Geophysical Inversion and Modelling Library  v1.3.0-2-gcf7079e5
GIMLI Namespace Reference

GIMLi main namespace for the Geophyiscal Inversion and Modelling Library. More...

Classes

class  __VectorExpr
 
class  BaseCalcMT
 
class  BaseEntity
 Base Entity. More...
 
class  BinaryExprOp
 
class  BlockMatrix
 
class  BlockMatrixEntry
 Block matrices for easier inversion, see appendix E in GIMLi tutorial. More...
 
class  Boundary
 
class  BoundingBox
 A BoundingBox. More...
 
class  CalculateMT
 
class  Cell
 A abstract cell. More...
 
struct  cerrPtr
 
struct  cerrPtrObject
 
class  CHOLMODWrapper
 
class  CollectNodeFunctor
 
struct  coutPtr
 
struct  coutPtrObject
 
class  CreateDijkstraDistMT
 
class  CreateDijkstraRowMT
 
class  CreateSensitivityColMT
 
class  CubicFunct
 
class  CycleCounter
 
class  D2Matrix
 
class  DataContainer
 DataContainer to store, load and save data in the GIMLi unified data format. More...
 
class  DataContainerERT
 
class  DataMap
 
class  DC1dModelling
 DC (direct current) 1D modelling. More...
 
class  DC1dModellingC
 
class  DC1dRhoModelling
 
class  DCMultiElectrodeModelling
 
class  DCSRMultiElectrodeModelling
 
struct  deletePtr
 
class  Dijkstra
 
class  DNMatrix
 
class  DRMatrix
 
class  Edge
 
class  Edge3
 
class  Edge3Cell
 
class  EdgeCell
 
class  EdgeShape
 
class  Electrode
 
class  ElectrodeShape
 Abstract class for an electrode with a shape, which is required for modelling. More...
 
class  ElectrodeShapeDomain
 Electrodeshape is a domain, e.g. the boundary of a complicated geoemtry for the complete electrode model. More...
 
class  ElectrodeShapeEntity
 Electrodeshape is singular source within a mesh entity (boundary or cell) More...
 
class  ElectrodeShapeNode
 Electrode that is represented by a node. More...
 
class  ElectrodeShapeNodesWithBypass
 Electrode that is represented by a list of nodes short circuited by a bypass. More...
 
class  ElementMatrix
 
class  ElementMatrixMap
 
class  Expr
 
class  ExprIdentity
 
class  ExprLiteral
 
class  FDEM1dModelling
 
class  FDEM1dRhoModelling
 
class  Function
 
class  GraphDistInfo
 
class  GravimetryModelling
 Modelling class for gravimetry calculation using polygon integration. More...
 
class  H2Matrix
 
class  H2SparseMapMatrix
 
class  HarmonicFunction
 
class  HarmonicModelling
 
class  Hexahedron
 
class  Hexahedron20
 A Hexahedron with 20 nodes. More...
 
class  HexahedronShape
 A Hexahedron. More...
 
class  HNMatrix
 
class  HRMatrix
 
class  IdentityMatrix
 Identity matrix: derived from matrixBase. More...
 
class  IncrementSequence
 
struct  indexCmp
 
class  IntegrationRules
 
class  InversionBase
 Inversion base template. More...
 
class  JacobianBaseMT
 
class  KDTreeWrapper
 Interface class for a kd-search tree. We use it for fast nearest neighbor point search in three dimensions. More...
 
class  LDLWrapper
 
class  Line
 A line. More...
 
class  LinearModelling
 
class  LinSolver
 
class  Matrix
 Simple row-based dense matrix based on Vector. More...
 
class  Matrix3
 
class  MatrixBase
 Interface class for matrices. More...
 
class  MatrixElement
 based on: Ulrich Breymann, Addison Wesley Longman 2000 , revised edition ISBN 0-201-67488-2, Designing Components with the C++ STL More...
 
class  MemWatch
 Memory watch. More...
 
class  Mesh
 
class  MeshEntity
 
class  ModellingBase
 
class  MRS1dBlockModelling
 
class  MRSModelling
 
class  MT1dModelling
 Magnetotellurics (MT) 1D modelling. More...
 
class  MT1dRhoModelling
 
class  Mult
 
class  Node
 3D Node More...
 
class  NodeBoundary
 
class  NodeShape
 
class  Option
 
class  OptionBase
 
class  OptionMap
 Simplified command line parser. More...
 
class  Plane
 A plane. More...
 
class  PolygonFace
 
class  PolygonShape
 
class  PolynomialElement
 
class  PolynomialFunction
 
class  PolynomialModelling
 Multidimensional polynomial modelling class. More...
 
class  Pos
 3 dimensional vector More...
 
class  PosFunctor
 
class  Pyramid
 
class  Pyramid13
 A Pyramid. More...
 
class  PyramidShape
 Pyramid. More...
 
class  PythonGILSave
 
class  Quadrangle
 Quadrangle. More...
 
class  Quadrangle8
 Quadrangle8 for serendipity type. More...
 
class  Quadrangle8Face
 
class  QuadrangleFace
 
class  QuadrangleShape
 Quadrangle shape. More...
 
class  Quaternion
 
class  RCObject
 
class  RefCountIPtr
 
class  Region
 
class  RegionManager
 
class  RegionMarker
 
class  RInversion
 
class  Shape
 A Shape defines a geometrical primitive. More...
 
class  ShapeFunctionCache
 
class  Singleton
 
class  SolverWrapper
 
class  SparseMapMatrix
 based on: Ulrich Breymann, Addison Wesley Longman 2000 , revised edition ISBN 0-201-67488-2, Designing Components with the C++ STL More...
 
class  SparseMatrix
 Sparse matrix in compressed row storage (CRS) form. More...
 
class  Stopwatch
 
class  Tetrahedron
 A Tetrahedron. More...
 
class  Tetrahedron10
 
class  TetrahedronShape
 Tetrahedral shape. More...
 
class  Trans
 
class  TransAdd
 
class  TransArchie
 
class  TransCotLU
 
class  TransCRIM
 
class  TransCumulative
 Very Slow. Refactor it!! More...
 
class  TransExp
 
class  TransInv
 
class  TransLin
 
class  TransLinear
 
class  TransLog
 
class  TransLogLU
 
class  TransLogLUMult
 
class  TransLogMult
 
class  TransMult
 
class  TransNest
 
class  TransNewton
 
class  TransPower
 
class  TransQuadrat
 
class  TransTanLU
 
class  TravelTimeDijkstraModelling
 Modelling class for travel time problems using the Dijkstra algorithm. More...
 
class  Triangle
 Triangle. More...
 
class  Triangle6
 Triangle6. More...
 
class  Triangle6Face
 
class  TriangleFace
 
class  TriangleShape
 
class  TriangleWrapper
 
class  TriPrism
 
class  TriPrism15
 Triangular15 prism. More...
 
class  TriPrismShape
 Triangular prism. More...
 
class  TTModellingWithOffset
 
class  UnaryExprOp
 
class  V2Matrix
 
struct  Variable
 
struct  Variable< XAxis__ >
 
struct  Variable< YAxis__ >
 
struct  Variable< ZAxis__ >
 
class  Vector
 One dimensional array aka Vector of limited size. More...
 
class  VectorIterator
 
class  VNMatrix
 
class  VRMatrix
 
struct  XAxis__
 
struct  YAxis__
 
struct  ZAxis__
 

Typedefs

typedef std::pair< int, int > CurrentPattern
 
typedef H2Matrix< RMatrix, RMatrixRH2Matrix
 nomenclature: Type(R/S)+Alignment(H/V/D)+Number(2/N/R)+Matrix
 
typedef H2Matrix< SparseMapMatrix< double, Index >, SparseMapMatrix< double, Index > > SH2Matrix
 
typedef DRMatrix< RMatrixRDRMatrix
 
typedef DRMatrix< SparseMapMatrix< double, Index > > SDRMatrix
 
typedef H2Matrix< IdentityMatrix, IdentityMatrixTwoModelsCMatrix
 Some examples useful for special inversions.
 
typedef DRMatrix< TwoModelsCMatrixManyModelsCMatrix
 
typedef DRMatrix< RSparseMapMatrixManyCMatrix
 
typedef V2Matrix< ManyCMatrix, ManyModelsCMatrixMMMatrix
 
typedef Expr< ExprIdentityDPlaceholder
 
typedef Expr< ExprIdentityIntPlaceholder
 
typedef Expr< ExprIdentityPlaceholder
 
typedef Expr< Variable< XAxis__ > > VariableX
 
typedef Expr< Variable< YAxis__ > > VariableY
 
typedef Expr< Variable< ZAxis__ > > VariableZ
 
typedef unsigned int uint
 
typedef uint8_t uint8
 
typedef uint16_t uint16
 
typedef uint32_t uint32
 
typedef uint64_t uint64
 
typedef int8_t int8
 
typedef int16_t int16
 
typedef int32_t int32
 
typedef int64_t int64
 
typedef size_t Index
 
typedef ssize_t SIndex
 
typedef Pos RVector3
 
typedef std::complex< double > Complex
 
typedef SparseMatrix< int > ISparseMatrix
 
typedef SparseMatrix< double > RSparseMatrix
 
typedef SparseMatrix< Complex > CSparseMatrix
 
typedef SparseMapMatrix< int, Index > ISparseMapMatrix
 
typedef SparseMapMatrix< double, Index > RSparseMapMatrix
 
typedef SparseMapMatrix< Complex, Index > CSparseMapMatrix
 
typedef Vector< double > RVector
 
typedef Vector< Complex > CVector
 
typedef Vector< PosPosVector
 
typedef PosVector R3Vector
 
typedef Vector< bool > BVector
 
typedef Vector< SIndex > IVector
 
typedef Vector< Index > IndexArray
 
typedef std::vector< SIndex > SIndexArray
 
typedef Matrix< double > RMatrix
 
typedef Matrix3< double > RMatrix3
 
typedef Matrix< Complex > CMatrix
 
typedef BlockMatrix< double > RBlockMatrix
 
typedef PolynomialFunction< double > RPolynomialFunction
 
typedef ElementMatrix< double > RElementMatrix
 
typedef Quaternion< double > RQuaternion
 
typedef RVector Vec
 
typedef Trans< RVectorRTrans
 
typedef TransLinear< RVectorRTransLinear
 
typedef TransLin< RVectorRTransLin
 
typedef TransPower< RVectorRTransPower
 
typedef TransLog< RVectorRTransLog
 
typedef TransLogLU< RVectorRTransLogLU
 
typedef TransCotLU< RVectorRTransCotLU
 
typedef TransCumulative< RVectorRTransCumulative
 
typedef std::map< Index, GraphDistInfoNodeDistMap
 
typedef std::map< Index, NodeDistMap > Graph
 

Enumerations

enum  LogType {
  Verbose, Info, Warning, Error,
  Debug, Critical
}
 
enum  IOFormat { Ascii, Binary }
 
enum  SolverType {
  AUTOMATIC, LDL, CHOLMOD, UMFPACK,
  UNKNOWN
}
 
enum  NodeState { No, Original, Secondary, Connected }
 

Functions

bool lessCellMarker (const Cell *c1, const Cell *c2)
 
template<class ValueType >
void createSensitivityCol_ (Matrix< ValueType > &S, const Mesh &mesh, const DataContainerERT &data, const Matrix< ValueType > &pots, const RVector &weights, const RVector &k, std::vector< std::pair< Index, Index > > &matrixClusterIds, uint nThreads, bool verbose)
 
void createSensitivityCol (RMatrix &S, const Mesh &mesh, const DataContainerERT &data, const RMatrix &pots, const RVector &weights, const RVector &k, std::vector< std::pair< Index, Index > > &matrixClusterIds, uint nThreads, bool verbose)
 
void createSensitivityCol (CMatrix &S, const Mesh &mesh, const DataContainerERT &data, const CMatrix &pots, const RVector &weights, const RVector &k, std::vector< std::pair< Index, Index > > &matrixClusterIds, uint nThreads, bool verbose)
 
void sensitivityDCFEMSingle (const std::vector< Cell * > &para, const RVector &p1, const RVector &p2, RVector &sens, bool verbose)
 
RVector prepExportSensitivityData (const Mesh &mesh, const RVector &data, double logdrop)
 
void exportSensitivityVTK (const std::string &fileName, const Mesh &mesh, const RVector &data, double logdrop)
 
void exportSensMatrixDC (const std::string &filename, const Mesh &mesh, const RMatrix &S, const IVector &idx, double logdrop)
 
RVector coverageDC (const RMatrix &sensMatrix)
 
RVector coverageDCtrans (const MatrixBase &S, const RVector &dd, const RVector &mm)
 
RVector createCoverage (const MatrixBase &S, const Mesh &mesh)
 
RVector createCoverage (const MatrixBase &S, const Mesh &mesh, const RVector &response, const RVector &model)
 
void initKWaveList (const Mesh &mesh, RVector &kValues, RVector &weights, bool verbose)
 
void initKWaveList (const Mesh &mesh, RVector &kValues, RVector &weights, const R3Vector &sources, bool verbose)
 
void initKWaveList (double rMin, double rMax, int nGauLegendre, int nGauLaguerre, RVector &kValues, RVector &weights)
 
RVector geometricFactors (const DataContainerERT &data, int dim, bool forceFlatEarth)
 
double exactDCSolution (const RVector3 &pot, const RVector3 &src)
 
double exactDCSolution (const RVector3 &v, const RVector3 &source, double k, double surfaceZ, double fallback)
 
RVector exactDCSolution (const Mesh &mesh, const RVector3 &src, double k, double surfaceZ)
 
RVector exactDCSolution (const Mesh &mesh, const Node *nA, const Node *nB, double k, double surfaceZ)
 
RVector exactDCSolution (const Mesh &mesh, const ElectrodeShape *elec, double k, double surfaceZ, bool setSingValue)
 
RVector exactDCSolution (const Mesh &mesh, int aID, int bID, double k, double surfaceZ)
 
RVector exactDCSolution (const Mesh &mesh, int aID, double k, double surfaceZ)
 
int countKWave (const Mesh &mesh)
 
void DCErrorEstimation (DataContainerERT &data, double errPerc, double errVolt, double defaultCurrent, bool verbose)
 
double DCParaDepth (const DataContainerERT &data)
 
void setDefaultBERTBoundaryConditions (Mesh &mesh)
 
void setAllNeumannBoundaryConditions (Mesh &mesh)
 
RVector prepExportPotentialData (const RVector &data, double logdrop)
 
RVector geometricFactor (const DataContainerERT &data, int dim=3, bool forceFlatEarth=false)
 
void setComplexResistivities (Mesh &mesh, const std::map< float, Complex > &aMap)
 
void setComplexResistivities (Mesh &mesh, const RVector &am, const RVector &ph)
 
void setComplexResistivities (Mesh &mesh, const CVector &z)
 
CVector getComplexResistivities (const Mesh &mesh)
 
void setComplexData (DataContainer &data, const RVector &re, const RVector &im)
 
void setComplexData (DataContainer &data, const CVector &z)
 
CVector getComplexData (const DataContainer &data)
 
template<class Vec >
bool checkIfMapFileExistAndLoadToVector (const std::string &filename, Vec &v)
 
template<class ValueType >
void assembleStiffnessMatrixHomogenDirichletBC (SparseMatrix< ValueType > &S, const IndexArray &nodeID, std::vector< Vector< ValueType > > &rhs)
 
template<class ValueType >
void assembleStiffnessMatrixHomogenDirichletBC (SparseMatrix< ValueType > &S, const IndexArray &nodeID)
 
template<class ValueType >
void dcfemDomainAssembleStiffnessMatrix (SparseMatrix< ValueType > &S, const Mesh &mesh, const Vector< ValueType > &atts, double k, bool fix)
 
void dcfemDomainAssembleStiffnessMatrix (RSparseMatrix &S, const Mesh &mesh, double k, bool fix)
 
void dcfemDomainAssembleStiffnessMatrix (CSparseMatrix &S, const Mesh &mesh, double k, bool fix)
 
template<class ValueType >
void dcfemBoundaryAssembleStiffnessMatrix (SparseMatrix< ValueType > &S, const Mesh &mesh, const Vector< ValueType > &atts, const RVector3 &source, double k)
 
void dcfemBoundaryAssembleStiffnessMatrix (RSparseMatrix &S, const Mesh &mesh, const RVector3 &source, double k)
 
void dcfemBoundaryAssembleStiffnessMatrix (CSparseMatrix &S, const Mesh &mesh, const RVector3 &source, double k)
 
void assembleCompleteElectrodeModel_ (RSparseMatrix &S, const std::vector< ElectrodeShape * > &elecs, uint oldMatSize, bool lastIsReferenz, const RVector &contactImpedances)
 
void assembleCompleteElectrodeModel (RSparseMatrix &S, const std::vector< ElectrodeShape * > &elecs, uint oldMatSize, bool lastIsReferenz, const RVector &contactImpedances)
 
void assembleCompleteElectrodeModel (CSparseMatrix &S, const std::vector< ElectrodeShape * > &elecs, uint oldMatSize, bool lastIsReferenz, const RVector &contactImpedances)
 
double mixedBoundaryCondition (const Boundary &boundary, const RVector3 &source, double k)
 
RVector transMult (const BlockMatrix< double > &A, const RVector &b)
 
RVector operator* (const BlockMatrix< double > &A, const RVector &b)
 
void rank1Update (H2SparseMapMatrix &A, const RVector &u, const RVector &v)
 
bool save (const H2SparseMapMatrix &A, const std::string &filename, IOFormat format=Ascii)
 
template<class T >
void distributeCalc (T calc, uint nCalcs, uint nThreads, bool verbose=false)
 
bool idPosLesserX (const std::pair< RVector3, Index > &a, const std::pair< RVector3, Index > &b)
 
bool idPosLesserXrY (const std::pair< RVector3, Index > &a, const std::pair< RVector3, Index > &b)
 
bool idPosLesserXYrZ (const std::pair< RVector3, Index > &a, const std::pair< RVector3, Index > &b)
 
template<>
std::ostream & operator<< (std::ostream &str, const ElementMatrix< double > &e)
 
void _prepDot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, ElementMatrix< double > &C)
 
void dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, double b, ElementMatrix< double > &C)
 
void dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, const Pos &c, ElementMatrix< double > &C)
 
void dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, const RMatrix &c, ElementMatrix< double > &C)
 
void dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, const FEAFunction &c, ElementMatrix< double > &C)
 
const ElementMatrix< double > dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B)
 
void dot (const ElementMatrix< double > &A, const ElementMatrix< double > &B, ElementMatrix< double > &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, RVector &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, PosVector &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, std::vector< RMatrix > &ret)
 
void evaluateQuadraturePoints (const MeshEntity &ent, const PosVector &x, const FEAFunction &f, RVector &ret)
 
void evaluateQuadraturePoints (const MeshEntity &ent, const PosVector &x, const FEAFunction &f, PosVector &ret)
 
void evaluateQuadraturePoints (const MeshEntity &ent, const PosVector &x, const FEAFunction &f, std::vector< RMatrix > &ret)
 
template<class ReturnType >
void evaluateQuadraturePoints_ (const Mesh &mesh, Index order, const FEAFunction &f, ReturnType &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, std::vector< RVector > &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, std::vector< PosVector > &ret)
 
void evaluateQuadraturePoints (const Mesh &mesh, Index order, const FEAFunction &f, std::vector< std::vector< RMatrix > > &ret)
 
void mult (const ElementMatrix< double > &A, double b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const Pos &b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const RVector &b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const PosVector &b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const RMatrix &b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const std::vector< RMatrix > &b, ElementMatrix< double > &C)
 
void mult (const ElementMatrix< double > &A, const FEAFunction &b, ElementMatrix< double > &C)
 
template<class Vec >
void createForceVectorPerCell_ (const Mesh &mesh, Index order, RVector &ret, const Vec &a, Index nCoeff, Index dofOffset)
 
template<class Vec >
void createForceVectorMult_ (const Mesh &mesh, Index order, RVector &ret, const Vec &a, Index nCoeff, Index dofOffset)
 
template<class Vec >
void createMassMatrixPerCell_ (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const Vec &a, Index nCoeff, Index dofOffset)
 
template<class Vec >
void createMassMatrixMult_ (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const Vec &a, Index nCoeff, Index dofOffset)
 
template<class Vec >
void createStiffnessMatrixPerCell_ (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const Vec &a, Index nCoeff, Index dofOffset, bool elastic, bool kelvin)
 
template<class Vec >
void createStiffnessMatrixMult_ (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const Vec &a, Index nCoeff, Index dofOffset, bool elastic, bool kelvin)
 
void createForceVector (const Mesh &mesh, Index order, RVector &ret, const RMatrix &a, Index nCoeff, Index dofOffset)
 
void createMassMatrix (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const RMatrix &a, Index nCoeff, Index dofOffset)
 
void createStiffnessMatrix (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const RMatrix &a, Index nCoeff, Index dofOffset, bool elastic, bool kelvin)
 
void createAdvectionMatrix (const Mesh &mesh, Index order, RSparseMapMatrix &ret, const PosVector &vel, Index dofOffset)
 
 DEFINE_CREATE_FORCE_VECTOR (double) DEFINE_CREATE_FORCE_VECTOR(const Pos &) DEFINE_CREATE_FORCE_VECTOR(const RVector &) DEFINE_CREATE_FORCE_VECTOR(const PosVector &) DEFINE_CREATE_FORCE_VECTOR(const RMatrix &) class DLLEXPORT FEAFunction
 
template<class ValueType >
std::ostream & operator<< (std::ostream &str, const ElementMatrix< ValueType > &e)
 
Complex btp (double u, double f, RVector rho, RVector d)
 
void throwToImplement (const std::string &errString)
 
void throwRangeError (const std::string &errString, int idx, int low, int high)
 
void throwLengthError (const std::string &errString)
 
DLLEXPORT bool debug ()
 
void throwError (const std::string &errString)
 
template<class Ex >
void show (Expr< Ex > expr, double start, double end, double step=1.0)
 
template<class Ex >
double sum (Expr< Ex > expr, double start, double end, double step)
 
template<class Ex >
double sum (Expr< Ex > expr, double start, double end)
 
template<class T >
bool isEqual (const T &a, const T &b)
 
template<>
bool isEqual (const double &a, const double &b)
 
template<>
bool isEqual (const Complex &a, const Complex &b)
 
template<class T >
bool isNonEqual (const T &a, const T &b)
 
template<class T >
bool isLesser (const T &a, const T &b)
 
template<class T >
bool isGreater (const T &a, const T &b)
 
template<class T >
bool isLesserEqual (const T &a, const T &b)
 
template<class T >
bool isGreaterEqual (const T &a, const T &b)
 
template<class T >
bool isInfNaN (const T &a)
 
template<class T >
bool isInf (const T &a)
 
template<class T >
bool isNaN (const T &a)
 
bool isNaN (const Complex &a)
 
bool isInf (const Complex &a)
 
bool isInfNaN (const Complex &a)
 
double abs (const double a)
 
double abs (const Complex &a)
 
double conj (const double &a)
 
Complex conj (const Complex &a)
 
Complex RINT (const Complex &a)
 
double RINT (const double &a)
 
template<class T >
roundTo (const T &a, const T &tol)
 
template<class T >
square (const T &a)
 
double cot (const double &a)
 
double acot (const double &a)
 
double sign (const double &a)
 
double exp10 (const double &a)
 
Index __setTC__ ()
 
std::string versionStr ()
 
void savePythonGIL (bool s)
 
bool pythonGIL ()
 
void setDebug (bool s)
 
void setDeepDebug (int level)
 
int deepDebug ()
 
void setThreadCount (Index nThreads)
 
Index threadCount ()
 
void showSizes ()
 
std::string authors ()
 
int openFile (const std::string &fname, std::fstream *file, std::ios_base::openmode farg, bool terminate)
 
bool fileExist (const std::string &filename)
 
uint fileLength (std::fstream &file)
 
uint countColumnsInFile (const std::string &fname)
 
uint countColumnsInFile (const std::string &fname, uint &columnsCount)
 
uint countRowsInFile (const std::string &fname)
 
std::vector< std::string > getRowSubstrings (std::fstream &file, char comment)
 
std::vector< std::string > getNonEmptyRow (std::fstream &file, char comment)
 
std::vector< std::string > getCommentLine (std::fstream &file, char comment)
 
std::vector< std::string > getSubstrings (const std::string &str)
 
std::vector< std::string > split (const std::string &str, char delimiter)
 
std::string replace (const std::string &str, char from, char to)
 
std::string lower (const std::string &str)
 
std::map< float, float > loadFloatMap (const std::string &filename)
 
std::map< float, Complex > loadCFloatMap (const std::string &filename)
 
std::map< int, int > loadIntMap (const std::string &filename)
 
std::string logStrShort_ (LogType type)
 
std::string logStr_ (LogType type)
 
void log (LogType type, const std::string &msg)
 
std::string str ()
 
template<typename T >
std::string str (const T &v)
 General template for conversion to string, should supersede all sprintf etc.
 
template<typename Value , typename... Values>
std::string str (Value v, Values... vs)
 
template<typename... Values>
void log (LogType type, Values... vs)
 
void print ()
 
template<class Head >
void print (std::ostream &s, Head &&head)
 
template<class Head , class... Tail>
void print (std::ostream &s, Head &&head, Tail &&... tail)
 
template<class... Args>
void print (Args &&... args)
 
template<class T , class U >
min (const T &a, const U &b)
 
template<class T , class U >
max (const T &a, const U &b)
 
int openInFileTerm (const std::string &fname, std::fstream *file)
 
int openInFile (const std::string &fname, std::fstream *file, bool terminate=true)
 
int openOutFile (const std::string &fname, std::fstream *file, bool terminate=true)
 
std::vector< std::string > getRow (std::fstream &file, char comment='#')
 
void convert (bool &var, char *opt)
 
void convert (int &var, char *opt)
 
void convert (uint &var, char *opt)
 
void convert (Index &var, char *opt)
 
void convert (float &var, char *opt)
 
void convert (double &var, char *opt)
 
void convert (std::string &var, char *opt)
 
void convert (std::vector< std::string > &var, char *opt)
 
std::string type (const bool &var)
 
std::string type (const int32 &var)
 
std::string type (const int64 &var)
 
std::string type (const uint32 &var)
 
std::string type (const uint64 &var)
 
std::string type (const float &var)
 
std::string type (const double &var)
 
std::string type (const Complex &var)
 
std::string type (const std::string &var)
 
std::string type (const std::vector< std::string > &var)
 
std::string type (const RVector &var)
 
std::string type (const RVector3 &var)
 
std::string type (const R3Vector &var)
 
std::string type (const CVector &var)
 
std::string type (const RMatrix &var)
 
std::string type (const CMatrix &var)
 
int toInt (const std::string &str)
 
float toFloat (const std::string &str)
 
double toDouble (const std::string &str)
 
template<typename ValueType >
ValueType getEnvironment (const std::string &name, ValueType def, bool verbose=false)
 
template<typename ValueType >
void setEnvironment (const std::string &name, ValueType val, bool verbose=false)
 
template<typename Set >
void intersectionSet (Set &dest, const Set &a, const Set &b)
 
template<typename Set >
void intersectionSet (Set &dest, const Set &a, const Set &b, const Set &c)
 
template<typename Set >
void intersectionSet (Set &dest, const Set &a, const Set &b, const Set &c, const Set &d)
 
template<typename Set >
void intersectionSet (Set &dest, const std::vector< Set > &a)
 
template<typename T >
Index hash_ (T v)
 
template<typename T >
void hashCombine (Index &seed, const T &val)
 
template<typename T , typename... Types>
void hashCombine (Index &seed, const T &val, const Types &... args)
 
void hashCombine (Index &seed)
 
template<typename... Types>
Index hash (const Types &... args)
 
template void hashCombine (Index &seed, const Index &hash)
 
double lineIntegraldGdz (const RVector3 &p1, const RVector3 &p2)
 
RVector calcGBounds (const std::vector< RVector3 > &pos, const Mesh &mesh, const RVector &model)
 
double f_gz (const RVector3 &x, const RVector3 &p)
 
RVector calcGCells (const std::vector< RVector3 > &pos, const Mesh &mesh, const RVector &model, uint nInt)
 
void interpolate (const Mesh &mesh, const RMatrix &vData, const R3Vector &ipos, RMatrix &iData, bool verbose, double fillValue)
 
void interpolate (const Mesh &mesh, const RVector &data, const Mesh &pos, RVector &iData, bool verbose, double fillValue)
 
RVector interpolate (const Mesh &mesh, const RVector &data, const R3Vector &pos, bool verbose, double fillValue)
 
void interpolate (const Mesh &mesh, const std::string &dataName, Mesh &pos, bool verbose, double fillValue)
 
void interpolate (const Mesh &mesh, const RVector &data, const R3Vector &pos, RVector &iData, bool verbose, double fillValue)
 
RVector interpolate (const Mesh &mesh, const RVector &data, const RVector &x, const RVector &y, const RVector &z, bool verbose, double fillValue)
 
RVector interpolate (const Mesh &mesh, const RVector &data, const RVector &x, const RVector &y, bool verbose, double fillValue)
 
RVector interpolate (const Mesh &mesh, const RVector &data, const RVector &x, bool verbose, double fillValue)
 
void interpolate (const Mesh &mesh, Mesh &qmesh, bool verbose, double fillValue)
 
void interpolateSurface (const Mesh &mesh, Mesh &qmesh, bool verbose, double fillValue)
 
void triangleMesh_ (const Mesh &mesh, Mesh &tmpMesh)
 
RVector cellDataToPointData (const Mesh &mesh, const RVector &cellData)
 
template<class Vec >
Vec getIRLSWeights (const Vec &a, double locut=0.0, double hicut=0.0)
 
template<class Vec >
Vec getIRLSWeightsP (const Vec &a, int p, double locut=0.0, double hicut=0.0)
 
double tac (Node *n, size_t i)
 
std::ostream & operator<< (std::ostream &str, const Line &l)
 
template<class Mat , class Vec >
int solveLU (const Mat &A, Vec &x, const Vec &b)
 
template<class ValueType >
Vector< ValueType > _mult (const Matrix< ValueType > &M, const Vector< ValueType > &b)
 
template<class ValueType >
Vector< ValueType > _mult (const Matrix< ValueType > &M, const Vector< ValueType > &b, Index startI, Index endI)
 
template<class ValueType >
Vector< ValueType > _transMult (const Matrix< ValueType > &M, const Vector< ValueType > &b)
 
template<class ValueType >
Matrix< ValueType > & _transAdd (Matrix< ValueType > *a, const Matrix< ValueType > &b)
 
void matMultABA (const RMatrix &A, const RMatrix &B, RMatrix &C, RMatrix &AtB, double a, double b)
 
void matMult (const RMatrix &A, const RMatrix &B, RMatrix &C, double a, double b)
 
void matTransMult (const RMatrix &A, const RMatrix &B, RMatrix &C, double a, double b)
 
template<class ValueType >
std::ostream & operator<< (std::ostream &str, const Matrix3< ValueType > &vec)
 
template<class ValueType >
Pos operator* (const Matrix3< ValueType > &A, const Pos &b)
 
template<class ValueType >
Vector< ValueType > multMT (const Matrix< ValueType > &A, const Vector< ValueType > &b)
 
template<class ValueType >
bool operator== (const Matrix< ValueType > &A, const Matrix< ValueType > &B)
 
template<class ValueType >
void scaleMatrix (Matrix< ValueType > &A, const Vector< ValueType > &l, const Vector< ValueType > &r)
 
template<class ValueType >
void rank1Update (Matrix< ValueType > &A, const Vector< ValueType > &u, const Vector< ValueType > &v)
 
template<class ValueType >
Matrix< ValueType > fliplr (const Matrix< ValueType > &m)
 
template<class ValueType >
Matrix< ValueType > real (const Matrix< std::complex< ValueType > > &cv)
 
template<class ValueType >
Matrix< ValueType > imag (const Matrix< std::complex< ValueType > > &cv)
 
template<class ValueType >
bool saveMatrix (const Matrix< ValueType > &A, const std::string &filename, IOFormat format=Binary)
 
template<class ValueType >
bool load (Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool loadMatrixSingleBin (Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool loadMatrixVectorsBin (Matrix< ValueType > &A, const std::string &filenameBody, uint kCount=1)
 
template<class ValueType >
bool saveMatrixCol (const Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool saveMatrixCol (const Matrix< ValueType > &A, const std::string &filename, const std::string &comments)
 
template<class ValueType >
bool loadMatrixCol (Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool loadMatrixCol (Matrix< ValueType > &A, const std::string &filename, std::vector< std::string > &comments)
 
template<class ValueType >
bool saveMatrixRow (const Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool saveMatrixRow (const Matrix< ValueType > &A, const std::string &filename, const std::string &comments)
 
template<class ValueType >
bool loadMatrixRow (Matrix< ValueType > &A, const std::string &filename)
 
template<class ValueType >
bool loadMatrixRow (Matrix< ValueType > &A, const std::string &filename, std::vector< std::string > &comments)
 
template<class T >
det (const T &a, const T &b, const T &c, const T &d)
 
template<class ValueType >
double det (const Matrix3< ValueType > &A)
 
template<class Matrix >
double det (const Matrix &A)
 
template<class ValueType >
Matrix3< ValueType > inv (const Matrix3< ValueType > &A)
 
template<class ValueType >
void inv (const Matrix3< ValueType > &A, Matrix3< ValueType > &I)
 
template<class Matrix >
Matrix inv (const Matrix &A)
 
template<class Matrix >
void inv (const Matrix &A, Matrix &I)
 
void save (const MatrixBase &A, const std::string &filename)
 
void save (MatrixBase &A, const std::string &filename)
 
RVector operator* (const MatrixBase &A, const RVector &b)
 
RVector transMult (const MatrixBase &A, const RVector &b)
 
RVector operator* (const RMatrix &A, const RVector &b)
 
CVector operator* (const CMatrix &A, const CVector &b)
 
RVector transMult (const RMatrix &A, const RVector &b)
 
CVector transMult (const CMatrix &A, const CVector &b)
 
RMatrix real (const CMatrix &A)
 
RMatrix imag (const CMatrix &A)
 
template<class T >
std::ostream & operator<< (std::ostream &str, const Matrix< T > &M)
 
double kByte (long byte)
 
double mByte (long byte)
 
double memoryInUse ()
 
std::ostream & operator<< (std::ostream &str, const Mesh &mesh)
 
BoundaryfindSecParent (const std::vector< Node * > &v)
 
int markerT (Node *n0, Node *n1)
 
std::ostream & operator<< (std::ostream &str, const BoundingBox &bb)
 
template<class ValueType >
void writeToFile (FILE *file, const ValueType &v, int count=1)
 
template<class ValueType >
void readFromFile (FILE *file, ValueType &v, int count=1)
 
BoundaryfindBoundary_ (const std::set< Boundary * > &common)
 
BoundaryfindBoundary (const Node &n1)
 
BoundaryfindBoundary (const Node &n1, const Node &n2)
 
BoundaryfindBoundary (const Node &n1, const Node &n2, const Node &n3)
 
BoundaryfindBoundary (const Node &n1, const Node &n2, const Node &n3, const Node &n4)
 
BoundaryfindBoundary (const std::vector< Node * > &n)
 
std::set< Boundary * > findBoundaries (const std::vector< Node * > &n)
 
BoundaryfindCommonBoundary (const Cell &c1, const Cell &c2)
 
CellfindCommonCell (const std::vector< Node * > &n, bool warn)
 
std::ostream & operator<< (std::ostream &str, const MeshEntity &e)
 
std::ostream & operator<< (std::ostream &str, const Boundary &e)
 
std::ostream & operator<< (std::ostream &str, const Edge &e)
 
std::ostream & operator<< (std::ostream &str, const TriangleFace &t)
 
std::ostream & operator<< (std::ostream &str, const EdgeCell &c)
 
std::ostream & operator<< (std::ostream &str, const Cell &c)
 
std::ostream & operator<< (std::ostream &str, const Triangle &t)
 
std::ostream & operator<< (std::ostream &str, const Quadrangle &t)
 
std::ostream & operator<< (std::ostream &str, const Tetrahedron &t)
 
std::ostream & operator<< (std::ostream &str, const Hexahedron &t)
 
std::ostream & operator<< (std::ostream &str, const TriPrism &t)
 
template<class Typname >
bool lesserId (const Typname *a, const Typname *b)
 
template<class ContainerOfMeshEntities >
std::set< Node * > commonNodes (const ContainerOfMeshEntities &c)
 
Mesh createGrid (const RVector &x, int marker)
 
Mesh createGrid (const RVector &x, const RVector &y, int marker, bool worldBoundaryMarker)
 
Mesh createGrid (const RVector &x, const RVector &y, const RVector &z, int marker, bool worldBoundaryMarker)
 
Mesh createMesh1D (Index nCells, Index nClones)
 
Mesh createMesh1D (const RVector &x)
 
Mesh createMesh1DBlock (Index nLayers, Index nProperties)
 
Mesh createMesh2D (Index xDim, Index yDim, int markerType)
 
Mesh createMesh2D (const RVector &x, const RVector &y, int markerType)
 
Mesh createMesh3D (Index xDim, Index yDim, Index zDim, int markerType)
 
Mesh createMesh3D (const RVector &x, const RVector &y, const RVector &z, int markerType)
 
Mesh createMesh2D (const Mesh &mesh, const RVector &y, int frontMarker, int backMarker, int leftMarker, int rightMarker, bool adjustBack)
 
Mesh createMesh3D (const Mesh &mesh, const RVector &z, int topMarker, int bottomMarker)
 
bool addTriangleBoundary (Mesh &mesh, double xBoundary, double yBoundary, int cellMarker, bool save)
 
std::ostream & operator<< (std::ostream &str, const GIMLI::Node &n)
 
std::ostream & operator<< (std::ostream &str, const std::vector< GIMLI::Node * > &nodes)
 
bool operator== (const Node &n1, const Node &n2)
 
RVector logDropTol (const RVector &data, double logdrop, bool normalize)
 
RVector logTransDropTol (const RVector &data, double logdrop, bool normalize)
 
void GaussLaguerre (uint n, RVector &x, RVector &w)
 
void GaussLegendre (double x1, double x2, uint n, RVector &x, RVector &w)
 
RVector3 sphTangential2Initerial (const RVector3 &V, double lat, double lon)
 
void lineIntegralZ_WonBevis (const RVector3 &p1, const RVector3 &p2, RVector3 &dg, RVector3 &dgz)
 
double lineIntegralZ_WonBevis (const RVector3 &p1, const RVector3 &p2)
 
template<class ValueType >
ValueType round (const ValueType &v, ValueType tol)
 
template<class ValueType >
ValueType degToRad (const ValueType &deg)
 
template<class ValueType >
ValueType radToDeg (const ValueType &rad)
 
template<class T >
powInt (const T &a, uint dim)
 
template<class ValueType >
ValueType besselI0 (const ValueType &x)
 Caluculate modified Bessel function of the first kind. More...
 
template<class ValueType >
ValueType besselI1 (const ValueType &x)
 Caluculate modified Bessel function of the first kind. More...
 
template<class ValueType >
ValueType besselK0 (const ValueType &x)
 Caluculate modified Bessel function of the second kind. More...
 
template<class ValueType >
ValueType besselK1 (const ValueType &x)
 Caluculate modified Bessel function of the second kind. More...
 
std::ostringstream & operator<< (std::ostringstream &s, const std::vector< std::string > &str)
 
std::ostream & operator<< (std::ostream &str, const Plane &p)
 
long numberOfCPU ()
 
int schedGetCPU ()
 
template<typename T >
bool isinf (T value)
 
template<typename T >
bool isnan (T value)
 
template<class ValueType >
bool operator< (const PolynomialElement< ValueType > &a, const PolynomialElement< ValueType > &b)
 
template<class ValueType >
bool operator!= (const PolynomialElement< ValueType > &a, const PolynomialElement< ValueType > &b)
 
template<class ValueType >
bool operator== (const PolynomialElement< ValueType > &a, const PolynomialElement< ValueType > &b)
 
template<class ValueType >
bool operator== (const PolynomialFunction< ValueType > &a, const PolynomialFunction< ValueType > &b)
 
template<class ValueType >
PolynomialFunction< ValueType > operator- (const PolynomialFunction< ValueType > &f)
 
template<class ValueType >
PolynomialFunction< ValueType > operator* (const ValueType &val, const PolynomialFunction< ValueType > &f)
 
template<class ValueType >
PolynomialFunction< ValueType > operator* (const PolynomialFunction< ValueType > &f, const ValueType &val)
 
template<class ValueType >
PolynomialFunction< ValueType > operator+ (const ValueType &val, const PolynomialFunction< ValueType > &f)
 
template<class ValueType >
PolynomialFunction< ValueType > operator+ (const PolynomialFunction< ValueType > &f, const ValueType &val)
 
template<class ValueType >
PolynomialFunction< ValueType > operator+ (const PolynomialFunction< ValueType > &f, const PolynomialFunction< ValueType > &g)
 
template<class ValueType >
PolynomialFunction< ValueType > operator- (const PolynomialFunction< ValueType > &f, const PolynomialFunction< ValueType > &g)
 
template<class ValueType >
PolynomialFunction< ValueType > operator* (const PolynomialFunction< ValueType > &f, const PolynomialFunction< ValueType > &g)
 
template<class ValueType >
std::ostream & operator<< (std::ostream &os, const PolynomialFunction< ValueType > &p)
 
std::vector< PosloadRVector3 (const std::string &fileName)
 
void saveRVector3 (const std::vector< Pos > l, const std::string &fileName)
 
RVector3 center (const R3Vector &vPos)
 
R3Vector normalise (const R3Vector &vPos)
 
double jacobianDetXY (const Pos &p1, const Pos &p2, const Pos &p3)
 
double angle (const Pos &p1, const Pos &p2, const Pos &p3)
 
bool xVari (const R3Vector &electrodeList)
 
bool yVari (const R3Vector &electrodeList)
 
bool zVari (const R3Vector &electrodeList)
 
RVector x (const R3Vector &rv)
 
RVector y (const R3Vector &rv)
 
RVector z (const R3Vector &rv)
 
template<class ValueType >
void swap (ValueType &v1, ValueType &v2)
 
RVector absR3 (const R3Vector &vPos)
 
void swapXY (R3Vector &rv)
 
void swapXZ (R3Vector &rv)
 
void swapYZ (R3Vector &rv)
 
RVector toArray (const R3Vector &vec)
 
RMatrix toMatrix (const R3Vector &vec)
 
R3Vector stdVectorRVector3ToR3Vector (const std::vector< Pos > &rv)
 
std::vector< PosR3VectorTostdVectorRVector3 (const R3Vector &rv)
 
std::ostream & operator<< (std::ostream &str, const Pos &pos)
 
std::istream & operator>> (std::istream &is, Pos &pos)
 
bool operator== (const RVector3 &a, const RVector3 &b)
 
bool operator!= (const RVector3 &a, const RVector3 &b)
 
bool operator< (const RVector3 &a, const RVector3 &b)
 
bool operator<= (const RVector3 &a, const RVector3 &b)
 
bool operator> (const RVector3 &a, const RVector3 &b)
 
bool operator>= (const RVector3 &a, const RVector3 &b)
 
RVector3 RINT (const RVector3 &a)
 
bool posLesserXrY (const RVector3 &a, const RVector3 &b)
 
bool posLesserXYrZ (const RVector3 &a, const RVector3 &b)
 
bool posLesserX (const RVector3 &a, const RVector3 &b)
 
std::ostream & operator<< (std::ostream &str, const RQuaternion &q)
 
RMatrix getRotation (const Pos &src, const Pos &dest)
 
std::vector< PolynomialFunction< double > > createPolynomialShapeFunctions (const std::vector< RVector3 > &pnts, uint dim, uint nCoeff, bool pascale, bool serendipity, const RVector &startVector)
 
std::ostream & operator<< (std::ostream &str, const Shape &c)
 
RVector crossN (const RVector &a, const RVector &b)
 
double triSize (const RVector3 &p0, const RVector3 &p1, const RVector3 &p2)
 
double tetVolume (const RVector3 &p0, const RVector3 &p1, const RVector3 &p2, const RVector3 &p3)
 
template<class Ent >
std::vector< PolynomialFunction< double > > createPolynomialShapeFunctions (const Ent &ent, uint nCoeff, bool pascale, bool serendipity, const RVector &startVector)
 
template<class Ent >
std::vector< PolynomialFunction< double > > createPolynomialShapeFunctions (const Ent &ent, uint nCoeff, bool pascale, bool serendipity)
 
int solveCGLSCDWWhtrans (const MatrixBase &S, const MatrixBase &C, const Vec &dWeight, const Vec &b, Vec &x, const Vec &wc, const Vec &wm, const Vec &tm, const Vec &td, double lambda, const Vec &roughness, int maxIter, double tol, bool verbose)
 
int solveCGLSCDWWtrans (const MatrixBase &S, const MatrixBase &C, const Vec &dWeight, const Vec &b, Vec &x, const Vec &wc, const Vec &mc, const Vec &tm, const Vec &td, double lambda, const Vec &deltaX, int maxIter, bool verbose)
 
template<class ValueType , class IndexType >
void save (const SparseMapMatrix< ValueType, IndexType > &S, const std::string &fname)
 
template<class ValueType , class IndexType >
int load (SparseMapMatrix< ValueType, IndexType > &S, const std::string &fname)
 
RVector operator* (const RSparseMapMatrix &A, const RVector &b)
 
CVector operator* (const CSparseMapMatrix &A, const CVector &b)
 
CVector operator* (const CSparseMapMatrix &A, const RVector &b)
 
RVector transMult (const RSparseMapMatrix &A, const RVector &b)
 
CVector transMult (const CSparseMapMatrix &A, const CVector &b)
 
CVector transMult (const CSparseMapMatrix &A, const RVector &b)
 
RSparseMapMatrix real (const CSparseMapMatrix &A)
 
RSparseMapMatrix imag (const CSparseMapMatrix &A)
 
RSparseMapMatrix operator+ (const RSparseMapMatrix &A, const RSparseMapMatrix &B)
 
RSparseMapMatrix operator- (const RSparseMapMatrix &A, const RSparseMapMatrix &B)
 
template<class Vec >
void scaleMatrix (SparseMapMatrix< double, Index > &S, const Vec &l, const Vec &r)
 
template<class Vec >
void rank1Update (SparseMapMatrix< double, Index > &S, const Vec &u, const Vec &v)
 
template<class ValueType >
SparseMatrix< ValueType > operator+ (const SparseMatrix< ValueType > &A, const SparseMatrix< ValueType > &B)
 
template<class ValueType >
SparseMatrix< ValueType > operator- (const SparseMatrix< ValueType > &A, const SparseMatrix< ValueType > &B)
 
template<class ValueType >
SparseMatrix< ValueType > operator* (const SparseMatrix< ValueType > &A, const ValueType &b)
 
template<class ValueType >
SparseMatrix< ValueType > operator* (const ValueType &b, const SparseMatrix< ValueType > &A)
 
RVector operator* (const RSparseMatrix &A, const RVector &b)
 
RVector transMult (const RSparseMatrix &A, const RVector &b)
 
CVector operator* (const CSparseMatrix &A, const CVector &b)
 
CVector operator* (const CSparseMatrix &A, const RVector &b)
 
CVector transMult (const CSparseMatrix &A, const CVector &b)
 
CVector transMult (const CSparseMatrix &A, const RVector &b)
 
CSparseMatrix operator+ (const CSparseMatrix &A, const RSparseMatrix &B)
 
RSparseMatrix real (const CSparseMatrix &A)
 
RSparseMatrix imag (const CSparseMatrix &A)
 
std::vector< RVector3createSpline (const std::vector< RVector3 > &input, int nSegments, bool close)
 
std::vector< RVector3createSplineLocalDX (const std::vector< RVector3 > &input, double localDX, bool close)
 
std::vector< CubicFunctcalcNaturalCubicClosed (const std::vector< double > &x)
 
std::vector< CubicFunctcalcNaturalCubic (const std::vector< double > &x)
 
bool operator== (const CubicFunct &a, const CubicFunct &b)
 
void fillGraph_ (Graph &graph, const Node &a, const Node &b, double slowness, SIndex leftID)
 
void fillGraph_ (Graph &graph, Cell &c, double slowness)
 
IndexArray range (Index start, Index stop, Index step)
 
IndexArray range (Index stop)
 
IndexArray find (const BVector &v)
 
void Dump (const void *mem, unsigned int n)
 
template<class ValueType >
bool zero (const Vector< ValueType > &v)
 
template<class ValueType >
bool nonZero (const Vector< ValueType > &v)
 
template<class ValueType >
bool operator!= (const Vector< ValueType > &v1, const Vector< ValueType > &v2)
 
template<class ValueType >
ValueType mult (const Vector< ValueType > &v1, const Vector< ValueType > &v2)
 
template<class ValueType >
ValueType dot (const Vector< ValueType > &v1, const Vector< ValueType > &v2)
 
BVector operator~ (const BVector &a)
 
BVector inv (const BVector &a)
 
BVector operator& (const BVector &a, const BVector &b)
 
BVector operator| (const BVector &a, const BVector &b)
 
RVector operator* (const BVector &a, const RVector &b)
 
RVector operator* (const RVector &a, const BVector &b)
 
template<class T >
Vector< T > unique (const Vector< T > &a)
 
template<class ValueType >
void sort (const Vector< ValueType > &unsorted, Vector< ValueType > &sorted, IndexArray &indexMap)
 
template<class ValueType >
IndexArray sortIdx (const Vector< ValueType > &unsorted)
 
template<class T >
std::ostream & operator<< (std::ostream &str, const std::vector< T > &vec)
 
template<class T >
std::ostream & operator<< (std::ostream &str, const Vector< T > &vec)
 
template<class ValueType >
Vector< ValueType > increasingRange2 (const ValueType &a, const ValueType &last, Index n)
 
template<class ValueType >
Vector< ValueType > increasingRange (const ValueType &first, const ValueType &last, Index n)
 
template<class ValueType >
Vector< std::complex< ValueType > > toComplex (const Vector< ValueType > &re, const Vector< ValueType > &im)
 
CVector toComplex (const RVector &re, double im=0.)
 
CVector toComplex (double re, const RVector &im)
 
CVector polarToComplex (const RVector &mag, const RVector &phi, bool mRad=false)
 
template<class ValueType >
Vector< std::complex< ValueType > > operator* (const Vector< std::complex< ValueType > > &cv, const Vector< ValueType > &v)
 
template<class ValueType >
Vector< std::complex< ValueType > > operator* (const Vector< ValueType > &v, const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType >
Vector< std::complex< ValueType > > operator/ (const std::complex< ValueType > &v, const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType >
Vector< std::complex< ValueType > > operator/ (const ValueType &v, const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType , class A >
Vector< ValueType > real (const __VectorExpr< std::complex< ValueType >, A > &a)
 
template<class ValueType >
Vector< ValueType > real (const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType , class A >
Vector< ValueType > imag (const __VectorExpr< std::complex< ValueType >, A > &a)
 
template<class ValueType >
Vector< ValueType > imag (const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType , class A >
Vector< ValueType > angle (const __VectorExpr< std::complex< ValueType >, A > &a)
 
template<class ValueType >
Vector< ValueType > angle (const Vector< std::complex< ValueType > > &z)
 
RVector angle (const RVector &b, const RVector &a)
 
template<class ValueType >
Vector< ValueType > phase (const Vector< std::complex< ValueType > > &z)
 
template<class ValueType , class A >
Vector< ValueType > abs (const __VectorExpr< std::complex< ValueType >, A > &a)
 
template<class ValueType >
Vector< ValueType > abs (const Vector< std::complex< ValueType > > &cv)
 
template<class ValueType , class A >
Vector< std::complex< ValueType > > conj (const __VectorExpr< std::complex< ValueType >, A > &a)
 
template<class ValueType >
Vector< std::complex< ValueType > > conj (const Vector< std::complex< ValueType > > &cv)
 
RVector TmpToRealHACK (const RVector &v)
 
RVector TmpToRealHACK (const CVector &v)
 
IVector toIVector (const RVector &v)
 
template<class ValueType >
bool save (const Vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii)
 
template<class ValueType >
bool load (Vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii, bool verbose=true)
 
template<class ValueType >
bool saveVec (const Vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii)
 
template<class ValueType >
bool loadVec (Vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii)
 
template<typename T , class Iter , template< typename, class > class Vec>
IndexArray ids (const Vec< T, Iter > &e)
 
template<class ValueType >
bool save (std::vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii)
 
template<class ValueType >
bool load (std::vector< ValueType > &a, const std::string &filename, IOFormat format=Ascii, bool verbose=true)
 
template<class Vec >
bool saveVec (const Vec &a, const std::string &filename, IOFormat format, bool verbose=true)
 
template<class Vec >
bool loadVec (Vec &a, const std::string &filename, IOFormat format, bool verbose=true)
 
template<class T >
std::vector< T > sort (const std::vector< T > &a)
 
template<class T >
std::vector< T > unique (const std::vector< T > &a)
 
template<class Vec >
void clear (Vec &a)
 
template<typename T , class Iter , template< typename, class > class Vec>
min (const Vec< T, Iter > &v)
 
template<typename T , class Iter , template< typename, class > class Vec>
max (const Vec< T, Iter > &v)
 
template<class Vec >
void echoMinMax (const Vec &vec, const std::string &name)
 
template<class Vec >
double median (const Vec &a)
 
template<class Vec >
double arithmeticMean (const Vec &a)
 
template<class Vec >
double geometricMean (const Vec &a)
 
template<class Vec >
double harmonicMean (const Vec &a)
 
template<class Vec >
double rms (const Vec &a)
 
template<class Vec >
double rms (const Vec &a, const Vec &b)
 
template<class Vec >
double rrms (const Vec &a, const Vec &b)
 
template<class Vec >
double normlp (const Vec &a, int p)
 
template<class Vec >
double norml1 (const Vec &a)
 
template<class Vec >
double norml2 (const Vec &a)
 
template<class Vec >
double normlInfinity (const Vec &a)
 
template<class Vec >
double euclideanNorm (const Vec &a)
 
template<class Vec >
double norm (const Vec &a)
 
template<class Vec >
double chiQuad (const Vec &a, const Vec &b, const Vec &err)
 
template<class Vec >
double chiQuad (const Vec &a, const Vec &b, const Vec &err, bool isLog)
 
template<class ValueType >
void rand (Vector< ValueType > &vec, ValueType min=0.0, ValueType max=1.0)
 
template<class ValueType >
void randn (Vector< ValueType > &vec)
 
RVector randn (Index n)
 

Variables

static const int MARKER_NODE_ELECTRODE = -99
 
static const int MARKER_NODE_REFERENCEELECTRODE = -999
 
static const int MARKER_NODE_CALIBRATION = -1000
 
static const int MARKER_BOUND_ELECTRODE = -10000
 
std::mutex eraseMutex__
 
static bool __SAVE_PYTHON_GIL__ = false
 
static bool __GIMLI_DEBUG__ = false
 
static int __GIMLI_DEEP_DEBUG__ = 0
 
static Index __GIMLI_THREADCOUNT__ = __setTC__()
 
static const int MARKER_BOUND_HOMOGEN_NEUMANN = -1
 
static const int MARKER_BOUND_MIXED = -2
 
static const int MARKER_BOUND_HOMOGEN_DIRICHLET = -3
 
static const int MARKER_BOUND_DIRICHLET = -4
 
static const int MARKER_CELL_PARAMETER = 2
 
static const int MARKER_NODE_SENSOR = -99
 
static const int MARKER_FIXEDVALUE_REGION = -1000000
 
static const uint8 MESH_BASEENTITY_RTTI = 00
 
static const uint8 MESH_MESHENTITY_RTTI = 01
 
static const uint8 MESH_NODE_RTTI = 10
 
static const uint8 MESH_BOUNDARY_RTTI = 20
 
static const uint8 MESH_BOUNDARY_NODE_RTTI = 21
 
static const uint8 MESH_EDGE_RTTI = 22
 
static const uint8 MESH_EDGE3_RTTI = 23
 
static const uint8 MESH_TRIANGLEFACE_RTTI = 24
 
static const uint8 MESH_TRIANGLEFACE6_RTTI = 25
 
static const uint8 MESH_QUADRANGLEFACE_RTTI = 26
 
static const uint8 MESH_QUADRANGLEFACE8_RTTI = 27
 
static const uint8 MESH_POLYGON_FACE_RTTI = 28
 
static const uint8 MESH_CELL_RTTI = 30
 
static const uint8 MESH_EDGE_CELL_RTTI = 31
 
static const uint8 MESH_EDGE3_CELL_RTTI = 32
 
static const uint8 MESH_TRIANGLE_RTTI = 33
 
static const uint8 MESH_TRIANGLE6_RTTI = 34
 
static const uint8 MESH_QUADRANGLE_RTTI = 35
 
static const uint8 MESH_QUADRANGLE8_RTTI = 36
 
static const uint8 MESH_QUADRANGLE9_RTTI = 37
 
static const uint8 MESH_TETRAHEDRON_RTTI = 41
 
static const uint8 MESH_TETRAHEDRON10_RTTI = 42
 
static const uint8 MESH_HEXAHEDRON_RTTI = 43
 
static const uint8 MESH_HEXAHEDRON20_RTTI = 44
 
static const uint8 MESH_TRIPRISM_RTTI = 45
 
static const uint8 MESH_TRIPRISM15_RTTI = 46
 
static const uint8 MESH_PYRAMID_RTTI = 47
 
static const uint8 MESH_PYRAMID13_RTTI = 48
 
static const uint8 MESH_SHAPE_NODE_RTTI = 210
 
static const uint8 MESH_SHAPE_EDGE_RTTI = 211
 
static const uint8 MESH_SHAPE_TRIANGLE_RTTI = 221
 
static const uint8 MESH_SHAPE_QUADRANGLE_RTTI = 222
 
static const uint8 MESH_SHAPE_POLYGON_FACE_RTTI = 223
 
static const uint8 MESH_SHAPE_TETRAHEDRON_RTTI = 231
 
static const uint8 MESH_SHAPE_HEXAHEDRON_RTTI = 232
 
static const uint8 MESH_SHAPE_TRIPRISM_RTTI = 233
 
static const uint8 MESH_SHAPE_PYRAMID_RTTI = 234
 
static const uint8 GIMLI_MATRIXBASE_RTTI = 0
 
static const uint8 GIMLI_MATRIX_RTTI = 1
 
static const uint8 GIMLI_SPARSE_MAP_MATRIX_RTTI = 2
 
static const uint8 GIMLI_SPARSE_CRS_MATRIX_RTTI = 3
 
static const uint8 GIMLI_BLOCKMATRIX_RTTI = 4
 
IndexArray cellIDX__
 
static const uint8 TetrahedronFacesID [4][3]
 A Tetrahedron. More...
 
static const uint8 Tet10NodeSplit [10][2]
 
static const uint8 Tet10NodeSplitZienk [10][2]
 
static const uint8 HexahedronFacesID [6][4]
 A Hexahedron. More...
 
static const uint8 Hexahedron20FacesID [6][8]
 
static const uint8 Hex20NodeSplit [20][2]
 
static const uint8 TriPrismFacesID [5][4]
 Triangular prism. More...
 
static const uint8 Prism15NodeSplit [15][2]
 
static const uint8 PyramidFacesID [5][4]
 A Pyramid. More...
 
static const uint8 Pyramid13NodeSplit [13][2]
 
static const double NodeCoordinates [1][3]
 
static const double EdgeCoordinates [2][3]
 
static const double TriCoordinates [3][3]
 
static const double QuadCoordinates [4][3]
 
static const double TetCoordinates [4][3]
 
static const int HexahedronSplit5TetID [5][4]
 
static const int HexahedronSplit6TetID [6][4]
 
static const double HexCoordinates [8][3]
 
static const uint8 TriPrimSplit3TetID [3][4]
 
static const double PrismCoordinates [6][3]
 
static const double PyramidCoordinates [5][3]
 
bool V_ = false
 

Detailed Description

GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.

Return the numbers of virtual CPUS on this system

Enumeration Type Documentation

◆ IOFormat

Flag load/save Ascii or binary

Function Documentation

◆ addTriangleBoundary()

DLLEXPORT bool GIMLI::addTriangleBoundary ( Mesh mesh,
double  xBoundary,
double  yBoundary,
int  cellMarker,
bool  save = false 
)

Add triangle boundary to the mesh. Return false on failors.

◆ besselI0()

template<class ValueType >
ValueType GIMLI::besselI0 ( const ValueType &  x)

Caluculate modified Bessel function of the first kind.

See Abramowitz: Handbook of math. functions;

◆ besselI1()

template<class ValueType >
ValueType GIMLI::besselI1 ( const ValueType &  x)

Caluculate modified Bessel function of the first kind.

See Abramowitz: Handbook of math. functions

◆ besselK0()

template<class ValueType >
ValueType GIMLI::besselK0 ( const ValueType &  x)

Caluculate modified Bessel function of the second kind.

See Abramowitz: Handbook of math. functions

◆ besselK1()

template<class ValueType >
ValueType GIMLI::besselK1 ( const ValueType &  x)

Caluculate modified Bessel function of the second kind.

See Abramowitz: Handbook of math. functions

◆ calcGBounds()

DLLEXPORT RVector GIMLI::calcGBounds ( const std::vector< RVector3 > &  pos,
const Mesh mesh,
const RVector model 
)

Do not use until u know what u do.

Ensure neighborInfos()

◆ calcGCells()

DLLEXPORT RVector GIMLI::calcGCells ( const std::vector< RVector3 > &  pos,
const Mesh mesh,
const RVector model,
uint  nInt = 0 
)

Do not use until u know what u do.

Ensure neighborInfos()

References GIMLI::Singleton< IntegrationRules >::instance().

◆ calcNaturalCubicClosed()

DLLEXPORT std::vector< CubicFunct > GIMLI::calcNaturalCubicClosed ( const std::vector< double > &  x)

FROM: http://www.cse.unsw.edu.au/~lambert/splines/ calculates the closed natural cubic spline that interpolates x[0], x[1], ... x[n] The first segment is returned as C[0].a + C[0].b*u + C[0].c*u^2 + C[0].d*u^3 0<=u <1 the other segments are in C[1], C[2], ... C[n]

References x(), y(), and z().

◆ cellDataToPointData()

DLLEXPORT RVector GIMLI::cellDataToPointData ( const Mesh mesh,
const RVector cellData 
)

Utility function. Convert cell data to point data with the corresponding the cell interpolation function

◆ commonNodes()

template<class ContainerOfMeshEntities >
std::set< Node * > GIMLI::commonNodes ( const ContainerOfMeshEntities &  c)

Collect all common Node's for a container of MeshEntities, e.g., commonNodes(std::list< Cell > & cellList), returns all common nodes that are associated to each cell at the cellList.

◆ createGrid() [1/3]

DLLEXPORT Mesh GIMLI::createGrid ( const RVector x,
const RVector y,
const RVector z,
int  marker = 0,
bool  worldBoundaryMarker = false 
)

Unified interface. Generate simple grid with nodes at the given positions

◆ createGrid() [2/3]

DLLEXPORT Mesh GIMLI::createGrid ( const RVector x,
const RVector y,
int  marker = 0,
bool  worldBoundaryMarker = false 
)

Unified interface. Generate simple grid with nodes at the given positions

References createMesh1D(), and x().

◆ createGrid() [3/3]

DLLEXPORT Mesh GIMLI::createGrid ( const RVector x,
int  marker = 0 
)

Unified interface. Generate simple grid with nodes at the given positions

References GIMLI::Mesh::createGrid(), GIMLI::Mesh::setCellMarkers(), x(), y(), and z().

◆ createMesh1D() [1/2]

DLLEXPORT Mesh GIMLI::createMesh1D ( const RVector x)

Generate simple one dimensional mesh with nodes at position in RVector pos.

◆ createMesh1D() [2/2]

DLLEXPORT Mesh GIMLI::createMesh1D ( Index  nCells,
Index  nProperties = 1 
)

Generate simple 1D mesh with nCells cells of length 1, and nCells + 1 nodes. In case of more than one property quasi-2d mesh with regions is generated.

Referenced by createGrid(), and GIMLI::TTModellingWithOffset::TTModellingWithOffset().

◆ createMesh1DBlock()

DLLEXPORT Mesh GIMLI::createMesh1DBlock ( Index  nLayers,
Index  nProperties = 1 
)

Generate 1D block model of thicknesses and properties

Thicknesses have marker 0

Properties have markers 1,2,...

References createMesh2D(), x(), and y().

Referenced by GIMLI::DC1dModelling::DC1dModelling(), and GIMLI::MRSModelling::MRSModelling().

◆ createMesh2D() [1/3]

DLLEXPORT Mesh GIMLI::createMesh2D ( const Mesh mesh,
const RVector y,
int  frontMarker = 0,
int  backMarker = 0,
int  leftMarker = 0,
int  rightMarker = 0,
bool  adjustBack = false 
)

Generate a simple 2D mesh by extruding a 1D polygone into RVector y using quads. We assume a 2D mesh here consisting on nodes and edge boundaries. Nodes with marker are extruded as edges with marker or set to front- and backMarker. Edges with marker are extruded as cells with marker. All back y-coordinates are adjusted if adjustBack is set.

◆ createMesh2D() [2/3]

DLLEXPORT Mesh GIMLI::createMesh2D ( const RVector x,
const RVector y,
int  markerType = 0 
)

Generate simple two dimensional mesh with nodes at position in RVector x and y.

◆ createMesh2D() [3/3]

DLLEXPORT Mesh GIMLI::createMesh2D ( Index  xDim,
Index  yDim,
int  markerType = 0 
)

Generate simple two dimensional mesh with nRows x nCols cells with each length = 1.0

References createMesh3D(), x(), y(), and z().

Referenced by createMesh1DBlock().

◆ createMesh3D() [1/3]

DLLEXPORT Mesh GIMLI::createMesh3D ( const Mesh mesh,
const RVector z,
int  topMarker = 0,
int  bottomMarker = 0 
)

Generate a simple three dimensional mesh by extruding a two dimensional mesh into RVector z using triangle prism or hexahedrons or both. 3D cell marker are set from 2D cell marker. The boundary marker for the side boundaries are set from edge marker in mesh. Top and bottomLayer boundary marker are set from parameter topMarker and bottomMarker.

◆ createMesh3D() [2/3]

DLLEXPORT Mesh GIMLI::createMesh3D ( const RVector x,
const RVector y,
const RVector z,
int  markerType = 0 
)

Generate simple three dimensional mesh with nodes at position in RVector x and y.

References y().

◆ createMesh3D() [3/3]

DLLEXPORT Mesh GIMLI::createMesh3D ( Index  xDim,
Index  yDim,
Index  zDim,
int  markerType = 0 
)

Generate simple three dimensional mesh with nx x nx x nz cells with each length = 1.0

Referenced by createMesh2D().

◆ createSpline()

DLLEXPORT std::vector< RVector3 > GIMLI::createSpline ( const std::vector< RVector3 > &  input,
int  nSegments,
bool  close 
)

Create a vector of RealPos from input points with cubic spline interpolation. The edge between the input points is subdivided into nSegments.

◆ createSplineLocalDX()

DLLEXPORT std::vector< RVector3 > GIMLI::createSplineLocalDX ( const std::vector< RVector3 > &  input,
double  localDX,
bool  close 
)

Create a vector of RealPos from input points with cubic spline interpolation. The edge between the input points is subdivided into 3 segments within the lokal distance localDX to the inputpoints.

◆ dcfemDomainAssembleStiffnessMatrix()

DLLEXPORT void GIMLI::dcfemDomainAssembleStiffnessMatrix ( RSparseMatrix S,
const Mesh mesh,
double  k = 0.0,
bool  fix = true 
)

if fix is set. Matrix will check and fix singularities. Do not fix the matrix if you need it for the rhs while singulariety removal calculation.

References GIMLI::Cell::boundary(), GIMLI::BaseEntity::id(), GIMLI::Boundary::leftCell(), GIMLI::Vector< ValueType >::save(), and GIMLI::ElementMatrix< ValueType >::u2().

◆ DEFINE_CREATE_FORCE_VECTOR()

GIMLI::DEFINE_CREATE_FORCE_VECTOR ( double  ) const &

Interface to function q=f(p, ent) with q, p = Pos() in R1, R2, R 3 and ent assiated mesh entity.

◆ degToRad()

template<class ValueType >
ValueType GIMLI::degToRad ( const ValueType &  deg)

Converts a degree value to radian.

◆ det() [1/3]

template<class Matrix >
double GIMLI::det ( const Matrix A)

Return determinant for Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

◆ det() [2/3]

template<class ValueType >
double GIMLI::det ( const Matrix3< ValueType > &  A)

Return determinant for Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

◆ det() [3/3]

template<class T >
T GIMLI::det ( const T &  a,
const T &  b,
const T &  c,
const T &  d 
)
inline

Return determinant for Matrix(2 x 2).

◆ dot()

template<class ValueType >
ValueType GIMLI::dot ( const Vector< ValueType > &  v1,
const Vector< ValueType > &  v2 
)

Return scalar product <v1, v2>.

◆ evaluateQuadraturePoints() [1/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const Mesh mesh,
Index  order,
const FEAFunction &  f,
std::vector< PosVector > &  ret 
)

Evaluate vectors for each cell.

◆ evaluateQuadraturePoints() [2/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const Mesh mesh,
Index  order,
const FEAFunction &  f,
std::vector< RVector > &  ret 
)

Evaluate scalar for each cell.

◆ evaluateQuadraturePoints() [3/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const Mesh mesh,
Index  order,
const FEAFunction &  f,
std::vector< std::vector< RMatrix > > &  ret 
)

Evaluate matrices for each cell.

References GIMLI::Matrix< ValueType >::rows().

◆ evaluateQuadraturePoints() [4/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const MeshEntity ent,
const PosVector x,
const FEAFunction &  f,
PosVector ret 
)

Evaluate vectors per cell.

References x().

◆ evaluateQuadraturePoints() [5/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const MeshEntity ent,
const PosVector x,
const FEAFunction &  f,
RVector ret 
)

Evaluate scalars per cell.

References x(), and GIMLI::Shape::xyz().

◆ evaluateQuadraturePoints() [6/6]

DLLEXPORT void GIMLI::evaluateQuadraturePoints ( const MeshEntity ent,
const PosVector x,
const FEAFunction &  f,
std::vector< RMatrix > &  ret 
)

Evaluate matrices per cell.

◆ exactDCSolution()

DLLEXPORT RVector GIMLI::exactDCSolution ( const Mesh mesh,
const ElectrodeShape elec,
double  k,
double  surfaceZ = 0.0,
bool  setSingValue = true 
)

Calculate the analytical solution as well as an aproxmiate value for the singular position.

◆ find()

IndexArray GIMLI::find ( const BVector v)
inline

Find function. Return index vector of true values

References GIMLI::Vector< ValueType >::reserve().

Referenced by GIMLI::Mesh::cells(), GIMLI::Mesh::nodes(), and GIMLI::DataContainer::sortSensorsIndex().

◆ findBoundaries()

DLLEXPORT std::set< Boundary * > GIMLI::findBoundaries ( const std::vector< Node * > &  n)

Find all boundaries that have these nodes in common.

◆ GaussLaguerre()

DLLEXPORT void GIMLI::GaussLaguerre ( uint  n,
RVector x,
RVector w 
)

Given alpha = 0.0, the parameter alpha of the Laguerre polynomials, this routine returns vector x[0..n-1] and w[0..n-1] containing the abscissas and weights of the n-point Gauss-Laguerre quadrature formula. The smallest abscissa is returned in x[ 0 ], the largest in x[ n-1 ].

References x(), and z().

◆ GaussLegendre()

DLLEXPORT void GIMLI::GaussLegendre ( double  x1,
double  x2,
uint  n,
RVector x,
RVector w 
)

Given the lower and upper limits of integration x1 and x2 and given n, this routine returns vector x(0..n-1) and w(0..n-1) of length n, containing the abscissas and weights of the Gauss-Legendre n-point quadrature formula.

References x(), and z().

◆ geometricFactor()

RVector GIMLI::geometricFactor ( const DataContainerERT data,
int  dim = 3,
bool  forceFlatEarth = false 
)
inline

DEPRECATED due to wrong typo.

◆ geometricFactors()

DLLEXPORT RVector GIMLI::geometricFactors ( const DataContainerERT data,
int  dim = 3,
bool  forceFlatEarth = false 
)

Helper function to calculate configuration factors for a given DataContainerERT

References GIMLI::DataContainer::sensorPosition(), and GIMLI::DataContainer::setSensorPosition().

◆ getComplexData()

DLLEXPORT CVector GIMLI::getComplexData ( const DataContainer data)

Return CVector of the complex resistivity values transformed from data('rhoa') and data('ip') z=am * cos(ph) - i am * sin(abs(ph)), with am=data('rhoa') and ph=data('ip') /1000

◆ getComplexResistivities()

DLLEXPORT CVector GIMLI::getComplexResistivities ( const Mesh mesh)

Return CVector of the complex resistivity values.

References GIMLI::DataContainer::set(), and z().

◆ getEnvironment()

template<typename ValueType >
ValueType GIMLI::getEnvironment ( const std::string &  name,
ValueType  def,
bool  verbose = false 
)

Read value from environment variable. Return default value if environment not set. Environment var can be set in sh via: export name=val, or simple passing name=val in front of executable.

◆ getIRLSWeights()

template<class Vec >
Vec GIMLI::getIRLSWeights ( const Vec a,
double  locut = 0.0,
double  hicut = 0.0 
)

template function for computing L1 norm (robust/blocky) weightings

Referenced by GIMLI::RInversion::mWeight(), and GIMLI::RInversion::setReferenceModel().

◆ getIRLSWeightsP()

template<class Vec >
Vec GIMLI::getIRLSWeightsP ( const Vec a,
int  p,
double  locut = 0.0,
double  hicut = 0.0 
)

template function for computing Lp norm (robust/blocky) weightings

◆ hashCombine()

template<typename T >
void GIMLI::hashCombine ( Index &  seed,
const T &  val 
)

◆ increasingRange()

template<class ValueType >
Vector< ValueType > GIMLI::increasingRange ( const ValueType &  first,
const ValueType &  last,
Index  n 
)

Return a RVector with increasing values of size(n+1) filled with : 0, first, ... ,last

References GIMLI::Vector< ValueType >::fill(), and y().

◆ increasingRange2()

template<class ValueType >
Vector< ValueType > GIMLI::increasingRange2 ( const ValueType &  a,
const ValueType &  last,
Index  n 
)

Return a RVector with increasing values of size(n+1) filled with : [0, i*a + (i-1)*x, .. ,last]

References GIMLI::Vector< ValueType >::fill(), x(), and y().

◆ interpolate() [1/9]

DLLEXPORT void GIMLI::interpolate ( const Mesh srcMesh,
const RMatrix inMat,
const R3Vector destPos,
RMatrix outMat,
bool  verbose = false,
double  fillValue = 0.0 
)

Interpolate a given input data regarding the mesh srcMesh to a set of positions and write the interpolated data to outMat. outMat will resized if necessary. Each data vector in inMat have to correspond to mesh.nodeCount(). If data length is mesh.cellCount() cellDataToPointData will performed. The interpolation rule depend on the shape functions of mesh cells. Several utility or shortcut functions are defined.

Referenced by interpolate().

◆ interpolate() [2/9]

DLLEXPORT void GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const Mesh destMesh,
RVector outVec,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

◆ interpolate() [3/9]

DLLEXPORT RVector GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const R3Vector destPos,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

References interpolate(), and GIMLI::Matrix< ValueType >::push_back().

◆ interpolate() [4/9]

DLLEXPORT void GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const R3Vector destPos,
RVector outVec,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

References x(), y(), and z().

◆ interpolate() [5/9]

DLLEXPORT RVector GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const RVector x,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

◆ interpolate() [6/9]

DLLEXPORT RVector GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const RVector x,
const RVector y,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

◆ interpolate() [7/9]

DLLEXPORT RVector GIMLI::interpolate ( const Mesh srcMesh,
const RVector inVec,
const RVector x,
const RVector y,
const RVector z,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation.

◆ interpolate() [8/9]

DLLEXPORT void GIMLI::interpolate ( const Mesh srcMesh,
const std::string &  fileName,
Mesh destMesh,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation. Read in data from fileName and add the interpolated data into the destination mesh.

References interpolate(), x(), y(), and z().

◆ interpolate() [9/9]

DLLEXPORT void GIMLI::interpolate ( const Mesh srcMesh,
Mesh destMesh,
bool  verbose = false,
double  fillValue = 0.0 
)

Utility function for interpolation. Interpolate all export data from srcMesh to the destination mesh. Point and Cell based.

◆ interpolateSurface()

DLLEXPORT void GIMLI::interpolateSurface ( const Mesh srcMesh,
Mesh destMesh,
bool  verbose = false,
double  fillValue = 0 
)

Utility function for interpolation. Interpolate the z-coordinate from mesh to the z-coordinate of the destination mesh.

◆ inv() [1/5]

BVector GIMLI::inv ( const BVector a)
inline

For use in pygimli

◆ inv() [2/5]

template<class Matrix >
Matrix GIMLI::inv ( const Matrix A)

Return the inverse of Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

◆ inv() [3/5]

template<class Matrix >
void GIMLI::inv ( const Matrix A,
Matrix I 
)

Return the inverse of Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

◆ inv() [4/5]

template<class ValueType >
Matrix3<ValueType> GIMLI::inv ( const Matrix3< ValueType > &  A)
inline

Return the inverse of Matrix A3. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

Referenced by GIMLI::Shape::invJacobian().

◆ inv() [5/5]

template<class ValueType >
void GIMLI::inv ( const Matrix3< ValueType > &  A,
Matrix3< ValueType > &  I 
)
inline

Return the inverse of Matrix3 A.

◆ kByte()

double GIMLI::kByte ( long  byte)
inline

Convert byte into KByte.

◆ lineIntegraldGdz()

DLLEXPORT double GIMLI::lineIntegraldGdz ( const RVector3 p1,
const RVector3 p2 
)

Only for a small TPOC for 2d gravimetry after WonBevis1987 Do not use until u know what u do.

◆ lineIntegralZ_WonBevis() [1/2]

DLLEXPORT double GIMLI::lineIntegralZ_WonBevis ( const RVector3 p1,
const RVector3 p2 
)

Lineintegral after WonBevis. Only return dgz.

◆ lineIntegralZ_WonBevis() [2/2]

DLLEXPORT void GIMLI::lineIntegralZ_WonBevis ( const RVector3 p1,
const RVector3 p2,
RVector3 dg,
RVector3 dgz 
)

Lineintegral after WonBevis.

◆ load()

template<class ValueType >
bool GIMLI::load ( Matrix< ValueType > &  A,
const std::string &  filename 
)

Load matrix from a single or multiple files (Binary). File suffix (MATRIXBINSUFFIX, ".matrix", ".mat") given or not – loads single datafile, else try to load matrix from multiple binary vector files. Single format: see save(const Matrix < ValueType > & A, const std::string & filename)

  • First check if filename suffix is ".matrix", ".mat", MATRIXBINSUFFIX;

** yes, load loadMatrixSingleBin(filename)

  • no: check if filename is expandable with suffix ".matrix" or ".mat";

** yes , load loadMatrixSingleBin(filename + MATRIXBINSUFFIX)

  • no: try to load matrix from multiple binary vectors;

Referenced by GIMLI::Vector< bool >::load(), GIMLI::Mesh::Mesh(), and GIMLI::Vector< bool >::Vector().

◆ loadMatrixCol() [1/2]

template<class ValueType >
bool GIMLI::loadMatrixCol ( Matrix< ValueType > &  A,
const std::string &  filename 
)

Load Matrix from Ascii File (column based).

Referenced by saveMatrixCol().

◆ loadMatrixCol() [2/2]

template<class ValueType >
bool GIMLI::loadMatrixCol ( Matrix< ValueType > &  A,
const std::string &  filename,
std::vector< std::string > &  comments 
)

Load Matrix from Ascii File (column based), with optional comments header line.

◆ loadMatrixRow() [1/2]

template<class ValueType >
bool GIMLI::loadMatrixRow ( Matrix< ValueType > &  A,
const std::string &  filename 
)

Load Matrix from Ascii File (row based).

Referenced by saveMatrixRow().

◆ loadMatrixRow() [2/2]

template<class ValueType >
bool GIMLI::loadMatrixRow ( Matrix< ValueType > &  A,
const std::string &  filename,
std::vector< std::string > &  comments 
)

Load Matrix from Ascii File (row based), with optional comments header line.

◆ loadMatrixSingleBin()

template<class ValueType >
bool GIMLI::loadMatrixSingleBin ( Matrix< ValueType > &  A,
const std::string &  filename 
)

Force to load single matrix binary file. Format: see save(const Matrix < ValueType > & A, const std::string & filename).

Referenced by GIMLI::DCSRMultiElectrodeModelling::checkPrimpotentials_().

◆ loadMatrixVectorsBin()

template<class ValueType >
bool GIMLI::loadMatrixVectorsBin ( Matrix< ValueType > &  A,
const std::string &  filenameBody,
uint  kCount = 1 
)

Force to load multiple binary vector files into one matrix (row-based). File name will be determined from filenamebody + successive increased number (read while files exist).
e.g. read "filename.0.* ... filename.n.* -> Matrix[0–n)[0..vector.size())
kCount can be given to use as subcounter.
e.g. read "filename.0_0.* ... filename.n_0.* ... filename.0_kCount-1.* ... filename.n_kCount-1.* -> Matrix[0–n*kCount)[0..vector.size())

◆ loadVec()

template<class ValueType >
bool GIMLI::loadVec ( Vector< ValueType > &  a,
const std::string &  filename,
IOFormat  format = Ascii 
)

Load vector from file. See Vector< ValueType >::load.

References GIMLI::Vector< ValueType >::load().

◆ logDropTol()

DLLEXPORT RVector GIMLI::logDropTol ( const RVector data,
double  logdrop = 1e-6,
bool  normalize = true 
)

log10 scale of data with negative values. Conserve sign alternating a drop tolerance.

◆ logTransDropTol()

DLLEXPORT RVector GIMLI::logTransDropTol ( const RVector data,
double  logdrop = 1e-6,
bool  normalize = true 
)

DEPRECATED use logDropTol.

◆ lower()

DLLEXPORT std::string GIMLI::lower ( const std::string &  str)

convert all chars in str to lower and return the result

◆ matMult()

DLLEXPORT void GIMLI::matMult ( const RMatrix A,
const RMatrix B,
RMatrix C,
double  a = 1.0,
double  b = 0.0 
)

Inplace matrix calculation: $C = a*A*B + b*C$. B are transposed if needed to fit appropriate dimensions.

◆ matMultABA()

DLLEXPORT void GIMLI::matMultABA ( const RMatrix A,
const RMatrix B,
RMatrix C,
RMatrix AtB,
double  a = 1.0,
double  b = 0.0 
)

Inplace matrix calculation: $C = a * A.T * B * A$ + b*C. Size of A is (n,m) and B need to be square (n,n), C will resized to (m,m). AtB might be for temporary memory allocation.

◆ matTransMult()

DLLEXPORT void GIMLI::matTransMult ( const RMatrix A,
const RMatrix B,
RMatrix C,
double  a = 1.0,
double  b = 0.0 
)

Inplace matrix calculation: $C = a * A.T * B + b*C$. B are transposed if needed to fit appropriate dimensions.

References matTransMult().

Referenced by matTransMult().

◆ mByte()

double GIMLI::mByte ( long  byte)
inline

Convert byte into MByte

Referenced by GIMLI::MemWatch::inUse().

◆ memoryInUse()

double GIMLI::memoryInUse ( )
inline

Current amount of memory in use for the current process in MByte.

References GIMLI::Singleton< MemWatch >::instance(), and GIMLI::MemWatch::inUse().

◆ mult() [1/4]

DLLEXPORT void GIMLI::mult ( const ElementMatrix< double > &  A,
const PosVector b,
ElementMatrix< double > &  C 
)

vector per quadrature point

◆ mult() [2/4]

DLLEXPORT void GIMLI::mult ( const ElementMatrix< double > &  A,
const RVector b,
ElementMatrix< double > &  C 
)

scalar per quadrature point

◆ mult() [3/4]

DLLEXPORT void GIMLI::mult ( const ElementMatrix< double > &  A,
const std::vector< RMatrix > &  b,
ElementMatrix< double > &  C 
)

Matrix per quadrature point

◆ mult() [4/4]

template<class ValueType >
ValueType GIMLI::mult ( const Vector< ValueType > &  v1,
const Vector< ValueType > &  v2 
)

Return scalar product <v1, v2>. Redirect from dot

◆ nonZero()

template<class ValueType >
bool GIMLI::nonZero ( const Vector< ValueType > &  v)

Return true if at least one value is greater than TOLERANCE.

References zero().

◆ numberOfCPU()

DLLEXPORT long GIMLI::numberOfCPU ( )

Return the number of available CPUs. 1 if unknown.

Referenced by GIMLI::ModellingBase::setVerbose().

◆ operator&()

BVector GIMLI::operator& ( const BVector a,
const BVector b 
)
inline

Refactor with expression templates

◆ operator*()

template<class ValueType >
PolynomialFunction< ValueType > GIMLI::operator* ( const PolynomialFunction< ValueType > &  f,
const PolynomialFunction< ValueType > &  g 
)

Create new polynomial function for f(x,y,z) * g(x,y,z). pls refactor with expressions

◆ operator<()

template<class ValueType >
bool GIMLI::operator< ( const PolynomialElement< ValueType > &  a,
const PolynomialElement< ValueType > &  b 
)

waste to satisfy python bindings

◆ operator|()

BVector GIMLI::operator| ( const BVector a,
const BVector b 
)
inline

Refactor with expression templates

◆ operator~()

BVector GIMLI::operator~ ( const BVector a)
inline

Refactor with expression templates

◆ polarToComplex()

CVector GIMLI::polarToComplex ( const RVector mag,
const RVector phi,
bool  mRad = false 
)
inline

Convert absolute and phase (default in mrad) values to complex values. To get the vice versa use abs(cvector) and phase(cvector).

◆ posLesserXrY()

bool GIMLI::posLesserXrY ( const RVector3 a,
const RVector3 b 
)
inline

Sort increasing x and decreasing y

◆ posLesserXYrZ()

bool GIMLI::posLesserXYrZ ( const RVector3 a,
const RVector3 b 
)
inline

Sort increasing x and decreasing y

◆ prepExportPotentialData()

DLLEXPORT RVector GIMLI::prepExportPotentialData ( const RVector data,
double  logdrop = 1e-6 
)

log10 scale of potential data for visualisation.

◆ prepExportSensitivityData()

DLLEXPORT RVector GIMLI::prepExportSensitivityData ( const Mesh mesh,
const RVector data,
double  logdrop = 1e-3 
)

log10 scale of sensitivity data for visualisation. mesh need to be a parameter mesh, data is sensitivity matrix row of length nModel. Returning vector have the length of mesh.cellSize() and can be viewed directly.

◆ R3VectorTostdVectorRVector3()

DLLEXPORT std::vector< RVector3 > GIMLI::R3VectorTostdVectorRVector3 ( const R3Vector rv)

Temporary transformation vor R3Vector until std::vector < RVector3 > will be removed.

◆ radToDeg()

template<class ValueType >
ValueType GIMLI::radToDeg ( const ValueType &  rad)

Converts a radian value to degree.

◆ randn()

RVector GIMLI::randn ( Index  n)
inline

Create a array of len n with normal distributed randomized values.

◆ rank1Update()

template<class Vec >
void GIMLI::rank1Update ( SparseMapMatrix< double, Index > &  S,
const Vec u,
const Vec v 
)

Performs a rank 1 update of a matrix such that A -> A + u * v^T

◆ replace()

DLLEXPORT std::string GIMLI::replace ( const std::string &  str,
const char  from,
const char  to 
)

Replace from with to inside str and return the result

◆ saveMatrix()

template<class ValueType >
bool GIMLI::saveMatrix ( const Matrix< ValueType > &  A,
const std::string &  filename,
IOFormat  format = Binary 
)

Save matrix into a file (Binary). File suffix ($MATRIXBINSUFFIX) will be append if none given. Format: rows(uint32) cols(uint32) vals(rows*cols(ValueType)) If IOFormat == Ascii matrix will be saved in Ascii format, See: saveMatrixRow

◆ saveMatrixCol() [1/2]

template<class ValueType >
bool GIMLI::saveMatrixCol ( const Matrix< ValueType > &  A,
const std::string &  filename 
)

Save Matrix into Ascii File (column based).

◆ saveMatrixCol() [2/2]

template<class ValueType >
bool GIMLI::saveMatrixCol ( const Matrix< ValueType > &  A,
const std::string &  filename,
const std::string &  comments 
)

Save Matrix into Ascii File (column based) with optional comments header line.

References loadMatrixCol().

◆ saveMatrixRow() [1/2]

template<class ValueType >
bool GIMLI::saveMatrixRow ( const Matrix< ValueType > &  A,
const std::string &  filename 
)

Save Matrix into Ascii File (row based).

◆ saveMatrixRow() [2/2]

template<class ValueType >
bool GIMLI::saveMatrixRow ( const Matrix< ValueType > &  A,
const std::string &  filename,
const std::string &  comments 
)

Save Matrix into Ascii File (row based) with optional comments header line.

References loadMatrixRow().

◆ saveVec()

template<class ValueType >
bool GIMLI::saveVec ( const Vector< ValueType > &  a,
const std::string &  filename,
IOFormat  format = Ascii 
)

Save vector to file. See Vector< ValueType >::save.

References GIMLI::Vector< ValueType >::save().

◆ scaleMatrix()

template<class Vec >
void GIMLI::scaleMatrix ( SparseMapMatrix< double, Index > &  S,
const Vec l,
const Vec r 
)

Scales a matrix A from left and right vectors such that A -> diag(l) * A * diag(r)

◆ schedGetCPU()

DLLEXPORT int GIMLI::schedGetCPU ( )

Return the number of the currently used CPU from the scheduler.

Referenced by GIMLI::ModellingBase::setMultiThreadJacobian().

◆ setAllNeumannBoundaryConditions()

DLLEXPORT void GIMLI::setAllNeumannBoundaryConditions ( Mesh mesh)

Set the boundary marker to MARKER_BOUND_HOMOGEN_NEUMANN at the outer boundarys.

◆ setComplexData() [1/2]

DLLEXPORT void GIMLI::setComplexData ( DataContainer data,
const CVector u 
)

Set the complex resistivity data values into a DataContainer. as data('u') in Volt and data('ip') in mRad.

◆ setComplexData() [2/2]

DLLEXPORT void GIMLI::setComplexData ( DataContainer data,
const RVector re,
const RVector im 
)

Set the complex resistivity data values into a DataContainer. Complex values are transformed into data('u') in Volt and data('ip') in mRad. u=abs(re -i im), ip=phase(re -i im) * 1000.

Referenced by setComplexResistivities().

◆ setComplexResistivities() [1/3]

DLLEXPORT void GIMLI::setComplexResistivities ( Mesh mesh,
const CVector res 
)

ERT utility function for the handling of complex resistivity values vs. amplitude/phase data. Data are usually given in amplitude(Ohm m) and phase(mRad). Internal we calculate with real and complex resistivity values. There is no complex data type for cell attributes so we put the complex values into the mesh data map as AttributeReal and AttributeImag. Don't do this directly until you know what u do. Use this utility functions to apply the complex resistivity values.

References setComplexData().

◆ setComplexResistivities() [2/3]

DLLEXPORT void GIMLI::setComplexResistivities ( Mesh mesh,
const RVector amp,
const RVector phase 
)

Apply the vectors of Amplitude(Ohm m) and Phase(rad) to set desired complex resistivity values res. res=am * cos(ph) - i am * sin(abs(ph)) See setComplexResistivities(Mesh & mesh, const CVector & res).

◆ setComplexResistivities() [3/3]

DLLEXPORT void GIMLI::setComplexResistivities ( Mesh mesh,
const std::map< float, Complex > &  aMap 
)

Apply a rho map of Amplitude(Ohm m) and Phase(rad) to set desired complex resistivity values. res=am * cos(ph) - i am * sin(abs(ph)) See setComplexResistivities(Mesh & mesh, const CVector & res).

◆ setDebug()

DLLEXPORT void GIMLI::setDebug ( bool  s)

Set global gimli debug flag on or off

◆ setDeepDebug()

DLLEXPORT void GIMLI::setDeepDebug ( int  level)

For several levels of deep debugging. Mainly used for python rvalue conversion.

◆ setDefaultBERTBoundaryConditions()

DLLEXPORT void GIMLI::setDefaultBERTBoundaryConditions ( Mesh mesh)

Set the boundary marker at the outer boundarys. MARKER_BOUND_HOMOGEN_NEUMANN at the surface (boundary.center == zmax) and otherwise MARKER_BOUND_MIXED.

◆ setEnvironment()

template<typename ValueType >
void GIMLI::setEnvironment ( const std::string &  name,
ValueType  val,
bool  verbose = false 
)

Set environment variable. Probably only for internal use and maybe only for posix systems

◆ setThreadCount()

DLLEXPORT void GIMLI::setThreadCount ( Index  nThreads)

Set maximum amount of threads used by thirdparty software (e.g. openblas). Default is number of CPU.

◆ showSizes()

DLLEXPORT void GIMLI::showSizes ( )

For some debug purposes only

◆ sphTangential2Initerial()

DLLEXPORT RVector3 GIMLI::sphTangential2Initerial ( const RVector3 V,
double  lat,
double  lon 
)

Convert vector field from spherical tangential coordinates (radial, Latitude/theta(north/south), Longitude/phi(east/west))

\vec{V(1, lat, lon)} = V[0] * \vec{unit_r} +  V[1] * \vec{unit_theta} + V[2] * \vec{unit_phi}

to geocentric Cartesian coordinates x/y/z:

\vec{F(x, y, z)} = F[0] * \vec{unit_x} +  F[1] * \vec{unit_y} + F[2] * \vec{unit_z}

Transformation via rotation matrix S
F(x,y,z) = S * V(r,\theta,\phi)

J = S * (1, r, r cos th)

J (\dx, \dy, \dz) / (\dr, \d th, \d ph)

x = r * cos ph * cos th
y = r * sin ph * cos th
z = r * sin th

th = latitude degrees -pi/2 .. pi/2, 90 = north pole
ph = longitude degrees  -pi .. pi .. west - east

Inputs V B in radial direction or Magnetic field strength (B) lon longitude degrees (in degrees from -180 to 180) lat Latitude measured positive north from equator (in degrees from south pole [-90 .. 0 .. 90] north pole) Outputs F

◆ stdVectorRVector3ToR3Vector()

DLLEXPORT R3Vector GIMLI::stdVectorRVector3ToR3Vector ( const std::vector< RVector3 > &  rv)

Temporary transformation vor R3Vector until std::vector < RVector3 > will be removed.

◆ tetVolume()

DLLEXPORT double GIMLI::tetVolume ( const RVector3 p0,
const RVector3 p1,
const RVector3 p2,
const RVector3 p3 
)

Return Volume of the Tetrahedron given by 4 RVector3

◆ toArray()

DLLEXPORT RVector GIMLI::toArray ( const R3Vector vec)

Create one dimensional array from R3Vector return = [vev[0][0], vev[0][1], vev[0][2], vev[1][0] .. ]

◆ toMatrix()

DLLEXPORT RMatrix GIMLI::toMatrix ( const R3Vector vec)

Create two dimensional [n x 3] array from R3Vector

◆ triSize()

DLLEXPORT double GIMLI::triSize ( const RVector3 p0,
const RVector3 p1,
const RVector3 p2 
)

Return Size of the Triangle given by 3 RVector3

◆ unique()

template<class T >
Vector< T > GIMLI::unique ( const Vector< T > &  a)

Refactor for speed *‍/ template < class ValueType, class A > BVector operator == (const __VectorExpr< ValueType, A > & vec, const ValueType & v){ return Vector< ValueType >(vec) == v; }

#define DEFINE_COMPARE_OPERATOR__(OP)

#define DEFINE_UNARY_COMPARE_OPERATOR__(OP, FUNCT)

template < class T > Vector < T > cat(const Vector< T > & a, const Vector< T > & b){ Vector < T > c (a.size() + b.size()); std::copy(&a[0], &a[a.size()], &c[0]); std::copy(&b[0], &b[b.size()], &c[a.size()]); return c; }

template < class T, class A > T sum(const __VectorExpr< T, A > & a){ std::cout << "sum(vectorExpr)" << std::endl; T tmp(0.0); for (Index i = 0, imax = a.size(); i < imax; i++) tmp += a[i]; return tmp;

T tmp(0.0); __VectorExpr< T, A > al = a; for (Index i = 0; i < a.size(); i++, ++al) { tmp += *al; } return tmp;

T tmp(0.0); __VectorExpr< T, A > al = a; for (; al != a.end(); ++al){ tmp += *al; } return tmp;

return std::accumulate(a[0], a[a.size()], T()); }

 Templates argue with python bindings

inline Complex sum(const CVector & c){ return std::accumulate(c.begin(), c.end(), Complex(0)); } inline double sum(const RVector & r){ return std::accumulate(r.begin(), r.end(), double(0)); } inline SIndex sum(const IVector & i){ return std::accumulate(i.begin(), i.end(), SIndex(0)); }

template < class T, class A > T min(const __VectorExpr< T, A > & a){ return min(Vector< T >(a)); } template < class T, class A > T max(const __VectorExpr< T, A > & a){ return max(Vector< T >(a)); }

inline Complex max(const CVector & v){

Complex ret=v[0];
for (Index i = 1; i < v.size(); i ++ ) if (v[i] > ret) ret = v[i];
return ret;

}

inline Complex min(const CVector & v){

Complex ret=v[0];
for (Index i = 1; i < v.size(); i ++ ) if (v[i] < ret) ret = v[i];
return ret;

}

template < class T > T min(const Vector < T > & v){

return *std::min_element(&v[0], &v[0] + v.size());

} template < class T > T max(const Vector < T > & v){

return *std::max_element(&v[0], &v[0] + v.size());

}

template < class T > void capMax(Vector < T > & v, T max){

for (Index i = 0; i < v.size(); i ++ ) v[i] = min(v[i], max);

}

template < class T > void capMin(Vector < T > & v, T min){

for (Index i = 0; i < v.size(); i ++ ) v[i] = max(v[i], min);

}

template < class ValueType > ValueType mean(const Vector < ValueType > & a){ return sum(a) / ValueType(a.size()); }

template < class ValueType, class A> ValueType mean(const __VectorExpr< ValueType, A > & a){ return sum(a) / a.size(); }

template < class ValueType > ValueType stdDev(const Vector < ValueType > & a){ return std::sqrt(sum(square(a - mean(a))) / (double)(a.size() - 1)); }

template < class ValueType > bool haveInfNaN(const Vector < ValueType > & v){ for (VectorIterator < ValueType > it = v.begin(); it != v.end(); ++it){ if (isInfNaN(*it)) return true; } return false; }

template < class ValueType > Vector < ValueType > fixZero(const Vector < ValueType > & v, const ValueType tol = TOLERANCE){ Vector < ValueType > ret(v); for (VectorIterator < ValueType > it = ret.begin(); it != ret.end(); ++it){ if (::fabs(*it) < TOLERANCE) *it = tol; } return ret; }

template < class ValueType > Vector < ValueType > round(const Vector < ValueType > & v, ValueType tol){ return Vector< ValueType >(v).round(tol); }

template < class T > Vector < T > fliplr(const Vector < T > & v){ Vector < T > n(v.size()); for (Index i = 0; i < v.size(); i ++) n[i] = v[v.size() - 1 - i]; return n; }

template < class T, class A, class T2 > Vector < T > pow(const __VectorExpr< T, A > & a, T2 power){ return pow(Vector< T >(a), power); }

template < class T > Vector < T > pow(const Vector < T > & v, const Vector < T > & npower){ ASSERT_EQUAL(v.size(), npower.size())

Vector < T > r(v.size()); for (Index i = 0; i < v.size(); i ++) r[i] = std::pow(v[i], T(npower[i])); return r; }

template < class T > Vector < T > pow(const Vector < T > & v, double npower){ Vector < T > r(v.size()); for (Index i = 0; i < v.size(); i ++){ r[i] = std::pow(v[i], T(npower)); } return r; }

no template < int|double > since castxml interprets it as pow(vec,vec(int)) template < class T > Vector < T > pow(const Vector < T > & v, int npower){ return pow(v, (double)npower); }

template < class T > Vector< T > sort(const Vector < T > & a){

std::vector < T > tmp(a.size(), 0.0) ;
for (Index i = 0; i < a.size(); i ++) tmp[i] = a[i];
std::sort(tmp.begin(), tmp.end());

Vector < T > ret(tmp);
return ret;

fixme .. implement me without std::vector Vector < T > t(a); std::sort(t.begin(), t.end()); return Vector < T > (0); }

/*! Returning a copy of the vector and replacing all consecutive occurrences of a value by a single instance of that value. e.g. [0 1 1 2 1 1] -> [0 1 2 1]. To remove all double values from the vector use an additionally sorting. e.g. unique(sort(v)) gets you [0 1 2].

Referenced by GIMLI::ModellingBase::createMappedModel(), GIMLI::TTModellingWithOffset::TTModellingWithOffset(), and GIMLI::TravelTimeDijkstraModelling::updateMeshDependency_().

◆ x()

◆ y()

◆ z()

◆ zero()

template<class ValueType >
bool GIMLI::zero ( const Vector< ValueType > &  v)

Implement specialized type traits in vector.cpp *‍/ template <> DLLEXPORT void Vector<double>::add( const ElementMatrix < double >& A); template <> DLLEXPORT void Vector<double>::add( const ElementMatrix < double >& A, const double & a); template <> DLLEXPORT void Vector<double>::add( const ElementMatrix < double >& A, const Pos & a); template <> DLLEXPORT void Vector<double>::add( const ElementMatrix < double >& A, const RMatrix & a);

template< typename ValueType > void Vector< ValueType >::add( const ElementMatrix < double >& A){ THROW_TO_IMPL} template< typename ValueType > void Vector< ValueType >::add( const ElementMatrix < double >& A, const double & a){THROW_TO_IMPL} template< typename ValueType > void Vector< ValueType >::add( const ElementMatrix < double >& A, const Pos & a){THROW_TO_IMPL} template< typename ValueType > void Vector< ValueType >::add( const ElementMatrix < double >& A, const RMatrix & a){THROW_TO_IMPL}

removeme in V1.2, 20200727 template <> DLLEXPORT void Vector<double>::add( const ElementMatrix < double > & A, const RVector & a); removeme in V1.2, 20200727 template< typename ValueType > void Vector< ValueType >::add( const ElementMatrix < double >& A, const Vector< double> & a){THROW_TO_IMPL}

template < > inline Vector< double > & Vector< double >::round(const double & tolerance){

for (Index i = 0; i < size_; i ++) data_[i] = roundTo(data_[i], tolerance);

return *this;

}

template< class ValueType, class Iter > class AssignResult{ public: AssignResult(Vector< ValueType > & a, const Iter & result, Index start, Index end) : a_(&a), iter_(result), start_(start), end_(end){ } void operator()() { ValueType * iter = a_->begin().ptr(); std::cout << start_ << " " << end_ << std::endl; for (Index i = start_; i < end_; i++) iter[i] = iter_[i]; }

Vector< ValueType > * a_; Iter iter_; Index start_; Index end_; };

struct BINASSIGN { template < class T > inline T operator()(const T & a, const T & b) const { return b; } };

template< class ValueType, class Iter > void assignResult(Vector< ValueType > & v, const Iter & result) {

Make a temporary copy of the iterator. This is faster on segmented architectures, since all the iterators are in the same segment. Iter result2 = result;

no boost thread

no std algo

        ValueType * iter = v.begin().ptr();

Inlined expression for (Index i = v.size(); i–;) iter[i] = result2[i];

}

template< class ValueType, class A > class __VectorExpr { public: __VectorExpr(const A & a) : iter_(a) { }

inline ValueType operator [] (Index i) const { return iter_[i]; }

inline ValueType operator * () const { return *iter_; }

inline void operator ++ () { ++iter_; }

void assign(Vector< ValueType > & x) const { assignResult(x, *this); }

inline Index size() const { return iter_.size(); }

A * begin() { return iter_.begin(); } A * end() { return iter_.end(); }

private: A iter_; };

template< class ValueType, class A, class Op > class __VectorUnaryExprOp { public: __VectorUnaryExprOp(const A & a) : iter_(a) { }

inline ValueType operator [] (Index i) const { return Op()(iter_[i]); }

inline ValueType operator * () const { return Op()(*iter_); }

inline void operator ++ () { ++iter_; }

inline Index size() const { return iter_.size(); }

private: A iter_; };

template< class ValueType, class A, class B, class Op > class __VectorBinaryExprOp { public: __VectorBinaryExprOp(const A & a, const B & b) : iter1_(a), iter2_(b) { }

inline ValueType operator [] (Index i) const { return Op()(iter1_[i], iter2_[i]); }

inline ValueType operator * () const { return Op()(*iter1_, *iter2_); }

inline void operator ++ () { ++iter1_; ++iter2_; }

inline Index size() const { return iter2_.size(); }

private: A iter1_; B iter2_; };

template< class ValueType, class A, class Op > class __VectorValExprOp { public: __VectorValExprOp(const A & a, const ValueType & val) : iter_(a), val_(val) { }//__DS(val << " " << &val)}

inline ValueType operator [] (Index i) const { return Op()(iter_[i], val_); }

inline ValueType operator * () const { return Op()(*iter_, val_); }

inline void operator ++ () { ++iter_; }

inline Index size() const { return iter_.size(); }

private: A iter_; ValueType val_; };

template< class ValueType, class A, class Op > class __ValVectorExprOp { public: __ValVectorExprOp(const ValueType & val, const A & a) : iter_(a), val_(val) { }

inline ValueType operator [] (Index i) const { return Op()(val_, iter_[i]); }

inline ValueType operator * () const { return Op()(val_, *iter_); }

inline void operator ++ () { ++iter_; }

inline Index size() const { return iter_.size(); }

private: A iter_; ValueType val_; };

#define DEFINE_UNARY_EXPR_OPERATOR__(OP, FUNCT)

#define DEFINE_EXPR_OPERATOR__(OP, FUNCT)

 define some utility functions

inline bool operator < (const GIMLI::Vector<double>&a, const GIMLI::Vector<double> &b) { return false; }

template < class ValueType > bool operator == (const Vector< ValueType > & v1, const Vector< ValueType > & v2){ if (v1.size() != v2.size()) return false; for (Index i = 0; i < v1.size(); i ++){ if (!isEqual(v1[i], v2[i])) { for (Index j = 0; j < v1.size(); j ++){ __MS(j<< " " << v1[j] << " " << v2[j] << " " << v1[j]-v2[j] ) } return false; } } return true; }

template < class ValueType, class A > bool operator == (const Vector< ValueType > & v1, const __VectorExpr< ValueType, A > & v2){ return v1 == Vector< ValueType >(v2); }

/*! Return true if all values lower than TOLERANCE.

Referenced by nonZero().

Variable Documentation

◆ EdgeCoordinates

const double GIMLI::EdgeCoordinates[2][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0}
}

◆ Hex20NodeSplit

const uint8 GIMLI::Hex20NodeSplit[20][2]
static
Initial value:
= {
{0,0},{1,1},{2,2},{3,3},{4,4},{5,5},{6,6},{7,7},
{0,1},{1,2},{2,3},{3,0},
{4,5},{5,6},{6,7},{7,4},
{0,4},{1,5},{2,6},{3,7}
}

◆ Hexahedron20FacesID

const uint8 GIMLI::Hexahedron20FacesID[6][8]
static
Initial value:
= {
{0,1,5,4,8,17,12,16},
{1,2,6,5,9,18,13,17},
{2,3,7,6,10,19,14,18},
{3,0,4,7,11,16,15,19},
{0,3,2,1,11,10,9,8},
{4,5,6,7,12,13,14,15},
}

◆ HexahedronFacesID

const uint8 GIMLI::HexahedronFacesID[6][4]
static
Initial value:
= {
{1, 2, 6, 5},
{2, 3, 7, 6},
{3, 0, 4, 7},
{0, 1, 5, 4},
{4, 5, 6, 7},
{0, 3, 2, 1}
}

A Hexahedron.

A Hexahedron

Node direction:

7---—6
/| /|
4---—5 |
| 3-—|-2
|/ |/
0---—1
Neighborship relations: Boundary normal shows outside .. so the boundary left neighbor is this cell

Neighbor Nr, on Boundary a-b-c-d 0 1-2-6-5 // le 1 2-3-7-6 // ri 2 3-0-4-7 // ri 3 0-1-5-4 // le 4 4-5-6-7 // le 5 0-3-2-1 // ri

T.~Apel and N.~Düvelmeyer, Transformation of Hexahedral Finite Element Meshes into Tetrahedral Meshes According to Quality Criteria, Computing Volume 71, Number 4 / November, 2003, DOI 10.1007/s00607-003-0031-5, Pages 293-304 5-Tet-split: type 6(2) 1-4-5-6, 3-7-6-4, 1-4-0-3, 1-2-3-6, 1-6-4-3 6-Tet-split: type 1 0-1-2-6, 0-2-3-6, 0-1-6-5, 0-4-5-6, 0-3-7-6, 0-4-6-7

◆ HexahedronSplit5TetID

const int GIMLI::HexahedronSplit5TetID[5][4]
static
Initial value:
= {
{1, 4, 5, 6},
{3, 6, 7, 4},
{1, 0, 4, 3},
{1, 2, 3, 6},
{1, 4, 6, 3}
}

◆ HexahedronSplit6TetID

const int GIMLI::HexahedronSplit6TetID[6][4]
static
Initial value:
= {
{0, 1, 2, 6},
{0, 2, 3, 6},
{0, 1, 6, 5},
{0, 4, 5, 6},
{0, 3, 7, 6},
{0, 4, 6, 7}
}

◆ HexCoordinates

const double GIMLI::HexCoordinates[8][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{1.0, 1.0, 0.0},
{0.0, 1.0, 0.0},
{0.0, 0.0, 1.0},
{1.0, 0.0, 1.0},
{1.0, 1.0, 1.0},
{0.0, 1.0, 1.0}
}

◆ NodeCoordinates

const double GIMLI::NodeCoordinates[1][3]
static
Initial value:
= {
{0.0, 0.0, 0.0}
}

◆ Prism15NodeSplit

const uint8 GIMLI::Prism15NodeSplit[15][2]
static
Initial value:
= {
{0,0},{1,1},{2,2},{3,3},{4,4},{5,5},
{0,1},{1,2},{2,0},
{3,4},{4,5},{5,3},
{0,3},{1,4},{2,5}
}

◆ PrismCoordinates

const double GIMLI::PrismCoordinates[6][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{0.0, 1.0, 0.0},
{0.0, 0.0, 1.0},
{1.0, 0.0, 1.0},
{0.0, 1.0, 1.0}
}

◆ Pyramid13NodeSplit

const uint8 GIMLI::Pyramid13NodeSplit[13][2]
static
Initial value:
= {
{0,0},{1,1},{2,2},{3,3},{4,4},
{0,1},{1,2},{2,3},{3,0},
{0,4},{1,4},{2,4},{3,4}
}

◆ PyramidCoordinates

const double GIMLI::PyramidCoordinates[5][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{1.0, 1.0, 0.0},
{0.0, 1.0, 0.0},
{0.0, 0.0, 0.1}
}

◆ PyramidFacesID

const uint8 GIMLI::PyramidFacesID[5][4]
static
Initial value:
= {
{1, 2, 5, 255},
{2, 3, 5, 255},
{0, 5, 3, 255},
{0, 1, 5, 255},
{0, 3, 2, 1},
}

A Pyramid.

A Pyramid cell

Node direction:

t      3------------2  \n
|     /            /   \n
|    /            /    \n
|   /            /     \n
|  /      5     /      \n
| /            /       \n
|/            /        \n
0------------1-------r \n

◆ QuadCoordinates

const double GIMLI::QuadCoordinates[4][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{1.0, 1.0, 0.0},
{0.0, 1.0, 0.0}
}

◆ Tet10NodeSplit

const uint8 GIMLI::Tet10NodeSplit[10][2]
static
Initial value:
= {
{0,0},{1,1},{2,2},{3,3},
{0,1},{1,2},{2,0},
{0,3},{1,3},{2,3}
}

◆ Tet10NodeSplitZienk

const uint8 GIMLI::Tet10NodeSplitZienk[10][2]
static
Initial value:
= {
{0,0},{1,1},{2,2},{3,3},
{0,1},{0,2},{0,3},
{1,2},{2,3},{3,1}
}

◆ TetCoordinates

const double GIMLI::TetCoordinates[4][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{0.0, 1.0, 0.0},
{0.0, 0.0, 1.0}
}

◆ TetrahedronFacesID

const uint8 GIMLI::TetrahedronFacesID[4][3]
static
Initial value:
= {
{1, 2, 3},
{2, 0, 3},
{0, 1, 3},
{0, 2, 1}
}

A Tetrahedron.

A Tetrahedron

Node direction:

3
| 2
|/
0--—1
Neighborship relations: Boundary normal shows outside .. so the boundary left neighbor is this cell

Neighbor Nr., on Boundary a-b-c. Boundary to neighbor cell is opposite to NodeNr. 0 1-2-3 le – view from outer 1 2-0-3 ri – view from inner 2 0-1-3 le – view from outer 3 0-2-1 ri – view from inner

◆ TriCoordinates

const double GIMLI::TriCoordinates[3][3]
static
Initial value:
= {
{0.0, 0.0, 0.0},
{1.0, 0.0, 0.0},
{0.0, 1.0, 0.0}
}

◆ TriPrimSplit3TetID

const uint8 GIMLI::TriPrimSplit3TetID[3][4]
static
Initial value:
= {
{0, 5, 1, 2},
{3, 1, 5, 4},
{3, 5, 1, 0}
}

◆ TriPrismFacesID

const uint8 GIMLI::TriPrismFacesID[5][4]
static
Initial value:
= {
{1, 2, 5, 4},
{2, 0, 3, 5},
{0, 1, 4, 3},
{3, 4, 5, 255},
{0, 2, 1, 255},
}

Triangular prism.

A Triangular prism is a three-sided prism. Equivalently, it is a pentahedron of which two faces are parallel. Node direction:

5
/|\
3—4
| 2 |
|/ |
0—1