![]() |
OGS
|
|
Namespaces | |
| namespace | Fluid |
| namespace | Fracture |
| namespace | PhysicalConstant |
| namespace | Solids |
Functions | |
| void | checkForWhitespaces (std::string_view part) |
| auto | expandRange (int start, int end) |
| std::vector< int > | splitMaterialIdString (std::string const &material_id_string) |
| std::vector< int > | parseMaterialIdString (std::string const &material_id_string, MeshLib::PropertyVector< int > const *const material_ids) |
| template<typename T, typename CreateMedium> requires std::convertible_to< decltype(std::declval<CreateMedium>()(std::declval<int>())), std::shared_ptr<T>> | |
| void | createMediumForId (int const id, std::map< int, std::shared_ptr< T > > &media, std::vector< int > const &material_ids_of_this_medium, CreateMedium &&create_medium) |
| void MaterialLib::checkForWhitespaces | ( | std::string_view | part | ) |
Checks that a string part contains no whitespace. Throws OGS_FATAL if any whitespace is found.
Definition at line 21 of file MediaCreation.cpp.
References OGS_FATAL.
Referenced by splitMaterialIdString().
| void MaterialLib::createMediumForId | ( | int const | id, |
| std::map< int, std::shared_ptr< T > > & | media, | ||
| std::vector< int > const & | material_ids_of_this_medium, | ||
| CreateMedium && | create_medium ) |
Creates a new entry for the material id in the media map by either calling the create_medium function and creating a new shared pointer, or by reusing the existing shared pointer.
Definition at line 44 of file MediaCreation.h.
References OGS_FATAL.
Referenced by MaterialLib::Solids::createConstitutiveRelationsGeneric(), and ProjectData::parseMedia().
| auto MaterialLib::expandRange | ( | int | start, |
| int | end ) |
Creates a range of integers from start to end (inclusive). Throws OGS_FATAL if end < start.
Definition at line 35 of file MediaCreation.cpp.
References OGS_FATAL.
Referenced by splitMaterialIdString().
| std::vector< int > MaterialLib::parseMaterialIdString | ( | std::string const & | material_id_string, |
| MeshLib::PropertyVector< int > const *const | material_ids ) |
Parses a comma separated list of integers or "*" string. Such lists occur in the medium definition in the OGS prj file. Range syntax is supported with colon separator, e.g., "1:5" expands to "1,2,3,4,5". For the "*" input a vector of all (unique) material ids is returned. Error messages in this function refer to this specific purpose.
Definition at line 102 of file MediaCreation.cpp.
References DBUG(), OGS_FATAL, and splitMaterialIdString().
Referenced by MaterialLib::Solids::createConstitutiveRelationsGeneric(), and ProjectData::parseMedia().
| std::vector< int > MaterialLib::splitMaterialIdString | ( | std::string const & | material_id_string | ) |
Parses a comma separated list of integers and/or ranges. Such lists occur in the medium definition in the OGS prj file. Range syntax is supported with colon separator, e.g., "1:5" expands to "1,2,3,4,5". Multiple entries are separated by comma, e.g., "-1:2,5,7:9" expands to "-1,0,1,2,5,7,8,9". Error messages in this function refer to this specific purpose.
Definition at line 47 of file MediaCreation.cpp.
References checkForWhitespaces(), expandRange(), OGS_FATAL, BaseLib::parseInteger(), BaseLib::splitString(), and BaseLib::trim().
Referenced by ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess(), parseMaterialIdString(), and parseOutputMeshConfig().