Modules | |
Conservation Law Equations | |
Conservation law equations. | |
Electromagnetics | |
Electromagnetic equations. | |
Finite Element Mesh | |
Mesh management classes | |
Fluid Dynamics | |
Fluid Dynamics equations. | |
General Purpose Equations | |
Gathers equation related classes. | |
Global Variables | |
All global variables in the library. | |
Heat Transfer | |
Heat Transfer equations. | |
Input/Output | |
Input/Output utility classes. | |
Interface Problems | |
Interface problems, including image processing. | |
Laplace equation | |
Laplace and Poisson equations. | |
Physical properties of media | |
Physical properties of materials and media. | |
Porous Media problems | |
Porous Media equation classes. | |
Shape Function | |
Shape function classes. | |
Solid Mechanics | |
Solid Mechanics finite element equations. | |
Solver | |
Solver functions and classes. | |
Utilities | |
Utility functions and classes. | |
Vector and Matrix | |
Vector and matrix classes. | |
Files | |
file | AbsEqua.h |
Definition file for abstract class AbsEqua. | |
file | ICPG1D.h |
Definition file for class ICPG1D. | |
file | ICPG2DT.h |
Definition file for class ICPG2DT. | |
file | ICPG3DT.h |
Definition file for class ICPG3DT. | |
file | LCL1D.h |
Definition file for class LCL1D. | |
file | LCL2DT.h |
Definition file for class LCL2DT. | |
file | LCL3DT.h |
Definition file for class LCL3DT. | |
file | Muscl.h |
Definition file for class Muscl. | |
file | Muscl1D.h |
Definition file for class Muscl1D. | |
file | Muscl2DT.h |
Definition file for class Muscl2DT. | |
file | Muscl3DT.h |
Definition file for class Muscl3DT. | |
file | BiotSavart.h |
Definition file for class BiotSavart. | |
file | EC2D1T3.h |
Definition file for class EC2D1T3. | |
file | Equa_Electromagnetics.h |
Definition file for class FE_Electromagnetics. | |
file | HelmholtzBT3.h |
Definition file for class HelmholtzBT3. | |
file | Equation.h |
Definition file for class Equation. | |
file | Equa_Fluid.h |
Definition file for class Equa_Fluid. | |
file | NSP2DQ41.h |
Definition file for class NSP2DQ41. | |
file | TINS2DT3B.h |
Definition file for class TINS2DT3B. | |
file | Equa_Laplace.h |
Definition file for class Equa_Laplace. | |
file | Laplace1DL2.h |
Definition file for class Laplace1DL2. | |
file | Laplace1DL3.h |
Definition file for class Laplace1DL3. | |
file | Laplace2DFVT.h |
Definition file for class Laplace. | |
file | Laplace2DMHRT0.h |
Definition file for class Laplace2DMHRT0. | |
file | Laplace2DT3.h |
Definition file for class Laplace2DT3. | |
file | Laplace3DT4.h |
Definition file for class Laplace3DT4. | |
file | SteklovPoincare2DBE.h |
Definition file for class SteklovPoincare2DBE. | |
file | Equa_Porous.h |
Definition file for class Equa_Porous. | |
file | WaterPorous2D.h |
Definition file for class WaterPorous2D. | |
file | Bar2DL2.h |
Definition file for class Bar2DL2. | |
file | Beam3DL2.h |
Definition file for class Beam3DL2. | |
file | Elas2DQ4.h |
Definition file for class Elas2DQ4. | |
file | Elas2DT3.h |
Definition file for class Elas2DT3. | |
file | Elas3DH8.h |
Definition file for class Elas3DH8. | |
file | Elas3DT4.h |
Definition file for class Elas3DT4. | |
file | Equa_Solid.h |
Definition file for class Equa_Solid. | |
file | DC1DL2.h |
Definition file for class DC1DL2. | |
file | DC2DT3.h |
Definition file for class DC2DT3. | |
file | DC2DT6.h |
Definition file for class DC2DT6. | |
file | DC3DAT3.h |
Definition file for class DC3DAT3. | |
file | DC3DT4.h |
Definition file for class DC3DT4. | |
file | Equa_Therm.h |
Definition file for class Equa_Therm. | |
file | PhaseChange.h |
Definition file for class PhaseChange and its parent abstract class. | |
file | Funct.h |
Definition file for class Funct. | |
file | IOField.h |
Definition file for class IOField. | |
file | IPF.h |
Definition file for class IPF. | |
file | output.h |
File that contains some output utility functions. | |
file | Prescription.h |
Definition file for class Prescription. | |
file | saveField.h |
Prototypes for functions to save mesh in various file formats. | |
file | saveField.h |
Prototypes for functions to save mesh in various file formats. | |
file | Tabulation.h |
Definition file for class Tabulation. | |
file | UserData.h |
Definition file for abstract class UserData. | |
file | BMatrix.h |
Definition file for class BMatrix. | |
file | DMatrix.h |
Definition file for class DMatrix. | |
file | DSMatrix.h |
Definition file for abstract class DSMatrix. | |
file | LocalMatrix.h |
Definition file for class LocalMatrix. | |
file | LocalVect.h |
Definition file for class LocalVect. | |
file | Matrix.h |
Definition file for abstract class Matrix. | |
file | PETScMatrix.h |
Definition file for class PETScMatrix. | |
file | Point.h |
Definition file and implementation for class Point. | |
file | Point2D.h |
Definition file for class Point2D. | |
file | SkMatrix.h |
Definition file for class SkMatrix. | |
file | SkSMatrix.h |
Definition file for class SkSMatrix. | |
file | SpMatrix.h |
Definition file for class SpMatrix. | |
file | TrMatrix.h |
Definition file for class TrMatrix. | |
file | Domain.h |
Definition file for class Domain. | |
file | Edge.h |
Definition file for class Edge. | |
file | Element.h |
Definition file for class Element. | |
file | Figure.h |
Definition file for figure classes. | |
file | getMesh.h |
Definition file for mesh conversion functions. | |
file | Grid.h |
Definition file for class Grid. | |
file | Material.h |
Definition file for class Material. | |
file | Mesh.h |
Definition file for class Mesh. | |
file | MeshExtract.h |
Definition file for classes for extracting submeshes. | |
file | MeshUtil.h |
Definitions of utility functions for meshes. | |
file | Node.h |
Definition file for class Node. | |
file | saveMesh.h |
Prototypes for functions to save mesh in various file formats. | |
file | Side.h |
Definition file for class Side. | |
file | FEShape.h |
Definition file for class FEShape. | |
file | Hexa8.h |
Definition file for class Hexa8. | |
file | Line2.h |
Definition file for class Line2. | |
file | Line2H.h |
Definition file for class Line2H. | |
file | Line3.h |
Definition file for class Line3. | |
file | Penta6.h |
Definition file for class Penta6. | |
file | Quad4.h |
Definition file for class Quad4. | |
file | Tetra4.h |
Definition file for class Tetra4. | |
file | Triang3.h |
Definition file for class Triang3. | |
file | Triang6S.h |
Definition file for class Triang6S. | |
file | BiCG.h |
Solves an unsymmetric linear system of equations using the BiConjugate Gradient method. | |
file | BSpline.h |
Function to perform a B-spline interpolation. | |
file | CG.h |
Functions to solve a symmetric positive definite linear system of equations using the Conjugate Gradient method. | |
file | CGS.h |
Solves an unsymmetric linear system of equations using the Conjugate Gradient Squared method. | |
file | EigenProblemSolver.h |
Definition file for class EigenProblemSolver. | |
file | GMRes.h |
Function to solve a linear system of equations using the Generalized Minimum Residual method. | |
file | GS.h |
Function to solve a linear system of equations using the Gauss-Seidel method. | |
file | Jacobi.h |
Function to solve a linear system of equations using the Jacobi method. | |
file | MyOpt.h |
Definition file for abstract class MyOpt. | |
file | ODESolver.h |
Definition file for class ODESolver. | |
file | Prec.h |
Definition file for preconditioning classes. | |
file | Richardson.h |
Function to solve a linear system of equations using the Richardson method. | |
file | SSOR.h |
Function to solve a linear system of equations using the Symmetric Successive Over Relaxation method. | |
file | TimeStepping.h |
Definition file for class TimeStepping. | |
file | constants.h |
File that contains some widely used constants. | |
file | Gauss.h |
Definition file for struct Gauss. | |
file | qksort.h |
File that contains template quick sorting function. | |
file | Timer.h |
Definition file for class Timer. | |
file | util.h |
File that contains various utility functions. | |
Classes | |
class | SkMatrix< T_ > |
To handle square matrices in skyline storage format. More... | |
class | SkSMatrix< T_ > |
To handle symmetric matrices in skyline storage format. More... | |
class | SpMatrix< T_ > |
To handle matrices in sparse storage format. More... | |
class | AbsEqua< T_ > |
Mother abstract class to describe equation. More... | |
class | LocalVect< T_, N_ > |
Handles small size vectors like element vectors. More... | |
class | ICPG1D |
Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 1-D. More... | |
class | ICPG2DT |
Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 2-D. More... | |
class | ICPG3DT |
Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 3-D. More... | |
class | LCL1D |
Class to solve the linear conservation law (Hyperbolic equation) in 1-D by a MUSCL Finite Volume scheme. More... | |
class | LCL2DT |
Class to solve the linear hyperbolic equation in 2-D by a MUSCL Finite Volume scheme on triangles. More... | |
class | LCL3DT |
Class to solve the linear conservation law equation in 3-D by a MUSCL Finite Volume scheme on tetrahedra. More... | |
class | Muscl |
Parent class for hyperbolic solvers with Muscl scheme. More... | |
class | Vect< T_ > |
To handle general purpose vectors. More... | |
class | Muscl1D |
Class for 1-D hyperbolic solvers with Muscl scheme. More... | |
class | Muscl2DT |
Class for 2-D hyperbolic solvers with Muscl scheme. More... | |
class | Muscl3DT |
Class for 3-D hyperbolic solvers with Muscl scheme using tetrahedra. More... | |
class | BiotSavart |
Class to compute the magnetic induction from the current density using the Biot-Savart formula. More... | |
class | EC2D1T3 |
Eddy current problems in 2-D domains using solenoidal approximation. More... | |
class | Equa_Electromagnetics< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for Electromagnetics Equation classes. More... | |
class | HelmholtzBT3 |
Builds finite element arrays for Helmholtz equations in a bounded media using 3-Node triangles. More... | |
class | Equation< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for all equation classes. More... | |
class | Equa_Fluid< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for Fluid Dynamics Equation classes. More... | |
class | NSP2DQ41 |
Builds finite element arrays for incompressible Navier-Stokes equations in 2-D domains using Q1/P0 element and a penaly formulation for the incompressibility condition. More... | |
class | TINS2DT3B |
Builds finite element arrays for thermal diffusion and convection in 2-D domains using 3-Node triangles. More... | |
class | FastMarching2D |
To run a Fast Marching Method on 2-D structured uniform grids. More... | |
class | FMM2D |
class for the fast marching 2-D algorithm More... | |
class | FMM3D |
class for the 3-D fast marching algorithm More... | |
class | FMMSolver |
The Fast Marching Method solver. More... | |
class | Equa_Laplace< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for classes about the Laplace equation. More... | |
class | Laplace1DL2 |
To build element equation for a 1-D elliptic equation using the 2-Node line element (P1 ). More... | |
class | Laplace1DL3 |
To build element equation for the 1-D elliptic equation using the 3-Node line (P2 ). More... | |
class | Laplace2DFVT |
To build and solve the Laplace equation using a standard Finite Volume method. More... | |
class | Laplace2DMHRT0 |
To build element equation for the 2-D elliptic equation using the Mixed Hybrid finite element at lowest degree (Raviart-Thomas RT0 ). More... | |
class | Laplace2DT3 |
To build element equation for the Laplace equation using the 2-D triangle element (P1 ). More... | |
class | SteklovPoincare2DBE |
Solver of the Steklov Poincare problem in 2-D geometries using piecewie constant boundary elemen. More... | |
class | Equa_Porous< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for Porous Media Finite Element classes. More... | |
class | WaterPorous2D |
To solve water flow equations in porous media (2-D) More... | |
class | Bar2DL2 |
To build element equations for Planar Elastic Bar element with 2 DOF (Degrees of Freedom) per node. More... | |
class | Beam3DL2 |
To build element equations for 3-D beam equations using 2-node lines. More... | |
class | Elas2DQ4 |
To build element equations for 2-D linearized elasticity using 4-node quadrilaterals. More... | |
class | Elas2DT3 |
To build element equations for 2-D linearized elasticity using 3-node triangles. More... | |
class | Elas3DH8 |
To build element equations for 3-D linearized elasticity using 8-node hexahedra. More... | |
class | Elas3DT4 |
To build element equations for 3-D linearized elasticity using 4-node tetrahedra. More... | |
class | Equa_Solid< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for Solid Mechanics Finite Element classes. More... | |
class | DC1DL2 |
Builds finite element arrays for thermal diffusion and convection in 1-D using 2-Node elements. More... | |
class | DC2DT3 |
Builds finite element arrays for thermal diffusion and convection in 2-D domains using 3-Node triangles. More... | |
class | DC2DT6 |
Builds finite element arrays for thermal diffusion and convection in 2-D domains using 6-Node triangles. More... | |
class | DC3DAT3 |
Builds finite element arrays for thermal diffusion and convection in 3-D domains with axisymmetry using 3-Node triangles. More... | |
class | DC3DT4 |
Builds finite element arrays for thermal diffusion and convection in 3-D domains using 4-Node tetrahedra. More... | |
class | Equa_Therm< T_, NEN_, NEE_, NSN_, NSE_ > |
Abstract class for Heat transfer Finite Element classes. More... | |
class | PhaseChange |
This class enables defining phase change laws for a given material. More... | |
class | Funct |
A simple class to parse real valued functions. More... | |
class | IOField |
Enables working with files in the XML Format. More... | |
class | IPF |
To read project parameters from a file in IPF format. More... | |
class | Prescription |
To prescribe various types of data by an algebraic expression. Data may consist in boundary conditions, forces, tractions, fluxes, initial condition. All these data types can be defined through an enumerated variable. More... | |
class | Tabulation |
To read and manipulate tabulated functions. More... | |
class | UserData< T_ > |
Abstract class to define by user various problem data. More... | |
class | BMatrix< T_ > |
To handle band matrices. More... | |
class | DMatrix< T_ > |
To handle dense matrices. More... | |
class | DSMatrix< T_ > |
To handle symmetric dense matrices. More... | |
class | LocalMatrix< T_, NR_, NC_ > |
Handles small size matrices like element matrices, with a priori known size. More... | |
class | Matrix< T_ > |
Virtual class to handle matrices for all storage formats. More... | |
class | PETScVect< T_ > |
To handle general purpose vectors using Petsc. More... | |
class | PETScMatrix< T_ > |
To handle matrices in sparse storage format using the Petsc library. More... | |
class | PETScWrapper< T_ > |
This class is a wrapper to be used when the library Petsc is installed and used with OFELI. More... | |
class | Point< T_ > |
Defines a point with arbitrary type coordinates. More... | |
class | Point2D< T_ > |
Defines a 2-D point with arbitrary type coordinates. More... | |
class | Prec< T_ > |
To set a preconditioner. More... | |
class | TrMatrix< T_ > |
To handle tridiagonal matrices. More... | |
class | Domain |
To store and treat finite element geometric information. More... | |
class | Edge |
To describe an edge. More... | |
class | Element |
To store and treat finite element geometric information. More... | |
class | Figure |
To store and treat a figure (or shape) information. More... | |
class | Rectangle |
To store and treat a rectangular figure. More... | |
class | Brick |
To store and treat a brick (parallelepiped) figure. More... | |
class | Circle |
To store and treat a circular figure. More... | |
class | Sphere |
To store and treat a sphere. More... | |
class | Ellipse |
To store and treat an ellipsoidal figure. More... | |
class | Triangle |
To store and treat a triangle. More... | |
class | Polygon |
To store and treat a polygonal figure. More... | |
class | Grid |
To manipulate structured grids. More... | |
class | Material |
To treat material data. This class enables reading material data in material data files. It also returns these informations by means of its members. More... | |
class | Mesh |
To store and manipulate finite element meshes. More... | |
class | NodeList |
Class to construct a list of nodes having some common properties. More... | |
class | ElementList |
Class to construct a list of elements having some common properties. More... | |
class | SideList |
Class to construct a list of sides having some common properties. More... | |
class | EdgeList |
Class to construct a list of edges having some common properties. More... | |
class | Node |
To describe a node. More... | |
class | Partition |
To partition a finite element mesh into balanced submeshes. More... | |
class | Side |
To store and treat finite element sides (edges in 2-D or faces in 3-D) More... | |
class | FEShape |
Parent class from which inherit all finite element shape classes. More... | |
class | triangle |
Defines a triangle. The reference element is the rectangle triangle with two unit edges. More... | |
class | Hexa8 |
Defines a three-dimensional 8-node hexahedral finite element using Q1-isoparametric interpolation. More... | |
class | Line2 |
To describe a 2-Node planar line finite element. More... | |
class | Line2H |
To describe a 2-Node Hermite planar line finite element. More... | |
class | Line3 |
To describe a 3-Node quadratic planar line finite element. More... | |
class | Penta6 |
Defines a 6-node pentahedral finite element using P1 interpolation in local coordinates (s.x,s.y) and Q1 isoparametric interpolation in local coordinates (s.x,s.z) and (s.y,s.z) . More... | |
class | Quad4 |
Defines a 4-node quadrilateral finite element using Q1 isoparametric interpolation. More... | |
class | Tetra4 |
Defines a three-dimensional 4-node tetrahedral finite element using P1 interpolation. More... | |
class | Triang3 |
Defines a 3-Node (P1 ) triangle. More... | |
class | Triang6S |
Defines a 6-Node straight triangular finite element using P2 interpolation. More... | |
class | EigenProblemSolver |
Class to find eigenvalues and corresponding eigenvectors of a given matrix in a generalized eigenproblem, i.e. Find scalars l and non-null vectors v such that [K]{v} = l[M]{v} where [K] and [M] are symmetric matrices. The eigenproblem can be originated from a PDE. For this, we will refer to the matrices K and M as Stiffness and Mass matrices respectively. More... | |
class | Iter< T_ > |
Class to drive an iterative process. More... | |
class | LinearSolver< T_ > |
Class to solve systems of linear equations by iterative methods. More... | |
class | MyOpt |
Abstract class to define by user specified optimization function. More... | |
class | ODESolver |
To solve a system of ordinary differential equations. More... | |
class | TimeStepping |
To solve time stepping problems, i.e. systems of linear ordinary differential equations of the form [A2]{y"} + [A1]{y'} + [A0]{y} = {b}. More... | |
class | Gauss |
Calculate data for Gauss integration. More... | |
class | Timer |
To handle elapsed time counting. More... | |
Enumerations |
Functions | |
T_ * | A () |
Return element matrix. More... | |
T_ * | b () |
Return element right-hand side. More... | |
T_ * | Prev () |
Return element previous vector. More... | |
IOField () | |
Default constructor. | |
IOField (const string &file, AccessType access, bool compact=true) | |
Constructor using file name. More... | |
IOField (const string &mesh_file, const string &file, Mesh &ms, AccessType access, bool compact=true) | |
Constructor using file name, mesh file and mesh. More... | |
IOField (const string &file, Mesh &ms, AccessType access, bool compact=true) | |
Constructor using file name and mesh. More... | |
IOField (const string &file, AccessType access, const string &name) | |
Constructor using file name and field name. More... | |
~IOField () | |
Destructor. | |
void | setMeshFile (const string &file) |
Set mesh file. More... | |
void | open () |
Open file. More... | |
void | open (const string &file, AccessType access) |
Open file. More... | |
void | close () |
Close file. | |
void | put (Mesh &ms) |
Store mesh in file. | |
void | put (const Vect< real_t > &v) |
Store Vect instance v in file. More... | |
void | put (const PETScVect< real_t > &v) |
Store PETScVect instance v in file. More... | |
real_t | get (Vect< real_t > &v) |
Get Vect v instance from file. More... | |
int | get (Vect< real_t > &v, const string &name) |
Get Vect v instance from file if the field has the given name. More... | |
int | get (DMatrix< real_t > &A, const string &name) |
Get DMatrix A instance from file if the field has the given name. More... | |
int | get (DSMatrix< real_t > &A, const string &name) |
Get DSMatrix A instance from file if the field has the given name. More... | |
int | get (Vect< real_t > &v, real_t t) |
Get Vect v instance from file corresponding to a specific time value. More... | |
void | saveGMSH (string output_file, string mesh_file) |
Save field vectors in a file using GMSH format. More... | |
Tabulation () | |
Default constructor. | |
Tabulation (string file) | |
Constructor using file name. | |
~Tabulation () | |
Destructor. | |
void | setFile (string file) |
Set file name. More... | |
real_t | getValue (string funct, real_t v) |
Return the calculated value of the function. More... | |
real_t | getDerivative (string funct, real_t v) |
Return the derivative of the function at a given point. More... | |
real_t | getValue (string funct, real_t v1, real_t v2) |
Return the calculated value of the function. More... | |
real_t | getValue (string funct, real_t v1, real_t v2, real_t v3) |
Return the calculated value of the function. More... | |
Point< double > | CrossProduct (const Point< double > &lp, const Point< double > &rp) |
Return Cross product of two vectors lp and rp | |
Grid () | |
Construct a default grid with 10 intervals in each direction. | |
Grid (real_t xm, real_t xM, size_t npx) | |
Construct a 1-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (real_t xm, real_t xM, real_t ym, real_t yM, size_t npx, size_t npy) | |
Construct a 2-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (Point< real_t > m, Point< real_t > M, size_t npx, size_t npy) | |
Construct a 2-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (real_t xm, real_t xM, real_t ym, real_t yM, real_t zm, real_t zM, size_t npx, size_t npy, size_t npz) | |
Construct a 3-D structured grid given its extremal coordinates and number of intervals. More... | |
Grid (Point< real_t > m, Point< real_t > M, size_t npx, size_t npy, size_t npz) | |
Construct a 3-D structured grid given its extremal coordinates and number of intervals. More... | |
void | setXMin (const Point< real_t > &x) |
Set min. coordinates of the domain. More... | |
void | setXMax (const Point< real_t > &x) |
void | setDomain (real_t xmin, real_t xmax) |
Set Dimensions of the domain: 1-D case. More... | |
void | setDomain (real_t xmin, real_t xmax, real_t ymin, real_t ymax) |
Set Dimensions of the domain: 2-D case. More... | |
void | setDomain (real_t xmin, real_t xmax, real_t ymin, real_t ymax, real_t zmin, real_t zmax) |
Set Dimensions of the domain: 3-D case. More... | |
void | setDomain (Point< real_t > xmin, Point< real_t > xmax) |
Set Dimensions of the domain: 3-D case. More... | |
const Point< real_t > & | getXMin () const |
Return min. Coordinates of the domain. | |
const Point< real_t > & | getXMax () const |
Return max. Coordinates of the domain. | |
void | setN (size_t nx, size_t ny=0, size_t nz=0) |
Set number of grid intervals in the x , y and z -directions. More... | |
size_t | getNx () const |
Return number of grid intervals in the x -direction. | |
size_t | getNy () const |
Return number of grid intervals in the y -direction. More... | |
size_t | getNz () const |
Return number of grid intervals in the z-direction. More... | |
real_t | getHx () const |
Return grid size in the x-direction. | |
real_t | getHy () const |
Return grid size in the y-direction. | |
real_t | getHz () const |
Return grid size in the z-direction. | |
Point< real_t > | getCoord (size_t i) const |
Return coordinates a point with label i in a 1-D grid. | |
Point< real_t > | getCoord (size_t i, size_t j) const |
Return coordinates a point with label (i,j) in a 2-D grid. | |
Point< real_t > | getCoord (size_t i, size_t j, size_t k) const |
Return coordinates a point with label (i,j,k) in a 3-D grid. | |
real_t | getX (size_t i) const |
Return x-coordinate of point with index i | |
real_t | getY (size_t j) const |
Return y-coordinate of point with index j | |
real_t | getZ (size_t k) const |
Return z-coordinate of point with index k | |
Point2D< real_t > | getXY (size_t i, size_t j) const |
Return coordinates of point with indices (i,j) | |
Point< real_t > | getXYZ (size_t i, size_t j, size_t k) const |
Return coordinates of point with indices (i,j,k) | |
real_t | getCenter (size_t i) const |
Return coordinates of center of a 1-D cell with indices i , i+1 | |
Point< real_t > | getCenter (size_t i, size_t j) const |
Return coordinates of center of a 2-D cell with indices (i,j) , (i+1,j) , (i+1,j+1) , (i,j+1) | |
Point< real_t > | getCenter (size_t i, size_t j, size_t k) const |
Return coordinates of center of a 3-D cell with indices (i,j,k) , (i+1,j,k) , (i+1,j+1,k) , (i,j+1,k) , (i,j,k+1) , (i+1,j,k+1) , (i+1,j+1,k+1) , (i,j+1,k+1) | |
void | setCode (string exp, int code) |
Set a code for some grid points. More... | |
void | setCode (int side, int code) |
Set a code for grid points on sides. More... | |
int | getCode (int side) const |
Return code for a side number. More... | |
int | getCode (size_t i, size_t j) const |
Return code for a grid point. More... | |
int | getCode (size_t i, size_t j, size_t k) const |
Return code for a grid point. More... | |
size_t | getDim () const |
Return space dimension. | |
void | Deactivate (size_t i) |
Change state of a cell from active to inactive (1-D grid) More... | |
void | Deactivate (size_t i, size_t j) |
Change state of a cell from active to inactive (2-D grid) More... | |
void | Deactivate (size_t i, size_t j, size_t k) |
Change state of a cell from active to inactive (2-D grid) More... | |
int | isActive (size_t i) const |
Say if cell is active or not (1-D grid) More... | |
int | isActive (size_t i, size_t j) const |
Say if cell is active or not (2-D grid) More... | |
int | isActive (size_t i, size_t j, size_t k) const |
Say if cell is active or not (3-D grid) More... | |
ostream & | operator<< (ostream &s, const Grid &g) |
Output grid data. | |
BMatrix () | |
Default constructor. More... | |
BMatrix (size_t size, int ld, int ud) | |
Constructor that for a band matrix with given size and bandwidth. More... | |
BMatrix (const BMatrix &m) | |
Copy Constructor. | |
void | setSize (size_t size, int ld, int ud) |
Set size (number of rows) and storage of matrix. More... | |
void | MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and add result to y | |
void | MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add result to y | |
void | Mult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and save result in y | |
void | TMult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply transpose of matrix by vector x and save result in y | |
void | Axpy (T_ a, const BMatrix< T_ > &x) |
Add to matrix the product of a matrix by a scalar. More... | |
void | Axpy (T_ a, const Matrix< T_ > *x) |
Add to matrix the product of a matrix by a scalar. More... | |
void | set (size_t i, size_t j, const T_ &val) |
Add constant val to an entry (i,j) of the matrix. | |
void | add (size_t i, size_t j, const T_ &val) |
Add constant val value to an entry (i,j) of the matrix. | |
T_ | operator() (size_t i, size_t j) const |
Operator () (Constant version). More... | |
T_ & | operator() (size_t i, size_t j) |
Operator () (Non constant version). More... | |
BMatrix< T_ > & | operator= (const BMatrix< T_ > &m) |
Operator =. More... | |
BMatrix< T_ > & | operator= (const T_ &x) |
Operator = Assign matrix to identity times x . | |
BMatrix< T_ > & | operator*= (const T_ &x) |
Operator *=. More... | |
BMatrix< T_ > & | operator+= (const T_ &x) |
Operator +=. More... | |
int | setLU () |
Factorize the matrix (LU factorization) More... | |
int | solve (Vect< T_ > &b) |
Solve linear system. More... | |
int | solve (const Vect< T_ > &b, Vect< T_ > &x) |
Solve linear system. More... | |
T_ | get (size_t i, size_t j) const |
Return entry (i,j) of matrix. | |
DSMatrix () | |
Default constructor. | |
DSMatrix (size_t dim) | |
Constructor that for a symmetric matrix with given number of r‡qows. More... | |
DSMatrix (const DSMatrix< T_ > &m) | |
Copy Constructor. More... | |
void | setDiag () |
Store diagonal entries in a separate internal vector. | |
void | setSize (size_t dim) |
Set size (number of rows) of matrix. More... | |
void | set (size_t i, size_t j, const T_ &val) |
Assign constant to entry (i,j) of the matrix. More... | |
void | setDiag (const T_ &a) |
Set matrix as diagonal and assign its diagonal entries as a constant. More... | |
void | setDiag (const vector< T_ > &d) |
Set matrix as diagonal and assign its diagonal entries. More... | |
void | add (size_t i, size_t j, const T_ &val) |
Add constant to an entry ofthe matrix. More... | |
T_ | operator() (size_t i, size_t j) const |
Operator () (Constant version). More... | |
T_ & | operator() (size_t i, size_t j) |
Operator () (Non constant version). More... | |
DSMatrix< T_ > & | operator= (const DSMatrix< T_ > &m) |
Operator = Copy matrix m to current matrix instance. | |
DSMatrix< T_ > & | operator= (const T_ &x) |
Operator = Assign matrix to identity times x . | |
int | setLDLt () |
Factorize matrix (LDLT ) More... | |
void | getColumn (size_t j, Vect< T_ > &v) const |
Get j -th column vector. More... | |
Vect< T_ > | getColumn (size_t j) const |
Get j -th column vector. More... | |
void | setColumn (size_t i, const Vect< T_ > &v) |
Copy a given vector to a prescribed column in the matrix. More... | |
void | getRow (size_t i, Vect< T_ > &v) const |
Get i -th row vector. More... | |
Vect< T_ > | getRow (size_t i) const |
Get i -th row vector. More... | |
void | setRow (size_t i, const Vect< T_ > &v) |
Copy a given vector to a prescribed row in the matrix. More... | |
void | MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add result to y . | |
void | MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add to y . More... | |
void | Mult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and save result in y . | |
void | TMult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply transpose of matrix by vector x and add result in y . More... | |
int | solve (Vect< T_ > &b) |
Solve linear system. More... | |
int | solve (const Vect< T_ > &b, Vect< T_ > &x) |
Solve linear system. More... | |
T_ | get (size_t i, size_t j) const |
Return entry (i,j) of matrix. | |
void | Axpy (T_ a, const DSMatrix< T_ > &m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | Axpy (T_ a, const Matrix< T_ > *m) |
Add to matrix the product of a matrix by a scalar. More... | |
LocalMatrix () | |
Default constructor. More... | |
LocalMatrix (const LocalMatrix< T_, NR_, NC_ > &m) | |
Copy constructor. | |
LocalMatrix (Element *el, const SpMatrix< T_ > &a) | |
Constructor of a local matrix associated to element from a SpMatrix. More... | |
LocalMatrix (Element *el, const SkMatrix< T_ > &a) | |
Constructor of a local matrix associated to element from a SkMatrix. More... | |
LocalMatrix (Element *el, const SkSMatrix< T_ > &a) | |
Constructor of a local matrix associated to element from a SkSMatrix. More... | |
void | Localize (Element *el, const SpMatrix< T_ > &a) |
Initialize matrix as element matrix from global SpMatrix. More... | |
void | Localize (Element *el, const SkMatrix< T_ > &a) |
Initialize matrix as element matrix from global SkMatrix. More... | |
void | Localize (Element *el, const SkSMatrix< T_ > &a) |
Initialize matrix as element matrix from global SkSMatrix. More... | |
LocalMatrix< T_, NR_, NC_ > & | operator= (const LocalMatrix< T_, NR_, NC_ > &m) |
Operator = More... | |
LocalMatrix< T_, NR_, NC_ > & | operator= (const T_ &x) |
Operator = More... | |
LocalMatrix< T_, NR_, NC_ > & | operator+= (const LocalMatrix< T_, NR_, NC_ > &m) |
Operator += More... | |
LocalMatrix< T_, NR_, NC_ > & | operator-= (const LocalMatrix< T_, NR_, NC_ > &m) |
Operator -= More... | |
LocalVect< T_, NR_ > | operator* (LocalVect< T_, NC_ > &x) |
Operator * More... | |
LocalMatrix< T_, NR_, NC_ > & | operator+= (const T_ &x) |
Operator += More... | |
LocalMatrix< T_, NR_, NC_ > & | operator-= (const T_ &x) |
Operator -= More... | |
LocalMatrix< T_, NR_, NC_ > & | operator*= (const T_ &x) |
Operator *= More... | |
LocalMatrix< T_, NR_, NC_ > & | operator/= (const T_ &x) |
Operator /= More... | |
void | MultAdd (const LocalVect< T_, NC_ > &x, LocalVect< T_, NR_ > &y) |
Multiply matrix by vector and add result to vector. More... | |
void | MultAddScal (const T_ &a, const LocalVect< T_, NC_ > &x, LocalVect< T_, NR_ > &y) |
Multiply matrix by scaled vector and add result to vector. More... | |
void | Mult (const LocalVect< T_, NC_ > &x, LocalVect< T_, NR_ > &y) |
Multiply matrix by vector. More... | |
void | Symmetrize () |
Symmetrize matrix. More... | |
int | Factor () |
Factorize matrix. More... | |
int | Solve (LocalVect< T_, NR_ > &b) |
Forward and backsubstitute to solve a linear system. More... | |
int | FactorAndSolve (LocalVect< T_, NR_ > &b) |
Factorize matrix and solve linear system. More... | |
void | Invert (LocalMatrix< T_, NR_, NC_ > &A) |
Calculate inverse of matrix. More... | |
T_ | getInnerProduct (const LocalVect< T_, NC_ > &x, const LocalVect< T_, NR_ > &y) |
Calculate inner product witrh respect to matrix. More... | |
LocalVect () | |
Default constructor. | |
LocalVect (const T_ *a) | |
Constructor using a C-array. | |
LocalVect (const Element *el) | |
Constructor using Element pointer. | |
LocalVect (const Side *sd) | |
Constructor using Side pointer. | |
LocalVect (const LocalVect< T_, N_ > &v) | |
Copy constructor. | |
LocalVect (const Element *el, const Vect< T_ > &v, int opt=0) | |
Constructor of an element vector from a global Vect instance. More... | |
LocalVect (const Side *sd, const Vect< T_ > &v, int opt=0) | |
Constructor of a side vector from a global Vect instance. More... | |
void | getLocal (const Element &el, const Vect< T_ > &v, int type) |
Localize an element vector from a global Vect instance. More... | |
void | Localize (const Element *el, const Vect< T_ > &v, size_t k=0) |
Localize an element vector from a global Vect instance. More... | |
void | Localize (const Side *sd, const Vect< T_ > &v, size_t k=0) |
Localize a side vector from a global Vect instance. More... | |
LocalVect< T_, N_ > & | operator= (const LocalVect< T_, N_ > &v) |
Operator = More... | |
LocalVect< T_, N_ > & | operator= (const T_ &x) |
Operator = More... | |
LocalVect< T_, N_ > & | operator+= (const LocalVect< T_, N_ > &v) |
Operator += More... | |
LocalVect< T_, N_ > & | operator+= (const T_ &a) |
Operator += More... | |
LocalVect< T_, N_ > & | operator-= (const LocalVect< T_, N_ > &v) |
Operator -= More... | |
LocalVect< T_, N_ > & | operator-= (const T_ &a) |
Operator -= More... | |
LocalVect< T_, N_ > & | operator*= (const T_ &a) |
Operator *= More... | |
LocalVect< T_, N_ > & | operator/= (const T_ &a) |
Operator /= More... | |
T_ | operator, (const LocalVect< T_, N_ > &v) const |
Return Dot (scalar) product of two vectors. More... | |
SkSMatrix () | |
Default constructor. More... | |
SkSMatrix (size_t size, int is_diagonal=false) | |
Constructor that initializes a dense symmetric matrix. More... | |
SkSMatrix (Mesh &mesh, size_t dof=0, int is_diagonal=false) | |
Constructor using mesh to initialize skyline structure of matrix. More... | |
SkSMatrix (const Vect< size_t > &ColHt) | |
Constructor that initializes skyline structure of matrix using vector of column height. More... | |
SkSMatrix (const Vect< size_t > &I, const Vect< size_t > &J, int opt=1) | |
Constructor for a square matrix using non zero row and column indices. More... | |
SkSMatrix (const Vect< size_t > &I, const Vect< size_t > &J, const Vect< T_ > &a, int opt=1) | |
Constructor for a square matrix using non zero row and column indices. More... | |
SkSMatrix (const SkSMatrix< T_ > &m) | |
Copy Constructor. | |
void | setMesh (Mesh &mesh, size_t dof=0) |
Determine mesh graph and initialize matrix. More... | |
void | setSkyline (Mesh &mesh) |
Determine matrix structure. More... | |
void | setDiag () |
Store diagonal entries in a separate internal vector. | |
void | set (size_t i, size_t j, const T_ &val) |
Assign a value to an entry ofthe matrix. More... | |
void | MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and add to y . More... | |
void | MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add to y . More... | |
void | Mult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and save in y More... | |
void | TMult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply transpose of matrix by vector x and save in y. More... | |
void | add (size_t i, size_t j, const T_ &val) |
Add a constant to an entry of the matrix. More... | |
size_t | getColHeight (size_t i) const |
Return column height. More... | |
Vect< T_ > | getColumn (size_t j) const |
Get j -th column vector. | |
Vect< T_ > | getRow (size_t i) const |
Get i -th row vector. | |
T_ & | operator() (size_t i, size_t j) |
Operator () (Non constant version). More... | |
T_ | operator() (size_t i, size_t j) const |
Operator () (Constant version). More... | |
SkSMatrix< T_ > & | operator= (const SkSMatrix< T_ > &m) |
Operator =. More... | |
SkSMatrix< T_ > & | operator= (const T_ &x) |
Operator =. More... | |
SkSMatrix< T_ > & | operator+= (const SkSMatrix< T_ > &m) |
Operator +=. More... | |
SkSMatrix< T_ > & | operator*= (const T_ &x) |
Operator *=. More... | |
int | setLDLt () |
Factorize matrix (LDLt (Crout) factorization). More... | |
int | solve (Vect< T_ > &b) |
Solve linear system. More... | |
int | solve (const Vect< T_ > &b, Vect< T_ > &x) |
Solve linear system. More... | |
int | solveLDLt (const Vect< T_ > &b, Vect< T_ > &x) |
Solve a linear system using the LDLt (Crout) factorization. More... | |
T_ | get (size_t i, size_t j) const |
Return entry (i,j) of matrix if this one is stored, 0 else. | |
void | Axpy (T_ a, const SkSMatrix< T_ > &m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | Axpy (T_ a, const Matrix< T_ > *m) |
Add to matrix the product of a matrix by a scalar. More... | |
TrMatrix () | |
Default constructor. More... | |
TrMatrix (size_t size) | |
Constructor for a tridiagonal matrix with size rows. | |
TrMatrix (const TrMatrix &m) | |
Copy Constructor. | |
void | setSize (size_t size) |
Set size (number of rows) of matrix. More... | |
void | MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and add result to y . | |
void | MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector a*x and add result to y . | |
void | Mult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply matrix by vector x and save result in y . | |
void | TMult (const Vect< T_ > &x, Vect< T_ > &y) const |
Multiply transpose of matrix by vector x and save result in y . | |
void | Axpy (T_ a, const TrMatrix< T_ > &m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | Axpy (T_ a, const Matrix< T_ > *m) |
Add to matrix the product of a matrix by a scalar. More... | |
void | set (size_t i, size_t j, const T_ &val) |
Assign constant val to an entry (i,j) of the matrix. | |
void | add (size_t i, size_t j, const T_ &val) |
Add constant val value to an entry (i,j) of the matrix. | |
T_ | operator() (size_t i, size_t j) const |
Operator () (Constant version). More... | |
T_ & | operator() (size_t i, size_t j) |
Operator () (Non constant version). More... | |
TrMatrix< T_ > & | operator= (const TrMatrix< T_ > &m) |
Operator =. More... | |
TrMatrix< T_ > & | operator= (const T_ &x) |
Operator = Assign matrix to identity times x . | |
TrMatrix< T_ > & | operator*= (const T_ &x) |
Operator *=. More... | |
int | solve (Vect< T_ > &b) |
Solve a linear system with current matrix (forward and back substitution). More... | |
int | solve (const Vect< T_ > &b, Vect< T_ > &x) |
Solve a linear system with current matrix (forward and back substitution). More... | |
T_ | get (size_t i, size_t j) const |
Return entry (i,j) of matrix. | |
Iter () | |
Default Constructor. More... | |
Iter (int max_it, real_t toler, int verbose=0) | |
Constructor with iteration parameters. More... | |
bool | check (Vect< T_ > &u, const Vect< T_ > &v, int opt=2) |
Check convergence. More... | |
int | solve (Iteration s, Preconditioner p=DIAG_PREC) |
Solve equations using prescribed solver and preconditioner. More... | |
Detailed Description
Enumeration Type Documentation
enum PDE_Terms |
Enumerate variable that selects various terms in partial differential equations
enum EqDataType |
Enumerate variable that selects equation data type
enum ArrayType |
enum TimeScheme |
Selects time integration scheme
enum PDE |
Choose partial differential equation to `
enum FEType |
Choose Finite Element Type
enum AnalysisType |
enum MatrixType |
enum Iteration |
enum Preconditioner |
enum BCType |
Function Documentation
T_* OFELI::A | ( | ) |
Return element matrix.
Matrix is returned as a C-array
T_* OFELI::b | ( | ) |
Return element right-hand side.
Right-hand side is returned as a C-array
T_* OFELI::Prev | ( | ) |
Return element previous vector.
This is the vector given in time dependent constructor. It is returned as a C-array.
IOField | ( | const string & | file, |
AccessType | access, | ||
bool | compact = true |
||
) |
Constructor using file name.
- Parameters
-
[in] file File name. [in] access Access code. This number is to be chosen among two enumerated values: -
IOField::IN
to read the file -
IOField::OUT
to write on it
[in] compact Flag to choose a compact storage or not [Default: true
] -
IOField | ( | const string & | mesh_file, |
const string & | file, | ||
Mesh & | ms, | ||
AccessType | access, | ||
bool | compact = true |
||
) |
Constructor using file name, mesh file and mesh.
- Parameters
-
[in] mesh_file File containing mesh [in] file File that contains field stored or to store [in] ms Mesh instance [in] access Access code. This number is to be chosen among two enumerated values: -
IOField::IN
to read the file -
IOField::OUT
to write on it
[in] compact Flag to choose a compact storage or not [Default: true
] -
IOField | ( | const string & | file, |
Mesh & | ms, | ||
AccessType | access, | ||
bool | compact = true |
||
) |
Constructor using file name and mesh.
- Parameters
-
[in] file File that contains field stored or to store [in] ms Mesh instance [in] access Access code. This number is to be chosen among two enumerated values: -
IOField::IN
to read the file -
IOField::OUT
to write on it
[in] compact Flag to choose a compact storage or not [Default: true
] -
IOField | ( | const string & | file, |
AccessType | access, | ||
const string & | name | ||
) |
Constructor using file name and field name.
- Parameters
-
[in] file File that contains field stored or to store [in] access Access code. This number is to be chosen among two enumerated values: -
IOField::IN
to read the file -
IOField::OUT
to write on it
[in] name Seek a specific field with given name -
void setMeshFile | ( | const string & | file | ) |
Set mesh file.
- Parameters
-
[in] file Mesh file
void open | ( | ) |
Open file.
Case where file name has been previously given (in the constructor).
void open | ( | const string & | file, |
AccessType | access | ||
) |
Open file.
- Parameters
-
[in] file File name. [in] access Access code. This number is to be chosen among two enumerated values: -
IOField::IN
to read the file -
IOField::OUT
to write on it
-
Get Vect v
instance from file.
First time step is read from the XML
file.
Get Vect v
instance from file corresponding to a specific time value.
The sought vector corresponding to the time value is read from the XML
file.
- Parameters
-
[in,out] v Vector instance [in] t Time value
void saveGMSH | ( | string | output_file, |
string | mesh_file | ||
) |
Save field vectors in a file using GMSH format.
This member function enables avoiding the use of cfield
. It must be used once all field vectors have been stored in output file. It closes this file and copies its contents to a GMSH file.
- Parameters
-
[in] output_file Output file name where to store using GMSH format [in] mesh_file File containing mesh data
void setFile | ( | string | file | ) |
Set file name.
This function is to be used when the default constructor is invoked.
Return the calculated value of the function.
Case of a function of one variable
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v Value of the variable
- Returns
- Computed value of the function
Return the derivative of the function at a given point.
Case of a function of one variable
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v Value of the variable
- Returns
- Derivative value
Return the calculated value of the function.
Case of a function of two variables
- Parameters
-
[in] funct Name of the function to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable
- Returns
- Computed value of the function
Return the calculated value of the function.
Case of a function of three variables
- Parameters
-
[in] funct Name of the funct to be evaluated, as read from input file [in] v1 Value of the first variable [in] v2 Value of the second variable [in] v3 Value of the third variable
- Returns
- Computed value of the function
Construct a 1-D structured grid given its extremal coordinates and number of intervals.
- Parameters
-
[in] xm Minimal value for x
[in] xM Maximal value for x
[in] npx Number of grid intervals in the x
-direction
Construct a 2-D structured grid given its extremal coordinates and number of intervals.
- Parameters
-
[in] xm Minimal value for x
[in] xM Maximal value for x
[in] ym Minimal value for y
[in] yM Maximal value for y
[in] npx Number of grid intervals in the x
-direction[in] npy Number of grid intervals in the y
-direction
Construct a 2-D structured grid given its extremal coordinates and number of intervals.
- Parameters
-
[in] m Minimal coordinate value [in] M Maximal coordinate value [in] npx Number of grid intervals in the x
-direction[in] npy Number of grid intervals in the y
-direction
Grid | ( | real_t | xm, |
real_t | xM, | ||
real_t | ym, | ||
real_t | yM, | ||
real_t | zm, | ||
real_t | zM, | ||
size_t | npx, | ||
size_t | npy, | ||
size_t | npz | ||
) |
Construct a 3-D structured grid given its extremal coordinates and number of intervals.
- Parameters
-
[in] xm Minimal value for x
[in] xM Maximal value for x
[in] ym Minimal value for y
[in] yM Maximal value for y
[in] zm Minimal value for z
[in] zM Maximal value for z
[in] npx Number of grid intervals in the x
-direction[in] npy Number of grid intervals in the y
-direction[in] npz Number of grid intervals in the z
-direction
Construct a 3-D structured grid given its extremal coordinates and number of intervals.
- Parameters
-
[in] m Minimal coordinate value [in] M Maximal coordinate value [in] npx Number of grid intervals in the x
-direction[in] npy Number of grid intervals in the y
-direction[in] npz Number of grid intervals in the z
-direction
Set min. coordinates of the domain.
- Parameters
-
[in] x Minimal values of coordinates
Set max. coordinates of the domain.
- Parameters
-
[in] x Maximal values of coordinates
Set Dimensions of the domain: 1-D case.
- Parameters
-
[in] xmin Minimal value of x
-coordinate[in] xmax Maximal value of x
-coordinate
Set Dimensions of the domain: 2-D case.
- Parameters
-
[in] xmin Minimal value of x
-coordinate[in] xmax Maximal value of x
-coordinate[in] ymin Minimal value of y
-coordinate[in] ymax Maximal value of y
-coordinate
Set Dimensions of the domain: 3-D case.
- Parameters
-
[in] xmin Minimal value of x
-coordinate[in] xmax Maximal value of x
-coordinate[in] ymin Minimal value of y
-coordinate[in] ymax Maximal value of y
-coordinate[in] zmin Minimal value of z
-coordinate[in] zmax Maximal value of z
-coordinate
Set Dimensions of the domain: 3-D case.
- Parameters
-
[in] xmin Minimal coordinate value [in] xmax Maximal coordinate value
void setN | ( | size_t | nx, |
size_t | ny = 0 , |
||
size_t | nz = 0 |
||
) |
Set number of grid intervals in the x
, y
and z
-directions.
Number of points is the number of intervals plus one in each direction
- Parameters
-
[in] nx Number of grid intervals in the x
-direction[in] ny Number of grid intervals in the y
-direction (Default=0
: 1-D grid)[in] nz Number of grid intervals in the z
-direction (Default=0
: 1-D or 2-D grid)
- Remarks
- : The size of the grid (
xmin
andxmax
) must have been defined before.
size_t getNy | ( | ) | const |
Return number of grid intervals in the y
-direction.
ny=0
for 1-D domains (segments)
size_t getNz | ( | ) | const |
Return number of grid intervals in the z-direction.
nz=0
for 1-D (segments) and 2-D domains (rectangles)
void setCode | ( | string | exp, |
int | code | ||
) |
Set a code for some grid points.
- Parameters
-
[in] exp Regular expression that determines the set of grid points on which the code is applied. [in] code Code to assign.
void setCode | ( | int | side, |
int | code | ||
) |
Set a code for grid points on sides.
- Parameters
-
[in] side Side for which code is assigned. Possible values are: MIN_X
,MAX_X
,MIN_Y
,MAX_Y
,MIN_Z
,MAX_Z
[in] code Code to assign.
int getCode | ( | int | side | ) | const |
Return code for a side number.
- Parameters
-
[in] side Side for which code is returned. Possible values are: MIN_X
,MAX_X
,MIN_Y
,MAX_Y
,MIN_Z
,MAX_Z
int getCode | ( | size_t | i, |
size_t | j | ||
) | const |
Return code for a grid point.
- Parameters
-
[in] i i
-th index for node for which code is to be returned.[in] j j
-th index for node for which code is to be returned.
int getCode | ( | size_t | i, |
size_t | j, | ||
size_t | k | ||
) | const |
Return code for a grid point.
- Parameters
-
[in] i i
-th index for node for which code is to be returned.[in] j j
-th index for node for which code is to be returned.[in] k k
-th index for node for which code is to be returned.
void Deactivate | ( | size_t | i | ) |
Change state of a cell from active to inactive (1-D grid)
- Parameters
-
[in] i grid cell to remove
void Deactivate | ( | size_t | i, |
size_t | j | ||
) |
Change state of a cell from active to inactive (2-D grid)
- Parameters
-
[in] i i
-th index for grid cell to remove. If this value is0
, all cells(*,j)
are deactivated[in] j j
-th index for grid cell to remove If this value is0
, all cells(i,*)
are deactivated
- Remarks
- if
i
andj
have value0
all grid cells are deactivated !!
void Deactivate | ( | size_t | i, |
size_t | j, | ||
size_t | k | ||
) |
Change state of a cell from active to inactive (2-D grid)
- Parameters
-
[in] i i
-th index for grid cell to remove. If this value is0
, all cells(*,j,k)
are deactivated[in] j j
-th index for grid cell to remove If this value is0
, all cells(i,*,k)
are deactivated[in] k k
-th index for grid cell to remove If this value is0
, all cells(i,j,*)
are deactivated
int isActive | ( | size_t | i | ) | const |
Say if cell is active or not (1-D grid)
- Parameters
-
[in] i Index of cell
- Returns
1
if cell is active,0
if not
int isActive | ( | size_t | i, |
size_t | j | ||
) | const |
Say if cell is active or not (2-D grid)
- Parameters
-
[in] i i
-th index of cell[in] j j
-th index of cell
- Returns
1
if cell is active,0
if not
int isActive | ( | size_t | i, |
size_t | j, | ||
size_t | k | ||
) | const |
Say if cell is active or not (3-D grid)
- Parameters
-
[in] i i
-th index of cell[in] j j
-th index of cell[in] k k
-th index of cell
- Returns
1
if cell is active,0
if not
BMatrix | ( | ) |
Default constructor.
Initialize a zero dimension band matrix
BMatrix | ( | size_t | size, |
int | ld, | ||
int | ud | ||
) |
Constructor that for a band matrix with given size and bandwidth.
Assign 0 to all matrix entries.
- Parameters
-
[in] size Number of rows and columns [in] ld Number of lower co-diagonals (must be > 0) [in] ud Number of upper co-diagonals (must be > 0)
void setSize | ( | size_t | size, |
int | ld, | ||
int | ud | ||
) |
Set size (number of rows) and storage of matrix.
- Parameters
-
[in] size Number of rows and columns [in] ld Number of lower co-diagonals (must be > 0) [in] ud Number of upper co-diagonals (must be > 0)
void Axpy | ( | T_ | a, |
const BMatrix< T_ > & | x | ||
) |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] x Matrix by which a
is multiplied. The result is added to current instance
|
virtual |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] x Matrix by which a
is multiplied. The result is added to current instance
Implements Matrix< T_ >.
|
virtual |
Operator () (Constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
virtual |
Operator () (Non constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
BMatrix< T_ > & operator= | ( | const BMatrix< T_ > & | m | ) |
Operator =.
Copy matrix m
to current matrix instance.
BMatrix< T_ > & operator*= | ( | const T_ & | x | ) |
Operator *=.
Premultiply matrix entries by constant value x
BMatrix< T_ > & operator+= | ( | const T_ & | x | ) |
Operator +=.
Add constant x
to matrix entries.
int setLU | ( | ) |
Factorize the matrix (LU factorization)
LU factorization of the matrix is realized. Note that since this is an in place factorization, the contents of the matrix are modified.
- Returns
-
0
if factorization was normally performed, -
n
if then
-th pivot is null.
-
- Remarks
- A flag in this class indicates after factorization that this one has been realized, so that, if the member function solve is called after this no further factorization is done.
|
virtual |
Solve linear system.
The linear system having the current instance as a matrix is solved by using the LU decomposition. Solution is thus realized after a factorization step and a forward/backward substitution step. The factorization step is realized only if this was not already done.
Note that this function modifies the matrix contents is a factorization is performed. Naturally, if the the matrix has been modified after using this function, the user has to refactorize it using the function setLU. This is because the class has no non-expensive way to detect if the matrix has been modified. The function setLU realizes the factorization step only.
- Parameters
-
[in,out] b Vect instance that contains right-hand side on input and solution on output.
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Implements Matrix< T_ >.
Solve linear system.
The linear system having the current instance as a matrix is solved by using the LU decomposition. Solution is thus realized after a factorization step and a forward/backward substitution step. The factorization step is realized only if this was not already done.
Note that this function modifies the matrix contents is a factorization is performed. Naturally, if the the matrix has been modified after using this function, the user has to refactorize it using the function setLU. This is because the class has no non-expensive way to detect if the matrix has been modified. The function setLU realizes the factorization step only.
- Parameters
-
[in] b Vect instance that contains right-hand side. [out] x Vect instance that contains solution
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
DSMatrix | ( | size_t | dim | ) |
Constructor that for a symmetric matrix with given number of r‡qows.
- Parameters
-
[in] dim Number of rows
void setSize | ( | size_t | dim | ) |
Set size (number of rows) of matrix.
- Parameters
-
[in] dim Number of rows and columns.
|
virtual |
Assign constant to entry (i,j)
of the matrix.
- Parameters
-
[in] i row index [in] j column index [in] val value to assign to a(i,j)
Implements Matrix< T_ >.
void setDiag | ( | const T_ & | a | ) |
Set matrix as diagonal and assign its diagonal entries as a constant.
- Parameters
-
[in] a Value to assign to all diagonal entries
void setDiag | ( | const vector< T_ > & | d | ) |
Set matrix as diagonal and assign its diagonal entries.
- Parameters
-
[in] d Vector entries to assign to matrix diagonal entries
|
virtual |
Add constant to an entry ofthe matrix.
- Parameters
-
[in] i row index [in] j column index [in] val value to add to a(i,j)
Implements Matrix< T_ >.
|
virtual |
Operator ()
(Constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
virtual |
Operator ()
(Non constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
int setLDLt | ( | ) |
Factorize matrix (LDLT
)
- Returns
-
0
, if factorization was normally performed, -
n
, if then
-th pivot is null.
-
void getColumn | ( | size_t | j, |
Vect< T_ > & | v | ||
) | const |
Get j
-th column vector.
- Parameters
-
[in] j Index of column to extract [out] v Reference to Vect instance where the column is stored
- Remarks
- Vector v does not need to be sized before. It is resized in the function
Vect< T_ > getColumn | ( | size_t | j | ) | const |
Get j
-th column vector.
- Parameters
-
[in] j Index of column to extract
- Returns
- Vect instance where the column is stored
- Remarks
- Vector v does not need to be sized before. It is resized in the function
void setColumn | ( | size_t | i, |
const Vect< T_ > & | v | ||
) |
Copy a given vector to a prescribed column in the matrix.
- Parameters
-
[in] i column index to be assigned [in] v Vect instance to copy
void getRow | ( | size_t | i, |
Vect< T_ > & | v | ||
) | const |
Get i
-th row vector.
- Parameters
-
[in] i Index of row to extract [out] v Reference to Vect instance where the row is stored
- Remarks
- Vector v does not need to be sized before. It is resized in the function
Vect< T_ > getRow | ( | size_t | i | ) | const |
Get i
-th row vector.
- Parameters
-
[in] i Index of row to extract
- Returns
- Vect instance where the row is stored
- Remarks
- Vector v does not need to be sized before. It is resized in the function
void setRow | ( | size_t | i, |
const Vect< T_ > & | v | ||
) |
Copy a given vector to a prescribed row in the matrix.
- Parameters
-
[in] i row index to be assigned [in] v Vect instance to copy
Multiply matrix by vector a*x
and add to y
.
- Parameters
-
[in] a Constant to multiply by matrix [in] x Vector to multiply by matrix [in,out] y Vector to add to the result. y
contains on output the result.
Implements Matrix< T_ >.
Multiply transpose of matrix by vector x
and add result in y
.
- Parameters
-
[in] x Vector to add to y
[in,out] y on input, vector to add to. On output, result.
Implements Matrix< T_ >.
|
virtual |
Solve linear system.
The matrix is factorized using the LDLt (Crout) decomposition. If this one is already factorized, no further factorization is performed. If the matrix has been modified the user has to refactorize it using the function setLDLt.
- Parameters
-
[in,out] b Vect instance that contains right-hand side on input and solution on output.
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Implements Matrix< T_ >.
Solve linear system.
The matrix is factorized using the LDLt (Crout) decomposition. If this one is already factorized, no further factorization is performed. If the matrix has been modified the user has to refactorize it using the function setLDLt.
- Parameters
-
[in] b Vect instance that contains right-hand side. [out] x Vect instance that contains solution
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
void Axpy | ( | T_ | a, |
const DSMatrix< T_ > & | m | ||
) |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
|
virtual |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
Implements Matrix< T_ >.
LocalMatrix | ( | ) |
Default constructor.
Constructs a matrix with 0
rows and 0
columns
LocalMatrix< T_, NR_, NC_ > & operator= | ( | const LocalMatrix< T_, NR_, NC_ > & | m | ) |
Operator =
Copy instance m
into current instance.
LocalMatrix< T_, NR_, NC_ > & operator= | ( | const T_ & | x | ) |
Operator =
Assign matrix to identity times x
LocalMatrix< T_, NR_, NC_ > & operator+= | ( | const LocalMatrix< T_, NR_, NC_ > & | m | ) |
Operator +=
Add m
to current matrix.
LocalMatrix< T_, NR_, NC_ > & operator-= | ( | const LocalMatrix< T_, NR_, NC_ > & | m | ) |
Operator -=
Subtract m
from current matrix.
LocalVect< T_, NR_ > operator* | ( | LocalVect< T_, NC_ > & | x | ) |
Operator *
Return a Vect instance as product of current matrix by vector x
.
LocalMatrix< T_, NR_, NC_ > & operator+= | ( | const T_ & | x | ) |
Operator +=
Add constant x
to current matrix entries.
LocalMatrix< T_, NR_, NC_ > & operator-= | ( | const T_ & | x | ) |
Operator -=
Subtract x
from current matrix entries.
LocalMatrix< T_, NR_, NC_ > & operator*= | ( | const T_ & | x | ) |
Operator *=
Multiply matrix entries by constant x
.
LocalMatrix< T_, NR_, NC_ > & operator/= | ( | const T_ & | x | ) |
Operator /=
Divide by x
current matrix entries.
Multiply matrix by vector and add result to vector.
- Parameters
-
[in] x Vector to multiply matrix by. [out] y Resulting vector ( y += a * x
)
Multiply matrix by scaled vector and add result to vector.
- Parameters
-
[in] a Constant to premultiply by vector x
.[in] x (Scaled) vector to multiply matrix by. [out] y Resulting vector ( y += a * x
)
Multiply matrix by vector.
- Parameters
-
[in] x Vector to multiply matrix by. [out] y Resulting vector.
void Symmetrize | ( | ) |
Symmetrize matrix.
Fill upper triangle to form a symmetric matrix.
int Factor | ( | ) |
Factorize matrix.
Performs a LU factorization.
- Returns
-
0
: Factorization has ended normally, -
n
:n
-th pivot was zero.
-
int Solve | ( | LocalVect< T_, NR_ > & | b | ) |
Forward and backsubstitute to solve a linear system.
- Parameters
-
[in] b Right-hand side in input and solution vector in output.
- Returns
-
0
: Solution was performed normally. -
n
:n
-th pivot is zero.
-
- Note
- Matrix must have been factorized at first.
int FactorAndSolve | ( | LocalVect< T_, NR_ > & | b | ) |
Factorize matrix and solve linear system.
- Parameters
-
[in,out] b Right-hand side in input and solution vector in output.
- Returns
0
if solution was performed normally.n
ifn
-th pivot is zero. This function simply calls Factor() then Solve(b).
void Invert | ( | LocalMatrix< T_, NR_, NC_ > & | A | ) |
Calculate inverse of matrix.
- Parameters
-
[out] A Inverse of matrix
Calculate inner product witrh respect to matrix.
Returns the product xTAy
- Parameters
-
[in] x Left vector [in] y Right vector
- Returns
- Resulting product
Constructor of an element vector from a global Vect instance.
The constructed vector has local numbering of nodes
- Parameters
-
[in] el Pointer to Element to localize [in] v Global vector to localize [in] opt Option for DOF treatment - = 0, Normal case [Default]
- Any other value : only one DOF is handled (Local vector has as dimension number of degrees of freedom)
Constructor of a side vector from a global Vect instance.
The constructed vector has local numbering of nodes
- Parameters
-
[in] sd Pointer to Side to localize [in] v Global vector to localize [in] opt Option for DOF treatment - = 0, Normal case [Default]
- Any other value : only one DOF is handled (Local vector has as dimension number of degrees of freedom)
Localize an element vector from a global Vect instance.
The constructed vector has local numbering of nodes This function is called by the constructor: LocalVect(const Element *el, const Vect<T_> &v)
- Parameters
-
[in] el Pointer to Element to localize [in] v Global vector to localize [in] type Type of element. This is to be chosen among enumerated values: LINE2
,TRIANG3
,QUAD4
,TETRA4
,HEXA8
,PENTA6
Localize an element vector from a global Vect instance.
The constructed vector has local numbering of nodes This function is called by the constructor: LocalVect(const Element *el, const Vect<T_> &v)
- Parameters
-
[in] el Pointer to Side to localize [in] v Global vector to localize [in] k Degree of freedom to localize [Default: All degrees of freedom are stored]
Localize a side vector from a global Vect instance.
The constructed vector has local numbering of nodes This function is called by the constructor: LocalVect(const Side *sd, const Vect<T_> &v)
- Parameters
-
[in] sd Pointer to Side to localize [in] v Global vector to localize [in] k Degree of freedom to localize [Default: All degrees of freedom are stored]
LocalVect< T_, N_ > & operator= | ( | const LocalVect< T_, N_ > & | v | ) |
Operator =
Copy a LocalVect instance to the current one
LocalVect< T_, N_ > & operator= | ( | const T_ & | x | ) |
Operator =
Assign value x
to all vector entries
LocalVect< T_, N_ > & operator+= | ( | const LocalVect< T_, N_ > & | v | ) |
Operator +=
Add vector v
to this instance
LocalVect< T_, N_ > & operator+= | ( | const T_ & | a | ) |
Operator +=
Add constant a
to vector entries
LocalVect< T_, N_ > & operator-= | ( | const LocalVect< T_, N_ > & | v | ) |
Operator -=
Subtract vector v
from this instance
LocalVect< T_, N_ > & operator-= | ( | const T_ & | a | ) |
Operator -=
Subtract constant a
from vector entries
LocalVect< T_, N_ > & operator*= | ( | const T_ & | a | ) |
Operator *=
Multiply vector by constant a
LocalVect< T_, N_ > & operator/= | ( | const T_ & | a | ) |
Operator /=
Divide vector by constant a
T_ operator, | ( | const LocalVect< T_, N_ > & | v | ) | const |
Return Dot (scalar) product of two vectors.
A typical use of this operator is double a = (v,w)
where v
and w
are 2 instances of LocalVect<double,n>
- Parameters
-
[in] v LocalVect instance by which the current instance is multiplied
SkSMatrix | ( | ) |
Default constructor.
Initializes a zero-dimension matrix
SkSMatrix | ( | size_t | size, |
int | is_diagonal = false |
||
) |
Constructor that initializes a dense symmetric matrix.
Normally, for a dense matrix this is not the right class.
- Parameters
-
[in] size Number of matrix rows (and columns). [in] is_diagonal Boolean to select if the matrix is diagonal or not [Default: false]
SkSMatrix | ( | Mesh & | mesh, |
size_t | dof = 0 , |
||
int | is_diagonal = false |
||
) |
Constructor using mesh to initialize skyline structure of matrix.
- Parameters
-
[in] mesh Mesh instance for which matrix graph is determined. [in] dof Option parameter, with default value 0
.
dof=1
means that only one degree of freedom for each node (or element or side) is taken to determine matrix structure. The valuedof=0
means that matrix structure is determined using all DOFs.[in] is_diagonal Boolean argument to say is the matrix is actually a diagonal matrix or not.
SkSMatrix | ( | const Vect< size_t > & | ColHt | ) |
Constructor that initializes skyline structure of matrix using vector of column height.
- Parameters
-
[in] ColHt Vect instance that contains rows lengths of matrix.
Constructor for a square matrix using non zero row and column indices.
- Parameters
-
[in] I Vector containing row indices [in] J Vector containing column indices [in] opt Flag indicating if vectors I and J are cleaned and ordered (opt=1) or not (opt=0).
In the latter case, these vectors can contain the same contents more than once and are not necessarily ordered.
Constructor for a square matrix using non zero row and column indices.
- Parameters
-
[in] I Vector containing row indices [in] J Vector containing column indices [in] a Vector containing matrix entries in the same order than the one given by I
andJ
[in] opt Flag indicating if vectors I
andJ
are cleaned and ordered (opt=1
) or not (opt=0
).
In the latter case, these vectors can contain the same contents more than once and are not necessarily ordered
void setMesh | ( | Mesh & | mesh, |
size_t | dof = 0 |
||
) |
Determine mesh graph and initialize matrix.
This member function is called by constructor with the same arguments
- Parameters
-
[in] mesh Mesh instance for which matrix graph is determined. [in] dof Option parameter, with default value 0
.
dof=1
means that only one degree of freedom for each node (or element or side) is taken to determine matrix structure. The valuedof=0
means that matrix structure is determined using all DOFs.
void setSkyline | ( | Mesh & | mesh | ) |
Determine matrix structure.
This member function calculates matrix structure using Mesh instance mesh
.
|
virtual |
Assign a value to an entry ofthe matrix.
- Parameters
-
[in] i Row index [in] j Column index [in] val Value to assign to a(i,j)
Implements Matrix< T_ >.
Multiply matrix by vector x
and add to y
.
- Parameters
-
[in] x Vector to multiply by matrix [in,out] y Vector to add to the result. y
contains on output the result.
Implements Matrix< T_ >.
Multiply matrix by vector a*x
and add to y
.
- Parameters
-
[in] a Constant to multiply by matrix [in] x Vector to multiply by matrix [in,out] y Vector to add to the result. y
contains on output the result.
Implements Matrix< T_ >.
Multiply matrix by vector x
and save in y
- Parameters
-
[in] x Vector to multiply by matrix [out] y Vector that contains on output the result.
Implements Matrix< T_ >.
Multiply transpose of matrix by vector x and save in y.
- Parameters
-
[in] x Vector to multiply by matrix [out] y Vector that contains on output the result.
Implements Matrix< T_ >.
|
virtual |
Add a constant to an entry of the matrix.
- Parameters
-
[in] i Row index [in] j Column index [in] val Constant value to add to a(i,j)
Implements Matrix< T_ >.
size_t getColHeight | ( | size_t | i | ) | const |
Return column height.
Column height at entry i
is returned.
|
virtual |
Operator () (Non constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
virtual |
Operator () (Constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
SkSMatrix< T_ > & operator= | ( | const SkSMatrix< T_ > & | m | ) |
Operator =.
Copy matrix m
to current matrix instance.
SkSMatrix< T_ > & operator= | ( | const T_ & | x | ) |
Operator =.
define the matrix as a diagonal one with all diagonal entries equal to x
.
SkSMatrix< T_ > & operator+= | ( | const SkSMatrix< T_ > & | m | ) |
Operator +=.
Add matrix m
to current matrix instance.
SkSMatrix< T_ > & operator*= | ( | const T_ & | x | ) |
Operator *=.
Premultiply matrix entries by constant value x
.
int setLDLt | ( | ) |
Factorize matrix (LDLt (Crout) factorization).
- Returns
-
0
if factorization was normally performed -
n
if then
-th pivot is null
-
|
virtual |
Solve linear system.
The linear system having the current instance as a matrix is solved by using the LDLt decomposition. Solution is thus realized after a factorization step and a forward/backward substitution step. The factorization step is realized only if this was not already done.
Note that this function modifies the matrix contents is a factorization is performed. Naturally, if the the matrix has been modified after using this function, the user has to refactorize it using the function setLU. This is because the class has no non-expensive way to detect if the matrix has been modified. The function setLDLt realizes the factorization step only.
- Parameters
-
[in,out] b Vect instance that contains right-hand side on input and solution on output.
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Implements Matrix< T_ >.
Solve linear system.
The linear system having the current instance as a matrix is solved by using the LDLt decomposition. Solution is thus realized after a factorization step and a forward/backward substitution step. The factorization step is realized only if this was not already done.
Note that this function modifies the matrix contents is a factorization is performed. Naturally, if the the matrix has been modified after using this function, the user has to refactorize it using the function setLDLt. This is because the class has no non-expensive way to detect if the matrix has been modified. The function setLDLt realizes the factorization step only.
- Parameters
-
[in] b Vect instance that contains right-hand side. [out] x Vect instance that contains solution
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Solve a linear system using the LDLt (Crout) factorization.
This function solves a linear system. The LDLt factorization is performed if this was not already done using the function setLU.
- Parameters
-
[in] b Vect instance that contains right-hand side [out] x Vect instance that contains solution
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null
-
void Axpy | ( | T_ | a, |
const SkSMatrix< T_ > & | m | ||
) |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
|
virtual |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Pointer to Matrix by which a
is multiplied. The result is added to current instance
Implements Matrix< T_ >.
TrMatrix | ( | ) |
Default constructor.
Initialize a zero dimension tridiagonal matrix
void setSize | ( | size_t | size | ) |
Set size (number of rows) of matrix.
- Parameters
-
[in] size Number of rows and columns.
void Axpy | ( | T_ | a, |
const TrMatrix< T_ > & | m | ||
) |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
|
virtual |
Add to matrix the product of a matrix by a scalar.
- Parameters
-
[in] a Scalar to premultiply [in] m Matrix by which a
is multiplied. The result is added to current instance
Implements Matrix< T_ >.
|
virtual |
Operator () (Constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
|
virtual |
Operator () (Non constant version).
- Parameters
-
[in] i Row index [in] j Column index
Implements Matrix< T_ >.
TrMatrix< T_ > & operator= | ( | const TrMatrix< T_ > & | m | ) |
Operator =.
Copy matrix m
to current matrix instance.
TrMatrix< T_ > & operator*= | ( | const T_ & | x | ) |
Operator *=.
Premultiply matrix entries by constant value x
.
|
virtual |
Solve a linear system with current matrix (forward and back substitution).
- Parameters
-
[in,out] b Vect instance that contains right-hand side on input and solution on output.
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Warning: Matrix is modified after this function.
Implements Matrix< T_ >.
Solve a linear system with current matrix (forward and back substitution).
- Parameters
-
[in] b Vect instance that contains right-hand side. [out] x Vect instance that contains solution.
- Returns
-
0
if solution was normally performed, -
n
if then
-th pivot is null.
-
Warning: Matrix is modified after this function.
Iter | ( | ) |
Default Constructor.
This constructor set default values: the maximal number of iterations is set to 100
and the tolerance to 1.e-8
Iter | ( | int | max_it, |
real_t | toler, | ||
int | verbose = 0 |
||
) |
Constructor with iteration parameters.
- Parameters
-
[in] max_it Maximum number of iterations [in] toler Tolerance value for convergence [in] verbose Verbosity parameter [default: 0] 0
: No message output,> 0
: message output with increasing display.
Check convergence.
- Parameters
-
[in,out] u Solution vector at previous iteration [in] v Solution vector at current iteration [in] opt Vector norm for convergence checking 1
: 1-norm,2
: 2-norm, 0: Max. norm [default:2
]
- Returns
- true if convergence criterion is satisfied, false if not
After checking, this function copied v
into u
.
int solve | ( | Iteration | s, |
Preconditioner | p = DIAG_PREC |
||
) |
Solve equations using prescribed solver and preconditioner.
- Parameters
-
[in] s Solver identification parameter To be chosen in the enumeration variable Iteration:
DIRECT_SOLVER
,CG_SOLVER
,CGS_SOLVER
,BICG_SOLVER
,BICG_STAB_SOLVER
,GMRES_SOLVER
,QMR_SOLVER
[Default:CGS_SOLVER
][in] p Preconditioner identification parameter. To be chosen in the enumeration variable Preconditioner:
IDENT_PREC
,DIAG_PREC
,SSOR_PREC
,DILU_PREC
,ILU_PREC
[Default:DIAG_PREC
]
- Note
- The argument
p
has no effect if the solver isDIRECT_SOLVER