Chaste Release::3.1
Exception.hpp File Reference
#include <string>
#include <sstream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <boost/preprocessor/stringize.hpp>
Include dependency graph for Exception.hpp:

Go to the source code of this file.

Classes

class  Exception

Defines

#define EXCEPTION(message)
#define EXCEPT_IF_NOT(test)   if (!(test)) EXCEPTION("Assertion tripped: " BOOST_PP_STRINGIZE(test))
#define TERMINATE(message)
#define NEVER_REACHED   TERMINATE("Should have been impossible to reach this line of code"); exit(EXIT_FAILURE)
#define UNUSED_OPT(var)
#define EXPECT0(cmd, arg)
#define ABORT_IF_NON0_WITH_MSG(retcode, msg)
#define ABORT_IF_NON0(cmd, arg)
#define ABORT_IF_THROWS(block)
#define EXPECT_NON0(cmd, arg)
#define IGNORE_RET(cmd, arg)

Variables

const unsigned UNSIGNED_UNSET = UINT_MAX
const int INT_UNSET = INT_MAX
const double DOUBLE_UNSET = DBL_MAX

Detailed Description

Contains the Exception class, along with some macros that are widely used throughout the code.

Definition in file Exception.hpp.


Define Documentation

#define ABORT_IF_NON0 (   cmd,
  arg 
)
Value:
{ \
    std::string _arg(arg);        \
    int ret = cmd(_arg.c_str());  \
    ABORT_IF_NON0_WITH_MSG(ret, "Error executing command: " #cmd "(" + _arg + ")") \
    }

Handy for calling functions like system which return non-zero on error. Terminate if an error occurs.

This macro should be used instead of EXPECT0 within blocks that are only executed by one process, but need to kill all processes if an error occurs.

Parameters:
cmdcommand to call
argits argument (will be converted to std::string)

Definition at line 260 of file Exception.hpp.

Referenced by AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge(), HeartConfig::CopySchema(), CardiacSimulation::CreateAndRun(), and AbstractCardiacTissue< SPACE_DIM >::save().

#define ABORT_IF_NON0_WITH_MSG (   retcode,
  msg 
)
Value:
if (retcode != 0) {                          \
        TERMINATE(msg);                          \
    }

Handy for calling functions like system which return non-zero on error. Terminate if the return code is non-zero, printing a suitable message.

Parameters:
retcodecommand return code
msgerror message to display

Definition at line 245 of file Exception.hpp.

#define ABORT_IF_THROWS (   block)
Value:
try {                               \
        block;                          \
    } catch (const Exception& e) {      \
        TERMINATE(e.GetMessage());      \
    } catch (const std::exception &e) { \
        TERMINATE(e.what());            \
    } catch (...) {                     \
        TERMINATE("Unexpected exception thrown."); \
    }

Convenience function to convert an exception thrown by a single process into termination of the entire program.

Parameters:
blockthe block of code to execute

Definition at line 272 of file Exception.hpp.

Referenced by OutputDirectoryFifoQueue::CreateNextDir(), and AbstractTetrahedralMesh< SPACE_DIM, SPACE_DIM >::save().

#define EXCEPT_IF_NOT (   test)    if (!(test)) EXCEPTION("Assertion tripped: " BOOST_PP_STRINGIZE(test))
#define EXCEPTION (   message)
Value:
do {                                             \
        std::stringstream msg_stream;                \
        msg_stream << message;                       \
        throw Exception(msg_stream.str(), __FILE__, __LINE__); \
    } while (false)

Convenience macro for throwing an exception, in order to add file and line info.

Parameters:
messagethe error message to use, as a streamed expression

Definition at line 143 of file Exception.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::AbstractCellPopulation(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::AbstractHdf5Converter(), MultipleCaBasedCellPopulation< DIM >::AddCell(), MultipleCaBasedCellPopulation< DIM >::AddCellUsingLocationIndex(), VertexCryptBoundaryForce< DIM >::AddForceContribution(), LinearSpringWithVariableSpringConstantsForce< DIM >::AddForceContribution(), CryptProjectionForce::AddForceContribution(), WelikyOsterForce< DIM >::AddForceContribution(), RepulsionForce< DIM >::AddForceContribution(), NagaiHondaForce< DIM >::AddForceContribution(), AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AddForceContribution(), QuadraticMeshHelper< DIM >::AddNodesToBoundaryElements(), CellBasedPdeHandler< DIM >::AddPdeAndBc(), CellPropertyCollection::AddProperty(), AbstractCardiacCell::AdjustOutOfRangeSlowValues(), RungeKuttaFehlbergIvpOdeSolver::AdjustStepSize(), Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), BidomainProblem< DIM >::AnalyseMeshForBath(), Hdf5DataWriter::ApplyPermutation(), ArchiveOpener< Archive, Stream >::ArchiveOpener(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::AxisymmetricConductivityTensors(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Calculate(), PropagationPropertiesCalculator::CalculateActionPotentialDuration(), CellProperties::CalculateActionPotentialDurations(), NhsModelWithBackwardSolver::CalculateCaTropAndZDerivatives(), BoxCollection< DIM >::CalculateContainingBox(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateJacobian(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateNormal(), CellProperties::CalculateProperties(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection(), CardiacSimulation::CardiacSimulation(), Cell::Cell(), ChasteCuboid< SPACE_DIM >::ChasteCuboid(), ChasteEllipsoid< SPACE_DIM >::ChasteEllipsoid(), SloughingCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), SolidMechanicsProblemDefinition< DIM >::CheckCastSuccess(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::CheckCompatibilityCondition(), CellProperties::CheckExceededThreshold(), ColumnDataReader::CheckFiles(), ElectrodesStimulusFactory< DIM >::CheckForElectrodesIntersection(), XmlTransforms::CheckForIluPreconditioner(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CheckOutwardNormals(), AbstractParameterisedSystem< VECTOR >::CheckParametersOnLoad(), HeartConfig::CheckResumeSimulationIsDefined(), CellProperties::CheckReturnedToThreshold(), HeartConfig::CheckSimulationIsDefined(), HeartConfig::CheckTimeSteps(), Hdf5DataWriter::CheckUnitsName(), ColumnDataWriter::CheckUnitsName(), Hdf5DataWriter::CheckVariableName(), ColumnDataWriter::CheckVariableName(), ColumnDataReader::ColumnDataReader(), ColumnDataWriter::ColumnDataWriter(), Hdf5DataReader::CommonConstructor(), OutputFileHandler::CommonConstructor(), CompressibleNonlinearElasticitySolver< DIM >::CompressibleNonlinearElasticitySolver(), FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineElementCentroids(), FineCoarseMeshPair< DIM >::ComputeCoarseElementsForFineNodes(), AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantities(), Electrodes< DIM >::ComputeElectrodesAreasAndCheckEquality(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseQuadPoints(), PoleZeroMaterialLaw< DIM >::ComputeStressAndStressDerivative(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructCuboid(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), DistributedQuadraticMesh< DIM >::ConstructFromMeshReader(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructLinearMesh(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRectangularMesh(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructRegularSlabMesh(), CellMLToSharedLibraryConverter::Convert(), CellMLToSharedLibraryConverter::ConvertCellmlToSo(), CmguiDeformedSolutionsWriter< DIM >::ConvertOutput(), OutputFileHandler::CopyFileTo(), FileFinder::CopyTo(), CreateElectricsProblem< DIM, 2u >::Create(), CreateElectricsProblem< DIM, 1u >::Create(), HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus(), AbstractNonlinearElasticitySolver< DIM >::CreateCmguiOutput(), AbstractContinuumMechanicsSolver< DIM >::CreateVtkOutput(), CryptSimulation2d::CryptSimulation2d(), CvodeAdaptor::CvodeError(), AbstractCvodeSystem::CvodeError(), AbstractCellProperty::DecrementCellCount(), Hdf5DataWriter::DefineFixedDimension(), ColumnDataWriter::DefineFixedDimension(), Hdf5DataWriter::DefineFixedDimensionUsingMatrix(), Hdf5DataWriter::DefineUnlimitedDimension(), ColumnDataWriter::DefineUnlimitedDimension(), Hdf5DataWriter::DefineVariable(), ColumnDataWriter::DefineVariable(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), NodesOnlyMesh< SPACE_DIM >::DeleteNode(), HeartGeometryInformation< SPACE_DIM >::DetermineLayerForEachNode(), PottsMesh< DIM >::DivideElement(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis(), ColumnDataWriter::DoAdvanceAlongUnlimitedDimension(), AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::DoAssemble(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::DoAssemble(), ContinuumMechanicsNeumannBcsAssembler< DIM >::DoAssemble(), AbstractContinuumMechanicsAssembler< DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::DoAssemble(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::DumbPartitioning(), DynamicCellModelLoader::DynamicCellModelLoader(), ElectrodesStimulusFactory< DIM >::ElectrodesStimulusFactory(), Hdf5DataWriter::EndDefineMode(), ColumnDataWriter::EndDefineMode(), GenericEventHandler< 1, EventHandler >::EndEventImpl(), VolumeConstraintPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), SurfaceAreaConstraintPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), AdhesionPottsUpdateRule< DIM >::EvaluateHamiltonianContribution(), NhsContractionModel::EvaluateYDerivatives(), ExponentialMaterialLaw< DIM >::ExponentialMaterialLaw(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), FibreReader< DIM >::FibreReader(), FileFinder::FindMatches(), GaussianQuadratureRule< ELEMENT_DIM >::GaussianQuadratureRule(), GaussianQuadratureRule< 1 >::GaussianQuadratureRule(), CellsGenerator< CELL_CYCLE_MODEL, DIM >::GenerateBasic(), StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), ProcessSpecificArchive< Archive >::Get(), HeartConfig::GetAbsoluteTolerance(), ImplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::GetActiveTensionAndTensionDerivs(), FibreReader< DIM >::GetAllAxi(), FibreReader< DIM >::GetAllOrtho(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAngleBetweenNodes(), AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractOdeSystemInformation::GetAnyVariableIndex(), AbstractOdeSystemInformation::GetAnyVariableUnits(), ArchiveLocationInfo::GetArchiveDirectory(), AbstractOdeSystemInformation::GetAttribute(), AbstractNonlinearElasticitySolver< DIM >::GetAverageStressPerElement(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::GetCableElement(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::GetCardiacCellOrHaloCell(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData(), HeartConfig::GetCellHeterogeneities(), CellId::GetCellId(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellMutationStateCount(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetCellUsingLocationIndex(), HoneycombMeshGenerator::GetCircularMesh(), HeartConfig::GetConductivityHeterogeneities(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndexWithInitialGuess(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndices(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetDataReader(), AbstractOdeSystemInformation::GetDerivedQuantityIndex(), AbstractOdeSystemInformation::GetDerivedQuantityUnits(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetEdgeLength(), HeartConfig::GetElectrodeParameters(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetElementData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetFaceData(), HeartConfig::GetFibreLength(), FibreReader< DIM >::GetFibreSheetAndNormalMatrix(), FibreReader< DIM >::GetFibreVector(), HeartConfig::GetGradationForAdaptivity(), AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetHeartGeometryInformation(), PseudoEcgCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetIntegrand(), AbstractCardiacCellInterface::GetIntracellularCalciumConcentration(), HeartConfig::GetIonicModelRegions(), CellData::GetItem(), NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetJacobianForElement(), HeartConfig::GetKSPPreconditioner(), HeartConfig::GetKSPSolver(), CellProperties::GetLastCompleteMaxUpstrokeVelocity(), CellProperties::GetLastCompletePeakPotential(), CellId::GetMaxCellId(), HeartConfig::GetMaxEdgeLengthForAdaptivity(), HeartConfig::GetMaxNodesForAdaptivity(), AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh(), AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh(), CylindricalHoneycombVertexMeshGenerator::GetMesh(), CylindricalHoneycombMeshGenerator::GetMesh(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), ArchiveLocationInfo::GetMeshFilename(), HeartConfig::GetMeshPartitioning(), HeartConfig::GetMinEdgeLengthForAdaptivity(), AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::GetMixedDimensionMesh(), AbstractCardiacCellWithModifiers< CARDIAC_CELL >::GetModifier(), PottsBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), NodeBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), MultipleCaBasedCellPopulation< DIM >::GetNeighbouringNodeIndices(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeNotAlsoInElement(), VertexElementMap::GetNewIndex(), NodeMap::GetNewIndex(), NhsContractionModel::GetNextActiveTension(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), SemMeshReader< SPACE_DIM >::GetNextElementData(), PottsMeshReader< SPACE_DIM >::GetNextElementData(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementDataWithFaces(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextItemFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextLineFromStream(), SemMeshReader< SPACE_DIM >::GetNextLineFromStream(), PottsMeshReader< SPACE_DIM >::GetNextLineFromStream(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), SemMeshReader< SPACE_DIM >::GetNextNode(), PottsMeshReader< SPACE_DIM >::GetNextNode(), Warnings::GetNextWarningMessage(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNode(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNodeOrHaloNode(), HeartGeometryInformation< SPACE_DIM >::GetNodesAtSurface(), NonlinearElasticityTools< DIM >::GetNodesByComponentValue(), HeartConfig::GetNumberOfAdaptiveSweeps(), CommandLineArguments::GetNumberOfArgumentsForOption(), AbstractCardiacCell::GetNumSlowValues(), AbstractParameterisedSystem< VECTOR >::GetParameter(), AbstractOdeSystemInformation::GetParameterIndex(), AbstractOdeSystemInformation::GetParameterUnits(), CellBasedPdeHandler< DIM >::GetPdeSolution(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData(), CellPropertyCollection::GetProperty(), AbstractCachedMeshReader< ELEMENT_DIM, SPACE_DIM >::GetRawDataFromFile(), FileFinder::GetRelativePath(), HeartConfig::GetRelativeTolerance(), HeartConfig::GetSheetDimensions(), HeartConfig::GetSigmaForAdaptivity(), HeartConfig::GetSlabDimensions(), AbstractCardiacCell::GetSlowValues(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), AbstractOdeSystemInformation::GetStateVariableIndex(), AbstractOdeSystemInformation::GetStateVariableUnits(), HeartConfig::GetStimuli(), AbstractLookupTableCollection::GetTableIndex(), HeartConfig::GetTargetErrorForAdaptivity(), CellProperties::GetTimeAtLastCompleteMaxUpstrokeVelocity(), Cell::GetTimeUntilDeath(), FibreReader< DIM >::GetTokensAtNextLine(), ColumnDataReader::GetUnlimitedDimensionValues(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetUnsignedAttribute(), CommandLineArguments::GetUnsignedCorrespondingToOption(), ColumnDataReader::GetValues(), OdeSolution::GetVariableAtIndex(), Hdf5DataWriter::GetVariableByName(), Hdf5DataReader::GetVariableOverNodes(), Hdf5DataReader::GetVariableOverTime(), Hdf5DataReader::GetVariableOverTimeOverMultipleNodes(), HeartConfig::GetVersionFromNamespace(), StokesFlowProblemDefinition< DIM >::GetViscosity(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetVoronoiEdgeLength(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVoronoiElementIndexCorrespondingToDelaunayNodeIndex(), NonCachedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetWeightedDirectionForElement(), WntConcentration< DIM >::GetWntGradient(), Hdf5DataWriter::Hdf5DataWriter(), HeartConfigRelatedCellFactory< SPACE_DIM >::HeartConfigRelatedCellFactory(), HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), IncompressibleNonlinearElasticitySolver< DIM >::IncompressibleNonlinearElasticitySolver(), OrthotropicConductivityTensors< ELEMENT_DIM, SPACE_DIM >::Init(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::Init(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Initialise(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), CellCycleModelOdeSolver< CELL_CYCLE_MODEL, BackwardEulerIvpOdeSolver >::Initialise(), CellBasedPdeHandler< DIM >::InitialiseCellPdeElementMap(), ImplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::InitialiseContractionModels(), ExplicitCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::InitialiseContractionModels(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter(), FileFinder::IsEmpty(), AbstractCardiacCell::IsFastOnly(), LinearSystem::LinearSystem(), AbstractCardiacProblem< DIM, DIM, 1 >::load(), CellMLLoader::LoadCellMLFile(), MemfemMeshReader< ELEMENT_DIM, SPACE_DIM >::MemfemMeshReader(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::MetisLibraryPartitioning(), CardiacSimulationArchiver< PROBLEM_CLASS >::Migrate(), MooneyRivlinMaterialLaw< DIM >::MooneyRivlinMaterialLaw(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::MoveMergeNode(), MultipleCaBasedCellPopulation< DIM >::MultipleCaBasedCellPopulation(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::OffLatticeSimulation(), OnLatticeSimulation< DIM >::OnLatticeSimulation(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFiles(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenElementsFile(), SemMeshReader< SPACE_DIM >::OpenElementsFile(), PottsMeshReader< SPACE_DIM >::OpenElementsFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenFacesFile(), VertexMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), SemMeshReader< SPACE_DIM >::OpenNodeFile(), PottsMeshReader< SPACE_DIM >::OpenNodeFile(), OutputFileHandler::OpenOutputFile(), CellBasedPdeHandler< DIM >::OpenResultsFiles(), ChastePoint< 0 >::operator[](), OutputFileHandler::OutputFileHandler(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), PolynomialMaterialLaw3d::PolynomialMaterialLaw3d(), PottsMesh< DIM >::PottsMesh(), ExtendedBidomainProblem< DIM >::PreSolveChecks(), BidomainProblem< DIM >::PreSolveChecks(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), HeartGeometryInformation< SPACE_DIM >::ProcessLine(), Hdf5DataWriter::PutStripedVector(), Hdf5DataWriter::PutUnlimitedVariable(), ColumnDataWriter::PutVariable(), ParallelColumnDataWriter::PutVector(), Hdf5DataWriter::PutVector(), RandomCellKiller< DIM >::RandomCellKiller(), HeartConfig::ReadFile(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::ReadHeaders(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile(), FibreReader< DIM >::ReadNumLinesOfDataFromFile(), ColumnDataReader::ReadValueFromFile(), XmlTools::ReadXmlFile(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::RefreshJacobian(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), FileFinder::Remove(), Node< SPACE_DIM >::RemoveBoundaryElement(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::RemoveCellUsingLocationIndex(), Node< SPACE_DIM >::RemoveElement(), CellPropertyCollection::RemoveProperty(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode(), PetscTools::ReplicateException(), GenericEventHandler< 1, EventHandler >::ReportImpl(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetCellCyclePhaseCount(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetCellProliferativeTypeCount(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::rGetExtracellularConductivityTensor(), LinearSystem::rGetPrecondMatrix(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateX(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateY(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::RotateZ(), CardiacSimulation::Run(), AbstractSteadyStateRunner::RunToSteadyState(), CardiacSimulationArchiver< PROBLEM_CLASS >::Save(), AbstractMaterialLaw< DIM >::ScaleMaterialParameters(), SemMeshGenerator< DIM >::SemMeshGenerator(), LogFile::Set(), HeartConfig::SetAdaptivityParameters(), Cell::SetAncestor(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), StreeterFibreGenerator< SPACE_DIM >::SetApexToBase(), AbstractNonlinearElasticitySolver< DIM >::SetComputeAverageStressPerElementDuringSolve(), AxisymmetricConductivityTensors< ELEMENT_DIM, SPACE_DIM >::SetConstantConductivities(), AbstractConductivityTensors< ELEMENT_DIM, SPACE_DIM >::SetConstantConductivities(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetConstantFibreSheetDirections(), WntConcentration< DIM >::SetConstantWntValueForTesting(), WntConcentration< DIM >::SetCryptLength(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialCondition(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialConditions(), AbstractCellCycleModel::SetDimension(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::SetDistributedVectorFactory(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetFineCoarseMeshPair(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetFixedExtracellularPotentialNodes(), DistributedVectorFactory::SetFromFactory(), ExtendedBidomainProblem< DIM >::SetGgapHeterogeneities(), HeartConfig::SetKSPPreconditioner(), HeartConfig::SetKSPSolver(), AbstractSteadyStateRunner::SetMaxNumPaces(), AbstractPurkinjeCellFactory< ELEMENT_DIM, SPACE_DIM >::SetMesh(), HeartConfig::SetMeshPartitioning(), AbstractCardiacCellWithModifiers< CARDIAC_CELL >::SetModifier(), Cell::SetMutationState(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::SetNode(), AbstractOnLatticeCellPopulation< DIM >::SetNode(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::SetNodePermutation(), LinearSystem::SetNullBasis(), ElectroMechanicsProblemDefinition< DIM >::SetNumIncrementsForInitialDeformation(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::SetOutputDeformationGradientsAndStress(), VtkMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetParallelFiles(), AbstractParameterisedSystem< VECTOR >::SetParameter(), PoleZeroMaterialLaw< DIM >::SetParameters(), FileFinder::SetPath(), AbstractOdeSystemForCoupledPdeSystem::SetPdeSolution(), AbstractExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetRowForAverageOfPhiZeroed(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetRowForAverageOfPhiZeroed(), S1S2Stimulus::SetS2ExperimentPeriodIndex(), AbstractCardiacCell::SetSlowValues(), AbstractCardiacCell::SetState(), AbstractParameterisedSystem< VECTOR >::SetStateVariable(), AbstractParameterisedSystem< VECTOR >::SetStateVariables(), AbstractLookupTableCollection::SetTableProperties(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep(), HeartConfig::SetTissueAndBathIdentifiers(), WntConcentration< DIM >::SetType(), AbstractFileComparison::Setup(), CvodeAdaptor::SetupCvode(), AbstractCvodeSystem::SetupCvode(), AbstractCardiacMechanicsSolver< ELASTICITY_SOLVER, DIM >::SetVariableFibreSheetDirections(), AbstractContinuumMechanicsSolver< DIM >::SetWriteOutput(), SimpleDataWriter::SimpleDataWriter(), AbstractNonlinearAssemblerSolverHybrid< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), RungeKuttaFehlbergIvpOdeSolver::Solve(), CvodeAdaptor::Solve(), AbstractOneStepIvpOdeSolver::Solve(), SimplePetscNonlinearSolver::Solve(), SimpleNewtonNonlinearSolver::Solve(), LinearSystem::Solve(), CardiacNewtonSolver< SIZE, CELLTYPE >::Solve(), AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::Solve(), AbstractIvpOdeSolver::SolveAndUpdateStateVariable(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SolveAndWriteResultsToFile(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveBoundaryElementMapping(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveElementMapping(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SolveNodeMapping(), AbstractNonlinearElasticitySolver< DIM >::SolveNonSnes(), CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile(), AbstractNonlinearElasticitySolver< DIM >::SolveSnes(), CellPropertyRegistry::SpecifyOrdering(), SphereGeometryBoundaryCondition< DIM >::SphereGeometryBoundaryCondition(), Cell::StartApoptosis(), AbstractNonlinearElasticitySolver< DIM >::TakeNewtonStep(), CommandLineArguments::TestOptionFormat(), TimeStepper::TimeStepper(), FemlabMeshReader< ELEMENT_DIM, SPACE_DIM >::TokenizeStringsToDoubles(), TrianglesMeshReader< ELEMENT_DIM, SPACE_DIM >::TrianglesMeshReader(), NodeBasedCellPopulation< DIM >::Update(), ContactInhibitionCellCycleModel::UpdateCellCyclePhase(), AbstractOdeBasedCellCycleModel::UpdateCellCyclePhase(), MultipleCaBasedCellPopulation< DIM >::UpdateCellLocations(), AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateCellPopulation(), AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodeLocations(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::UpdateNodePositions(), HeartConfig::UpdateParametersFromResumeSimulation(), AbstractNonlinearElasticitySolver< DIM >::UpdateSolutionUsingLineSearch(), AbstractCardiacCellInterface::UseCellMLDefaultStimulus(), CellBasedPdeHandler< DIM >::UseCoarsePdeMesh(), ElectroMechanicsProblemDefinition< DIM >::Validate(), SolidMechanicsProblemDefinition< DIM >::Validate(), ContinuumMechanicsProblemDefinition< DIM >::Validate(), VertexBasedCellPopulation< DIM >::Validate(), PottsBasedCellPopulation< DIM >::Validate(), NodeBasedCellPopulationWithParticles< DIM >::Validate(), NodeBasedCellPopulation< DIM >::Validate(), MeshBasedCellPopulationWithGhostNodes< DIM >::Validate(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Validate(), VanLeeuwen2009WntSwatCellCycleOdeSystem::VanLeeuwen2009WntSwatCellCycleOdeSystem(), PlaneBoundaryCondition< DIM >::VerifyBoundaryCondition(), VertexBasedCellPopulation< DIM >::VertexBasedCellPopulation(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader(), HeartConfig::Write(), AbstractNonlinearElasticitySolver< DIM >::WriteCurrentAverageElementStresses(), CmguiDeformedSolutionsWriter< DIM >::WriteDeformationPositions(), and OdeSolution::WriteToFile().

#define EXPECT0 (   cmd,
  arg 
)
Value:
{      \
    std::string _arg(arg);       \
    int ret = cmd(_arg.c_str()); \
    if (ret != 0) {              \
        EXCEPTION("Error executing command: " #cmd "(" + _arg + ")"); \
    } }

Handy for calling functions like system which return non-zero on error. Throws if an error occurs.

Note:
DO NOT use this macro within an if (PetscTools::AmMaster) block, as then you'll get deadlock if an exception is thrown when running in parallel! (Unless the block is wrapped in a try-catch and exception replication handler.) Instead, use ABORT_IF_NON0.
Parameters:
cmdcommand to call
argits argument (will be converted to std::string)

Definition at line 231 of file Exception.hpp.

Referenced by CellMLToSharedLibraryConverter::ConvertCellmlToSo(), AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::DisplayRun(), and PetscSetup::setUpWorld().

#define EXPECT_NON0 (   cmd,
  arg 
)
Value:
{   \
    std::string _arg = (arg);     \
    int ret = cmd(_arg.c_str());  \
    if (ret == 0) {               \
        EXCEPTION("Command: " #cmd "(" + _arg + ") succeeded and it shouldn't have"); \
    } }

Handy for calling functions like system which return non-zero on error. This time we expect failure; throws if the command succeeds.

Parameters:
cmdcommand to call
argits argument (will be converted to std::string)

Definition at line 289 of file Exception.hpp.

#define IGNORE_RET (   cmd,
  arg 
)
Value:
{   \
    std::string _arg = (arg);    \
    int ret = cmd(_arg.c_str()); \
    ret = ret;                   \
    }

Handy for calling functions like system which return non-zero on error. This version ignores the return code, in case you don't care about errors for some reason...

Parameters:
cmdcommand to call
argits argument (will be converted to std::string)

Definition at line 302 of file Exception.hpp.

Referenced by CellMLToSharedLibraryConverter::ConvertCellmlToSo().

#define NEVER_REACHED   TERMINATE("Should have been impossible to reach this line of code"); exit(EXIT_FAILURE)

Use for control paths that will never be executed, just to make sure they aren't.

The exit statement at the end of NEVER_REACHED is not really needed but prevents g++ from complaining about uninitialised variables when you have code that looks like:

   RelativeTo::Value relative_to;
   switch (rPath.relative_to())
   {
       case cp::relative_to_type::cwd:
           relative_to = RelativeTo::CWD;
           break;
       case cp::relative_to_type::chaste_test_output:
           relative_to = RelativeTo::ChasteTestOutput;
           break;
       case cp::relative_to_type::chaste_source_root:
           relative_to = RelativeTo::ChasteSourceRoot;
           break;
       case cp::relative_to_type::absolute:
           relative_to = RelativeTo::Absolute;
           break;
       default:
           NEVER_REACHED;
           break;
   }

relative_to is considered potentially uninitialised in the default branch unless the compiler finds a exit, assert or throw statement.

Definition at line 206 of file Exception.hpp.

Referenced by AbstractCellMutationState::AbstractCellMutationState(), AbstractCellProliferativeType::AbstractCellProliferativeType(), AdaptiveBidomainProblem::AdaptMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), ContinuumMechanicsNeumannBcsAssembler< DIM >::AssembleOnBoundaryElement(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElementForPressureOnDeformedBc(), IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), AbstractContinuumMechanicsAssembler< DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::AssembleOnElement(), OffLatticeSimulation< ELEMENT_DIM, SPACE_DIM >::CalculateCellDivisionVector(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection(), SloughingCellKiller< DIM >::CheckAndLabelCellsForApoptosisOrDeath(), AbstractStimulusFunction::Clear(), CmguiDeformedSolutionsWriter< DIM >::CmguiDeformedSolutionsWriter(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::CmguiMeshWriter(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunction(), QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunctionDerivative(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::ComputeCableMatrixTerm(), AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::ComputeCableVectorTerm(), DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::ComputeDistanceMap(), CellwiseSourcePde< DIM >::ComputeLinearInUCoeffInSourceTerm(), AbstractFeVolumeIntegralAssembler< DIM, DIM, 2, false, true, CARDIAC >::ComputeMatrixTerm(), AbstractFeSurfaceIntegralAssembler< ELEMENT_DIM, SPACE_DIM, 2 >::ComputeVectorSurfaceTerm(), AbstractFeVolumeIntegralAssembler< DIM, DIM, 2, false, true, CARDIAC >::ComputeVectorTerm(), MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge(), Cylindrical2dMesh::CorrectNonPeriodicMesh(), HeartConfigRelatedCellFactory< SPACE_DIM >::CreateCellWithIntracellularStimulus(), BidomainTissue< SPACE_DIM >::CreateExtracellularConductivityTensors(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::CreateIntracellularConductivityTensor(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CreateVoronoiTessellation(), Determinant(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::DetermineWatchedNodes(), AbstractCellBasedSimulation< ELEMENT_DIM, SPACE_DIM >::DoCellBirth(), AbstractRushLarsenCardiacCell::EvaluateYDerivatives(), AbstractBackwardEulerCardiacCell< SIZE >::EvaluateYDerivatives(), HeartConfigRelatedCellFactory< SPACE_DIM >::FillInCellularTransmuralAreas(), CryptCellsGenerator< CELL_CYCLE_MODEL >::Generate(), AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM >::GenerateCellResults(), StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetCentroidOfElement(), HeartGeometryInformation< SPACE_DIM >::GetDistanceToEndo(), StreeterFibreGenerator< SPACE_DIM >::GetFibreMaxAngle(), HeartConfig::GetInterNodeSpace(), HeartConfig::GetIonicModelRegions(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetRestLength(), HeartConfig::GetStimuli(), SimpleWntCellCycleModel::GetWntLevel(), AbstractWntOdeBasedCellCycleModel::GetWntLevel(), SimpleWntCellCycleModel::GetWntType(), SpaceConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::GiveUpConvergence(), HeartFileFinder::HeartFileFinder(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), OperatorSplittingMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), AbstractCardiacTissue< SPACE_DIM >::LoadCardiacCells(), ExtendedBidomainTissue< DIM >::LoadExtendedBidomainCells(), NodePartitioner< ELEMENT_DIM, SPACE_DIM >::MetisLibraryPartitioning(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::PermuteNodes(), PottsMeshGenerator< DIM >::PottsMeshGenerator(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetNodePairs(), AbstractCardiacTissue< SPACE_DIM >::save(), AbstractCardiacTissue< SPACE_DIM >::SaveCardiacCells(), ExtendedBidomainTissue< DIM >::SaveExtendedBidomainCells(), SemMeshGenerator< DIM >::SemMeshGenerator(), SimpleWntCellCycleModel::SetG1Duration(), StochasticDurationGenerationBasedCellCycleModel::SetG1Duration(), StochasticDurationCellCycleModel::SetG1Duration(), AbstractSimpleCellCycleModel::SetG1Duration(), FileFinder::SetPath(), LinearSystem::SetPrecondMatrixIsDifferentFromLhs(), BoxCollection< DIM >::SetupAllLocalBoxes(), CellwiseDataGradient< DIM >::SetupGradients(), BoxCollection< DIM >::SetupLocalBoxesHalfOnly(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems(), SubDeterminant(), SimpleWntCellCycleModel::UpdateCellCyclePhase(), DeltaNotchOffLatticeSimulation< DIM >::UpdateCellData(), PottsBasedCellPopulation< DIM >::UpdateCellLocations(), MultipleCaBasedCellPopulation< DIM >::UpdateCellLocations(), OnLatticeSimulation< DIM >::UpdateCellPopulation(), CellBasedPdeHandler< DIM >::UseCoarsePdeMesh(), MultipleCaBasedCellPopulation< DIM >::Validate(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter(), and CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteNodeFileHeader().

#define TERMINATE (   message)
Value:
do {                                             \
        std::stringstream msg_stream;                \
        msg_stream << message;                       \
        Exception::Terminate(msg_stream.str(), __FILE__, __LINE__); \
    } while (false)

Terminate execution safely, even when running in parallel. Use for level 4 errors: execution cannot continue from this point and hence should be terminated (even when running with NDEBUG).

Parameters:
messageexplanatory message

Definition at line 168 of file Exception.hpp.

Referenced by OutputFileHandler::CopyFileTo(), AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), OutputFileHandler::MakeFoldersAndReturnFullPath(), PCBlockDiagonal::PCBlockDiagonalCreate(), PCLDUFactorisation::PCLDUFactorisationCreate(), PCTwoLevelsBlockDiagonal::PCTwoLevelsBlockDiagonalCreate(), LinearSystem::SetPcType(), and LinearSystem::Solve().

#define UNUSED_OPT (   var)

This is to cope with NDEBUG causing variables to not be used, when they are only used in assert()s.

Parameters:
varthe "unused" variable

Definition at line 216 of file Exception.hpp.


Variable Documentation

const int INT_UNSET = INT_MAX

Use when initialising an int variable that doesn't have a sensible default value.

Definition at line 54 of file Exception.hpp.