GEOSX
Classes | Namespaces | Macros | Enumerations
common.hpp File Reference
#include "common/DataTypes.hpp"

Go to the source code of this file.

Classes

struct  geosx::MatrixLayout
 

Namespaces

 geosx
 

Macros

#define GEOSX_LAI_RUNTIME_ASSERT   1
 
#define GEOSX_LAI_ASSERT(expr)   GEOSX_ERROR_IF( !(expr), "" )
 
#define GEOSX_LAI_ASSERT_MSG(expr, msg)   GEOSX_ERROR_IF( !(expr), msg )
 
#define GEOSX_LAI_ASSERT_EQ(lhs, rhs)   GEOSX_ERROR_IF_NE( lhs, rhs )
 
#define GEOSX_LAI_ASSERT_NE(lhs, rhs)   GEOSX_ERROR_IF_EQ( lhs, rhs )
 
#define GEOSX_LAI_ASSERT_GT(lhs, rhs)   GEOSX_ERROR_IF_GE( rhs, lhs )
 
#define GEOSX_LAI_ASSERT_GE(lhs, rhs)   GEOSX_ERROR_IF_GT( rhs, lhs )
 
#define GEOSX_LAI_CHECK_ERROR(call)
 
#define GEOSX_LAI_CHECK_ERROR_NNEG(call)
 

Enumerations

enum  geosx::LAIOutputFormat {
  NATIVE_ASCII, NATIVE_BINARY, MATLAB_ASCII, MATLAB_BINARY,
  MATRIX_MARKET
}
 

Macro Definition Documentation

◆ GEOSX_LAI_ASSERT

#define GEOSX_LAI_ASSERT (   expr)    GEOSX_ERROR_IF( !(expr), "" )

Assert expression is true

Parameters
exprexpression

Definition at line 33 of file common.hpp.

◆ GEOSX_LAI_ASSERT_EQ

#define GEOSX_LAI_ASSERT_EQ (   lhs,
  rhs 
)    GEOSX_ERROR_IF_NE( lhs, rhs )

Assert lhs equals rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 47 of file common.hpp.

◆ GEOSX_LAI_ASSERT_GE

#define GEOSX_LAI_ASSERT_GE (   lhs,
  rhs 
)    GEOSX_ERROR_IF_GT( rhs, lhs )

Assert lhs greater than or equal to rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 68 of file common.hpp.

◆ GEOSX_LAI_ASSERT_GT

#define GEOSX_LAI_ASSERT_GT (   lhs,
  rhs 
)    GEOSX_ERROR_IF_GE( rhs, lhs )

Assert lhs greater than rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 61 of file common.hpp.

◆ GEOSX_LAI_ASSERT_MSG

#define GEOSX_LAI_ASSERT_MSG (   expr,
  msg 
)    GEOSX_ERROR_IF( !(expr), msg )

Assert expression and output message if false

Parameters
exprexpression
msgmessage

Definition at line 40 of file common.hpp.

◆ GEOSX_LAI_ASSERT_NE

#define GEOSX_LAI_ASSERT_NE (   lhs,
  rhs 
)    GEOSX_ERROR_IF_EQ( lhs, rhs )

Assert lhs not equal to rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 54 of file common.hpp.

◆ GEOSX_LAI_CHECK_ERROR

#define GEOSX_LAI_CHECK_ERROR (   call)
Value:
do { \
auto const ierr = call; \
GEOSX_ERROR_IF_NE_MSG( ierr, 0, "Error in call to " << #call ); \
} while( false )

Macro for checking and reporting error codes from TPL packages

Parameters
callcall to check function

Definition at line 117 of file common.hpp.

◆ GEOSX_LAI_CHECK_ERROR_NNEG

#define GEOSX_LAI_CHECK_ERROR_NNEG (   call)
Value:
do { \
auto const ierr = call; \
GEOSX_ERROR_IF_GT_MSG( 0, ierr, "Error in call to " << #call ); \
} while( false )

Macro for checking and reporting non-negative error codes from TPL packages

Parameters
callcall to check function

Definition at line 127 of file common.hpp.

◆ GEOSX_LAI_RUNTIME_ASSERT

#define GEOSX_LAI_RUNTIME_ASSERT   1

Whether to check preconditions at runtime in LAI functions

Definition at line 26 of file common.hpp.