AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
slic_macros.hpp File Reference
#include "axom/config.hpp"
#include "axom/core/Macros.hpp"

Classes

struct  axom::slic::detail::FalseType
 Variable of a type that evaluates as false. More...
 

Namespaces

 axom
 
 axom::slic
 
 axom::slic::detail
 

Macros

#define SLIC_ASSERT(ignore_EXP)   ((void)0)
 
#define SLIC_ASSERT_MSG(ignore_EXP, ignore_msg)   ((void)0)
 
#define SLIC_CHECK(ignore_EXP)   ((void)0)
 
#define SLIC_CHECK_MSG(ignore_EXP, ignore_msg)   ((void)0)
 
#define SLIC_INFO(msg)
 Logs an Info message. More...
 
#define SLIC_INFO_IF(EXP, msg)
 Logs an Info message iff EXP is true. More...
 
#define SLIC_DEBUG(ignore_EXP)   ((void)0)
 
#define SLIC_DEBUG_IF(ignore_EXP, ignore_msg)   ((void)0)
 
ERROR MACROS
#define SLIC_ERROR(msg)
 Logs an error and aborts the application. More...
 
#define SLIC_ERROR_IF(EXP, msg)
 Logs an error iff EXP is true and aborts the application. More...
 
WARNING MACROS
#define SLIC_WARNING(msg)
 Logs a warning message. More...
 
#define SLIC_WARNING_IF(EXP, msg)
 Logs an error iff EXP is true and aborts the application. More...
 

Variables

static const FalseType axom::slic::detail::false_value
 

Macro Definition Documentation

◆ SLIC_ERROR

#define SLIC_ERROR (   msg)

◆ SLIC_ERROR_IF

#define SLIC_ERROR_IF (   EXP,
  msg 
)
Value:
do \
{ \
if(EXP) \
{ \
std::ostringstream __oss; \
__oss << msg; \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
} \
static const FalseType false_value
Definition: slic_macros.hpp:392
void logErrorMessage(const std::string &message, const std::string &fileName, int line)
Convenience method to log an error message.

Logs an error iff EXP is true and aborts the application.

Parameters
[in]EXPuser-supplied boolean expression.
[in]msguser-supplied message.
Note
The SLIC_ERROR_IF macro is always active.
Warning
This macro calls processAbort() if EXP is true.

Usage:

SLIC_ERROR_IF( (val < 0), "my_val should always be positive" );

Referenced by axom::mint::ParticleMesh::append(), axom::sidre::Array< T >::Array(), axom::inlet::FunctionWrapper< FunctionTags >::call(), axom::mint::ConnectivityArray< TYPE >::ConnectivityArray(), axom::mint::FieldData::createField(), axom::mint::Mesh::createField(), axom::sidre::Array< T >::dynamicRealloc(), axom::mint::Field::Field(), axom::mint::FieldVariable< T >::FieldVariable(), axom::inlet::FunctionWrapper< FunctionTags >::get(), axom::mint::MeshCoordinates::getCoordinateArray(), axom::mint::Field::getDataPtr(), axom::mint::Mesh::getFieldData(), axom::mint::FieldData::getFieldPtr(), axom::sidre::Array< T >::getViewShape(), axom::primal::Plane< T, NDIMS >::Plane(), axom::sidre::Array< T >::reallocViewData(), axom::mint::MeshCoordinates::reserve(), axom::mint::ConnectivityArray< TYPE >::reserve(), axom::mint::MeshCoordinates::shrink(), axom::inlet::detail::toIndex(), and axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh().

◆ SLIC_WARNING

#define SLIC_WARNING (   msg)
Value:
do \
{ \
std::ostringstream __oss; \
__oss << msg; \
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
static const FalseType false_value
Definition: slic_macros.hpp:392
void logWarningMessage(const std::string &message, const std::string &fileName, int line)
Convenience method to log warning messages.

Logs a warning message.

Parameters
[in]msguser-supplied message
Note
The SLIC_WARNING macro is always active.

Usage:

SLIC_WARNING( "my_val should always be positive" );

Referenced by axom::mint::bind_basis(), axom::slam::NullSet< RelationType::SetPosition, RelationType::SetElement >::empty(), axom::sidre::ListCollection< TYPE >::getItem(), axom::sidre::ListCollection< TYPE >::getItemIndex(), axom::sidre::ListCollection< TYPE >::getItemName(), axom::sidre::ListCollection< TYPE >::hasItem(), axom::slam::DynamicConstantRelation< PosType, ElemType, CardinalityPolicy >::insert(), axom::mint::UnstructuredMesh< TOPO >::isExternal(), axom::mint::UnstructuredMesh< TOPO >::isInSidre(), and axom::sidre::ListCollection< TYPE >::removeItem().

◆ SLIC_WARNING_IF

#define SLIC_WARNING_IF (   EXP,
  msg 
)
Value:
do \
{ \
if(EXP) \
{ \
std::ostringstream __oss; \
__oss << msg; \
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
} \
static const FalseType false_value
Definition: slic_macros.hpp:392
void logWarningMessage(const std::string &message, const std::string &fileName, int line)
Convenience method to log warning messages.

Logs an error iff EXP is true and aborts the application.

Parameters
[in]EXPuser-supplied boolean expression.
[in]msguser-supplied message.
Note
The SLIC_WARNING_IF macro is always active.

Usage:

SLIC_WARNING_IF( (val < 0), "my_val should always be positive" );

Referenced by axom::mint::UnstructuredMesh< TOPO >::getFaceResizeRatio(), axom::sidre::ListCollection< TYPE >::insertItem(), axom::mint::MeshCoordinates::isExternal(), axom::mint::MeshCoordinates::isInSidre(), axom::mint::Mesh::removeField(), and axom::quest::InOutOctree< DIM >::setVertexWeldThreshold().

◆ SLIC_ASSERT

#define SLIC_ASSERT (   ignore_EXP)    ((void)0)

Referenced by axom::primal::Triangle< T, NDIMS >::angle(), axom::mint::MeshCoordinates::append(), axom::mint::ParticleMesh::append(), axom::mint::ConnectivityArray< TYPE >::appendM(), axom::sidre::Array< T >::Array(), axom::mint::bind_basis(), axom::primal::BoundingBox< double, DIM >::bisect(), axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIterator< OctreeLevel, IterHelper, DataType >::BlockIterator(), axom::spin::OctreeBase< DIM, InOutBlockData >::blockStatus(), axom::primal::BoundingBox< double, DIM >::BoundingBox(), axom::spin::BVHTree< T, NDIMS >::build(), axom::primal::Polygon< T, NDIMS >::centroid(), axom::quest::detail::InOutOctreeValidator< DIM >::checkBlockIndexingConsistency(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::childPt(), axom::primal::NumericArray< IndexType, NDIMS >::clamp(), axom::mint::Lagrange< mint::TRIANGLE >::computeDerivatives(), axom::mint::Lagrange< mint::QUAD >::computeDerivatives(), axom::mint::Lagrange< mint::TET >::computeDerivatives(), axom::mint::Lagrange< mint::PYRAMID >::computeDerivatives(), axom::mint::Lagrange< mint::PRISM >::computeDerivatives(), axom::mint::Lagrange< mint::HEX >::computeDerivatives(), axom::mint::Lagrange< mint::QUAD9 >::computeDerivatives(), axom::mint::Lagrange< mint::HEX27 >::computeDerivatives(), axom::quest::SignedDistance< NDIMS >::computeDistance(), axom::mint::Lagrange< mint::TRIANGLE >::computeShape(), axom::mint::Lagrange< mint::QUAD >::computeShape(), axom::mint::Lagrange< mint::TET >::computeShape(), axom::mint::Lagrange< mint::PYRAMID >::computeShape(), axom::mint::Lagrange< mint::PRISM >::computeShape(), axom::mint::Lagrange< mint::QUAD9 >::computeShape(), axom::mint::Lagrange< mint::HEX >::computeShape(), axom::mint::Lagrange< mint::HEX27 >::computeShape(), axom::primal::Sphere< T, NDIMS >::computeSignedDistance(), axom::mint::ConnectivityArray< TYPE >::ConnectivityArray(), axom::spin::BVHTree< T, NDIMS >::contains(), axom::spin::ImplicitGrid< NDIMS, TheIndexType >::contains(), axom::slam::Map< slam::Set< CoordType, CoordType >, OctreeLevelType * >::copy(), axom::spin::OctreeBase< DIM, InOutBlockData >::coveringLeafBlock(), axom::mint::FieldData::createField(), axom::mint::Mesh::createField(), axom::sidre::Array< T >::describeView(), axom::primal::Vector< SpaceCoordType, NDIMS >::dot_product(), axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpTriMeshVTK(), axom::spin::BVHTree< T, NDIMS >::empty(), axom::mint::UniformMesh::evaluateCoordinate(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::faceNeighbor(), axom::mint::FieldVariable< T >::FieldVariable(), axom::spin::BVHTree< T, NDIMS >::find(), axom::mint::for_all_cells(), axom::mint::for_all_faces(), axom::mint::for_all_nodes(), axom::quest::InOutOctree< DIM >::generateIndex(), axom::spin::UniformGrid< T, NDIMS >::getBinContents(), axom::spin::BVHTree< T, NDIMS >::getBucketBox(), axom::spin::BVHTree< T, NDIMS >::getBucketNumObjects(), axom::spin::BVHTree< T, NDIMS >::getBucketObjectArray(), axom::mint::StructuredMesh::getCellFaceIDs(), axom::mint::UnstructuredMesh< TOPO >::getCellFaceIDs(), axom::mint::StructuredMesh::getCellGridIndex(), axom::mint::StructuredMesh::getCellNodeIDs(), axom::mint::ParticleMesh::getCellNodeIDs(), axom::mint::UnstructuredMesh< TOPO >::getCellNodeIDs(), axom::mint::StructuredMesh::getCellResolution(), axom::mint::Lagrange< mint::QUAD >::getCenter(), axom::mint::Lagrange< mint::PRISM >::getCenter(), axom::mint::Lagrange< mint::TRIANGLE >::getCenter(), axom::mint::Lagrange< mint::HEX >::getCenter(), axom::mint::Lagrange< mint::QUAD9 >::getCenter(), axom::mint::Lagrange< mint::PYRAMID >::getCenter(), axom::mint::Lagrange< mint::TET >::getCenter(), axom::mint::Lagrange< mint::HEX27 >::getCenter(), axom::mint::MeshCoordinates::getCoordinate(), axom::mint::MeshCoordinates::getCoordinateArray(), axom::mint::MeshCoordinates::getCoordinates(), axom::mint::Lagrange< mint::PRISM >::getCoords(), axom::mint::Lagrange< mint::QUAD >::getCoords(), axom::mint::Lagrange< mint::HEX >::getCoords(), axom::mint::Lagrange< mint::TRIANGLE >::getCoords(), axom::mint::Lagrange< mint::QUAD9 >::getCoords(), axom::mint::Lagrange< mint::TET >::getCoords(), axom::mint::Lagrange< mint::PYRAMID >::getCoords(), axom::mint::Lagrange< mint::HEX27 >::getCoords(), axom::mint::Field::getDataPtr(), axom::slam::ProductSet< PosType, ElemType >::getElements(), axom::mint::StructuredMesh::getExtent(), axom::mint::UnstructuredMesh< TOPO >::getFaceCellsArray(), axom::mint::StructuredMesh::getFaceLinearIndex(), axom::mint::StructuredMesh::getFaceNodeIDs(), axom::mint::UnstructuredMesh< TOPO >::getFaceNodeIDs(), axom::mint::FieldData::getField(), axom::mint::FieldData::getFieldPtr(), axom::mint::Mesh::getFieldPtr(), axom::mint::StructuredMesh::getIFaceCellIDs(), axom::mint::StructuredMesh::getIFaceGridIndex(), axom::mint::StructuredMesh::getIFaceLinearIndex(), axom::mint::StructuredMesh::getIFaceNodeIDs(), axom::mint::StructuredMesh::getJFaceCellIDs(), axom::mint::StructuredMesh::getJFaceGridIndex(), axom::mint::StructuredMesh::getJFaceLinearIndex(), axom::mint::StructuredMesh::getJFaceNodeIDs(), axom::mint::StructuredMesh::getKFaceCellIDs(), axom::mint::StructuredMesh::getKFaceGridIndex(), axom::mint::StructuredMesh::getKFaceLinearIndex(), axom::mint::StructuredMesh::getKFaceNodeIDs(), axom::primal::BoundingBox< double, DIM >::getLongestDimension(), axom::quest::getMeshTriangle(), axom::mint::StructuredMesh::getNodeGridIndex(), axom::mint::StructuredMesh::getNodeResolution(), axom::spin::BVHTree< T, NDIMS >::getObjectBox(), axom::spin::BVHTree< T, NDIMS >::getObjectBucketIndex(), axom::spin::BVHTree< T, NDIMS >::getObjectData(), axom::primal::Sphere< T, NDIMS >::getOrientation(), axom::mint::StructuredMesh::getTotalNumFaces(), axom::spin::OctreeBase< DIM, InOutBlockData >::hasBlock(), axom::mint::Mesh::hasField(), axom::spin::ImplicitGrid< NDIMS, TheIndexType >::ImplicitGrid(), axom::spin::ImplicitGrid< NDIMS, TheIndexType >::initialize(), axom::spin::BVHTree< T, NDIMS >::insert(), axom::spin::UniformGrid< T, NDIMS >::insert(), axom::spin::ImplicitGrid< NDIMS, TheIndexType >::insert(), axom::mint::MeshCoordinates::insert(), axom::mint::ConnectivityArray< TYPE >::insertM(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::isDescendantOf(), axom::quest::PointInCell< mesh_tag >::locatePoint(), axom::slam::ModularInt< SizePolicy >::ModularInt(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::BivariateMapIterator::numComp(), axom::primal::NumericArray< IndexType, NDIMS >::NumericArray(), axom::primal::NumericArray< IndexType, NDIMS >::operator/=(), axom::primal::Tetrahedron< T, NDIMS >::operator[](), axom::primal::Triangle< T, NDIMS >::operator[](), axom::slam::StaticRelation< VertexIndex, VertexIndex, ConstantCardinality, STLIndirection, MeshElementSet, MeshVertexSet >::operator[](), axom::mint::ConnectivityArray< TYPE >::operator[](), axom::spin::OctreeBase< DIM, InOutBlockData >::operator[](), axom::primal::OrientedBoundingBox< T, NDIMS >::OrientedBoundingBox(), axom::primal::Plane< T, NDIMS >::Plane(), axom::quest::PointInCell< mesh_tag >::PointInCell(), axom::primal::Polygon< T, NDIMS >::Polygon(), axom::primal::Ray< T, NDIMS >::Ray(), axom::spin::OctreeBase< DIM, InOutBlockData >::refineLeaf(), axom::slam::RelationSet< RelationType >::RelationSet(), axom::mint::MeshCoordinates::reserve(), axom::mint::ParticleMesh::reserve(), axom::mint::MeshCoordinates::resize(), axom::mint::ParticleMesh::resize(), axom::mint::MeshCoordinates::set(), axom::mint::ConnectivityArray< TYPE >::set(), axom::mint::Field::setBasis(), axom::quest::InOutBlockData::setBlack(), axom::sidre::Array< T >::setCapacity(), axom::quest::InOutBlockData::setGray(), axom::mint::ConnectivityArray< TYPE >::setM(), axom::mint::MeshCoordinates::setResizeRatio(), axom::quest::InOutBlockData::setUncoloredLeaf(), axom::quest::InOutOctree< DIM >::setVertexWeldThreshold(), axom::quest::InOutBlockData::setWhite(), axom::mint::MeshCoordinates::shrink(), axom::mint::ParticleMesh::shrink(), axom::quest::SignedDistance< NDIMS >::SignedDistance(), axom::primal::NumericArray< IndexType, NDIMS >::size(), axom::primal::Sphere< T, NDIMS >::Sphere(), axom::primal::NumericArray< IndexType, NDIMS >::to_array(), axom::spin::UniformGrid< T, NDIMS >::UniformGrid(), axom::mint::UnstructuredMesh< TOPO >::UnstructuredMesh(), axom::sidre::Array< T >::updateNumTuples(), and axom::spin::BVHTree< T, NDIMS >::writeVtkFile().

◆ SLIC_ASSERT_MSG

#define SLIC_ASSERT_MSG (   ignore_EXP,
  ignore_msg 
)    ((void)0)

Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::addAllChildren(), axom::slam::StaticRelation< PosType, ElemType, RelationCardinalityPolicy, RelationIndicesIndirectionPolicy, TheFromSet, TheToSet >::RelationBuilder::begins(), axom::slam::BitSet::BitSet(), axom::inlet::Proxy::call(), axom::quest::detail::InOutOctreeValidator< DIM >::checkAllLeavesColoredAtLevel(), axom::quest::detail::InOutOctreeValidator< DIM >::checkBlockIndexingConsistency(), axom::quest::detail::InOutOctreeValidator< DIM >::checkEachVertexIsIndexed(), axom::quest::detail::InOutOctreeValidator< DIM >::checkTrianglesReferencedInBoundaryVertexBlocks(), axom::quest::InOutBlockData::color(), axom::slam::policies::CompileTimeOffset< IntType, INT_VAL >::CompileTimeOffset(), axom::slam::policies::CompileTimeSize< IntType, INT_VAL >::CompileTimeSize(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::copy(), axom::spin::OctreeBase< DIM, InOutBlockData >::coveringLeafBlock(), axom::slam::DynamicVariableRelation< PosType, ElemType >::data(), axom::slam::Map< slam::Set< CoordType, CoordType >, OctreeLevelType * >::data(), axom::slam::DynamicConstantRelation< PosType, ElemType, CardinalityPolicy >::data(), axom::slam::NullSet< RelationType::SetPosition, RelationType::SetElement >::empty(), axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock(), axom::quest::InOutOctree< DIM >::generateIndex(), axom::inlet::Proxy::get(), axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::getBroodData(), axom::slam::NullBivariateSet< SetPosition, SetElement >::getElements(), axom::slam::FieldRegistry< slam::Set< VertexIndex >, VertexIndex >::getScalar(), axom::slam::policies::ArrayIndirection< PositionType, ElementType >::indirection(), axom::slam::policies::STLVectorIndirection< SetPosition, SetElement >::indirection(), axom::slam::ProductSet< PosType, ElemType >::isValid(), axom::slam::RelationSet< RelationType >::isValid(), axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::isValid(), axom::slam::DynamicMap< SetType, DataType >::isValidEntry(), axom::slam::ModularInt< SizePolicy >::operator!=(), axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::operator()(), axom::slam::BivariateMap< SetType, DataType, StridePolicy >::operator[](), axom::slam::SubMap< SetType, DataType, SuperMapType, StridePolicy >::operator[](), axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::operator[](), axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::operator[](), axom::spin::OctreeBase< DIM, InOutBlockData >::operator[](), axom::slam::OrderedSet< IndexType, IndexType, SizePolicy >::positions(), axom::slam::DynamicSet< PosType, ElemType, SizePolicy, OffsetPolicy, StridePolicy >::remove(), axom::slam::DynamicMap< SetType, DataType >::resize(), axom::slam::policies::CompileTimeStride< IntType, INT_VAL >::setStride(), axom::slam::policies::StrideOne< SetPosition >::setStride(), axom::slam::BitSet::test(), axom::quest::InOutOctree< DIM >::within(), axom::slam::policies::ZeroOffset< SetPosition >::ZeroOffset(), and axom::slam::policies::ZeroSize< IntType >::ZeroSize().

◆ SLIC_CHECK

#define SLIC_CHECK (   ignore_EXP)    ((void)0)

◆ SLIC_CHECK_MSG

◆ SLIC_INFO

#define SLIC_INFO (   msg)
Value:
do \
{ \
std::ostringstream __oss; \
__oss << msg; \
__oss.str(), \
__FILE__, \
__LINE__); \
INFO log information that is useful for users & developers.
Definition: MessageLevel.hpp:36
void logMessage(message::Level level, const std::string &message, bool filter_duplicates=false)
Logs the given message to all registered streams.
static const FalseType false_value
Definition: slic_macros.hpp:392

Logs an Info message.

Parameters
[in]msguser-supplied message
Note
The SLIC_INFO macro is always active.

Usage:

SLIC_INFO( "informative text goes here" );

Referenced by axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpDifferentColoredNeighborsMeshVTK(), axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpOctreeMeshVTK(), axom::quest::detail::InOutOctreeMeshDumper< DIM >::dumpTriMeshVTK(), axom::quest::InOutOctree< DIM >::generateIndex(), axom::quest::getMeshTriangle(), axom::slam::DynamicVariableRelation< PosType, ElemType >::isValid(), and axom::quest::InOutOctree< DIM >::within().

◆ SLIC_INFO_IF

#define SLIC_INFO_IF (   EXP,
  msg 
)
Value:
do \
{ \
if(EXP) \
{ \
std::ostringstream __oss; \
__oss << msg; \
__oss.str(), \
__FILE__, \
__LINE__); \
} \
INFO log information that is useful for users & developers.
Definition: MessageLevel.hpp:36
void logMessage(message::Level level, const std::string &message, bool filter_duplicates=false)
Logs the given message to all registered streams.
static const FalseType false_value
Definition: slic_macros.hpp:392

Logs an Info message iff EXP is true.

Parameters
[in]EXPuser-supplied boolean expression.
[in]msguser-supplied message.
Note
The SLIC_INFO_IF macro is always active.

Usage:

SLIC_INFO_IF( (val < 0), "my_val should always be positive" );

◆ SLIC_DEBUG

◆ SLIC_DEBUG_IF