https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Functions | Variables
ThermochimicaUtils Namespace Reference

Functions

void addClassDescription (InputParameters &params, const std::string &desc)
 Add the supplied class description if thermochimica is available, otherwise add a warning message.
 
void checkLibraryAvailability (MooseObject &self)
 Check if thermochimica is available and throw an error if it is not.
 
void checkLibraryAvailability (Action &self)
 

Variables

static const std::string message
 

Function Documentation

◆ addClassDescription()

void ThermochimicaUtils::addClassDescription ( InputParameters params,
const std::string &  desc 
)

Add the supplied class description if thermochimica is available, otherwise add a warning message.

Definition at line 23 of file ThermochimicaUtils.C.

24{
25#ifdef THERMOCHIMICA_ENABLED
26 params.addClassDescription(desc);
27#else
28 params.addClassDescription(message + " (Original description: " + desc + ")");
29#endif
30}
void addClassDescription(const std::string &doc_string)

Referenced by ChemicalCompositionAction::validParams(), and ThermochimicaDataBase< is_nodal >::validParams().

◆ checkLibraryAvailability() [1/2]

void ThermochimicaUtils::checkLibraryAvailability ( Action self)

Definition at line 43 of file ThermochimicaUtils.C.

44{
45#ifndef THERMOCHIMICA_ENABLED
46 mooseError(self.parameters().blockLocation() + ": " + message);
47#else
48 libmesh_ignore(self);
49#endif
50}
void mooseError(Args &&... args)
std::string blockLocation() const
const InputParameters & parameters() const

◆ checkLibraryAvailability() [2/2]

void ThermochimicaUtils::checkLibraryAvailability ( MooseObject self)

Check if thermochimica is available and throw an error if it is not.

Definition at line 33 of file ThermochimicaUtils.C.

34{
35#ifndef THERMOCHIMICA_ENABLED
36 self.paramError("type", message);
37#else
38 libmesh_ignore(self);
39#endif
40}
void paramError(const std::string &param, Args... args) const

Referenced by ChemicalCompositionAction::ChemicalCompositionAction(), and ThermochimicaDataBase< is_nodal >::ThermochimicaDataBase().

Variable Documentation

◆ message

const std::string ThermochimicaUtils::message
static
Initial value:
=
"To use this object, you need to have the `Thermochimica` library installed. Refer to the "
"documentation for guidance on how to enable it."

Definition at line 18 of file ThermochimicaUtils.C.

Referenced by addClassDescription(), checkLibraryAvailability(), and checkLibraryAvailability().