17#include <pybind11/eval.h>
20#include <boost/algorithm/string/predicate.hpp>
22#include <range/v3/action/sort.hpp>
23#include <range/v3/action/unique.hpp>
24#include <range/v3/algorithm/contains.hpp>
25#include <range/v3/range/conversion.hpp>
26#include <range/v3/view/adjacent_remove_if.hpp>
38#include "InfoLib/CMakeInfo.h"
44#elif defined(USE_PETSC)
68#ifdef OGS_EMBED_PYTHON_INTERPRETER
72#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
76#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
79#ifdef OGS_BUILD_PROCESS_HT
82#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
85#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
88#ifdef OGS_BUILD_PROCESS_WELLBORESIMULATOR
91#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
94#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
97#ifdef OGS_BUILD_PROCESS_LIE_M
100#ifdef OGS_BUILD_PROCESS_LIE_HM
103#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
106#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
110#ifdef OGS_BUILD_PROCESS_PHASEFIELD
113#ifdef OGS_BUILD_PROCESS_HMPHASEFIELD
116#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
119#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
122#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
125#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
128#ifdef OGS_BUILD_PROCESS_TH2M
131#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
134#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
137#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
140#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
143#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
150 std::string
const& dir_first, std::string
const& dir_second)
152 DBUG(
"Reading geometry file '{:s}'.", fname);
159 WARN(
"File {:s} not found in {:s}! Trying reading from {:s}.", fname,
160 dir_first, dir_second);
163 OGS_FATAL(
"Could not read geometry file {:s} in {:s}.", fname,
172 std::string
const& directory)
175 directory, mesh_config_parameter.
getValue<std::string>());
176 DBUG(
"Reading mesh file '{:s}'.", mesh_file);
182 std::filesystem::path abspath{mesh_file};
185 abspath = std::filesystem::absolute(mesh_file);
187 catch (std::filesystem::filesystem_error
const& e)
189 ERR(
"Determining the absolute path of '{}' failed: {}", mesh_file,
193 OGS_FATAL(
"Could not read mesh from '{:s}' file. No mesh added.",
197#ifdef DOXYGEN_DOCU_ONLY
202 if (
auto const axially_symmetric =
205 "axially_symmetric"))
207 mesh->setAxiallySymmetric(*axially_symmetric);
208 if (mesh->getDimension() == 3 && mesh->isAxiallySymmetric())
210 OGS_FATAL(
"3D mesh cannot be axially symmetric.");
219 std::string
const& project_directory)
221 std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
229 DBUG(
"Reading multiple meshes.");
231 auto const configs = optional_meshes->getConfigParameterList(
"mesh");
232 std::transform(configs.begin(), configs.end(),
233 std::back_inserter(meshes),
234 [&directory](
auto const& mesh_config)
235 { return readSingleMesh(mesh_config, directory); });
236 if (
auto const geometry_file_name =
240 readGeometry(*geometry_file_name, geoObjects, directory,
250 auto const geometry_file_name =
260 std::unique_ptr<MeshGeoToolsLib::SearchLength> search_length_algorithm =
262 bool const multiple_nodes_allowed =
false;
263 auto additional_meshes =
265 geoObjects, *meshes[0], std::move(search_length_algorithm),
266 multiple_nodes_allowed);
268 std::move(begin(additional_meshes), end(additional_meshes),
269 std::back_inserter(meshes));
273 ranges::actions::sort;
274 auto const sorted_names = meshes | mesh_names;
275 auto const unique_names = meshes | mesh_names | ranges::actions::unique;
276 if (unique_names.size() < sorted_names.size())
279 "Mesh names aren't unique. From project file read mesh names are:");
286 auto const zero_mesh_field_data_by_material_ids =
289 "zero_mesh_field_data_by_material_ids");
290 if (zero_mesh_field_data_by_material_ids)
293 "Tag 'zero_mesh_field_data_by_material_ids` is experimental. Its "
294 "name may be changed, or it may be removed due to its "
295 "corresponding feature becomes a single tool. Please use it with "
298 *meshes[0], *zero_mesh_field_data_by_material_ids);
310 INFO(
"readRasters ...");
311 std::vector<GeoLib::NamedRaster> named_rasters;
315 if (optional_rasters)
318 auto const configs = optional_rasters->getConfigSubtreeList(
"raster");
320 configs.begin(), configs.end(), std::back_inserter(named_rasters),
321 [&raster_directory, &min_max_points](
auto const& raster_config)
323 return GeoLib::IO::readRaster(raster_config, raster_directory,
327 INFO(
"readRasters done");
328 return named_rasters;
356 std::string
const& project_directory,
357 std::string
const& output_directory,
358 std::string
const& mesh_directory,
359 [[maybe_unused]] std::string
const& script_directory)
360 : _mesh_vec(
readMeshes(project_config, mesh_directory, project_directory)),
361 _named_rasters(
readRasters(project_config, project_directory,
368 if (
auto const python_script =
372 namespace py = pybind11;
374#ifdef OGS_EMBED_PYTHON_INTERPRETER
379 auto py_path = py::module::import(
"sys").attr(
"path");
380 py_path.attr(
"append")(script_directory);
382 auto const script_path =
386 py::object scope = py::module::import(
"__main__").attr(
"__dict__");
388 auto globals = py::dict(scope);
389 globals[
"ogs_prj_directory"] = project_directory;
390 globals[
"ogs_mesh_directory"] = mesh_directory;
391 globals[
"ogs_script_directory"] = script_directory;
394 py::eval_file(script_path, scope);
396 catch (py::error_already_set
const& e)
398 OGS_FATAL(
"Error evaluating python script {}: {}", script_path,
406 auto parameter_names_for_transformation =
417 if (std::find(begin(parameter_names_for_transformation),
418 end(parameter_names_for_transformation),
420 end(parameter_names_for_transformation))
425 "The parameter '{:s}' is using the local coordinate system "
426 "but no local coordinate system was provided.",
451 project_directory, output_directory,
452 std::move(chemical_solver_interface));
465 DBUG(
"Parse process variables:");
467 std::set<std::string> names;
475 auto const mesh_name =
477 var_config.getConfigParameter<std::string>(
"mesh",
484 if (!names.insert(pv.getName()).second)
486 OGS_FATAL(
"A process variable with name `{:s}' already exists.",
499 std::set<std::string> names;
500 std::vector<std::string> parameter_names_for_transformation;
502 DBUG(
"Reading parameters:");
503 for (
auto parameter_config :
509 if (!names.insert(p->name).second)
511 OGS_FATAL(
"A parameter with name `{:s}' already exists.", p->name);
514 auto const use_local_coordinate_system =
516 parameter_config.getConfigParameterOptional<
bool>(
517 "use_local_coordinate_system");
518 if (!!use_local_coordinate_system && *use_local_coordinate_system)
520 parameter_names_for_transformation.push_back(p->name);
533 return parameter_names_for_transformation;
537 std::optional<BaseLib::ConfigTree>
const& media_config)
544 DBUG(
"Reading media:");
548 ERR(
"A mesh is required to define medium materials.");
552 for (
auto const& medium_config :
554 media_config->getConfigSubtreeList(
"medium"))
556 auto create_medium = [dim =
_mesh_vec[0]->getDimension(),
557 &medium_config,
this](
int const id)
565 auto const material_id_string =
567 medium_config.getConfigAttribute<std::string>(
"id",
"0");
569 std::vector<int>
const material_ids_of_this_medium =
573 for (
auto const&
id : material_ids_of_this_medium)
576 id,
_media, material_ids_of_this_medium, create_medium);
582 OGS_FATAL(
"No entity is found inside <media>.");
586std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
588 std::optional<BaseLib::ConfigTree>
const& config,
589 std::string
const& output_directory)
596 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
597 chemical_solver_interface;
598#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
600 "Ready for initializing interface to a chemical solver for water "
601 "chemistry calculation.");
603 auto const chemical_solver =
605 config->getConfigAttribute<std::string>(
"chemical_solver");
607 if (boost::iequals(chemical_solver,
"Phreeqc"))
610 "Configuring phreeqc interface for water chemistry calculation "
611 "using file-based approach.");
615 *config, output_directory);
617 else if (boost::iequals(chemical_solver,
"PhreeqcKernel"))
620 "The chemical solver option of PhreeqcKernel is not accessible for "
621 "the time being. Please set 'Phreeqc'' as the chemical solver for "
622 "reactive transport modeling.");
624 else if (boost::iequals(chemical_solver,
"SelfContained"))
627 "Use self-contained chemical solver for water chemistry "
637 "Unknown chemical solver. Please specify either Phreeqc or "
638 "PhreeqcKernel as the solver for water chemistry calculation "
642 (void)output_directory;
645 "Found the type of the process to be solved is not component transport "
646 "process. Please specify the process type to ComponentTransport. At "
647 "the present, water chemistry calculation is only available for "
648 "component transport process.");
650 return chemical_solver_interface;
655 std::string
const& project_directory,
656 std::string
const& output_directory,
657 [[maybe_unused]] std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
658 chemical_solver_interface)
660 (void)project_directory;
661 (void)output_directory;
663 DBUG(
"Reading processes:");
669 process_config.peekConfigParameter<std::string>(
"type");
673 process_config.getConfigParameter<std::string>(
"name");
675 [[maybe_unused]]
auto const integration_order =
677 process_config.getConfigParameter<
int>(
"integration_order");
679 std::unique_ptr<ProcessLib::Process> process;
683 process_config.getConfigSubtreeOptional(
"jacobian_assembler"));
685#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
686 if (type ==
"STEADY_STATE_DIFFUSION")
695 name, *
_mesh_vec[0], std::move(jacobian_assembler),
701#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
702 if (type ==
"LIQUID_FLOW")
705 name, *
_mesh_vec[0], std::move(jacobian_assembler),
711#ifdef OGS_BUILD_PROCESS_TH2M
718 name, *
_mesh_vec[0], std::move(jacobian_assembler),
725 name, *
_mesh_vec[0], std::move(jacobian_assembler),
731 OGS_FATAL(
"TH2M process does not support given dimension");
736#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
737 if (type ==
"HEAT_CONDUCTION")
740 name, *
_mesh_vec[0], std::move(jacobian_assembler),
746#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
747 if (type ==
"HEAT_TRANSPORT_BHE")
752 "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
758 name, *
_mesh_vec[0], std::move(jacobian_assembler),
764#ifdef OGS_BUILD_PROCESS_WELLBORESIMULATOR
765 if (type ==
"WELLBORE_SIMULATOR")
770 "WELLBORE_SIMULATOR can only work with a 1-dimensional "
776 name, *
_mesh_vec[0], std::move(jacobian_assembler),
782#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
783 if (type ==
"HYDRO_MECHANICS")
786 process_config.getConfigParameterOptional<
int>(
"dimension"))
789 "The 'dimension' tag has been removed in the merge-request "
790 "!4766. The dimension is now taken from the main mesh and "
791 "the tag must be removed. There is a python script in the "
792 "merge-request description for automatic conversion.");
800 std::move(jacobian_assembler),
809 std::move(jacobian_assembler),
816 "HYDRO_MECHANICS process does not support given "
822#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
823 if (type ==
"LARGE_DEFORMATION")
830 name, *
_mesh_vec[0], std::move(jacobian_assembler),
838 name, *
_mesh_vec[0], std::move(jacobian_assembler),
845 "LARGE_DEFORMATION process does not support given "
851#ifdef OGS_BUILD_PROCESS_LIE_HM
852 if (type ==
"HYDRO_MECHANICS_WITH_LIE")
855 process_config.getConfigParameterOptional<
int>(
"dimension"))
858 "The 'dimension' tag has been removed in the merge-request "
860 "The dimension is now taken from the main mesh and the tag "
862 "removed. There is a python script in the merge-request "
864 "for automatic conversion.");
871 name, *
_mesh_vec[0], std::move(jacobian_assembler),
879 name, *
_mesh_vec[0], std::move(jacobian_assembler),
886 "HYDRO_MECHANICS_WITH_LIE process does not support "
892#ifdef OGS_BUILD_PROCESS_HT
896 name, *
_mesh_vec[0], std::move(jacobian_assembler),
902#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
903 if (type ==
"ComponentTransport")
907 name, *
_mesh_vec[0], std::move(jacobian_assembler),
910 std::move(chemical_solver_interface));
914#ifdef OGS_BUILD_PROCESS_PHASEFIELD
915 if (type ==
"PHASE_FIELD")
922 name, *
_mesh_vec[0], std::move(jacobian_assembler),
930 name, *
_mesh_vec[0], std::move(jacobian_assembler),
939#ifdef OGS_BUILD_PROCESS_HMPHASEFIELD
940 if (type ==
"HM_PHASE_FIELD")
947 name, *
_mesh_vec[0], std::move(jacobian_assembler),
955 name, *
_mesh_vec[0], std::move(jacobian_assembler),
964#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
965 if (type ==
"RichardsComponentTransport")
969 name, *
_mesh_vec[0], std::move(jacobian_assembler),
975#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
976 if (type ==
"SMALL_DEFORMATION")
983 name, *
_mesh_vec[0], std::move(jacobian_assembler),
991 name, *
_mesh_vec[0], std::move(jacobian_assembler),
998 "SMALL_DEFORMATION process does not support given "
1004#ifdef OGS_BUILD_PROCESS_LIE_M
1005 if (type ==
"SMALL_DEFORMATION_WITH_LIE")
1008 process_config.getConfigParameterOptional<
int>(
"dimension"))
1011 "The 'dimension' tag has been removed in the merge-request "
1013 "The dimension is now taken from the main mesh and the tag "
1015 "removed. There is a python script in the merge-request "
1017 "for automatic conversion.");
1024 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1032 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1039 "SMALL_DEFORMATION_WITH_LIE process does not support "
1045#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
1046 if (type ==
"THERMO_HYDRO_MECHANICS")
1049 process_config.getConfigParameterOptional<
int>(
"dimension"))
1052 "The 'dimension' tag has been removed in the merge-request "
1054 "The dimension is now taken from the main mesh and the tag "
1056 "removed. There is a python script in the merge-request "
1058 "for automatic conversion.");
1065 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1073 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1080 "THERMO_HYDRO_MECHANICS process does not support given "
1086#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
1087 if (type ==
"THERMO_MECHANICS")
1094 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1102 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1111#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
1112 if (type ==
"RICHARDS_FLOW")
1115 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1121#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
1122 if (type ==
"RICHARDS_MECHANICS")
1125 process_config.getConfigParameterOptional<
int>(
"dimension"))
1128 "The 'dimension' tag has been removed in the merge-request "
1130 "The dimension is now taken from the main mesh and the tag "
1132 "removed. There is a python script in the merge-request "
1134 "for automatic conversion.");
1141 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1149 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1158#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
1159 if (type ==
"THERMO_RICHARDS_FLOW")
1163 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1169#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
1170 if (type ==
"THERMO_RICHARDS_MECHANICS")
1177 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1185 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1195#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
1196 if (type ==
"TWOPHASE_FLOW_PP")
1200 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1206#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1207 if (type ==
"THERMAL_TWOPHASE_WITH_PP")
1211 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1218 OGS_FATAL(
"Unknown process type: {:s}", type);
1222 [](std::unique_ptr<ProcessLib::Process>
const& p)
1223 {
return p->name; }))
1225 OGS_FATAL(
"The process name '{:s}' is not unique.", name);
1232 std::string
const& output_directory)
1234 DBUG(
"Reading time loop configuration.");
1236 bool const compensate_non_equilibrium_initial_residuum = std::any_of(
1239 [](
auto const& process_variable)
1240 {
return process_variable.compensateNonEquilibriumInitialResiduum(); });
1244 compensate_non_equilibrium_initial_residuum);
1248 OGS_FATAL(
"Initialization of time loop failed.");
1254 DBUG(
"Reading linear solver configuration.");
1260 auto const name = conf.getConfigParameter<std::string>(
"name");
1261 auto const linear_solver_parser =
1263 auto const solver_options =
1264 linear_solver_parser.parseNameAndOptions(
"", &conf);
1269 std::make_unique<GlobalLinearSolver>(std::get<0>(solver_options),
1270 std::get<1>(solver_options)),
1271 "The linear solver name is not unique");
1277 DBUG(
"Reading non-linear solver configuration.");
1282 auto const ls_name =
1284 conf.getConfigParameter<std::string>(
"linear_solver");
1287 "A linear solver with the given name does not exist.");
1290 auto const name = conf.getConfigParameter<std::string>(
"name");
1295 "The nonlinear solver name is not unique");
1306 DBUG(
"Reading curves configuration.");
1309 for (
auto conf : config->getConfigSubtreeList(
"curve"))
1312 auto const name = conf.getConfigParameter<std::string>(
"name");
1318 "The curve name is not unique.");
Definition of the AsciiRasterInterface class.
Definition of the BoostXmlGmlInterface class.
Functionality to build different search length algorithm objects from given config.
Definition of the GEOObjects class.
std::vector< std::size_t > getNodes(GeoLib::Point const &pnt, std::vector< MeshLib::Node * > const &nodes, MeshLib::PropertyVector< int > const &mat_ids, std::pair< int, int > const &mat_limits, std::pair< double, double > const &elevation_limits, MeshLib::Mesh const &mesh)
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the Mesh class.
Definition of the GeoLib::Raster class.
Base class for different search length strategies.
std::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
std::optional< T > getConfigParameterOptional(std::string const ¶m) const
T getConfigParameter(std::string const ¶m) const
Range< SubtreeIterator > getConfigSubtreeList(std::string const &root) const
ConfigTree getConfigSubtree(std::string const &root) const
std::optional< T > getConfigAttributeOptional(std::string const &attr) const
Container class for geometric objects.
std::vector< PolylineVec * > const & getPolylines() const
Read access to polylines w/o using a name.
std::vector< PointVec * > const & getPoints() const
Read access to points w/o using a name.
std::vector< SurfaceVec * > const & getSurfaces() const
Read access to surfaces w/o using a name.
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
static PROCESSLIB_EXPORT const std::string constant_one_parameter_name
std::map< std::string, std::unique_ptr< GlobalLinearSolver > > _linear_solvers
std::optional< ParameterLib::CoordinateSystem > _local_coordinate_system
std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > _nonlinear_solvers
MeshLib::Mesh & getMesh(std::string const &mesh_name) const
void parseProcesses(BaseLib::ConfigTree const &processes_config, std::string const &project_directory, std::string const &output_directory, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface)
std::unique_ptr< ChemistryLib::ChemicalSolverInterface > parseChemicalSolverInterface(std::optional< BaseLib::ConfigTree > const &config, const std::string &output_directory)
void parseMedia(std::optional< BaseLib::ConfigTree > const &media_config)
Parses media configuration and saves them in an object.
void parseLinearSolvers(BaseLib::ConfigTree const &config)
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > _parameters
Buffer for each parameter config passed to the process.
std::vector< std::unique_ptr< ProcessLib::Process > > _processes
std::vector< GeoLib::NamedRaster > _named_rasters
void parseNonlinearSolvers(BaseLib::ConfigTree const &config)
std::vector< ProcessLib::ProcessVariable > _process_variables
void parseProcessVariables(BaseLib::ConfigTree const &process_variables_config)
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > _curves
void parseCurves(std::optional< BaseLib::ConfigTree > const &config)
std::vector< std::unique_ptr< MeshLib::Mesh > > _mesh_vec
void parseTimeLoop(BaseLib::ConfigTree const &config, const std::string &output_directory)
Parses the time loop configuration.
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > _media
std::vector< std::string > parseParameters(BaseLib::ConfigTree const ¶meters_config)
std::unique_ptr< ProcessLib::TimeLoop > _time_loop
The time loop used to solve this project's processes.
std::pair< std::unique_ptr< NonlinearSolverBase >, NonlinearSolverTag > createNonlinearSolver(GlobalLinearSolver &linear_solver, BaseLib::ConfigTree const &config)
pybind11::scoped_interpreter setupEmbeddedPython()
void insertIfKeyUniqueElseError(Map &map, Key const &key, Value &&value, std::string const &error_message)
bool IsFileExisting(const std::string &strFilename)
Returns true if given file exists.
std::string joinPaths(std::string const &pathA, std::string const &pathB)
OGS_NO_DANGLING Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
std::unique_ptr< ChemicalSolverInterface > createChemicalSolverInterface(std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< std::string, std::unique_ptr< GlobalLinearSolver > > const &linear_solvers, BaseLib::ConfigTree const &config, std::string const &output_directory)
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)
std::vector< int > parseMaterialIdString(std::string const &material_id_string, MeshLib::PropertyVector< int > const *const material_ids)
std::unique_ptr< Medium > createMedium(int const material_id, int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
std::unique_ptr< CurveType > createPiecewiseLinearCurve(BaseLib::ConfigTree const &config)
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)
constexpr ranges::views::view_closure names
For an element of a range view return its name.
Mesh & findMeshByName(std::vector< std::unique_ptr< Mesh > > const &meshes, std::string_view const name)
void setMeshSpaceDimension(std::vector< std::unique_ptr< Mesh > > const &meshes)
std::optional< ParameterLib::CoordinateSystem > createCoordinateSystem(std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters)
std::unique_ptr< ParameterBase > createParameter(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::vector< GeoLib::NamedRaster > const &named_rasters, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
std::unique_ptr< Process > createComponentTransportProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface)
template std::unique_ptr< Process > createHMPhaseFieldProcess< 3 >(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createHMPhaseFieldProcess< 2 >(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createHTProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createHeatConductionProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createHeatTransportBHEProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createHydroMechanicsProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createHydroMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createHydroMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createLiquidFlowProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createPhaseFieldProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createPhaseFieldProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
std::unique_ptr< Process > createRichardsComponentTransportProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createRichardsFlowProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createRichardsMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createRichardsMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createSteadyStateDiffusion(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createTH2MProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createTH2MProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createThermalTwoPhaseFlowWithPPProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoHydroMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoHydroMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createThermoRichardsFlowProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoRichardsMechanicsProcess< 3 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createThermoRichardsMechanicsProcess< 2 >(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createTwoPhaseFlowWithPPProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createWellboreSimulatorProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< TimeLoop > createTimeLoop(BaseLib::ConfigTree const &config, std::string const &output_directory, const std::vector< std::unique_ptr< Process > > &processes, const std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > &nonlinear_solvers, std::vector< std::unique_ptr< MeshLib::Mesh > > &meshes, bool const compensate_non_equilibrium_initial_residuum)
Builds a TimeLoop from the given configuration.
std::unique_ptr< AbstractJacobianAssembler > createJacobianAssembler(std::optional< BaseLib::ConfigTree > const &config)
std::vector< std::unique_ptr< MeshLib::Mesh > > readMeshes(BaseLib::ConfigTree const &config, std::string const &directory, std::string const &project_directory)
void readGeometry(std::string const &fname, GeoLib::GEOObjects &geo_objects, std::string const &dir_first, std::string const &dir_second)
std::vector< GeoLib::NamedRaster > readRasters(BaseLib::ConfigTree const &config, std::string const &raster_directory, GeoLib::MinMaxPoints const &min_max_points)
std::unique_ptr< MeshLib::Mesh > readSingleMesh(BaseLib::ConfigTree const &mesh_config_parameter, std::string const &directory)
Definition of readMeshFromFile function.
Single, constant value parameter.
static PROCESSLIB_EXPORT const std::string zero_parameter_name