Modules

 Acoustic wave propagation problems
 Acoustic wave propagation problems.
 
 Conservation Law Equations
 Conservation law equations.
 
 Electromagnetics
 Electromagnetic equations.
 
 General Purpose Equations
 Gathers equation related classes.
 
 Fluid Dynamics
 Fluid Dynamics equations.
 
 Generic
 Generic partial differential equation.
 
 Laplace equation
 Laplace and Poisson equations.
 
 Porous Media problems
 Porous Media equation classes.
 
 Solid Mechanics
 Solid Mechanics finite element equations.
 
 Heat Transfer
 Heat Transfer equations.
 
 Input/Output
 Input/Output utility classes.
 
 Utilities
 Utility functions and classes.
 
 Physical properties of media
 Physical properties of materials and media.
 
 Global Variables
 All global variables in the library.
 
 Finite Element Mesh
 Mesh management classes
 
 Shape Function
 Shape function classes.
 
 Solver
 Solver functions and classes.
 
 Vector and Matrix
 Vector and matrix classes.
 

Files

file  Equa_Acoustics.h
 Definition file for class Equa_Acoustics.
 
file  Pres1DL2.h
 Definition file for class PRES1DL2.
 
file  Pres2DT3.h
 Definition file for class Pres2DT3.
 
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  EC2D2T3.h
 Definition file for class EC2D2T3.
 
file  Equa_Electromagnetics.h
 Definition file for class FE_Electromagnetics.
 
file  HelmholtzBT3.h
 Definition file for class HelmholtzBT3.
 
file  Equa.h
 Definition file for abstract class Equa.
 
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  TINS2DT3S.h
 Definition file for class TINS2DT3S.
 
file  TINS3DT4S.h
 Definition file for class TINS3DT4S.
 
file  Equa_LinearPDE.h
 Definition file for class Equa_LinearPDE.
 
file  LinearPDE1D.h
 Definition file for class LinearPDE1D.
 
file  LinearPDE2D.h
 Definition file for class LinearPDE2D.
 
file  LinearPDE3D.h
 Definition file for class LinearPDE3D.
 
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  Laplace2DT3.h
 Definition file for class Laplace2DT3.
 
file  Laplace2DT6.h
 Definition file for class Laplace2DT6.
 
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  WaterPorous1D.h
 Definition file for class WaterPorous1D.
 
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  Tabulation.h
 Definition file for class Tabulation.
 
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  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  SpaceTime.h
 Definition file and implementation for class SpaceTime.
 
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  MeshAdapt.h
 Definition file for class MeshAdapt.
 
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  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  FuncApprox.h
 Definition file for class FuncApprox.
 
file  GeoModel.h
 Definition file for class GeoModel.
 
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  Integration.h
 Definition file for numerical integration class.
 
file  Jacobi.h
 Function to solve a linear system of equations using the Jacobi method.
 
file  LeastSquare.h
 Definition file for class LeastSquare.
 
file  MyNLAS.h
 Definition file for abstract class MyNLAS.
 
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  Equa_Acoustics< NEN_, NEE_, NSN_, NSE_ >
 Abstract class for Wave Finite Element classes. More...
 
class  Pres1DL2
 Builds finite element arrays for acoustic propagation in 1-D using 2-Node elements. More...
 
class  Pres2DT3
 Builds finite element arrays for wave propagation in 2-D using 3-Node elements. 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  EC2D2T3
 Eddy current problems in 2-D domains using transversal approximation. More...
 
class  Equa_Electromagnetics< 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  Equa
 Mother abstract class to describe equation. More...
 
class  Equation< NEN_, NEE_, NSN_, NSE_ >
 Abstract class for all equation classes. More...
 
class  Equa_Fluid< 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  TINS2DT3S
 Builds finite element arrays for transient incompressible fluid flow using Navier-Stokes equations in 2-D domains. Numerical approximation uses stabilized 3-node triangle finite elements for velocity and pressure. 2nd-order projection scheme is used for time integration. More...
 
class  TINS3DT4S
 Builds finite element arrays for transient incompressible fluid flow using Navier-Stokes equations in 3-D domains. Numerical approximation uses stabilized 4-node tatrahedral finite elements for velocity and pressure. 2nd-order projection scheme is used for time integration. More...
 
class  Equa_LinearPDE< NEN_, NSN_ >
 Abstract class for Finite Element classes for lienar PDEs'. More...
 
class  LinearPDE1D
 Solves a generic linear PDE in 1-D using 2-Node line finite elements. More...
 
class  LinearPDE2D
 Solves a generic linear PDE in 2-D using 3-Node triangular finite elements. More...
 
class  FastMarching
 class for the fast marching algorithm on uniform grids More...
 
class  FastMarching1DG
 class for the fast marching algorithm on 1-D uniform grids More...
 
class  FastMarching2DG
 class for the fast marching algorithm on 2-D uniform grids More...
 
class  FastMarching3DG
 class for the fast marching algorithm on 3-D uniform grids More...
 
class  Equa_Laplace< 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  Laplace2DT3
 To build element equation for the Laplace equation using the 2-D triangle element (P1). More...
 
class  Laplace2DT6
 To build element equation for the Laplace equation using the 2-D triangle element (P2). More...
 
class  Laplace3DT4
 To build element equation for the Laplace equation using the 3-D tetrahedral element (P1). More...
 
class  SteklovPoincare2DBE
 Solver of the Steklov Poincare problem in 2-D geometries using piecewie constant boundary elemen. More...
 
class  Equa_Porous< NEN_, NEE_, NSN_, NSE_ >
 Abstract class for Porous Media Finite Element classes. More...
 
class  WaterPorous2D
 To solve water flow equations in porous media (1-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< 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< 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  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  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  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  Point< T_ >
 Defines a point with arbitrary type coordinates. More...
 
class  Point2D< T_ >
 Defines a 2-D point with arbitrary type coordinates. More...
 
class  SpaceTime
 Defines a space-time point. 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  MeshAdapt
 To adapt mesh in function of given solution. 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  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  Prec< T_ >
 To set a preconditioner. 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  FuncApprox
 To set function approximation methods. More...
 
class  GeoModel
 To set geometry modelling. More...
 
class  Integration
 Class for numerical integration methods. More...
 
class  Iter< T_ >
 Class to drive an iterative process. More...
 
class  LeastSquare
 To compute a least square approximation. More...
 
class  LinearSolver
 Class to solve systems of linear equations by direct or iterative methods. More...
 
class  MyNLAS
 Abstract class to define by user specified function. 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

enum class  PDE_Terms : int {
  NOTERM = 0x00000000 ,
  CONSISTENT_MASS = 0x00000010 ,
  CONSISTENT_CAPACITY = 0x00000010 ,
  LUMPED_MASS = 0x00000020 ,
  MASS = 0x00000020 ,
  LUMPED_CAPACITY = 0x00000020 ,
  CAPACITY = 0x00000020 ,
  VISCOSITY = 0x00000040 ,
  STIFFNESS = 0x00000080 ,
  DIFFUSION = 0x00000100 ,
  MOBILITY = 0x00000200 ,
  CONVECTION = 0x00000400 ,
  DEVIATORIC = 0x00000800 ,
  DILATATION = 0x00001000 ,
  ELECTRIC = 0x00002000 ,
  MAGNETIC = 0x00004000 ,
  BODY_RHS = 0x00008000 ,
  LOAD = 0x00008000 ,
  SOURCE = 0x00008000 ,
  BOUNDARY_RHS = 0x00010000 ,
  NEUMANN = 0x00010000 ,
  FLUX = 0x00010000 ,
  BOUNDARY_TRACTION = 0x00010000 ,
  CONTACT = 0x00020000 ,
  BUOYANCY = 0x00040000 ,
  LORENTZ_FORCE = 0x00080000 ,
  DAMPING = 0x00100000 ,
  L00 = 0x00200000 ,
  L10 = 0x00400000 ,
  L20 = 0x00800000 ,
  L01 = 0x01000000 ,
  L02 = 0x02000000 ,
  L11 = 0x04000000
}
 
enum  Analysis {
}
 
enum  TimeScheme {
  NONE = 0 ,
  FORWARD_EULER = 1 ,
  BACKWARD_EULER = 2 ,
  CRANK_NICOLSON = 3 ,
  HEUN = 4 ,
  NEWMARK = 5 ,
  LEAP_FROG = 6 ,
  ADAMS_BASHFORTH ,
  AB2 = 7 ,
  RUNGE_KUTTA ,
  RK4 = 8 ,
  RK3_TVD = 9 ,
  BDF2 = 10 ,
  BUILTIN = 11
}
 
enum  FEType {
  FE_2D_3N ,
  FE_2D_6N ,
  FE_2D_4N ,
  FE_3D_AXI_3N ,
  FE_3D_4N ,
  FE_3D_8N
}
 
enum class  PDECoefType
 
enum  AccessType
 Enumerated values for file access type.
 
enum  MatrixType {
  DENSE = 1 ,
  SKYLINE = 2 ,
  SPARSE = 4 ,
  DIAGONAL = 8 ,
  TRIDIAGONAL = 16 ,
  BAND = 32 ,
  SYMMETRIC = 64 ,
  UNSYMMETRIC = 128 ,
  IDENTITY = 256
}
 
enum  Iteration {
  DIRECT_SOLVER = 1 ,
  CG_SOLVER = 2 ,
  CGS_SOLVER = 3 ,
  BICG_SOLVER = 4 ,
  BICG_STAB_SOLVER = 5 ,
  GMRES_SOLVER = 6
}
 Choose iterative solver for the linear system. More...
 
enum  Preconditioner {
  IDENT_PREC = 1 ,
  DIAG_PREC = 2 ,
  DILU_PREC = 3 ,
  ILU_PREC = 4 ,
  SSOR_PREC = 5
}
 Choose preconditioner for the linear system. More...
 
enum  BCType {
  PERIODIC_A = 9999 ,
  PERIODIC_B = -9999 ,
  CONTACT_BC = 9998 ,
  CONTACT_M = 9997 ,
  CONTACT_S = -9997 ,
  SLIP = 9996
}
 
enum  EigenMethod {
  SUBSPACE = 1 ,
  QR = 2
}
 Enumerate methods to solve the eigenvalue problem. More...
 
enum  IntegrationScheme {
  LEFT_RECTANGLE = 0 ,
  RIGHT_RECTANGLE = 1 ,
  MID_RECTANGLE = 2 ,
  TRAPEZOIDAL = 3 ,
  SIMPSON = 4 ,
  GAUSS_LEGENDRE = 5
}
 

Functions

T_ * A ()
 Return element matrix.
 
T_ * b ()
 Return element right-hand side.
 
T_ * Prev ()
 Return element previous vector.
 
 IOField ()
 Default constructor.
 
 IOField (const string &file, AccessType access, bool compact=true)
 Constructor using file name.
 
 IOField (const string &mesh_file, const string &file, Mesh &ms, AccessType access, bool compact=true)
 Constructor using file name, mesh file and mesh.
 
 IOField (const string &file, Mesh &ms, AccessType access, bool compact=true)
 Constructor using file name and mesh.
 
 IOField (const string &file, AccessType access, const string &name)
 Constructor using file name and field name.
 
 ~IOField ()
 Destructor.
 
void setMeshFile (const string &file)
 Set mesh file.
 
void open ()
 Open file.
 
void open (const string &file, AccessType access)
 Open file.
 
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.
 
real_t get (Vect< real_t > &v)
 Get Vect v instance from file.
 
int get (Vect< real_t > &v, const string &name)
 Get Vect v instance from file if the field has the given name.
 
int get (DMatrix< real_t > &A, const string &name)
 Get DMatrix A instance from file if the field has the given name.
 
int get (DSMatrix< real_t > &A, const string &name)
 Get DSMatrix A instance from file if the field has the given name.
 
int get (Vect< real_t > &v, real_t t)
 Get Vect v instance from file corresponding to a specific time value.
 
void saveGMSH (string output_file, string mesh_file)
 Save field vectors in a file using GMSH format.
 
ostream & operator<< (ostream &s, const complex_t &x)
 Output a complex number.
 
ostream & operator<< (ostream &s, const std::string &c)
 Output a string.
 
template<class T_ >
ostream & operator<< (ostream &s, const vector< T_ > &v)
 Output a vector instance.
 
template<class T_ >
ostream & operator<< (ostream &s, const std::list< T_ > &l)
 Output a vector instance.
 
template<class T_ >
ostream & operator<< (ostream &s, const std::pair< T_, T_ > &a)
 Output a pair instance.
 
void saveField (const Vect< real_t > &v, const Mesh &mesh, string output_file, int opt)
 Save a vector to an output file in a given file format.
 
void saveField (Vect< real_t > &v, const Grid &g, string output_file, int opt)
 Save a vector to an output file in a given file format, for a structured grid data.
 
void saveGnuplot (Mesh &mesh, string input_file, string output_file, int f=1)
 Save a vector to an input Gnuplot file.
 
void saveTecplot (Mesh &mesh, string input_file, string output_file, int f=1)
 Save a vector to an output file to an input Tecplot file.
 
void saveVTK (Mesh &mesh, string input_file, string output_file, int f=1)
 Save a vector to an output VTK file.
 
void saveGmsh (Mesh &mesh, string input_file, string output_file, int f=1)
 Save a vector to an output Gmsh file.
 
 Tabulation ()
 Default constructor.
 
 Tabulation (string file)
 Constructor using file name.
 
 ~Tabulation ()
 Destructor.
 
void setFile (string file)
 Set file name.
 
real_t getValue (string funct, real_t x)
 Return the calculated value of the function.
 
real_t getDerivative (string funct, real_t x)
 Return the derivative of the function at a given point.
 
real_t getValue (string funct, real_t x, real_t y)
 Return the calculated value of the function.
 
real_t getValue (string funct, real_t x, real_t y, real_t z)
 Return the calculated value of the function.
 
real_t getValue (string funct, real_t x, real_t y, real_t z, real_t t)
 Return the calculated value of the function.
 
size_t getNbFuncts () const
 Get the Number of read functions.
 
size_t getNbVar (size_t n) const
 Get number of variables of a given function.
 
string getFunctName (size_t n) const
 Get the name of a read function.
 
size_t getSize (size_t n, size_t i) const
 Get number of points defining tabulation.
 
real_t getMinVar (size_t n, size_t i) const
 Get minimal value of a variable.
 
real_t getMaxVar (size_t n, size_t i) const
 Get maximal value of a variable.
 
ostream & operator<< (ostream &s, const Tabulation &t)
 Output Tabulated function data.
 
template<class T_ >
BMatrix< T_ > operator* (T_ a, const BMatrix< T_ > &A)
 Operator * (Premultiplication of matrix by constant)
 
template<class T_ >
ostream & operator<< (ostream &s, const BMatrix< T_ > &a)
 Output matrix in output stream.
 
template<class T_ >
Vect< T_ > operator* (const DMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
ostream & operator<< (ostream &s, const DMatrix< T_ > &a)
 Output matrix in output stream.
 
template<class T_ >
Vect< T_ > operator* (const DSMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
ostream & operator<< (ostream &s, const DSMatrix< T_ > &a)
 Output matrix in output stream.
 
template<class T_ , size_t NR_, size_t NC_>
LocalMatrix< T_, NR_, NC_ > operator* (T_ a, const LocalMatrix< T_, NR_, NC_ > &x)
 Operator * (Multiply matrix x by scalar a)
 
template<class T_ , size_t NR_, size_t NC_>
LocalVect< T_, NR_ > operator* (const LocalMatrix< T_, NR_, NC_ > &A, const LocalVect< T_, NC_ > &x)
 Operator * (Multiply matrix A by vector x)
 
template<class T_ , size_t NR_, size_t NC_>
ostream & operator<< (ostream &s, const LocalMatrix< T_, NR_, NC_ > &A)
 Output vector in output stream.
 
template<class T_ , size_t N_>
LocalVect< T_, N_ > operator+ (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y)
 Operator + (Add two vectors)
 
template<class T_ , size_t N_>
LocalVect< T_, N_ > operator- (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y)
 Operator - (Subtract two vectors)
 
template<class T_ , size_t N_>
LocalVect< T_, N_ > operator* (T_ a, const LocalVect< T_, N_ > &x)
 Operator * (Premultiplication of vector by constant)
 
template<class T_ , size_t N_>
LocalVect< T_, N_ > operator/ (T_ a, const LocalVect< T_, N_ > &x)
 Operator / (Division of vector by constant)
 
template<class T_ , size_t N_>
void Scale (T_ a, LocalVect< T_, N_ > &x)
 Multiply vector x by constant a and store result in x.
 
template<class T_ , size_t N_>
ostream & operator<< (ostream &s, const LocalVect< T_, N_ > &v)
 Output vector in output stream.
 
template<class T_ >
Point< T_ > operator+ (const Point< T_ > &a, const Point< T_ > &b)
 Operator +
 
template<class T_ >
Point< T_ > operator+ (const Point< T_ > &a, const T_ &x)
 Operator +
 
template<class T_ >
Point< T_ > operator- (const Point< T_ > &a)
 Unary Operator -
 
template<class T_ >
Point< T_ > operator- (const Point< T_ > &a, const Point< T_ > &b)
 Operator -
 
template<class T_ >
Point< T_ > operator- (const Point< T_ > &a, const T_ &x)
 Operator -
 
template<class T_ >
Point< T_ > operator* (const T_ &a, const Point< T_ > &b)
 Operator *
 
template<class T_ >
Point< T_ > operator* (const int &a, const Point< T_ > &b)
 Operator *.
 
template<class T_ >
Point< T_ > operator* (const Point< T_ > &b, const T_ &a)
 Operator /
 
template<class T_ >
Point< T_ > operator* (const Point< T_ > &b, const int &a)
 Operator *
 
template<class T_ >
T_ operator* (const Point< T_ > &a, const Point< T_ > &b)
 Operator *
 
template<class T_ >
Point< T_ > operator/ (const Point< T_ > &b, const T_ &a)
 Operator /
 
Point< real_t > CrossProduct (const Point< real_t > &lp, const Point< real_t > &rp)
 Return Cross product of two vectors lp and rp
 
template<class T_ >
std::ostream & operator<< (std::ostream &s, const Point< T_ > &a)
 Output point coordinates.
 
template<class T_ >
bool operator== (const Point2D< T_ > &a, const Point2D< T_ > &b)
 Operator ==.
 
template<class T_ >
Point2D< T_ > operator+ (const Point2D< T_ > &a, const Point2D< T_ > &b)
 Operator +.
 
template<class T_ >
Point2D< T_ > operator+ (const Point2D< T_ > &a, const T_ &x)
 Operator +.
 
template<class T_ >
Point2D< T_ > operator- (const Point2D< T_ > &a)
 Unary Operator -
 
template<class T_ >
Point2D< T_ > operator- (const Point2D< T_ > &a, const Point2D< T_ > &b)
 Operator -
 
template<class T_ >
Point2D< T_ > operator- (const Point2D< T_ > &a, const T_ &x)
 Operator -
 
template<class T_ >
Point2D< T_ > operator* (const T_ &a, const Point2D< T_ > &b)
 Operator *.
 
template<class T_ >
Point2D< T_ > operator* (const int &a, const Point2D< T_ > &b)
 
template<class T_ >
Point2D< T_ > operator* (const Point2D< T_ > &b, const T_ &a)
 Operator /
 
template<class T_ >
Point2D< T_ > operator* (const Point2D< T_ > &b, const int &a)
 Operator *
 
template<class T_ >
T_ operator* (const Point2D< T_ > &b, const Point2D< T_ > &a)
 Operator *.
 
template<class T_ >
Point2D< T_ > operator/ (const Point2D< T_ > &b, const T_ &a)
 Operator /
 
bool areClose (const Point2D< real_t > &a, const Point2D< real_t > &b, real_t toler=OFELI_TOLERANCE)
 Return true if both instances of class Point2D<real_t> are distant with less then toler [Default: OFELI_EPSMCH].
 
real_t SqrDistance (const Point2D< real_t > &a, const Point2D< real_t > &b)
 Return squared euclidean distance between points a and b
 
real_t Distance (const Point2D< real_t > &a, const Point2D< real_t > &b)
 Return euclidean distance between points a and b
 
template<class T_ >
std::ostream & operator<< (std::ostream &s, const Point2D< T_ > &a)
 Output point coordinates.
 
template<class T_ >
Vect< T_ > operator* (const SkMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
ostream & operator<< (ostream &s, const SkMatrix< T_ > &a)
 Output matrix in output stream.
 
template<class T_ >
Vect< T_ > operator* (const SkSMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
ostream & operator<< (ostream &s, const SkSMatrix< T_ > &a)
 Output matrix in output stream.
 
bool operator== (const SpaceTime &a, const SpaceTime &b)
 Operator ==
 
SpaceTime operator+ (const SpaceTime &a, const SpaceTime &b)
 Operator +
 
SpaceTime operator+ (const SpaceTime &a, const real_t &x)
 Operator +
 
SpaceTime operator- (const SpaceTime &a)
 Unary Operator -
 
SpaceTime operator- (const SpaceTime &a, const SpaceTime &b)
 Operator -
 
SpaceTime operator- (const SpaceTime &a, const real_t &x)
 Operator -
 
SpaceTime operator* (const real_t &a, const SpaceTime &b)
 Operator *
 
SpaceTime operator* (const int &a, const SpaceTime &b)
 Operator *.
 
SpaceTime operator* (const SpaceTime &b, const real_t &a)
 Operator /
 
SpaceTime operator* (const SpaceTime &b, const int &a)
 Operator *
 
real_t operator* (const SpaceTime &a, const SpaceTime &b)
 Operator *
 
SpaceTime operator/ (const SpaceTime &b, const real_t &a)
 Operator /
 
SpaceTime CrossProduct (const SpaceTime &lp, const SpaceTime &rp)
 Return Cross product of two vectors lp and rp
 
bool areClose (const SpaceTime &a, const SpaceTime &b, real_t toler=OFELI_TOLERANCE)
 Return true if both instances of class Point<double> are distant with less then toler
 
real_t SqrDistance (const SpaceTime &a, const SpaceTime &b)
 Return squared euclidean distance between points a and b
 
real_t Distance (const SpaceTime &a, const SpaceTime &b)
 Return euclidean distance between points a and b
 
bool operator< (const SpaceTime &a, const SpaceTime &b)
 Comparison operator. Returns true if all components of first vector are lower than those of second one.
 
std::ostream & operator<< (std::ostream &s, const SpaceTime &a)
 Output space-time point coordinates.
 
 SpMatrix ()
 Default constructor.
 
 SpMatrix (size_t nr, size_t nc)
 Constructor that initializes current instance as a dense matrix.
 
 SpMatrix (size_t size, int is_diagonal=false)
 Constructor that initializes current instance as a dense matrix.
 
 SpMatrix (Mesh &mesh, size_t dof=0, int is_diagonal=false)
 Constructor using a Mesh instance.
 
 SpMatrix (const vector< RC > &I, int opt=1)
 Constructor for a square matrix using non zero row and column indices.
 
 SpMatrix (const vector< RC > &I, const Vect< T_ > &a, int opt=1)
 Constructor for a square matrix using non zero row and column indices.
 
 SpMatrix (size_t nr, size_t nc, const vector< size_t > &row_ptr, const vector< size_t > &col_ind)
 Constructor for a rectangle matrix.
 
 SpMatrix (size_t nr, size_t nc, const vector< size_t > &row_ptr, const vector< size_t > &col_ind, const vector< T_ > &a)
 Constructor for a rectangle matrix.
 
 SpMatrix (const vector< size_t > &row_ptr, const vector< size_t > &col_ind)
 Constructor for a rectangle matrix.
 
 SpMatrix (const vector< size_t > &row_ptr, const vector< size_t > &col_ind, const vector< T_ > &a)
 Constructor for a rectangle matrix.
 
 SpMatrix (const SpMatrix &m)
 Copy constructor.
 
 ~SpMatrix ()
 Destructor.
 
void Identity ()
 Define matrix as identity.
 
void Dense ()
 Define matrix as a dense one.
 
void Diagonal ()
 Define matrix as a diagonal one.
 
void Diagonal (const T_ &a)
 Define matrix as a diagonal one with diagonal entries equal to a
 
void Laplace1D (size_t n, real_t h)
 Sets the matrix as the one for the Laplace equation in 1-D.
 
void Laplace2D (size_t nx, size_t ny)
 Sets the matrix as the one for the Laplace equation in 2-D.
 
void setMesh (Mesh &mesh, size_t dof=0)
 Determine mesh graph and initialize matrix.
 
void setOneDOF ()
 Activate 1-DOF per node option.
 
void setSides ()
 Activate Sides option.
 
void setDiag ()
 Store diagonal entries in a separate internal vector.
 
void DiagPrescribe (Mesh &mesh, Vect< T_ > &b, const Vect< T_ > &u)
 Impose by a diagonal method an essential boundary condition.
 
void DiagPrescribe (Vect< T_ > &b, const Vect< T_ > &u)
 Impose by a diagonal method an essential boundary condition using the Mesh instance provided by the constructor.
 
void setSize (size_t size)
 Set size of matrix (case where it's a square matrix).
 
void setSize (size_t nr, size_t nc)
 Set size (number of rows) of matrix.
 
void setGraph (const vector< RC > &I, int opt=1)
 Set graph of matrix by giving a vector of its nonzero entries.
 
Vect< T_ > getRow (size_t i) const
 Get i-th row vector.
 
Vect< T_ > getColumn (size_t j) const
 Get j-th column vector.
 
T_ at (size_t i, size_t j)
 Return a value of a matrix entry.
 
T_ & operator() (size_t i, size_t j)
 Operator () (Non constant version)
 
T_ operator() (size_t i, size_t j) const
 Operator () (Constant version)
 
T_ operator() (size_t i) const
 Operator () with one argument (Constant version)
 
T_ operator[] (size_t i) const
 Operator [] (Constant version).
 
Vect< T_ > operator* (const Vect< T_ > &x) const
 Operator * to multiply matrix by a vector.
 
SpMatrix< T_ > & operator*= (const T_ &a)
 Operator *= to premultiply matrix by a constant.
 
void getMesh (Mesh &mesh)
 Get mesh instance whose reference will be stored in current instance of SpMatrix.
 
void Mult (const Vect< T_ > &x, Vect< T_ > &y) const
 Multiply matrix by vector and save in another one.
 
void MultAdd (const Vect< T_ > &x, Vect< T_ > &y) const
 Multiply matrix by vector x and add to y.
 
void MultAdd (T_ a, const Vect< T_ > &x, Vect< T_ > &y) const
 Multiply matrix by vector a*x and add to y.
 
void TMult (const Vect< T_ > &x, Vect< T_ > &y) const
 Multiply transpose of matrix by vector x and save in y.
 
void Axpy (T_ a, const SpMatrix< T_ > &m)
 Add to matrix the product of a matrix by a scalar.
 
void Axpy (T_ a, const Matrix< T_ > *m)
 Add to matrix the product of a matrix by a scalar.
 
void set (size_t i, size_t j, const T_ &val)
 Assign a value to an entry of the matrix.
 
void add (size_t i, size_t j, const T_ &val)
 Add a value to an entry of the matrix.
 
void operator= (const T_ &x)
 Operator =.
 
size_t getColInd (size_t i) const
 Return storage information.
 
size_t getRowPtr (size_t i) const
 Return Row pointer at position i.
 
int solve (const Vect< T_ > &b, Vect< T_ > &x, bool fact=false)
 Solve the linear system of equations.
 
void setSolver (Iteration solver=CG_SOLVER, Preconditioner prec=DIAG_PREC, int max_it=1000, real_t toler=1.e-8)
 Choose solver and preconditioner for an iterative procedure.
 
void clear ()
 brief Set all matrix entries to zero
 
T_ * get () const
 Return C-Array.
 
T_ get (size_t i, size_t j) const
 Return entry (i,j) of matrix if this one is stored, 0 otherwise.
 
void add (size_t i, const T_ &val)
 Add val to entry i.
 
template<class T_ >
Vect< T_ > operator* (const SpMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
ostream & operator<< (ostream &s, const SpMatrix< T_ > &A)
 Output matrix in output stream.
 
 TrMatrix ()
 Default constructor.
 
 TrMatrix (size_t size)
 Constructor for a tridiagonal matrix with size rows.
 
 TrMatrix (const TrMatrix &m)
 Copy Constructor.
 
 ~TrMatrix ()
 Destructor.
 
void Identity ()
 Define matrix as identity matrix.
 
void Diagonal ()
 Define matrix as a diagonal one.
 
void Diagonal (const T_ &a)
 Define matrix as a diagona one and assign value a to all diagonal entries.
 
void Laplace1D (real_t h)
 Define matrix as the one of 3-point finite difference discretization of the second derivative.
 
void setSize (size_t size)
 Set size (number of rows) of matrix.
 
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.
 
void Axpy (T_ a, const Matrix< T_ > *m)
 Add to matrix the product of a matrix by a scalar.
 
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.
 
void add (size_t i, const T_ &val)
 Add val to entry i.
 
T_ at (size_t i, size_t j)
 Return a value of a matrix entry.
 
T_ operator() (size_t i, size_t j) const
 Operator () (Constant version).
 
T_ & operator() (size_t i, size_t j)
 Operator () (Non constant version).
 
TrMatrix< T_ > & operator= (const TrMatrix< T_ > &m)
 Operator =.
 
TrMatrix< T_ > & operator= (const T_ &x)
 Operator = Assign matrix to identity times x.
 
TrMatrix< T_ > & operator*= (const T_ &x)
 Operator *=.
 
int solve (Vect< T_ > &b, bool fact=true)
 Solve a linear system with current matrix (forward and back substitution).
 
int solve (const Vect< T_ > &b, Vect< T_ > &x, bool fact=false)
 Solve a linear system with current matrix (forward and back substitution).
 
T_ * get () const
 Return C-Array.
 
T_ get (size_t i, size_t j) const
 Return entry (i,j) of matrix.
 
template<class T_ >
Vect< T_ > operator* (const TrMatrix< T_ > &A, const Vect< T_ > &b)
 Operator * (Multiply vector by matrix and return resulting vector.
 
template<class T_ >
TrMatrix< T_ > operator* (T_ a, const TrMatrix< T_ > &A)
 Operator * (Premultiplication of matrix by constant)
 
template<class T_ >
ostream & operator<< (ostream &s, const TrMatrix< T_ > &A)
 Output matrix in output stream.
 
template<class T_ >
Vect< T_ > operator+ (const Vect< T_ > &x, const Vect< T_ > &y)
 Operator + (Addition of two instances of class Vect)
 
template<class T_ >
Vect< T_ > operator- (const Vect< T_ > &x, const Vect< T_ > &y)
 Operator - (Difference between two vectors of class Vect)
 
template<class T_ >
Vect< T_ > operator* (const T_ &a, const Vect< T_ > &x)
 Operator * (Premultiplication of vector by constant)
 
template<class T_ >
Vect< T_ > operator* (const Vect< T_ > &x, const T_ &a)
 Operator * (Postmultiplication of vector by constant)
 
template<class T_ >
Vect< T_ > operator/ (const Vect< T_ > &x, const T_ &a)
 Operator / (Divide vector entries by constant)
 
template<class T_ >
T_ Dot (const Vect< T_ > &x, const Vect< T_ > &y)
 Calculate dot product of two vectors.
 
real_t Discrepancy (Vect< complex_t > &x, const Vect< complex_t > &y, int n, int type=1)
 Return discrepancy between 2 vectors x and y
 
template<class T_ >
ostream & operator<< (ostream &s, const Vect< T_ > &v)
 Output vector in output stream.
 
ostream & operator<< (ostream &s, const Edge &ed)
 Output edge data.
 
ostream & operator<< (ostream &s, const Element &el)
 Output element data.
 
Figure operator- (const Figure &f1, const Figure &f2)
 Function to define a Figure instance as the set subtraction of two Figure instances.
 
 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.
 
 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.
 
 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.
 
 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.
 
 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.
 
 ~Grid ()
 Destructor.
 
void setXMin (const Point< real_t > &x)
 Set min. coordinates of the domain.
 
void setXMax (const Point< real_t > &x)
 
void setDomain (real_t xmin, real_t xmax)
 Set Dimensions of the domain: 1-D case.
 
void setDomain (real_t xmin, real_t xmax, real_t ymin, real_t ymax)
 Set Dimensions of the domain: 2-D case.
 
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.
 
void setDomain (Point< real_t > xmin, Point< real_t > xmax)
 Set Dimensions of the domain: 3-D case.
 
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.
 
void setX (const Vect< real_t > &x)
 Set node x-coordinates of grid.
 
void setXY (const Vect< real_t > &x, const Vect< real_t > &y)
 Set node x- and y-coordinates of grid.
 
void setXYZ (const Vect< real_t > &x, const Vect< real_t > &y, const Vect< real_t > &z)
 Set node x-, y- and z-coordinates of grid.
 
void setNbDOF (size_t n)
 Set number of degrees of freedom for a node [Default: 1].
 
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.
 
size_t getNz () const
 Return number of grid intervals in the z-direction.
 
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.
 
size_t getNbNodes () const
 Return total number of grid nodes.
 
size_t getNbDOF () const
 Return total number of dof.
 
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.
 
void setCode (int side, int code)
 Set a code for grid points on sides.
 
int getCode (int side) const
 Return code for a side number.
 
int getCode (size_t i, size_t j) const
 Return code for a grid point.
 
int getCode (size_t i, size_t j, size_t k) const
 Return code for a grid point.
 
size_t getDim () const
 Return space dimension.
 
void Deactivate (size_t i)
 Change state of a cell from active to inactive (1-D grid)
 
void Deactivate (size_t i, size_t j)
 Change state of a cell from active to inactive (2-D grid)
 
void Deactivate (size_t i, size_t j, size_t k)
 Change state of a cell from active to inactive (2-D grid)
 
int isActive (size_t i) const
 Say if cell is active or not (1-D grid)
 
int isActive (size_t i, size_t j) const
 Say if cell is active or not (2-D grid)
 
int isActive (size_t i, size_t j, size_t k) const
 Say if cell is active or not (3-D grid)
 
ostream & operator<< (ostream &s, const Grid &g)
 Output grid data.
 
ostream & operator<< (ostream &s, const Material &m)
 Output material data.
 
ostream & operator<< (ostream &s, const Mesh &ms)
 Output mesh data.
 
ostream & operator<< (ostream &s, const MeshAdapt &a)
 Output MeshAdapt class data.
 
ostream & operator<< (ostream &s, const NodeList &nl)
 Output NodeList instance.
 
ostream & operator<< (ostream &s, const ElementList &el)
 Output ElementList instance.
 
ostream & operator<< (ostream &s, const SideList &sl)
 Output SideList instance.
 
ostream & operator<< (ostream &s, const EdgeList &el)
 Output EdgeList instance.
 
size_t Label (const Element &el)
 Return label of a given element.
 
size_t Label (const Side &sd)
 Return label of a given side.
 
size_t Label (const Edge &ed)
 Return label of a given edge.
 
size_t NodeLabel (const Side &sd, size_t n)
 Return global label of node local label in side.
 
int Code (const Element &el)
 Return code of a given element.
 
int Code (const Side &sd, size_t i=1)
 Return code of a given (degree of freedom of) side.
 
bool operator== (const Element &el1, const Element &el2)
 Check equality between 2 elements.
 
bool operator== (const Side &sd1, const Side &sd2)
 Check equality between 2 sides.
 
void MeshToMesh (const Vect< real_t > &u1, Vect< real_t > &u2, size_t nx, size_t ny=0, size_t nz=0, size_t dof=1)
 Function to redefine a vector defined on a mesh to a new mesh.
 
void MeshToMesh (Mesh &m1, Mesh &m2, const Vect< real_t > &u1, Vect< real_t > &u2, const Point< real_t > &xmin, const Point< real_t > &xmax, size_t nx, size_t ny, size_t nz, size_t dof=1)
 Function to redefine a vector defined on a mesh to a new mesh.
 
ostream & operator<< (ostream &s, const Node &nd)
 Output node data.
 
void saveGmsh (const string &file, const Mesh &mesh)
 This function outputs a Mesh instance in a file in Gmsh format.
 
void saveGnuplot (const string &file, const Mesh &mesh)
 This function outputs a Mesh instance in a file in Gmsh format.
 
void saveTecplot (const string &file, const Mesh &mesh)
 This function outputs a Mesh instance in a file in Tecplot format.
 
void saveVTK (const string &file, const Mesh &mesh)
 This function outputs a Mesh instance in a file in VTK format.
 
ostream & operator<< (ostream &s, const Side &sd)
 Output side data.
 
template<class T_ >
int BiCG (const SpMatrix< T_ > &A, int prec, const Vect< T_ > &b, Vect< T_ > &x, int max_it, real_t toler)
 Biconjugate gradient solver function.
 
template<class T_ >
int CG (const SpMatrix< T_ > &A, int prec, const Vect< T_ > &b, Vect< T_ > &x, int max_it, real_t toler)
 Conjugate gradient solver function.
 
template<class T_ >
int CGS (const SpMatrix< T_ > &A, int prec, const Vect< T_ > &b, Vect< T_ > &x, int max_it, real_t toler)
 Conjugate Gradient Squared solver function.
 
ostream & operator<< (ostream &s, const EigenProblemSolver &es)
 Output eigenproblem information.
 
 FuncApprox ()
 Default constructor.
 
 ~FuncApprox ()
 Destructor.
 
void setLagrange (int n, const Vect< real_t > &x, const Vect< real_t > &y, Fct &f)
 Define Lagrange interpolation.
 
void setLeastSquare (const vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
 Define least square approximation using given basis functions.
 
void setLeastSquare (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
 Define least square approximation with given least square matrix.
 
void setLeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
 Define least square approximation using polynomial regression.
 
void setLeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
 Constructor foDefine least square approximation using linear regression.
 
void getLeastSquare (Fct &f)
 Compute the resulting least square fitting function.
 
void setBSpline (size_t n, size_t c, size_t np, const Vect< real_t > &b, Vect< real_t > &p)
 Define BSpline approximation.
 
void setBSplineSurface (size_t m, size_t n, size_t c, size_t d, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define BSpline surface modelling.
 
void setBezier (size_t n, size_t nc, const Vect< real_t > &b, Vect< real_t > &p)
 Define Bezier modelling.
 
void setBezierSurface (size_t m, size_t n, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define Bezier surface modelling.
 
void setNurbs (size_t n, size_t c, size_t np, const Vect< real_t > &b, const Vect< real_t > &h, Vect< real_t > &p)
 Define for Nurbs modelling.
 
void setNurbsSurface (size_t m, size_t n, size_t c, size_t d, size_t npu, size_t npw, const Vect< real_t > &b, Vect< real_t > &p)
 Define Nurbs surface modelling.
 
int run ()
 Run approximation process.
 
 GeoModel ()
 Default constructor.
 
 GeoModel (const Vect< real_t > &b, Vect< real_t > &p)
 Constructor with given polygon points and solution vector.
 
 GeoModel (const Vect< real_t > &b, const Vect< real_t > &h, Vect< real_t > &p)
 Constructor with given data for nurbs.
 
 ~GeoModel ()
 Destructor.
 
void setData (const Vect< real_t > &b, Vect< real_t > &p)
 Set vector data.
 
void setData (const Vect< real_t > &b, const Vect< real_t > &h, Vect< real_t > &p)
 Set vector data for Nurbs.
 
void setBSplinePar (size_t n, size_t c, size_t np)
 Set parameters for BSpline modelling.
 
void setBSplineSurfacePar (size_t m, size_t n, size_t c, size_t d, size_t npu, size_t npw)
 Set parameters for BSplineS modelling.
 
void setBezierPar (size_t n, size_t nc)
 Set parameters for BSpline modelling.
 
void setBezierSurfacePar (size_t m, size_t n, size_t npu, size_t npw)
 Set parameters for BSpline modelling.
 
void setNurbsPar (size_t n, size_t c, size_t np)
 Set parameters for Nurbs modelling.
 
void BSpline ()
 Run bspline modelling.
 
void BSplineSurface ()
 Run surface bspline modelling.
 
void Bezier ()
 Run Bezier modelling.
 
void BezierSurface ()
 Run Surface Bezier modelling.
 
void Nurbs ()
 Run Nurbs modelling.
 
template<class T_ >
int GMRes (const SpMatrix< T_ > &A, int prec, const Vect< T_ > &b, Vect< T_ > &x, size_t m, int max_it, real_t toler)
 GMRes solver function.
 
 LeastSquare ()
 Default constructor.
 
 LeastSquare (vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
 Constructor of least square approximation using given basis functions.
 
 LeastSquare (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
 Constructor with given least square matrix.
 
 LeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
 Constructor for polynomial regression.
 
 LeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
 Constructor for linear regression.
 
 ~LeastSquare ()
 Destructor.
 
void set (vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
 Set least square approximation using given basis functions.
 
void set (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
 Set least square approximation using least square matrix.
 
void set (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
 Set least square approximation by polynomial regression.
 
void set (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
 Set least square approximation by linear regression.
 
int run ()
 Compute least square approximation.
 
ostream & operator<< (ostream &s, const ODESolver &de)
 Output differential system information.
 
ostream & operator<< (ostream &s, TimeStepping &ts)
 Output differential system information.
 
template<class T_ , class C_ >
void qksort (std::vector< T_ > &a, int begin, int end, C_ compare)
 Function to sort a vector according to a key function.
 
real_t Sgn (real_t a, real_t b)
 Return |a| if b>0, -|a| if not.
 
real_t Abs2 (real_t a)
 Return square of real number a
 
real_t Abs (complex_t a)
 Return modulus of complex number a
 
real_t Abs (const Point< real_t > &p)
 Return norm of vector a
 
complex_t Conjg (complex_t a)
 Return complex conjugate of complex number a
 
string out_complex (real_t x, real_t y)
 Return string to conviently display a complex number.
 
template<class T_ >
const T_ & Max (const T_ &a, const T_ &b)
 Return maximum value of elements a and b
 
int Max (int a, int b, int c)
 Return maximum value of integer numbers a, b and c
 
real_t Min (real_t a, real_t b, real_t c)
 Return minimum value of real numbers a, b and c
 
int Min (int a, int b, int c)
 Return minimum value of integer numbers a, b and c
 
real_t Max (real_t a, real_t b, real_t c, real_t d)
 Return maximum value of integer numbers a, b, c and d
 
int Max (int a, int b, int c, int d)
 Return maximum value of integer numbers a, b, c and d
 
real_t Min (real_t a, real_t b, real_t c, real_t d)
 Return minimum value of real numbers a, b, c and d
 
int Min (int a, int b, int c, int d)
 Return minimum value of integer numbers a, b, c and d
 
template<class T_ >
void Scale (T_ a, const vector< T_ > &x, vector< T_ > &y)
 Mutiply vector x by a and save result in vector y
 
template<class T_ >
void Scale (T_ a, const Vect< T_ > &x, Vect< T_ > &y)
 Mutiply vector x by a and save result in vector y
 
template<class T_ >
void Scale (T_ a, vector< T_ > &x)
 Mutiply vector x by a
 
template<class T_ >
void Xpy (const vector< T_ > &x, vector< T_ > &y)
 Add vector x to y
 
template<class T_ >
void Axpy (size_t n, T_ a, T_ *x, T_ *y)
 Multiply array x by a and add result to y
 
template<class T_ >
void Axpy (T_ a, const vector< T_ > &x, vector< T_ > &y)
 Multiply vector x by a and add result to y
 
template<class T_ >
void Copy (size_t n, T_ *x, T_ *y)
 Copy array x to y n is the arrays size.
 
template<class T_ >
T_ Dot (size_t n, T_ *x, T_ *y)
 Return dot product of arrays x and y
 
real_t Dot (const vector< real_t > &x, const vector< real_t > &y)
 Return dot product of vectors x and y.
 
real_t operator* (const vector< real_t > &x, const vector< real_t > &y)
 Operator * (Dot product of 2 vector instances)
 
template<class T_ >
T_ Dot (const Point< T_ > &x, const Point< T_ > &y)
 Return dot product of x and y
 
template<class T_ >
void clear (Vect< T_ > &v)
 Assign 0 to all entries of a vector.
 
real_t Nrm2 (const vector< real_t > &x)
 Return 2-norm of vector x
 
template<class T_ >
real_t Nrm2 (const Point< T_ > &a)
 Return 2-norm of a
 
 Iter ()
 Default Constructor.
 
 Iter (int max_it, real_t toler)
 Constructor with iteration parameters.
 
bool check (Vect< T_ > &u, const Vect< T_ > &v, int opt=2)
 Check convergence.
 
bool check (T_ &u, const T_ &v)
 Check convergence for a scalar case (one equation)
 

Detailed Description

Enumeration Type Documentation

◆ Analysis

enum Analysis

Selects Analysis type

Enumerator
STEADY_STATE 

Steady State analysis

TRANSIENT 

Transient problem

TRANSIENT_ONE_STEP 

Transient problem, perform only one time step

OPTIMIZATION 

Optimization problem

EIGEN 

Eigenvalue problem

◆ BCType

enum BCType

To select special boundary conditions.

Enumerator
PERIODIC_A 

Periodic Boundary condition (first side)

PERIODIC_B 

Periodic Boundary condition (second side)

CONTACT_BC 

Contact Boundary conditions

CONTACT_M 

Contact Boundary condition, set as master side

CONTACT_S 

Contact Boundary condition, set as slave side

SLIP 

Slip Boundary condition

◆ EigenMethod

Enumerate methods to solve the eigenvalue problem.

Enumerator
SUBSPACE 

Subspace iteration method (for symmetric matrices)

QR 

QR reduction method (Martin, Parlett, Peters, Reinsch and Wilkinson.)

◆ FEType

enum FEType

Choose Finite Element Type

Enumerator
FE_2D_3N 

2-D elements, 3-Nodes (P1)

FE_2D_6N 

2-D elements, 6-Nodes (P2)

FE_2D_4N 

2-D elements, 4-Nodes (Q1)

FE_3D_AXI_3N 

3-D Axisymmetric elements, 3-Nodes (P1)

FE_3D_4N 

3-D elements, 4-Nodes (P1)

FE_3D_8N 

3-D elements, 8-Nodes (Q1)

◆ IntegrationScheme

Choose numerical integration scheme

Enumerator
LEFT_RECTANGLE 

Left rectangle integration formula

RIGHT_RECTANGLE 

Right rectangle integration formula

MID_RECTANGLE 

Midpoint (central) rectangle formula

TRAPEZOIDAL 

Trapezoidal rule

SIMPSON 

Simpson formula

GAUSS_LEGENDRE 

Gauss-Legendre quadrature formulae

◆ Iteration

enum Iteration

Choose iterative solver for the linear system.

Enumerator
DIRECT_SOLVER 

Direct solver

CG_SOLVER 

CG Method

CGS_SOLVER 

CGS Metod

BICG_SOLVER 

BiCG Method

BICG_STAB_SOLVER 

BiCGStab Method

GMRES_SOLVER 

GMRes Method

◆ MatrixType

enum MatrixType

Choose matrix storage and type

Enumerator
DENSE 

Dense storage

SKYLINE 

Skyline storage

SPARSE 

Sparse storage

DIAGONAL 

Diagonal storage

TRIDIAGONAL 

Tridiagonal storage

BAND 

Band storage

SYMMETRIC 

Symmetric matrix

UNSYMMETRIC 

Unsymmetric matrix

IDENTITY 

Identity matrix

◆ PDE_Terms

enum class PDE_Terms : int
strong

Enumerate class to select various terms in partial differential equations

Enumerator
NOTERM 

No term (empty equation)

CONSISTENT_MASS 

Consistent mass (or capacity) term

CONSISTENT_CAPACITY 

Consistent mass (or capacity) term

LUMPED_MASS 

Lumped mass (or capacity) term

MASS 

Lumped mass (or capacity) term

LUMPED_CAPACITY 

Lumped mass (or capacity) term

CAPACITY 

Lumped mass (or capacity) term

VISCOSITY 

Viscosity term

STIFFNESS 

Stiffness term

DIFFUSION 

Diffusion term

MOBILITY 

Mobility term

CONVECTION 

Convection term

DEVIATORIC 

Deviatoric term

DILATATION 

Dilatational term

ELECTRIC 

Electric term

MAGNETIC 

Magnetic term

BODY_RHS 

Body load term

LOAD 

Body load term

SOURCE 

Body load term

BOUNDARY_RHS 

Given right-hand side on boundary

NEUMANN 

Given right-hand side on boundary

FLUX 

Given right-hand side on boundary

BOUNDARY_TRACTION 

Given right-hand side on boundary

CONTACT 

Signorini contact

BUOYANCY 

Buoyancy force term

LORENTZ_FORCE 

Lorentz force term

DAMPING 

Damping term

L00 

0th order in time and space, to LHS

L10 

1st order in time, 0th order in space, to LHS

L20 

2nd order in time, 0th order in space, to LHS

L01 

0th order in time, 1st order in space, to LHS

L02 

0th order in time, 2nd order in space, to LHS

L11 

1st order in time, 1st order in space, to LHS

◆ PDECoefType

enum class PDECoefType
strong

Choose PDE Coefficient

◆ Preconditioner

Choose preconditioner for the linear system.

Enumerator
IDENT_PREC 

Identity (No preconditioning)

DIAG_PREC 

Diagonal preconditioner

DILU_PREC 

DILU (Diagonal Incomplete factorization) preconditioner

ILU_PREC 

ILU (Incomplete factorization) preconditioner

SSOR_PREC 

SSOR preconditioner

◆ TimeScheme

enum TimeScheme

Selects Time integration scheme

Enumerator
NONE 

No time integration scheme

FORWARD_EULER 

Forward Euler scheme (Explicit)

BACKWARD_EULER 

Backward Euler scheme (Implicit)

CRANK_NICOLSON 

Crank-Nicolson scheme

HEUN 

Heun scheme

NEWMARK 

Newmark scheme

LEAP_FROG 

Leap Frog scheme

AB2 

Adams-Bashforth scheme (2nd Order)

RK4 

4-th Order Runge-Kutta scheme (4th Order)

RK3_TVD 

3-rd Order Runge-Kutta TVD scheme

BDF2 

Backward Difference Formula (2nd Order)

BUILTIN 

Builtin scheme, implemented in equation class

Function Documentation

◆ FuncApprox()

Default constructor.

The function setData can then be used

◆ GeoModel() [1/3]

GeoModel ( )

Default constructor.

The function setData can then be used

◆ GeoModel() [2/3]

GeoModel ( const Vect< real_t > &  b,
const Vect< real_t > &  h,
Vect< real_t > &  p 
)

Constructor with given data for nurbs.

This function is to be used if the default constructed was used

Parameters
[in]bVector containing the defining polygon vertices
[in]hVector containing the homogeneous weighting factors
[in,out]pVector containing the resulting curve points

◆ GeoModel() [3/3]

GeoModel ( const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Constructor with given polygon points and solution vector.

This function is to be used if the default constructed was used

Parameters
[in]bVector containing the defining polygon vertices
[in,out]pVector containing the resulting curve points

◆ Grid() [1/5]

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.

Parameters
[in]mMinimal coordinate value
[in]MMaximal coordinate value
[in]npxNumber of grid intervals in the x-direction
[in]npyNumber of grid intervals in the y-direction

◆ Grid() [2/5]

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.

Parameters
[in]mMinimal coordinate value
[in]MMaximal coordinate value
[in]npxNumber of grid intervals in the x-direction
[in]npyNumber of grid intervals in the y-direction
[in]npzNumber of grid intervals in the z-direction

◆ Grid() [3/5]

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]xmMinimal value for x
[in]xMMaximal value for x
[in]ymMinimal value for y
[in]yMMaximal value for y
[in]zmMinimal value for z
[in]zMMaximal value for z
[in]npxNumber of grid intervals in the x-direction
[in]npyNumber of grid intervals in the y-direction
[in]npzNumber of grid intervals in the z-direction

◆ Grid() [4/5]

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.

Parameters
[in]xmMinimal value for x
[in]xMMaximal value for x
[in]ymMinimal value for y
[in]yMMaximal value for y
[in]npxNumber of grid intervals in the x-direction
[in]npyNumber of grid intervals in the y-direction

◆ Grid() [5/5]

Grid ( real_t  xm,
real_t  xM,
size_t  npx 
)

Construct a 1-D structured grid given its extremal coordinates and number of intervals.

Parameters
[in]xmMinimal value for x
[in]xMMaximal value for x
[in]npxNumber of grid intervals in the x-direction

◆ IOField() [1/4]

IOField ( const string &  file,
AccessType  access,
bool  compact = true 
)

Constructor using file name.

Parameters
[in]fileFile name.
[in]accessAccess code. This number is to be chosen among two enumerated values:
  • IOField::IN to read the file
  • IOField::OUT to write on it
[in]compactFlag to choose a compact storage or not [Default: true]

◆ IOField() [2/4]

IOField ( const string &  file,
AccessType  access,
const string &  name 
)

Constructor using file name and field name.

Parameters
[in]fileFile that contains field stored or to store
[in]accessAccess code. This number is to be chosen among two enumerated values:
  • IOField::IN to read the file
  • IOField::OUT to write on it
[in]nameSeek a specific field with given name

◆ IOField() [3/4]

IOField ( const string &  file,
Mesh ms,
AccessType  access,
bool  compact = true 
)

Constructor using file name and mesh.

Parameters
[in]fileFile that contains field stored or to store
[in]msMesh instance
[in]accessAccess code. This number is to be chosen among two enumerated values:
  • IOField::IN to read the file
  • IOField::OUT to write on it
[in]compactFlag to choose a compact storage or not [Default: true]

◆ IOField() [4/4]

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_fileFile containing mesh
[in]fileFile that contains field stored or to store
[in]msMesh instance
[in]accessAccess code. This number is to be chosen among two enumerated values:
  • IOField::IN to read the file
  • IOField::OUT to write on it
[in]compactFlag to choose a compact storage or not [Default: true]

◆ Iter() [1/2]

template<class T_ >
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() [2/2]

template<class T_ >
Iter ( int  max_it,
real_t  toler 
)

Constructor with iteration parameters.

Parameters
[in]max_itMaximum number of iterations
[in]tolerTolerance value for convergence

◆ LeastSquare() [1/5]

Default constructor.

The functions set(...) must be used to define data before computing the approximation using run()

◆ LeastSquare() [2/5]

LeastSquare ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
real_t &  a0,
real_t &  a1 
)

Constructor for linear regression.

Define 1-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a0 + a1*x

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]a0Coefficient of constant term
[out]a1Coefficient of first degree term

◆ LeastSquare() [3/5]

LeastSquare ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
size_t  N,
Vect< real_t > &  a 
)

Constructor for polynomial regression.

Define N-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a[0] + a[1]*x + ... + a[N]*x^N

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[in]NDegree of approximation polynomial
[out]aVector of coefficients of polynomial as defined here above

◆ LeastSquare() [4/5]

LeastSquare ( DMatrix< real_t > &  B,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Constructor with given least square matrix.

Matrix entries is defined by B(k,i) as the k-th basis function evaluated at x(i)

Parameters
[in]BRectangle matrix of Least square approximation
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ LeastSquare() [5/5]

LeastSquare ( vector< Fct * > &  f,
const Vect< real_t > &  x,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Constructor of least square approximation using given basis functions.

The least square approximation defines the function: a[0]*f[0] + a[1]*f[1] + ... + a[N]*f[N]

Parameters
[in]fVector of references to functions (class Fct) defining basis of least square approximation
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ SpMatrix() [1/10]

template<class T_ >
SpMatrix ( )

Default constructor.

Initialize a zero-dimension matrix

◆ SpMatrix() [2/10]

template<class T_ >
SpMatrix ( const vector< RC > &  I,
const Vect< T_ > &  a,
int  opt = 1 
)

Constructor for a square matrix using non zero row and column indices.

Parameters
[in]IVector containing pairs of row and column indices
[in]aVector containing matrix entries in the same order than the one given by I
[in]optFlag indicating if vector I is cleaned and ordered (opt=1: default) or not (opt=0). In the latter case, this vector can have the same contents more than once and are not necessarily ordered

◆ SpMatrix() [3/10]

template<class T_ >
SpMatrix ( const vector< RC > &  I,
int  opt = 1 
)

Constructor for a square matrix using non zero row and column indices.

Parameters
[in]IVector containing pairs of row and column indices
[in]optFlag indicating if vectors I is cleaned and ordered (opt=1) or not (opt=0). In the latter case, this vector can have the same contents more than once and are not necessarily ordered

◆ SpMatrix() [4/10]

template<class T_ >
SpMatrix ( const vector< size_t > &  row_ptr,
const vector< size_t > &  col_ind 
)

Constructor for a rectangle matrix.

Parameters
[in]row_ptrVector of row pointers (See the above description of this class).
[in]col_indVector of column indices (See the above description of this class).

◆ SpMatrix() [5/10]

template<class T_ >
SpMatrix ( const vector< size_t > &  row_ptr,
const vector< size_t > &  col_ind,
const vector< T_ > &  a 
)

Constructor for a rectangle matrix.

Parameters
[in]row_ptrVector of row pointers (See the above description of this class).
[in]col_indVector of column indices (See the above description of this class).
[in]avector instance that contain matrix entries stored row by row.
Number of rows is extracted from vector row_ptr.

◆ SpMatrix() [6/10]

template<class T_ >
SpMatrix ( Mesh mesh,
size_t  dof = 0,
int  is_diagonal = false 
)

Constructor using a Mesh instance.

Parameters
[in]meshMesh instance from which matrix graph is extracted.
[in]dofOption 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 value dof=0 means that matrix structure is determined using all DOFs.
[in]is_diagonalBoolean argument to say is the matrix is actually a diagonal matrix or not.

◆ SpMatrix() [7/10]

template<class T_ >
SpMatrix ( size_t  nr,
size_t  nc 
)

Constructor that initializes current instance as a dense matrix.

Normally, for a dense matrix this is not the right class.

Parameters
[in]nrNumber of matrix rows.
[in]ncNumber of matrix columns.

◆ SpMatrix() [8/10]

template<class T_ >
SpMatrix ( size_t  nr,
size_t  nc,
const vector< size_t > &  row_ptr,
const vector< size_t > &  col_ind 
)

Constructor for a rectangle matrix.

Parameters
[in]nrNumber of rows
[in]ncNumber of columns
[in]row_ptrVector of row pointers (See the above description of this class).
[in]col_indVector of column indices (See the above description of this class).

◆ SpMatrix() [9/10]

template<class T_ >
SpMatrix ( size_t  nr,
size_t  nc,
const vector< size_t > &  row_ptr,
const vector< size_t > &  col_ind,
const vector< T_ > &  a 
)

Constructor for a rectangle matrix.

Parameters
[in]nrNumber of rows
[in]ncNumber of columns
[in]row_ptrVector of row pointers (See the above description of this class).
[in]col_indVector of column indices (See the above description of this class).
[in]avector instance containing matrix entries stored columnwise

◆ SpMatrix() [10/10]

template<class T_ >
SpMatrix ( size_t  size,
int  is_diagonal = false 
)

Constructor that initializes current instance as a dense matrix.

Normally, for a dense matrix this is not the right class.

Parameters
[in]sizeNumber of matrix rows (and columns).
[in]is_diagonalBoolean argument to say is the matrix is actually a diagonal matrix or not.

◆ TrMatrix()

template<class T_ >
TrMatrix ( )

Default constructor.

Initialize a zero dimension tridiagonal matrix

◆ A()

T_ * A ( )

Return element matrix.

Matrix is returned as a C-array

◆ add()

template<class T_ >
void add ( size_t  i,
size_t  j,
const T_ &  val 
)
virtual

Add a value to an entry of the matrix.

Parameters
[in]iRow index
[in]jColumn index
[in]valConstant value to add to a(i,j)

Implements Matrix< T_ >.

◆ areClose()

bool areClose ( const SpaceTime a,
const SpaceTime b,
real_t  toler = OFELI_TOLERANCE 
)

Return true if both instances of class Point<double> are distant with less then toler

Author
Rachid Touzani

◆ at() [1/2]

template<class T_ >
T_ at ( size_t  i,
size_t  j 
)
virtual

Return a value of a matrix entry.

Parameters
[in]iRow index (starts at 1)
[in]jColumn index (starts at 1)

Implements Matrix< T_ >.

◆ at() [2/2]

template<class T_ >
T_ at ( size_t  i,
size_t  j 
)
virtual

Return a value of a matrix entry.

Parameters
[in]iRow index (starts at 1)
[in]jColumn index (starts at 1)

Implements Matrix< T_ >.

◆ Axpy() [1/6]

template<class T_ >
void Axpy ( size_t  n,
T_  a,
T_ *  x,
T_ *  y 
)

Multiply array x by a and add result to y

n is the arrays size.

◆ Axpy() [2/6]

template<class T_ >
void Axpy ( T_  a,
const Matrix< T_ > *  m 
)
virtual

Add to matrix the product of a matrix by a scalar.

Parameters
[in]aScalar to premultiply
[in]mPointer to Matrix by which a is multiplied. The result is added to current instance

Implements Matrix< T_ >.

◆ Axpy() [3/6]

template<class T_ >
void Axpy ( T_  a,
const Matrix< T_ > *  m 
)
virtual

Add to matrix the product of a matrix by a scalar.

Parameters
[in]aScalar to premultiply
[in]mMatrix by which a is multiplied. The result is added to current instance

Implements Matrix< T_ >.

◆ Axpy() [4/6]

template<class T_ >
void Axpy ( T_  a,
const SpMatrix< T_ > &  m 
)

Add to matrix the product of a matrix by a scalar.

Parameters
[in]aScalar to premultiply
[in]mMatrix by which a is multiplied. The result is added to current instance

◆ Axpy() [5/6]

template<class T_ >
void Axpy ( T_  a,
const TrMatrix< T_ > &  m 
)

Add to matrix the product of a matrix by a scalar.

Parameters
[in]aScalar to premultiply
[in]mMatrix by which a is multiplied. The result is added to current instance

◆ Axpy() [6/6]

template<class T_ >
void Axpy ( T_  a,
const vector< T_ > &  x,
vector< T_ > &  y 
)

Multiply vector x by a and add result to y

x and y are instances of class vector<T_>

◆ b()

T_ * b ( )

Return element right-hand side.

Right-hand side is returned as a C-array

◆ Bezier()

void Bezier ( )

Run Bezier modelling.

Remarks
The resulting vector of curve points is the vector p given by the constructor or by setData

◆ BezierSurface()

void BezierSurface ( )

Run Surface Bezier modelling.

Remarks
The resulting vector of curve points is the vector p given by the constructor or by setData

◆ BiCG()

template<class T_ >
int BiCG ( const SpMatrix< T_ > &  A,
int  prec,
const Vect< T_ > &  b,
Vect< T_ > &  x,
int  max_it,
real_t  toler 
)

Biconjugate gradient solver function.

This function uses the preconditioned Biconjugate Conjugate Gradient algorithm to solve a linear system with a sparse matrix.
The global variable Verbosity enables choosing output message level

  • Verbosity < 2 : No output message
  • Verbosity > 1 : Notify executing the function CG
  • Verbosity > 2 : Notify convergence with number of performed iterations or divergence
  • Verbosity > 3 : Output each iteration number and residual
  • Verbosity > 6 : Print final solution if convergence
  • Verbosity > 10 : Print obtained solution at each iteration
Parameters
[in]AProblem matrix (Instance of class SpMatrix).
[in]precEnum variable selecting a preconditioner, among the values IDENT_PREC, DIAG_PREC, ILU_PREC or SSOR_PREC
[in]bRight-hand side vector (class Vect)
[in,out]xVect instance containing initial solution guess in input and solution of the linear system in output (If iterations have succeeded).
[in]max_itMaximum number of iterations.
toler[in] Tolerance for convergence (measured in relative weighted 2-Norm).
Returns
Number of performed iterations,
Template Parameters
<T_>Data type (double, float, complex<double>, ...)
Author
Rachid Touzani

◆ BSpline()

void BSpline ( )

Run bspline modelling.

Remarks
The resulting vector of curve points is the vector p given by the constructor or by setData

◆ BSplineSurface()

void BSplineSurface ( )

Run surface bspline modelling.

Remarks
The resulting vector of curve points is the vector p given by the constructor or by setData

◆ CG()

template<class T_ >
int CG ( const SpMatrix< T_ > &  A,
int  prec,
const Vect< T_ > &  b,
Vect< T_ > &  x,
int  max_it,
real_t  toler 
)

Conjugate gradient solver function.

This function uses the preconditioned Conjugate Gradient algorithm to solve a linear system with a sparse matrix.
The global variable Verbosity enables choosing output message level

  • Verbosity < 2 : No output message
  • Verbosity > 1 : Notify executing the function CG
  • Verbosity > 2 : Notify convergence with number of performed iterations or divergence
  • Verbosity > 3 : Output each iteration number and residual
  • Verbosity > 6 : Print final solution if convergence
  • Verbosity > 10 : Print obtained solution at each iteration
Parameters
[in]AProblem matrix (Instance of abstract class SpMatrix).
[in]precEnum variable selecting a preconditioner, among the values IDENT_PREC, DIAG_PREC, ILU_PREC or SSOR_PREC
[in]bRight-hand side vector (class Vect)
[in,out]xVect instance containing initial solution guess in input and solution of the linear system in output (If iterations have succeeded).
[in]max_itMaximum number of iterations.
[in]tolerTolerance for convergence (measured in relative weighted 2-Norm).
Returns
Number of performed iterations,
Template Parameters
<T_>Data type (double, float, complex<double>, ...)
Author
Rachid Touzani

◆ CGS()

template<class T_ >
int CGS ( const SpMatrix< T_ > &  A,
int  prec,
const Vect< T_ > &  b,
Vect< T_ > &  x,
int  max_it,
real_t  toler 
)

Conjugate Gradient Squared solver function.

This function uses the preconditioned Conjugate Gradient Squared algorithm to solve a linear system with a sparse matrix.
The global variable Verbosity enables choosing output message level

  • Verbosity < 2 : No output message
  • Verbosity > 1 : Notify executing the function CG
  • Verbosity > 2 : Notify convergence with number of performed iterations or divergence
  • Verbosity > 3 : Output each iteration number and residual
  • Verbosity > 6 : Print final solution if convergence
  • Verbosity > 10 : Print obtained solution at each iteration
Parameters
[in]AProblem matrix (Instance of class SpMatrix).
[in]precEnum variable selecting a preconditioner, among the values IDENT_PREC, DIAG_PREC, ILU_PREC or SSOR_PREC
[in]bRight-hand side vector (class Vect)
[in,out]xVect instance containing initial solution guess in input and solution of the linear system in output (If iterations have succeeded).
[in]max_itMaximum number of iterations.
[in]tolerTolerance for convergence (measured in relative weighted 2-Norm).
Returns
Number of performed iterations
Template Parameters
<T_>Data type (real_t, float, complex<real_t>, ...)
Author
Rachid Touzani

◆ check() [1/2]

template<class T_ >
bool check ( T_ &  u,
const T_ &  v 
)

Check convergence for a scalar case (one equation)

Parameters
[in,out]uSolution at previous iteration
[in]vSolution at current iteration
Returns
true if convergence criterion is satisfied, false if not

After checking, this function copied v into u.

◆ check() [2/2]

template<class T_ >
bool check ( Vect< T_ > &  u,
const Vect< T_ > &  v,
int  opt = 2 
)

Check convergence.

Parameters
[in,out]uSolution vector at previous iteration
[in]vSolution vector at current iteration
[in]optVector 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.

◆ clear()

template<class T_ >
void clear ( Vect< T_ > &  v)

Assign 0 to all entries of a vector.

Parameters
[in]vVector to clear

◆ Code() [1/2]

int Code ( const Element el)

Return code of a given element.

Parameters
[in]elReference to Element instance
Returns
Code of element
Author
Rachid Touzani

◆ Code() [2/2]

int Code ( const Side sd,
size_t  i = 1 
)

Return code of a given (degree of freedom of) side.

Parameters
[in]sdReference to Side instance
[in]iLabel of dof [Default: 1]
Returns
Code of dof of side
Author
Rachid Touzani

◆ Deactivate() [1/3]

void Deactivate ( size_t  i)

Change state of a cell from active to inactive (1-D grid)

Parameters
[in]igrid cell to remove

◆ Deactivate() [2/3]

void Deactivate ( size_t  i,
size_t  j 
)

Change state of a cell from active to inactive (2-D grid)

Parameters
[in]ii-th index for grid cell to remove. If this value is 0, all cells (*,j) are deactivated
[in]jj-th index for grid cell to remove If this value is 0, all cells (i,*) are deactivated
Remarks
if i and j have value 0 all grid cells are deactivated !!

◆ Deactivate() [3/3]

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]ii-th index for grid cell to remove. If this value is 0, all cells (*,j,k) are deactivated
[in]jj-th index for grid cell to remove If this value is 0, all cells (i,*,k) are deactivated
[in]kk-th index for grid cell to remove If this value is 0, all cells (i,j,*) are deactivated

◆ DiagPrescribe() [1/2]

template<class T_ >
void DiagPrescribe ( Mesh mesh,
Vect< T_ > &  b,
const Vect< T_ > &  u 
)

Impose by a diagonal method an essential boundary condition.

This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).

Parameters
[in]meshMesh instance from which information is extracted.
[in,out]bVect instance that contains right-hand side.
[in]uVect instance that conatins imposed valued at DOFs where they are to be imposed.

◆ DiagPrescribe() [2/2]

template<class T_ >
void DiagPrescribe ( Vect< T_ > &  b,
const Vect< T_ > &  u 
)

Impose by a diagonal method an essential boundary condition using the Mesh instance provided by the constructor.

This member function modifies diagonal terms in matrix and terms in vector that correspond to degrees of freedom with nonzero code in order to impose a boundary condition. The penalty parameter is defined by default equal to 1.e20. It can be modified by member function setPenal(..).

Parameters
[in,out]bVect instance that contains right-hand side.
[in]uVect instance that conatins imposed valued at DOFs where they are to be imposed.

◆ Discrepancy()

real_t Discrepancy ( Vect< complex_t > &  x,
const Vect< complex_t > &  y,
int  n,
int  type = 1 
)

Return discrepancy between 2 vectors x and y

Parameters
[in,out]xFirst vector (Instance of class Vect). On output, x is assigned the vector y
[in]ySecond vector (Instance of class Vect)
[in]nType of norm
  • 1: Weighted 1-Norm
  • 2: Weighted 2-Norm
  • 0: Max-Norm
[in]typeDiscrepancy type (0: Absolute, 1: Relative [Default])
Returns
Computed discrepancy value

◆ Distance() [1/2]

real_t Distance ( const Point2D< real_t > &  a,
const Point2D< real_t > &  b 
)

Return euclidean distance between points a and b

Author
Rachid Touzani

◆ Distance() [2/2]

double Distance ( const SpaceTime a,
const SpaceTime b 
)

Return euclidean distance between points a and b

Author
Rachid Touzani

◆ Dot() [1/3]

template<class T_ >
T_ Dot ( const Vect< T_ > &  x,
const Vect< T_ > &  y 
)

Calculate dot product of two vectors.

Returns
Dot (inner or scalar) product Calculate dot (scalar) product of two vectors

◆ Dot() [2/3]

double Dot ( const vector< real_t > &  x,
const vector< real_t > &  y 
)

Return dot product of vectors x and y.

x and y are instances of class vector<double>

◆ Dot() [3/3]

template<class T_ >
T_ Dot ( size_t  n,
T_ *  x,
T_ *  y 
)

Return dot product of arrays x and y

n is the arrays size.

◆ get() [1/7]

template<class T_ >
T_ * get ( ) const

Return C-Array.

Non zero terms of matrix is stored row by row.

◆ get() [2/7]

int get ( DMatrix< real_t > &  A,
const string &  name 
)

Get DMatrix A instance from file if the field has the given name.

First time step is read from the XML file.

Parameters
[in,out]ADMatrix instance
[in]nameName to seek in the XML file

◆ get() [3/7]

int get ( DSMatrix< real_t > &  A,
const string &  name 
)

Get DSMatrix A instance from file if the field has the given name.

First time step is read from the XML file.

Parameters
[in,out]ADSMatrix instance
[in]nameName to seek in the XML file

◆ get() [4/7]

template<class T_ >
T_ get ( size_t  i,
size_t  j 
) const
virtual

Return entry (i,j) of matrix if this one is stored, 0 otherwise.

Parameters
[in]iRow index (Starting from 1)
[in]jColumn index (Starting from 1)

Implements Matrix< T_ >.

◆ get() [5/7]

real_t get ( Vect< real_t > &  v)

Get Vect v instance from file.

First time step is read from the XML file.

◆ get() [6/7]

int get ( Vect< real_t > &  v,
const string &  name 
)

Get Vect v instance from file if the field has the given name.

First time step is read from the XML file.

Parameters
[in,out]vVect instance
[in]nameName to seek in the XML file

◆ get() [7/7]

int get ( Vect< real_t > &  v,
real_t  t 
)

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]vVector instance
[in]tTime value

◆ getCode() [1/3]

int getCode ( int  side) const

Return code for a side number.

Parameters
[in]sideSide for which code is returned. Possible values are: MIN_X, MAX_X, MIN_Y, MAX_Y, MIN_Z, MAX_Z

◆ getCode() [2/3]

int getCode ( size_t  i,
size_t  j 
) const

Return code for a grid point.

Parameters
[in]ii-th index for node for which code is to be returned.
[in]jj-th index for node for which code is to be returned.

◆ getCode() [3/3]

int getCode ( size_t  i,
size_t  j,
size_t  k 
) const

Return code for a grid point.

Parameters
[in]ii-th index for node for which code is to be returned.
[in]jj-th index for node for which code is to be returned.
[in]kk-th index for node for which code is to be returned.

◆ getColInd()

template<class T_ >
size_t getColInd ( size_t  i) const
virtual

Return storage information.

Returns
Column index of the i-th stored element in matrix

Reimplemented from Matrix< T_ >.

◆ getDerivative()

real_t getDerivative ( string  funct,
real_t  x 
)

Return the derivative of the function at a given point.

Case of a function of one variable

Parameters
[in]functName of the function to be evaluated, as read from input file
[in]xValue of the variable
Returns
Derivative value

◆ getFunctName()

string getFunctName ( size_t  n) const

Get the name of a read function.

Parameters
[in]nindex of function
Returns
Name of function

◆ getLeastSquare()

void getLeastSquare ( Fct &  f)

Compute the resulting least square fitting function.

Once the function run() is invoked, this member function gives the analytical expression of the resulting least square fitting function

Parameters
[in]fReference to approximating function using the least square method

◆ getMaxVar()

real_t getMaxVar ( size_t  n,
size_t  i 
) const

Get maximal value of a variable.

Parameters
[in]nindex of function
[in]iindex of variable (between 1 and 3)
Returns

◆ getMinVar()

real_t getMinVar ( size_t  n,
size_t  i 
) const

Get minimal value of a variable.

Parameters
[in]nindex of function
[in]iindex of variable (Between 1 and 3)
Returns
Minimal value

◆ getNbFuncts()

size_t getNbFuncts ( ) const

Get the Number of read functions.

Returns
size_t Number of functions

◆ getNbVar()

size_t getNbVar ( size_t  n) const

Get number of variables of a given function.

Parameters
[in]nindex of function
Returns
Number of variables

◆ getNy()

size_t getNy ( ) const

Return number of grid intervals in the y-direction.

ny=0 for 1-D domains (segments)

◆ getNz()

size_t getNz ( ) const

Return number of grid intervals in the z-direction.

nz=0 for 1-D (segments) and 2-D domains (rectangles)

◆ getSize()

size_t getSize ( size_t  n,
size_t  i 
) const

Get number of points defining tabulation.

Parameters
[in]nindex of function (Starting from 1)
[in]iindex of variable (Between 1 and 3)
Returns
Size

◆ getValue() [1/4]

real_t getValue ( string  funct,
real_t  x 
)

Return the calculated value of the function.

Case of a function of one variable

Parameters
[in]functName of the function to be evaluated, as read from input file
[in]xValue of the variable
Returns
Computed value of the function

◆ getValue() [2/4]

real_t getValue ( string  funct,
real_t  x,
real_t  y 
)

Return the calculated value of the function.

Case of a function of two variables

Parameters
[in]functName of the function to be evaluated, as read from input file
[in]xValue of the first variable
[in]yValue of the second variable
Returns
Computed value of the function

◆ getValue() [3/4]

real_t getValue ( string  funct,
real_t  x,
real_t  y,
real_t  z 
)

Return the calculated value of the function.

Case of a function of three variables

Parameters
[in]functName of the funct to be evaluated, as read from input file
[in]xValue of the first variable
[in]yValue of the second variable
[in]zValue of the third variable
Returns
Computed value of the function

◆ getValue() [4/4]

real_t getValue ( string  funct,
real_t  x,
real_t  y,
real_t  z,
real_t  t 
)

Return the calculated value of the function.

Case of a function of three variables

Parameters
[in]functName of the funct to be evaluated, as read from input file
[in]xValue of the first variable
[in]yValue of the second variable
[in]zValue of the third variable
[in]tValue of the fourth variable
Returns
Computed value of the function

◆ GMRes()

template<class T_ >
int GMRes ( const SpMatrix< T_ > &  A,
int  prec,
const Vect< T_ > &  b,
Vect< T_ > &  x,
size_t  m,
int  max_it,
real_t  toler 
)

GMRes solver function.

This function uses the preconditioned GMRES algorithm to solve a linear system with a sparse matrix.
The global variable Verbosity enables choosing output message level

  • Verbosity < 2 : No output message
  • Verbosity > 1 : Notify executing the function CG
  • Verbosity > 2 : Notify convergence with number of performed iterations or divergence
  • Verbosity > 3 : Output each iteration number and residual
  • Verbosity > 6 : Print final solution if convergence
  • Verbosity > 10 : Print obtained solution at each iteration
Parameters
[in]AProblem matrix (Instance of class SpMatrix).
[in]precEnum variable selecting a preconditioner, among the values IDENT_PREC, DIAG_PREC, ILU_PREC or SSOR_PREC
[in]bRight-hand side vector (class Vect)
[in,out]xVect instance containing initial solution guess in input and solution of the linear system in output (If iterations have succeeded).
[in]mNumber of subspaces to generate for iterations.
[in]max_itMaximum number of iterations.
[in]tolerTolerance for convergence (measured in relative weighted 2-Norm).
Returns
Number of performed iterations,
Template Parameters
<T_>Data type (double, float, complex<double>, ...)
Author
Rachid Touzani

◆ isActive() [1/3]

int isActive ( size_t  i) const

Say if cell is active or not (1-D grid)

Parameters
[in]iIndex of cell
Returns
1 if cell is active, 0 if not

◆ isActive() [2/3]

int isActive ( size_t  i,
size_t  j 
) const

Say if cell is active or not (2-D grid)

Parameters
[in]ii-th index of cell
[in]jj-th index of cell
Returns
1 if cell is active, 0 if not

◆ isActive() [3/3]

int isActive ( size_t  i,
size_t  j,
size_t  k 
) const

Say if cell is active or not (3-D grid)

Parameters
[in]ii-th index of cell
[in]jj-th index of cell
[in]kk-th index of cell
Returns
1 if cell is active, 0 if not

◆ Label() [1/3]

size_t Label ( const Edge ed)

Return label of a given edge.

Parameters
[in]edReference to Edge instance
Returns
Label of edge
Author
Rachid Touzani

◆ Label() [2/3]

size_t Label ( const Element el)

Return label of a given element.

Parameters
[in]elReference to Element instance
Returns
Label of element
Author
Rachid Touzani

◆ Label() [3/3]

size_t Label ( const Side sd)

Return label of a given side.

Parameters
[in]sdReference to Side instance
Returns
Label of side
Author
Rachid Touzani

◆ Laplace1D() [1/2]

template<class T_ >
void Laplace1D ( real_t  h)

Define matrix as the one of 3-point finite difference discretization of the second derivative.

Parameters
[in]hmesh size

◆ Laplace1D() [2/2]

template<class T_ >
void Laplace1D ( size_t  n,
real_t  h 
)

Sets the matrix as the one for the Laplace equation in 1-D.

The matrix is initialized as the one resulting from P1 finite element discretization of the classical elliptic operator -u'' = f with homogeneous Dirichlet boundary conditions

Remarks
This function is available for real valued matrices only.
Parameters
[in]nSize of matrix (Number of rows)
[in]hMesh size (assumed constant)

◆ Laplace2D()

template<class T_ >
void Laplace2D ( size_t  nx,
size_t  ny 
)

Sets the matrix as the one for the Laplace equation in 2-D.

The matrix is initialized as the one resulting from P1 finite element discretization of the classical elliptic operator -Delta u = f with homogeneous Dirichlet boundary conditions

Remarks
This function is available for real valued matrices only.
Parameters
[in]nxNumber of unknowns in the x-direction
[in]nyNumber of unknowns in the y-direction
Remarks
The number of rows is equal to nx*ny

◆ MeshToMesh() [1/2]

void MeshToMesh ( const Vect< real_t > &  u1,
Vect< real_t > &  u2,
size_t  nx,
size_t  ny = 0,
size_t  nz = 0,
size_t  dof = 1 
)

Function to redefine a vector defined on a mesh to a new mesh.

The program interpolates (piecewise linear) first the vector on a finer structured grid. Then the values on the new mesh nodes are computed.

Remarks
For efficiency the number of grid cells must be large enough so that interpolation provides efficient accuracy
Parameters
[in]u1Input vector of nodal values defined on first mesh. This vector instance must contain Mesh instance
[out]u2Output vector of nodal values defined on second mesh. This vector instance must contain Mesh instance
[in]nxNumber of cells in the x-direction in the fine structured grid
[in]nyNumber of cells in the y-direction in the fine structured grid The default value of ny is 0, i.e. a 1-D grid
[in]nzNumber of cells in the z-direction in the fine structured grid The default value of nz is 0, i.e. a 1-D or 2-D grid
[in]dofLabel of degree of freedom of vector u. Only this dof is considered. [Default: 1]
Note
The input vector u1 is a one degree of freedom per node vector, i.e. its size must be equal (or greater than) the total number of nodes of mesh m1. The size of vector u2 is deduced from the mesh m2
Author
Rachid Touzani

◆ MeshToMesh() [2/2]

void MeshToMesh ( Mesh m1,
Mesh m2,
const Vect< real_t > &  u1,
Vect< real_t > &  u2,
const Point< real_t > &  xmin,
const Point< real_t > &  xmax,
size_t  nx,
size_t  ny,
size_t  nz,
size_t  dof = 1 
)

Function to redefine a vector defined on a mesh to a new mesh.

The program interpolates (piecewise linear) first the vector on a finer structured grid. Then the values on the new mesh nodes are computed. In this function the grid rectangle is defined so that this one can cover only a submesh of m1.

Remarks
For efficiency the number of grid cells must be large enough so that interpolation provides efficient accuracy
Parameters
[in]m1Reference to the first mesh instance
[out]m2Reference to the second mesh instance
[in]u1Input vector of nodal values defined on first mesh
[out]u2Output vector of nodal values defined on second mesh
[in]xminPoint instance containing minimal coordinates of the rectangle that defines the grid
[in]xmaxPoint instance containing maximal coordinates of the rectangle that defines the grid
[in]nxNumber of cells in the x-direction in the fine structured grid
[in]nyNumber of cells in the y-direction in the fine structured grid The default value of ny is 0, i.e. a 1-D grid
[in]nzNumber of cells in the z-direction in the fine structured grid The default value of nz is 0, i.e. a 1-D or 2-D grid
[in]dofLabel of degree of freedom of vector u. Only this dof is considered. [Default: 1]
Note
The input vector u1 is a one degree of freedom per node vector, i.e. its size must be equal (or greater than) the total number of nodes of mesh m1. The size of vector u2 is deduced from the mesh m2
Author
Rachid Touzani

◆ Mult()

template<class T_ >
void Mult ( const Vect< T_ > &  x,
Vect< T_ > &  y 
) const
virtual

Multiply matrix by vector and save in another one.

Parameters
[in]xVector to multiply by matrix
[out]yVector that contains on output the result.

Implements Matrix< T_ >.

◆ MultAdd() [1/2]

template<class T_ >
void MultAdd ( const Vect< T_ > &  x,
Vect< T_ > &  y 
) const
virtual

Multiply matrix by vector x and add to y.

Parameters
[in]xVector to multiply by matrix
[out]yVector to add to the result. y contains on output the result.

Implements Matrix< T_ >.

◆ MultAdd() [2/2]

template<class T_ >
void MultAdd ( T_  a,
const Vect< T_ > &  x,
Vect< T_ > &  y 
) const
virtual

Multiply matrix by vector a*x and add to y.

Parameters
[in]aConstant to multiply by matrix
[in]xVector to multiply by matrix
[out]yVector to add to the result. y contains on output the result.

Implements Matrix< T_ >.

◆ NodeLabel()

size_t NodeLabel ( const Side sd,
size_t  n 
)

Return global label of node local label in side.

Parameters
[in]sdReference to Side instance
[in]nLocal label of node in side
Returns
Global label of node
Author
Rachid Touzani

◆ Nurbs()

void Nurbs ( )

Run Nurbs modelling.

Remarks
The resulting vector of curve points is the vector p given by the constructor or by setData

◆ open() [1/2]

void open ( )

Open file.

Case where file name has been previously given (in the constructor).

◆ open() [2/2]

void open ( const string &  file,
AccessType  access 
)

Open file.

Parameters
[in]fileFile name.
[in]accessAccess code. This number is to be chosen among two enumerated values:
  • IOField::IN to read the file
  • IOField::OUT to write on it

◆ operator()() [1/5]

template<class T_ >
T_ operator() ( size_t  i) const

Operator () with one argument (Constant version)

Returns i-th position in the array storing matrix entries. The first entry is at location 1. Entries are stored row by row.

◆ operator()() [2/5]

template<class T_ >
T_ & operator() ( size_t  i,
size_t  j 
)
virtual

Operator () (Non constant version)

Parameters
[in]iRow index
[in]jColumn index

Implements Matrix< T_ >.

◆ operator()() [3/5]

template<class T_ >
T_ & operator() ( size_t  i,
size_t  j 
)
virtual

Operator () (Non constant version).

Parameters
[in]iRow index
[in]jColumn index

Implements Matrix< T_ >.

◆ operator()() [4/5]

template<class T_ >
T_ operator() ( size_t  i,
size_t  j 
) const
virtual

Operator () (Constant version)

Parameters
[in]iRow index
[in]jColumn index

Implements Matrix< T_ >.

◆ operator()() [5/5]

template<class T_ >
T_ operator() ( size_t  i,
size_t  j 
) const
virtual

Operator () (Constant version).

Parameters
[in]iRow index
[in]jColumn index

Implements Matrix< T_ >.

◆ operator*() [1/30]

template<class T_ >
Vect< T_ > operator* ( const DMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ADMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b

◆ operator*() [2/30]

template<class T_ >
Vect< T_ > operator* ( const DSMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ADSMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b

◆ operator*() [3/30]

template<class T_ >
Point2D< T_ > operator* ( const int &  a,
const Point2D< T_ > &  b 
)

Operator *.

Return point b divided by integer constant a

Author
Rachid Touzani

◆ operator*() [4/30]

template<class T_ >
Point< T_ > operator* ( const int &  a,
const Point< T_ > &  b 
)

Operator *.

Return point b divided by integer constant a

Author
Rachid Touzani

◆ operator*() [5/30]

SpaceTime operator* ( const int &  a,
const SpaceTime b 
)

Operator *.

Return point b divided by integer constant a

Author
Rachid Touzani

◆ operator*() [6/30]

template<class T_ , size_t NR_, size_t NC_>
LocalVect< T_, NR_, NC_ > operator* ( const LocalMatrix< T_, NR_, NC_ > &  x,
const LocalVect< T_, NC_ > &  x 
)

Operator * (Multiply matrix A by vector x)

This function performs a matrix-vector product and returns resulting vector as a reference to LocalVect instance

Returns
A*x

◆ operator*() [7/30]

template<class T_ >
Point2D< T_ > operator* ( const Point2D< T_ > &  b,
const int &  a 
)

Operator *

Return point b postmultiplied by constant a

Author
Rachid Touzani

◆ operator*() [8/30]

template<class T_ >
T_ operator* ( const Point2D< T_ > &  b,
const Point2D< T_ > &  a 
)

Operator *.

Return point b postmultiplied by integer constant a.

Author
Rachid Touzani

◆ operator*() [9/30]

template<class T_ >
Point2D< T_ > operator* ( const Point2D< T_ > &  b,
const T_ &  a 
)

Operator /

Return point b postmultiplied by constant a

Author
Rachid Touzani

◆ operator*() [10/30]

template<class T_ >
T_ operator* ( const Point< T_ > &  b,
const Point< T_ > &  a 
)

Operator *

Return inner (scalar) product of points a and b

Author
Rachid Touzani

◆ operator*() [11/30]

template<class T_ >
Point< T_ > operator* ( const Point< T_ > &  b,
const int &  a 
)

Operator *

Return point b postmultiplied by constant a

Author
Rachid Touzani

◆ operator*() [12/30]

template<class T_ >
Point< T_ > operator* ( const Point< T_ > &  b,
const T_ &  a 
)

Operator /

Return point b multiplied by constant a

◆ operator*() [13/30]

SpaceTime operator* ( const real_t &  a,
const SpaceTime b 
)

Operator *

Return point b premultiplied by constant a

Author
Rachid Touzani

◆ operator*() [14/30]

template<class T_ >
Vect< T_ > operator* ( const SkMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ASkMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b
Author
Rachid Touzani

◆ operator*() [15/30]

template<class T_ >
Vect< T_ > operator* ( const SkSMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ASkSMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b
Author
Rachid Touzani

◆ operator*() [16/30]

real_t operator* ( const SpaceTime b,
const SpaceTime a 
)

Operator *

Return inner (scalar) product of points a and b

Author
Rachid Touzani

◆ operator*() [17/30]

SpaceTime operator* ( const SpaceTime b,
const int &  a 
)

Operator *

Return point b postmultiplied by constant a

Author
Rachid Touzani

◆ operator*() [18/30]

SpaceTime operator* ( const SpaceTime b,
const real_t &  a 
)

Operator /

Return point b multiplied by constant a

◆ operator*() [19/30]

template<class T_ >
Vect< T_ > operator* ( const SpMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ASpMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b
Author
Rachid Touzani

◆ operator*() [20/30]

template<class T_ >
Point2D< T_ > operator* ( const T_ &  a,
const Point2D< T_ > &  b 
)

Operator *.

Return point b premultiplied by constant a

Author
Rachid Touzani

◆ operator*() [21/30]

template<class T_ >
Point< T_ > operator* ( const T_ &  a,
const Point< T_ > &  b 
)

Operator *

Return point b premultiplied by constant a

Author
Rachid Touzani

◆ operator*() [22/30]

template<class T_ >
Vect< T_ > operator* ( const T_ &  a,
const Vect< T_ > &  x 
)

Operator * (Premultiplication of vector by constant)

Returns
a*x

◆ operator*() [23/30]

template<class T_ >
Vect< T_ > operator* ( const TrMatrix< T_ > &  A,
const Vect< T_ > &  b 
)

Operator * (Multiply vector by matrix and return resulting vector.

Parameters
[in]ATrMatrix instance to multiply by vector
[in]bVect instance
Returns
Vect instance containing A*b
Author
Rachid Touzani

◆ operator*() [24/30]

template<class T_ >
Vect< T_ > operator* ( const Vect< T_ > &  x) const

Operator * to multiply matrix by a vector.

Parameters
[in]xVect instance to multiply by
Returns
Vector product of matrix by x

◆ operator*() [25/30]

template<class T_ >
Vect< T_ > operator* ( const Vect< T_ > &  x,
const T_ &  a 
)

Operator * (Postmultiplication of vector by constant)

Returns
x*a

◆ operator*() [26/30]

real_t operator* ( const vector< real_t > &  x,
const vector< real_t > &  y 
)

Operator * (Dot product of 2 vector instances)

Returns
x.y

◆ operator*() [27/30]

template<class T_ >
BMatrix< T_ > operator* ( T_  a,
const BMatrix< T_ > &  A 
)

Operator * (Premultiplication of matrix by constant)

Returns
a*A

◆ operator*() [28/30]

template<class T_ , size_t NR_, size_t NC_>
LocalMatrix< T_, NR_, NC_ > operator* ( T_  a,
const LocalMatrix< T_, NR_, NC_ > &  x 
)

Operator * (Multiply matrix x by scalar a)

Returns
a*x

◆ operator*() [29/30]

template<class T_ , size_t N_>
LocalVect< T_, N_ > operator* ( T_  a,
const LocalVect< T_, N_ > &  x 
)

Operator * (Premultiplication of vector by constant)

Returns
a*x

◆ operator*() [30/30]

template<class T_ >
TrMatrix< T_ > operator* ( T_  a,
const TrMatrix< T_ > &  A 
)

Operator * (Premultiplication of matrix by constant)

Returns
a*A
Author
Rachid Touzani

◆ operator*=() [1/2]

template<class T_ >
SpMatrix< T_ > & operator*= ( const T_ &  a)

Operator *= to premultiply matrix by a constant.

Parameters
[in]aConstant to multiply matrix by
Returns
Resulting matrix

◆ operator*=() [2/2]

template<class T_ >
TrMatrix< T_ > & operator*= ( const T_ &  x)

Operator *=.

Premultiply matrix entries by constant value x.

◆ operator+() [1/8]

template<class T_ , size_t N_>
LocalVect< T_, N_ > operator+ ( const LocalVect< T_, N_ > &  x,
const LocalVect< T_, N_ > &  y 
)

Operator + (Add two vectors)

Returns
x+y

◆ operator+() [2/8]

template<class T_ >
Point2D< T_ > operator+ ( const Point2D< T_ > &  a,
const Point2D< T_ > &  b 
)

Operator +.

Return sum of two points a and b

Author
Rachid Touzani

◆ operator+() [3/8]

template<class T_ >
Point2D< T_ > operator+ ( const Point2D< T_ > &  a,
const T_ &  x 
)

Operator +.

Translate a by x

Author
Rachid Touzani

◆ operator+() [4/8]

template<class T_ >
Point< T_ > operator+ ( const Point< T_ > &  a,
const Point< T_ > &  b 
)

Operator +

Return sum of two points a and b

Author
Rachid Touzani

◆ operator+() [5/8]

template<class T_ >
Point< T_ > operator+ ( const Point< T_ > &  a,
const T_ &  x 
)

Operator +

Translate a by x

Author
Rachid Touzani

◆ operator+() [6/8]

SpaceTime operator+ ( const SpaceTime a,
const real_t &  x 
)

Operator +

Translate a by x

Author
Rachid Touzani

◆ operator+() [7/8]

SpaceTime operator+ ( const SpaceTime a,
const SpaceTime b 
)

Operator +

Return sum of two points a and b

Author
Rachid Touzani

◆ operator+() [8/8]

template<class T_ >
Vect< T_ > operator+ ( const Vect< T_ > &  x,
const Vect< T_ > &  y 
)

Operator + (Addition of two instances of class Vect)

Returns
x + y

◆ operator-() [1/12]

Figure operator- ( const Figure f1,
const Figure f2 
)

Function to define a Figure instance as the set subtraction of two Figure instances.

Parameters
[in]f1First Figure instance to subtract from
[in]f2Second Figure instance to subtract
Returns
Updated resulting Figure instance

◆ operator-() [2/12]

template<class T_ , size_t N_>
LocalVect< T_, N_ > operator- ( const LocalVect< T_, N_ > &  x,
const LocalVect< T_, N_ > &  y 
)

Operator - (Subtract two vectors)

Returns
x-y

◆ operator-() [3/12]

template<class T_ >
Point2D< T_ > operator- ( const Point2D< T_ > &  a)

Unary Operator -

Return minus a

Author
Rachid Touzani

◆ operator-() [4/12]

template<class T_ >
Point2D< T_ > operator- ( const Point2D< T_ > &  a,
const Point2D< T_ > &  b 
)

Operator -

Return point a minus point b

Author
Rachid Touzani

◆ operator-() [5/12]

template<class T_ >
Point2D< T_ > operator- ( const Point2D< T_ > &  a,
const T_ &  x 
)

Operator -

Translate a by -x

Author
Rachid Touzani

◆ operator-() [6/12]

template<class T_ >
Point< T_ > operator- ( const Point< T_ > &  a)

Unary Operator -

Return minus a

Author
Rachid Touzani

◆ operator-() [7/12]

template<class T_ >
Point< T_ > operator- ( const Point< T_ > &  a,
const Point< T_ > &  b 
)

Operator -

Return point a minus point b

Author
Rachid Touzani

◆ operator-() [8/12]

template<class T_ >
Point< T_ > operator- ( const Point< T_ > &  a,
const T_ &  x 
)

Operator -

Translate a by -x

Author
Rachid Touzani

◆ operator-() [9/12]

SpaceTime operator- ( const SpaceTime a)

Unary Operator -

Return minus a

Author
Rachid Touzani

◆ operator-() [10/12]

SpaceTime operator- ( const SpaceTime a,
const real_t &  x 
)

Operator -

Translate a by -x

Author
Rachid Touzani

◆ operator-() [11/12]

SpaceTime operator- ( const SpaceTime a,
const SpaceTime b 
)

Operator -

Return point a minus point b

Author
Rachid Touzani

◆ operator-() [12/12]

template<class T_ >
Vect< T_ > operator- ( const Vect< T_ > &  x,
const Vect< T_ > &  y 
)

Operator - (Difference between two vectors of class Vect)

Returns
x - y

◆ operator/() [1/5]

template<class T_ >
Point2D< T_ > operator/ ( const Point2D< T_ > &  b,
const T_ &  a 
)

Operator /

Return point b divided by constant a

Author
Rachid Touzani

◆ operator/() [2/5]

template<class T_ >
Point< T_ > operator/ ( const Point< T_ > &  b,
const T_ &  a 
)

Operator /

Return point b divided by constant a

Author
Rachid Touzani

◆ operator/() [3/5]

SpaceTime operator/ ( const SpaceTime b,
const real_t &  a 
)

Operator /

Return point b divided by constant a

Author
Rachid Touzani

◆ operator/() [4/5]

template<class T_ >
Vect< T_ > operator/ ( const Vect< T_ > &  x,
const T_ &  a 
)

Operator / (Divide vector entries by constant)

Returns
x/a

◆ operator/() [5/5]

template<class T_ , size_t N_>
LocalVect< T_, N_ > operator/ ( T_  a,
const LocalVect< T_, N_ > &  x 
)

Operator / (Division of vector by constant)

Returns
x/a

◆ operator<()

bool operator< ( const SpaceTime a,
const SpaceTime b 
)

Comparison operator. Returns true if all components of first vector are lower than those of second one.

Return minus a

Author
Rachid Touzani

◆ operator<<() [1/21]

ostream & operator<< ( ostream &  s,
const complex_t &  x 
)

Output a complex number.

Author
Rachid Touzani

◆ operator<<() [2/21]

ostream & operator<< ( ostream &  s,
const EdgeList el 
)

Output EdgeList instance.

Author
Rachid Touzani

◆ operator<<() [3/21]

ostream & operator<< ( ostream &  s,
const ElementList el 
)

Output ElementList instance.

Author
Rachid Touzani

◆ operator<<() [4/21]

ostream & operator<< ( ostream &  s,
const Mesh ms 
)

Output mesh data.

Level of mesh output depends on the global variable Verbosity

  • If Verbosity=0 or Verbosity=1, this function outputs only principal mesh parameters: number of nodes, number of elements, ...
  • If Verbosity>1, this function outputs in addition the list of 10 first nodes, elements and sides
  • If Verbosity>2, this function outputs in addition the list of 50 first nodes, elements and sides
  • If Verbosity>3, this function outputs all mesh data

◆ operator<<() [5/21]

ostream & operator<< ( ostream &  s,
const Node nd 
)

Output node data.

Author
Rachid Touzani

◆ operator<<() [6/21]

ostream & operator<< ( ostream &  s,
const NodeList nl 
)

Output NodeList instance.

Author
Rachid Touzani

◆ operator<<() [7/21]

ostream & operator<< ( ostream &  s,
const Side sd 
)

Output side data.

Author
Rachid Touzani

◆ operator<<() [8/21]

ostream & operator<< ( ostream &  s,
const SideList sl 
)

Output SideList instance.

Author
Rachid Touzani

◆ operator<<() [9/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const SkMatrix< T_ > &  a 
)

Output matrix in output stream.

Author
Rachid Touzani
Author
Rachid Touzani

◆ operator<<() [10/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const SkSMatrix< T_ > &  a 
)

Output matrix in output stream.

Author
Rachid Touzani

◆ operator<<() [11/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const SpMatrix< T_ > &  A 
)

Output matrix in output stream.

Author
Rachid Touzani

◆ operator<<() [12/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const std::list< T_ > &  l 
)

Output a vector instance.

Author
Rachid Touzani

◆ operator<<() [13/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const std::pair< T_, T_ > &  a 
)

Output a pair instance.

Author
Rachid Touzani

◆ operator<<() [14/21]

ostream & operator<< ( ostream &  s,
const std::string &  c 
)

Output a string.

Author
Rachid Touzani

◆ operator<<() [15/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const TrMatrix< T_ > &  a 
)

Output matrix in output stream.

Author
Rachid Touzani

◆ operator<<() [16/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const Vect< T_ > &  v 
)

Output vector in output stream.

Level of vector output depends on the global variable Verbosity

  • If Verbosity=0, this function outputs vector size only.
  • If Verbosity>0, this function outputs vector size, vector name, value of time, and number of components
  • If Verbosity>1, this function outputs in addition the first 10 entries in vector
  • If Verbosity>2, this function outputs in addition the first 50 entries in vector
  • If Verbosity>3, this function outputs in addition the first 100 entries in vector
  • If Verbosity>4, this function outputs all vector entries
Author
Rachid Touzani

◆ operator<<() [17/21]

template<class T_ >
ostream & operator<< ( ostream &  s,
const vector< T_ > &  v 
)

Output a vector instance.

Author
Rachid Touzani

◆ operator<<() [18/21]

ostream & operator<< ( ostream &  s,
TimeStepping ts 
)

Output differential system information.

Author
Rachid Touzani

◆ operator<<() [19/21]

template<class T_ >
ostream & operator<< ( std::ostream &  s,
const Point2D< T_ > &  a 
)

Output point coordinates.

Author
Rachid Touzani

◆ operator<<() [20/21]

template<class T_ >
ostream & operator<< ( std::ostream &  s,
const Point< T_ > &  a 
)

Output point coordinates.

Author
Rachid Touzani

◆ operator<<() [21/21]

ostream & operator<< ( std::ostream &  s,
const SpaceTime a 
)

Output space-time point coordinates.

Author
Rachid Touzani

◆ operator=() [1/2]

template<class T_ >
void operator= ( const T_ &  x)

Operator =.

Assign constant value x to all matrix entries.

◆ operator=() [2/2]

template<class T_ >
TrMatrix< T_ > & operator= ( const TrMatrix< T_ > &  m)

Operator =.

Copy matrix m to current matrix instance.

◆ operator==() [1/4]

operator== ( const Element el1,
const Element el2 
)

Check equality between 2 elements.

Parameters
[in]el1Reference to first Side instance
[in]el2Reference to second Side instance
Returns
true is elements are equal, i.e. if they have the same nodes, false if not.
Author
Rachid Touzani

◆ operator==() [2/4]

template<class T_ >
bool operator== ( const Point2D< T_ > &  a,
const Point2D< T_ > &  b 
)

Operator ==.

Return true if a=b, false if not.

Author
Rachid Touzani

◆ operator==() [3/4]

bool operator== ( const Side sd1,
const Side sd2 
)

Check equality between 2 sides.

Parameters
[in]sd1Reference to first Side instance
[in]sd2Reference to second Side instance
Returns
true is sides are equal, i.e. if they have the same nodes, false if not.
Author
Rachid Touzani

◆ operator==() [4/4]

bool operator== ( const SpaceTime a,
const SpaceTime b 
)

Operator ==

Return true if a=b, false if not.

Author
Rachid Touzani

◆ operator[]()

template<class T_ >
T_ operator[] ( size_t  i) const

Operator [] (Constant version).

Returns i-th position in the array storing matrix entries. The first entry is at location 0. Entries are stored row by row.

◆ out_complex()

string out_complex ( real_t  x,
real_t  y 
)

Return string to conviently display a complex number.

Parameters
[in]xReal part
[in]yImaginary part

◆ Prev()

T_ * Prev ( )

Return element previous vector.

This is the vector given in time dependent constructor. It is returned as a C-array.

◆ put()

void put ( const Vect< real_t > &  v)

Store Vect instance v in file.

Parameters
[in]vVect instance to store

◆ qksort()

template<class T_ , class C_ >
void qksort ( std::vector< T_ > &  a,
int  begin,
int  end,
C_  compare 
)

Function to sort a vector according to a key function.

qksort uses the famous quick sorting algorithm.

Parameters
[in,out]aVector to sort.
[in]beginindex of starting index (0 for the beginning of the vector)
[in]endindex of ending index
[in]compareA function object that implements the ordering. The user must provide this function that returns a boolean function that is true if the first argument is less than the second and false if not.
Author
Rachid Touzani

◆ run()

int run ( )

Run approximation process.

Results are stored in designated vector(s)

Returns
0 if no problem occurred given in set...() functions.

◆ saveField() [1/2]

void saveField ( const Vect< real_t > &  v,
const Mesh mesh,
string  output_file,
int  opt 
)

Save a vector to an output file in a given file format.

Case where the vector does not contain mesh information

Parameters
[in]vVect instance to save
[in]meshMesh instance
[in]output_fileOutput file where to save the vector
[in]optOption to choose file format to save. This is to be chosen among enumerated values: GMSH, GNUPLOT, MATLAB, TECPLOT, VTK
Author
Rachid Touzani

◆ saveField() [2/2]

void saveField ( Vect< real_t > &  v,
const Grid g,
string  output_file,
int  opt = VTK 
)

Save a vector to an output file in a given file format, for a structured grid data.

Parameters
[in]vVect instance to save
[in]gGrid instance
[in]output_fileOutput file where to save the vector
[in]optOption to choose file format to save. This is to be chosen among enumerated values: GMSH, VTK
Author
Rachid Touzani

◆ saveGmsh() [1/2]

void saveGmsh ( const string &  file,
const Mesh mesh 
)

This function outputs a Mesh instance in a file in Gmsh format.

Note
Gmsh is a free mesh generator that can be downloaded from the site: http://www.geuz.org/gmsh/
Parameters
[in]fileOutput file in Gmsh format.
[in]meshMesh instance to save.
Author
Rachid Touzani

◆ saveGmsh() [2/2]

void saveGmsh ( Mesh mesh,
string  input_file,
string  output_file,
int  f = 1 
)

Save a vector to an output Gmsh file.

Gmsh is a free mesh generator and postprocessor that can be downloaded from the site:
http://www.geuz.org/gmsh/

Parameters
[in]meshReference to Mesh instance
[in]input_fileInput file (OFELI XML file containing a field).
[in]output_fileOutput file (Gmsh format file)
[in]fField is stored each f time step [Default: 1]
Author
Rachid Touzani

◆ saveGMSH()

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_fileOutput file name where to store using GMSH format
[in]mesh_fileFile containing mesh data

◆ saveGnuplot() [1/2]

void saveGnuplot ( const string &  file,
const Mesh mesh 
)

This function outputs a Mesh instance in a file in Gmsh format.

Note
Gnuplot is a command-line driven program for producing 2D and 3D plots. It is under the GNU General Public License. Available information can be found in the site:
http://www.gnuplot.info/
Parameters
[out]fileOutput file in Gnuplot format.
[in]meshMesh instance to save.
Author
Rachid Touzani

◆ saveGnuplot() [2/2]

void saveGnuplot ( Mesh mesh,
string  input_file,
string  output_file,
int  f = 1 
)

Save a vector to an input Gnuplot file.

Gnuplot is a command-line driven program for producing 2D and 3D plots. It is under the GNU General Public License. Available information can be found in the site:
http://www.gnuplot.info/

Parameters
[in]meshReference to Mesh instance
[in]input_fileInput file (OFELI XML file containing a field).
[in]output_fileOutput file (gnuplot format file)
[in]fField is stored each f time step [Default: 1]
Author
Rachid Touzani

◆ saveTecplot() [1/2]

void saveTecplot ( const string &  file,
const Mesh mesh 
)

This function outputs a Mesh instance in a file in Tecplot format.

Note
Tecplot is high quality post graphical commercial processing program developed by Amtec. Available information can be found in the site:
http://www.tecplot.com
Parameters
[out]fileOutput file in Tecplot format.
[in]meshMesh instance to save.
Author
Rachid Touzani

◆ saveTecplot() [2/2]

void saveTecplot ( Mesh mesh,
string  input_file,
string  output_file,
int  f = 1 
)

Save a vector to an output file to an input Tecplot file.

Tecplot is high quality post graphical commercial processing program developed by Amtec. Available information can be found in the site: http://www.tecplot.com

Parameters
[in]meshReference to Mesh instance
[in]input_fileInput file (OFELI XML file containing a field).
[in]output_fileOutput file (gnuplot format file)
[in]fField is stored each f time step [Default: 1]
Author
Rachid Touzani

◆ saveVTK() [1/2]

void saveVTK ( const string &  file,
const Mesh mesh 
)

This function outputs a Mesh instance in a file in VTK format.

Note
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics. Available information can be found in the site:
http://public.kitware.com/VTK/
Parameters
[out]fileOutput file in VTK format.
[in]meshMesh instance to save.
Author
Rachid Touzani

◆ saveVTK() [2/2]

saveVTK ( Mesh mesh,
string  input_file,
string  output_file,
int  f = 1 
)

Save a vector to an output VTK file.

The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics. Available information can be found in the site:
http://public.kitware.com/VTK/

Parameters
[in]meshReference to Mesh instance
[in]input_fileInput file (OFELI XML file containing a field).
[in]output_fileOutput file (VTK format file)
[in]fField is stored each f time step [Default: 1]
Author
Rachid Touzani

◆ Scale() [1/3]

template<class T_ >
void Scale ( T_  a,
const Vect< T_ > &  x,
Vect< T_ > &  y 
)

Mutiply vector x by a and save result in vector y

x and y are instances of class Vect<T_>

◆ Scale() [2/3]

template<class T_ >
void Scale ( T_  a,
const vector< T_ > &  x,
vector< T_ > &  y 
)

Mutiply vector x by a and save result in vector y

x and y are instances of class vector<T_>

◆ Scale() [3/3]

template<class T_ >
void Scale ( T_  a,
vector< T_ > &  x 
)

Mutiply vector x by a

x is an instance of class vector<T_>

◆ set() [1/5]

void set ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
real_t &  a0,
real_t &  a1 
)

Set least square approximation by linear regression.

Define 1-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a0 + a1*x

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]a0Coefficient of constant term
[out]a1Coefficient of first degree term

◆ set() [2/5]

void set ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
size_t  N,
Vect< real_t > &  a 
)

Set least square approximation by polynomial regression.

Define N-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a[0] + a[1]*x + ... + a[N]*x^N

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[in]NDegree of approximation polynomial
[out]aVector of coefficients of polynomial as defined here above

◆ set() [3/5]

void set ( DMatrix< real_t > &  B,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Set least square approximation using least square matrix.

Matrix entries is defined by B(k,i) as the k-th basis function evaluated at x(i)

Parameters
[in]BRectangle matrix of Least square approximation
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ set() [4/5]

template<class T_ >
void set ( size_t  i,
size_t  j,
const T_ &  val 
)
virtual

Assign a value to an entry of the matrix.

Parameters
[in]iRow index
[in]jColumn index
[in]valValue to assign to a(i,j)

Implements Matrix< T_ >.

◆ set() [5/5]

void set ( vector< Fct * > &  f,
const Vect< real_t > &  x,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Set least square approximation using given basis functions.

The least square approximation defines the function: a[0]*f[0] + a[1]*f[1] + ... + a[N]*f[N]

Parameters
[in]fVector of references to functions (class Fct) defining basis of least square approximation
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ setBezier()

void setBezier ( size_t  n,
size_t  nc,
const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Define Bezier modelling.

Parameters
[in]nNumber of defining polygon vertices
[in]ncNumber of points to be calculated on the curve
[in]bVector containing the defining polygon vertices
[out]pVector containing the resulting curve points

◆ setBezierPar()

void setBezierPar ( size_t  n,
size_t  nc 
)

Set parameters for BSpline modelling.

Parameters
[in]nNumber of defining polygon vertices
[in]ncNumber of points to be calculated on the curve

◆ setBezierSurface()

void setBezierSurface ( size_t  m,
size_t  n,
size_t  npu,
size_t  npw,
const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Define Bezier surface modelling.

Parameters
[in]mOne less than the number of polygon vertices in w direction
[in]nOne less than the number of polygon vertices in u direction
[in]npuNumber of parametric lines in the u direction
[in]npwNumber of parametric lines in the w direction
[in]bVector containing the defining polygon vertices
[out]pVector containing the resulting curve points

◆ setBezierSurfacePar()

void setBezierSurfacePar ( size_t  m,
size_t  n,
size_t  npu,
size_t  npw 
)

Set parameters for BSpline modelling.

Parameters
[in]mOne less than the number of polygon vertices in w direction
[in]nOne less than the number of polygon vertices in u direction
[in]npuNumber of parametric lines in the u direction
[in]npwNumber of parametric lines in the w direction

◆ setBSpline()

void setBSpline ( size_t  n,
size_t  c,
size_t  np,
const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Define BSpline approximation.

We set here BSpline approximation data. No computation are done yet.

Parameters
[in]nNumber of defining polygon vertices
[in]cOrder of the B-spline basis function
[in]npNumber of points to be calculated on the curve
[in]bVector containing the defining polygon vertices
[out]pVector containing the resulting curve points

◆ setBSplinePar()

void setBSplinePar ( size_t  n,
size_t  c,
size_t  np 
)

Set parameters for BSpline modelling.

Parameters
[in]nNumber of defining polygon vertices
[in]cOrder of the B-spline basis function
[in]npNumber of points to be calculated on the curve

◆ setBSplineSurface()

void setBSplineSurface ( size_t  m,
size_t  n,
size_t  c,
size_t  d,
size_t  npu,
size_t  npw,
const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Define BSpline surface modelling.

Parameters
[in]mOne less than the number of polygon vertices in w direction
[in]nOne less than the number of polygon vertices in u direction
[in]cOrder of the B-spline basis function in w direction
[in]dOrder of the B-spline basis function in u direction
[in]npuNumber of parametric lines in the u direction
[in]npwNumber of parametric lines in the w direction
[in]bVector containing the defining polygon vertices
[out]pVector containing the resulting curve points

◆ setBSplineSurfacePar()

void setBSplineSurfacePar ( size_t  m,
size_t  n,
size_t  c,
size_t  d,
size_t  npu,
size_t  npw 
)

Set parameters for BSplineS modelling.

Parameters
[in]mOne less than the number of polygon vertices in w direction
[in]nOne less than the number of polygon vertices in u direction
[in]cOrder of the B-spline basis function in w direction
[in]dOrder of the B-spline basis function in u direction
[in]npuNumber of parametric lines in the u direction
[in]npwNumber of parametric lines in the w direction

◆ setCode() [1/2]

void setCode ( int  side,
int  code 
)

Set a code for grid points on sides.

Parameters
[in]sideSide for which code is assigned. Possible values are: MIN_X, MAX_X, MIN_Y, MAX_Y, MIN_Z, MAX_Z
[in]codeCode to assign.

◆ setCode() [2/2]

void setCode ( string  exp,
int  code 
)

Set a code for some grid points.

Parameters
[in]expRegular expression that determines the set of grid points on which the code is applied.
[in]codeCode to assign.

◆ setData() [1/2]

void setData ( const Vect< real_t > &  b,
const Vect< real_t > &  h,
Vect< real_t > &  p 
)

Set vector data for Nurbs.

Parameters
[in]bVector containing the defining polygon vertices
[in]hVector containing the homogeneous weighting factors
[in,out]pVector containing the resulting curve points

◆ setData() [2/2]

void setData ( const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Set vector data.

Parameters
[in]bVector containing the defining polygon vertices
[in,out]pVector containing the resulting curve points

◆ setDomain() [1/4]

void setDomain ( Point< real_t >  xmin,
Point< real_t >  xmax 
)

Set Dimensions of the domain: 3-D case.

Parameters
[in]xminMinimal coordinate value
[in]xmaxMaximal coordinate value

◆ setDomain() [2/4]

void setDomain ( real_t  xmin,
real_t  xmax 
)

Set Dimensions of the domain: 1-D case.

Parameters
[in]xminMinimal value of x-coordinate
[in]xmaxMaximal value of x-coordinate

◆ setDomain() [3/4]

void setDomain ( real_t  xmin,
real_t  xmax,
real_t  ymin,
real_t  ymax 
)

Set Dimensions of the domain: 2-D case.

Parameters
[in]xminMinimal value of x-coordinate
[in]xmaxMaximal value of x-coordinate
[in]yminMinimal value of y-coordinate
[in]ymaxMaximal value of y-coordinate

◆ setDomain() [4/4]

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.

Parameters
[in]xminMinimal value of x-coordinate
[in]xmaxMaximal value of x-coordinate
[in]yminMinimal value of y-coordinate
[in]ymaxMaximal value of y-coordinate
[in]zminMinimal value of z-coordinate
[in]zmaxMaximal value of z-coordinate

◆ setFile()

void setFile ( string  file)

Set file name.

This function is to be used when the default constructor is invoked.

◆ setGraph()

template<class T_ >
void setGraph ( const vector< RC > &  I,
int  opt = 1 
)

Set graph of matrix by giving a vector of its nonzero entries.

Parameters
[in]IVector containing pairs of row and column indices
[in]optFlag indicating if vector I is cleaned and ordered (opt=1: default) or not (opt=0). In the latter case, this vector can have the same contents more than once and are not necessarily ordered

◆ setLagrange()

void setLagrange ( int  n,
const Vect< real_t > &  x,
const Vect< real_t > &  y,
Fct &  f 
)

Define Lagrange interpolation.

This member function defines Lagrange interpolation data

Parameters
[in]nDegree of interpolation polynomial (must be >= 1)
[in]xAbcissa of defining points
[in]yValues of points to interpolate
[out]fFunction that will contain Lagrange interpolation polynomial once the function run() is invoked

◆ setLeastSquare() [1/4]

void setLeastSquare ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
real_t &  a0,
real_t &  a1 
)

Constructor foDefine least square approximation using linear regression.

Define 1-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a0 + a1*x

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]a0Coefficient of constant term
[out]a1Coefficient of first degree term

◆ setLeastSquare() [2/4]

void setLeastSquare ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
size_t  N,
Vect< real_t > &  a 
)

Define least square approximation using polynomial regression.

Define N-degree polynomial to approximate in the sense of least squares of a given set of points in the plane. The resulting line has the equation: y = a[0] + a[1]*x + ... + a[N]*x^N

Parameters
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[in]NDegree of approximation polynomial
[out]aVector of coefficients of polynomial as defined here above

◆ setLeastSquare() [3/4]

void setLeastSquare ( const vector< Fct * > &  f,
const Vect< real_t > &  x,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Define least square approximation using given basis functions.

The least square approximation defines the function: a[0]*f[0] + a[1]*f[1] + ... + a[N]*f[N]

Parameters
[in]fVector of references to functions (class Fct) defining basis of least square approximation
[in]xVector defining x-coordinates of points
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ setLeastSquare() [4/4]

void setLeastSquare ( DMatrix< real_t > &  B,
const Vect< real_t > &  y,
Vect< real_t > &  a 
)

Define least square approximation with given least square matrix.

Matrix entries is defined by B(k,i) as the k-th basis function evaluated at x(i)

Parameters
[in]BRectangle matrix of Least square approximation
[in]yVector defining y-coordinates of points
[out]aVector containing solution: Coefficients of basis functions

◆ setMesh()

template<class T_ >
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]meshMesh instance for which matrix graph is determined.
[in]dofOption 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 value dof=0 means that matrix structure is determined using all DOFs.

◆ setMeshFile()

void setMeshFile ( const string &  file)

Set mesh file.

Parameters
[in]fileMesh file

◆ setN()

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]nxNumber of grid intervals in the x-direction
[in]nyNumber of grid intervals in the y-direction (Default=0: 1-D grid)
[in]nzNumber of grid intervals in the z-direction (Default=0: 1-D or 2-D grid)
Remarks
: The size of the grid (xmin and xmax) must have been defined before.

◆ setNurbs()

void setNurbs ( size_t  n,
size_t  c,
size_t  np,
const Vect< real_t > &  b,
const Vect< real_t > &  h,
Vect< real_t > &  p 
)

Define for Nurbs modelling.

Parameters
[in]nNumber of defining polygon vertices
[in]cOrder of the B-spline basis function
[in]npNumber of points to be calculated on the curve
[in]bVector containing the defining polygon vertices
[in]hVector containing the homogeneous weighting factors
[out]pVector containing the resulting curve points

◆ setNurbsPar()

void setNurbsPar ( size_t  n,
size_t  c,
size_t  np 
)

Set parameters for Nurbs modelling.

Parameters
[in]nNumber of defining polygon vertices
[in]cOrder of the B-spline basis function
[in]npNumber of points to be calculated on the curve

◆ setNurbsSurface()

void setNurbsSurface ( size_t  m,
size_t  n,
size_t  c,
size_t  d,
size_t  npu,
size_t  npw,
const Vect< real_t > &  b,
Vect< real_t > &  p 
)

Define Nurbs surface modelling.

Parameters
[in]mNumber of polygon vertices in w direction
[in]nNumber of polygon vertices in u direction
[in]cOrder of the B-spline basis function in w direction
[in]dOrder of the B-spline basis function in u direction
[in]npuNumber of parametric lines in the u direction
[in]npwNumber of parametric lines in the w direction
[in]bVector containing the defining polygon vertices
[out]pVector containing the resulting curve points

◆ setSize() [1/3]

template<class T_ >
void setSize ( size_t  nr,
size_t  nc 
)

Set size (number of rows) of matrix.

Parameters
[in]nrNumber of rows
[in]ncNumber of columns

◆ setSize() [2/3]

template<class T_ >
void setSize ( size_t  size)

Set size of matrix (case where it's a square matrix).

Parameters
[in]sizeNumber of rows and columns.

◆ setSize() [3/3]

template<class T_ >
void setSize ( size_t  size)

Set size (number of rows) of matrix.

Parameters
[in]sizeNumber of rows and columns.

◆ setSolver()

template<class T_ >
void setSolver ( Iteration  solver = CG_SOLVER,
Preconditioner  prec = DIAG_PREC,
int  max_it = 1000,
real_t  toler = 1.e-8 
)

Choose solver and preconditioner for an iterative procedure.

Parameters
[in]solverOption to choose iterative solver in an enumerated variable
  • CG_SOLVER: Conjugate Gradient [default]
  • CGS_SOLVER: Squared conjugate gradient
  • BICG_SOLVER: Biconjugate gradient
  • BICG_STAB_SOLVER: Biconjugate gradient stabilized
  • GMRES_SOLVER: Generalized Minimal Residual
Default value is CG_SOLVER
[in]precOption to choose preconditioner in an enumerated variable
  • IDENT_PREC: Identity preconditioner (no preconditioning)
  • DIAG_PREC: Diagonal preconditioner [default]
  • SSOR_PREC: SSOR (Symmetric Successive Over Relaxation) preconditioner
  • DILU_PREC: ILU (Diagonal Incomplete factorization) preconditioner
  • ILU_PREC: ILU (Incomplete factorization) preconditioner
Default value is DIAG_PREC
[in]max_itMaximum number of allowed iterations. Default value is 1000.
[in]tolerTolerance for convergence. Default value is 1.e-8

◆ setX()

void setX ( const Vect< real_t > &  x)

Set node x-coordinates of grid.

This function is to be used to define a nonuniform grid

Parameters
[in]xVector of x-coordinates of nodes

◆ setXMax()

void setXMax ( const Point< real_t > &  x)

Set max. coordinates of the domain.

Parameters
[in]xMaximal values of coordinates

◆ setXMin()

void setXMin ( const Point< real_t > &  x)

Set min. coordinates of the domain.

Parameters
[in]xMinimal values of coordinates

◆ setXY()

void setXY ( const Vect< real_t > &  x,
const Vect< real_t > &  y 
)

Set node x- and y-coordinates of grid.

This function is to be used to define a nonuniform grid

Parameters
[in]xVector of x-coordinates of nodes
[in]yVector of y-coordinates of nodes

◆ setXYZ()

void setXYZ ( const Vect< real_t > &  x,
const Vect< real_t > &  y,
const Vect< real_t > &  z 
)

Set node x-, y- and z-coordinates of grid.

This function is to be used to define a nonuniform grid

Parameters
[in]xVector of x-coordinates of nodes
[in]yVector of y-coordinates of nodes
[in]zVector of z-coordinates of nodes

◆ solve() [1/3]

template<class T_ >
int solve ( const Vect< T_ > &  b,
Vect< T_ > &  x,
bool  fact = false 
)
virtual

Solve the linear system of equations.

The default parameters are:

  • CG_SOLVER for solver
  • DIAG_PREC for preconditioner
  • Max. Number of iterations is 1000
  • Tolerance is 1.e-8

To change these values, call function setSolver before this function

Parameters
[in]bVector that contains right-hand side
[out]xVector that contains the obtained solution
[in]factUnused argument
Returns
Number of actual performed iterations

Implements Matrix< T_ >.

◆ solve() [2/3]

template<class T_ >
int solve ( const Vect< T_ > &  b,
Vect< T_ > &  x,
bool  fact = false 
)
virtual

Solve a linear system with current matrix (forward and back substitution).

Parameters
[in]bVect instance that contains right-hand side.
[out]xVect instance that contains solution.
[in]factUnused argument
Returns
  • 0 if solution was normally performed,
  • n if the n-th pivot is null.

Warning: Matrix is modified after this function.

Implements Matrix< T_ >.

◆ solve() [3/3]

template<class T_ >
int solve ( Vect< T_ > &  b,
bool  fact = true 
)
virtual

Solve a linear system with current matrix (forward and back substitution).

Parameters
[in,out]bVect instance that contains right-hand side on input and solution on output.
[in]factUnunsed argument
Returns
  • 0 if solution was normally performed,
  • n if the n-th pivot is null.

Warning: Matrix is modified after this function.

Implements Matrix< T_ >.

◆ SqrDistance() [1/2]

real_t SqrDistance ( const Point2D< real_t > &  a,
const Point2D< real_t > &  b 
)

Return squared euclidean distance between points a and b

Author
Rachid Touzani

◆ SqrDistance() [2/2]

double SqrDistance ( const SpaceTime a,
const SpaceTime b 
)

Return squared euclidean distance between points a and b

Author
Rachid Touzani

◆ TMult()

template<class T_ >
void TMult ( const Vect< T_ > &  x,
Vect< T_ > &  y 
) const
virtual

Multiply transpose of matrix by vector x and save in y.

Parameters
[in]xVector to multiply by matrix
[out]yVector that contains on output the result.

Implements Matrix< T_ >.

◆ Xpy()

template<class T_ >
void Xpy ( const vector< T_ > &  x,
vector< T_ > &  y 
)

Add vector x to y

x and y are instances of class vector<T_>