HermesCommon  3.0
Hermes Namespace Reference

General namespace for the Hermes library. More...

Namespaces

 Algebra
 Namespace containing classes for vector / matrix operations.
 
 Mixins
 Namespace for mixin classes. These classes always serve one particular purpose that multiple classes of the entire Hermes library could use - logging, time measurement, ...
 
 Preconditioners
 Namespace containing objects for preconditioners.
 
 Solvers
 Namespace for linear / nonlinear / iterative solvers.
 

Classes

class  Api
 API Class containing settings for the whole HermesCommon. More...
 
class  Array
 
class  ButcherTable
 Butcher's tables for Runge-Kutta methods. More...
 
class  Hermes1DFunction
 
class  Hermes2DFunction
 
class  Hermes3DFunction
 
class  LightArray
 A light version of the array. For ordinal types or pointers, does not provide memory handling. More...
 
class  Ord
 
class  Range
 Range of values. More...
 
struct  SplineCoeff
 
class  Table
 General square table of real numbers. More...
 

Typedefs

typedef
Hermes::Mixins::OutputAttachable::Parameter
< unsigned int > 
OutputParameterUnsignedInt
 
typedef
Hermes::Mixins::OutputAttachable::Parameter
< double > 
OutputParameterDouble
 
typedef
Hermes::Mixins::OutputAttachable::Parameter
< bool > 
OutputParameterBool
 
typedef
Hermes::Mixins::OutputAttachable::Parameter
< std::vector< unsigned int > > 
OutputParameterUnsignedIntVector
 
typedef
Hermes::Mixins::OutputAttachable::Parameter
< std::vector< double > > 
OutputParameterDoubleVector
 
typedef
Hermes::Mixins::OutputAttachable::Parameter
< std::vector< bool > > 
OutputParameterBoolVector
 

Enumerations

enum  MatrixSolverType {
  SOLVER_UMFPACK = 0, SOLVER_PARALUTION_ITERATIVE = 1, SOLVER_PARALUTION_AMG = 2, SOLVER_PETSC = 3,
  SOLVER_MUMPS = 4, SOLVER_SUPERLU = 5, SOLVER_AMESOS = 6, SOLVER_AZTECOO = 7,
  SOLVER_EXTERNAL = 8, SOLVER_EMPTY = 100
}
 
enum  DirectMatrixSolverType {
  DIRECT_SOLVER_UMFPACK = 0, DIRECT_SOLVER_MUMPS = 4, DIRECT_SOLVER_SUPERLU = 5, DIRECT_SOLVER_AMESOS = 6,
  DIRECT_SOLVER_EXTERNAL = 8
}
 
enum  IterativeMatrixSolverType { ITERATIVE_SOLVER_PARALUTION = 1, ITERATIVE_SOLVER_PETSC = 3, ITERATIVE_SOLVER_AZTECOO = 7 }
 
enum  AMGMatrixSolverType { AMG_SOLVER_PARALUTION = 2 }
 
enum  HermesCommonApiParam {
  numThreads, matrixSolverType, directMatrixSolverType, showInternalWarnings,
  checkMeshesOnLoad, useAccelerators
}
 Enumeration of potential keys in the Api::parameters storage.
 
enum  ButcherTableType {
  Explicit_RK_1, Explicit_RK_2, Explicit_RK_3, Explicit_RK_4,
  Implicit_RK_1, Implicit_Crank_Nicolson_2_2, Implicit_SIRK_2_2, Implicit_ESIRK_2_2,
  Implicit_SDIRK_2_2, Implicit_Lobatto_IIIA_2_2, Implicit_Lobatto_IIIB_2_2, Implicit_Lobatto_IIIC_2_2,
  Implicit_Lobatto_IIIA_3_4, Implicit_Lobatto_IIIB_3_4, Implicit_Lobatto_IIIC_3_4, Implicit_Radau_IIA_3_5,
  Implicit_SDIRK_5_4, Explicit_HEUN_EULER_2_12_embedded, Explicit_BOGACKI_SHAMPINE_4_23_embedded, Explicit_FEHLBERG_6_45_embedded,
  Explicit_CASH_KARP_6_45_embedded, Explicit_DORMAND_PRINCE_7_45_embedded, Implicit_ESDIRK_TRBDF2_3_23_embedded, Implicit_ESDIRK_TRX2_3_23_embedded,
  Implicit_SDIRK_CASH_3_23_embedded, Implicit_SDIRK_BILLINGTON_3_23_embedded, Implicit_SDIRK_CASH_5_24_embedded, Implicit_SDIRK_CASH_5_34_embedded,
  Implicit_DIRK_ISMAIL_7_45_embedded
}
 Butcher's tables type. The last number in the name always means order, the one before last (if provided) is the number of stages. More...
 

Functions

template<typename Scalar >
double get_l2_norm (Algebra::Vector< Scalar > *vec)
 
template<typename Scalar >
double get_l2_norm (Scalar *vec, int count)
 
int sqr (int x)
 
double sqr (double x)
 
double sqrt (double x)
 
double sqr (std::complex< double > x)
 
double magn (double x)
 
double conj (double a)
 
double cos (double x)
 
double sin (double x)
 
double atan (double x)
 
double atan2 (double x, double y)
 
double abs (double x)
 
double pow (double x, double y)
 
double log (double x)
 
HERMES_API Ord operator/ (const double &a, const Ord &b)
 
HERMES_API Ord operator* (const double &a, const Ord &b)
 
HERMES_API Ord operator+ (const double &a, const Ord &b)
 
HERMES_API Ord operator- (const double &a, const Ord &b)
 
HERMES_API Ord operator/ (const std::complex< double > &a, const Ord &b)
 
HERMES_API Ord operator* (const std::complex< double > &a, const Ord &b)
 
HERMES_API Ord operator+ (const std::complex< double > &a, const Ord &b)
 
HERMES_API Ord operator- (const std::complex< double > &a, const Ord &b)
 
HERMES_API Ord operator- (const Ord &a)
 
HERMES_API Ord pow (const Ord &a, const double &b)
 
HERMES_API Ord sqrt (const Ord &a)
 
HERMES_API Ord sqr (const Ord &a)
 
HERMES_API Ord conj (const Ord &a)
 
HERMES_API Ord abs (const Ord &a)
 
HERMES_API Ord magn (const Ord &a)
 
HERMES_API Ord atan2 (const Ord &a, const Ord &b)
 
HERMES_API Ord atan (const Ord &a)
 
HERMES_API Ord sin (const Ord &a)
 
HERMES_API Ord cos (const Ord &a)
 
HERMES_API Ord log (const Ord &a)
 
HERMES_API Ord exp (const Ord &a)
 
template<typename Caller , typename ArrayItem >
ArrayItem * calloc_with_check (int size, Caller *const caller, bool force_malloc=false)
 
template<typename ArrayItem >
ArrayItem * calloc_with_check (int size, bool force_malloc=false)
 
template<typename Caller , typename ArrayItem >
ArrayItem * malloc_with_check (int size, Caller *const caller, bool force_malloc=false)
 
template<typename ArrayItem >
ArrayItem * malloc_with_check (int size, bool force_malloc=false)
 
template<typename ArrayItem >
ArrayItem * malloc_with_check_direct_size (int size)
 
template<typename ArrayItem >
ArrayItem * calloc_with_check_direct_size (int size)
 
template<typename Caller , typename ArrayItem >
ArrayItem * realloc_with_check (ArrayItem *&original_array, int new_size, Caller *const caller)
 
template<typename ArrayItem >
ArrayItem * realloc_with_check (ArrayItem *&original_array, int new_size)
 
template<typename ArrayItem >
void free_with_check (ArrayItem *&ptr, bool force_malloc=false)
 

Variables

HERMES_COMMON_API Hermes::Api HermesCommonApi
 Global instance used inside Hermes which is also accessible to users.
 
const double HermesEpsilon = std::numeric_limits<double>::epsilon() * 10.
 
const double HermesSqrtEpsilon = std::sqrt(std::numeric_limits<double>::epsilon())
 
const std::string HERMES_ANY = "-1234"
 
const int HERMES_ANY_INT = -1234
 
template class HERMES_API Hermes1DFunction< double >
 
template class HERMES_API Hermes2DFunction< double >
 
template class HERMES_API Hermes3DFunction< double >
 

Detailed Description

General namespace for the Hermes library.

Enumeration Type Documentation

Butcher's tables type. The last number in the name always means order, the one before last (if provided) is the number of stages.

Enumerator
Explicit_RK_1 

Explicit Runge-Kutta RK-1 (explicit Euler).

Explicit_RK_2 

Explicit Runge-Kutta RK-2 method.

Explicit_RK_3 

Explicit Runge-Kutta RK-3 method.

Explicit_RK_4 

Explicit Runge-Kutta RK-4 method.

Implicit_RK_1 

Implicit Runge-Kutta RK-1 (implicit Euler).

Implicit_Crank_Nicolson_2_2 

Implicit Crank_Nicolson method.

Implicit_SIRK_2_2 

Implicit SIRK-2-2 method.

Implicit_ESIRK_2_2 

Implicit ESIRK-2-2 method.

Implicit_SDIRK_2_2 

Implicit SDIRK-2-2 method.

Implicit_Lobatto_IIIA_2_2 

Implicit Lobatto IIIA-2 method.

Implicit_Lobatto_IIIB_2_2 

Implicit Lobatto IIIB-2 method.

Implicit_Lobatto_IIIC_2_2 

Implicit Lobatto IIIB-2 method.

Implicit_Lobatto_IIIA_3_4 

Implicit Lobatto IIIA-4 method.

Implicit_Lobatto_IIIB_3_4 

Implicit Lobatto IIIB-4 method.

Implicit_Lobatto_IIIC_3_4 

Implicit Lobatto IIIB-4 method.

Implicit_Radau_IIA_3_5 

Implicit Radau IIA-5 method.

Implicit_SDIRK_5_4 

Implicit SDIRK-5-4 method.

Explicit_HEUN_EULER_2_12_embedded 

Heun-Euler (orders 1 and 2),.

Explicit_BOGACKI_SHAMPINE_4_23_embedded 

Bogacki-Shampine (orders 2 and 3),.

Explicit_FEHLBERG_6_45_embedded 

Fehlberg (orders 4 and 5),.

Explicit_CASH_KARP_6_45_embedded 

Cash-Karp (orders 4 and 5),.

Explicit_DORMAND_PRINCE_7_45_embedded 

Dormand-Prince (orders 4 and 5),.

Implicit_ESDIRK_TRBDF2_3_23_embedded 

of TR-BDF2 by Hosea and Shampine.

From the paper Analysis and implementation

Implicit_ESDIRK_TRX2_3_23_embedded 

of TR-BDF2 by Hosea and Shampine.

From the paper Analysis and implementation

Implicit_SDIRK_CASH_3_23_embedded 

with Error Estimates by J.R. Cash

From the paper Diagonally Implicit Runge-Kutta Formulae

Implicit_SDIRK_BILLINGTON_3_23_embedded 

Codes for the Solution of Stiff and Non-Stiff systems of ODE's.

From the Master Thesis by S.R. Billington: Type Insensitive

Implicit_SDIRK_CASH_5_24_embedded 

with Error Estimates by J.R. Cash

From the paper Diagonally Implicit Runge-Kutta Formulae

Implicit_SDIRK_CASH_5_34_embedded 

with Error Estimates by J.R. Cash

From the paper Diagonally Implicit Runge-Kutta Formulae

Implicit_DIRK_ISMAIL_7_45_embedded 

Implicit embedded DIRK method pair of orders four in five (from the paper Fudziah Ismail et all: Embedded Pair of Diagonally Implicit Runge-Kutta Method for Solving Ordinary Differential Equations). The method has 7 stages but the first one is explicit.

Definition at line 32 of file table.h.