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>
37#include "InfoLib/CMakeInfo.h"
42#elif defined(USE_PETSC)
66#ifdef OGS_EMBED_PYTHON_INTERPRETER
70#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
74#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
77#ifdef OGS_BUILD_PROCESS_HT
80#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
83#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
86#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
89#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
92#ifdef OGS_BUILD_PROCESS_LIE
96#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
99#ifdef OGS_BUILD_PROCESS_STOKESFLOW
103#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
107#ifdef OGS_BUILD_PROCESS_PHASEFIELD
110#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
113#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
116#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
119#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
122#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
125#ifdef OGS_BUILD_PROCESS_TES
128#ifdef OGS_BUILD_PROCESS_TH2M
131#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
134#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
137#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
140#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
143#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
146#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
149#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
157 DBUG(
"Reading geometry file '{:s}'.", fname);
164 std::string
const& directory)
167 mesh_config_parameter.
getValue<std::string>(), directory);
168 DBUG(
"Reading mesh file '{:s}'.", mesh_file);
174 OGS_FATAL(
"Could not read mesh from '{:s}' file. No mesh added.",
178#ifdef DOXYGEN_DOCU_ONLY
183 if (
auto const axially_symmetric =
186 "axially_symmetric"))
188 mesh->setAxiallySymmetric(*axially_symmetric);
197 std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
205 DBUG(
"Reading multiple meshes.");
207 auto const configs = optional_meshes->getConfigParameterList(
"mesh");
208 std::transform(configs.begin(), configs.end(),
209 std::back_inserter(meshes),
210 [&directory](
auto const& mesh_config)
211 { return readSingleMesh(mesh_config, directory); });
212 if (
auto const geometry_file_name =
216 std::string
const geometry_file =
235 std::unique_ptr<MeshGeoToolsLib::SearchLength> search_length_algorithm =
237 bool const multiple_nodes_allowed =
false;
238 auto additional_meshes =
240 geoObjects, *meshes[0], std::move(search_length_algorithm),
241 multiple_nodes_allowed);
243 std::move(begin(additional_meshes), end(additional_meshes),
244 std::back_inserter(meshes));
248 ranges::actions::sort;
249 auto const sorted_names = meshes | mesh_names;
250 auto const unique_names = meshes | mesh_names | ranges::actions::unique;
251 if (unique_names.size() < sorted_names.size())
254 "Mesh names aren't unique. From project file read mesh names are:");
261 auto const zero_mesh_field_data_by_material_ids =
264 "zero_mesh_field_data_by_material_ids");
265 if (zero_mesh_field_data_by_material_ids)
268 "Tag 'zero_mesh_field_data_by_material_ids` is experimental. Its "
269 "name may be changed, or it may be removed due to its "
270 "corresponding feature becomes a single tool. Please use it with "
273 *meshes[0], *zero_mesh_field_data_by_material_ids);
285 INFO(
"readRasters ...");
286 std::vector<GeoLib::NamedRaster> named_rasters;
290 if (optional_rasters)
293 auto const configs = optional_rasters->getConfigSubtreeList(
"raster");
295 configs.begin(), configs.end(), std::back_inserter(named_rasters),
296 [&raster_directory, &min_max_points](
auto const& raster_config)
298 return GeoLib::IO::readRaster(raster_config, raster_directory,
302 INFO(
"readRasters done");
303 return named_rasters;
331 std::string
const& project_directory,
332 std::string
const& output_directory,
333 std::string
const& mesh_directory,
334 [[maybe_unused]] std::string
const& script_directory)
335 : _mesh_vec(
readMeshes(project_config, mesh_directory)),
336 _named_rasters(
readRasters(project_config, project_directory,
343 if (
auto const python_script =
347 namespace py = pybind11;
349#ifdef OGS_EMBED_PYTHON_INTERPRETER
354 auto py_path = py::module::import(
"sys").attr(
"path");
355 py_path.attr(
"append")(script_directory);
357 py_path.attr(
"append")(
358 CMakeInfoLib::CMakeInfo::python_virtualenv_sitepackages);
360 auto const script_path =
364 py::object scope = py::module::import(
"__main__").attr(
"__dict__");
366 auto globals = py::dict(scope);
367 globals[
"ogs_prj_directory"] = project_directory;
368 globals[
"ogs_mesh_directory"] = mesh_directory;
369 globals[
"ogs_script_directory"] = script_directory;
370 py::eval_file(script_path, scope);
376 auto parameter_names_for_transformation =
387 if (std::find(begin(parameter_names_for_transformation),
388 end(parameter_names_for_transformation),
390 end(parameter_names_for_transformation))
395 "The parameter '{:s}' is using the local coordinate system "
396 "but no local coordinate system was provided.",
421 project_directory, output_directory,
422 std::move(chemical_solver_interface));
435 DBUG(
"Parse process variables:");
437 std::set<std::string> names;
445 auto const mesh_name =
447 var_config.getConfigParameter<std::string>(
"mesh",
454 if (!names.insert(pv.getName()).second)
456 OGS_FATAL(
"A process variable with name `{:s}' already exists.",
469 std::set<std::string> names;
470 std::vector<std::string> parameter_names_for_transformation;
472 DBUG(
"Reading parameters:");
473 for (
auto parameter_config :
479 if (!names.insert(p->name).second)
481 OGS_FATAL(
"A parameter with name `{:s}' already exists.", p->name);
484 auto const use_local_coordinate_system =
486 parameter_config.getConfigParameterOptional<
bool>(
487 "use_local_coordinate_system");
488 if (!!use_local_coordinate_system && *use_local_coordinate_system)
490 parameter_names_for_transformation.push_back(p->name);
503 return parameter_names_for_transformation;
507 std::optional<BaseLib::ConfigTree>
const& media_config)
514 DBUG(
"Reading media:");
518 ERR(
"A mesh is required to define medium materials.");
522 for (
auto const& medium_config :
524 media_config->getConfigSubtreeList(
"medium"))
526 auto material_id_string =
528 medium_config.getConfigAttribute<std::string>(
"id",
"0");
530 auto const material_ids_of_this_medium =
533 for (
auto const&
id : material_ids_of_this_medium)
538 "Multiple media were specified for the same material id "
539 "'{:d}'. Keep in mind, that if no material id is "
540 "specified, it is assumed to be 0 by default.",
544 if (
id == material_ids_of_this_medium[0])
547 id,
_mesh_vec[0]->getDimension(), medium_config,
565 OGS_FATAL(
"No entity is found inside <media>.");
569std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
571 std::optional<BaseLib::ConfigTree>
const& config,
572 std::string
const& output_directory)
579 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
580 chemical_solver_interface;
581#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
583 "Ready for initializing interface to a chemical solver for water "
584 "chemistry calculation.");
586 auto const chemical_solver =
588 config->getConfigAttribute<std::string>(
"chemical_solver");
590 if (boost::iequals(chemical_solver,
"Phreeqc"))
593 "Configuring phreeqc interface for water chemistry calculation "
594 "using file-based approach.");
598 *config, output_directory);
600 else if (boost::iequals(chemical_solver,
"PhreeqcKernel"))
603 "The chemical solver option of PhreeqcKernel is not accessible for "
604 "the time being. Please set 'Phreeqc'' as the chemical solver for "
605 "reactive transport modeling.");
607 else if (boost::iequals(chemical_solver,
"SelfContained"))
610 "Use self-contained chemical solver for water chemistry "
620 "Unknown chemical solver. Please specify either Phreeqc or "
621 "PhreeqcKernel as the solver for water chemistry calculation "
625 (void)output_directory;
628 "Found the type of the process to be solved is not component transport "
629 "process. Please specify the process type to ComponentTransport. At "
630 "the present, water chemistry calculation is only available for "
631 "component transport process.");
633 return chemical_solver_interface;
638 std::string
const& project_directory,
639 std::string
const& output_directory,
640 [[maybe_unused]] std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
641 chemical_solver_interface)
643 (void)project_directory;
644 (void)output_directory;
646 DBUG(
"Reading processes:");
652 process_config.peekConfigParameter<std::string>(
"type");
656 process_config.getConfigParameter<std::string>(
"name");
658 [[maybe_unused]]
auto const integration_order =
660 process_config.getConfigParameter<
int>(
"integration_order");
662 std::unique_ptr<ProcessLib::Process> process;
666 process_config.getConfigSubtreeOptional(
"jacobian_assembler"));
668#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
669 if (type ==
"STEADY_STATE_DIFFUSION")
678 name, *
_mesh_vec[0], std::move(jacobian_assembler),
684#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
685 if (type ==
"LIQUID_FLOW")
688 name, *
_mesh_vec[0], std::move(jacobian_assembler),
694#ifdef OGS_BUILD_PROCESS_STOKESFLOW
695 if (type ==
"StokesFlow")
702 name, *
_mesh_vec[0], std::move(jacobian_assembler),
708 "StokesFlow process does not support given "
715#ifdef OGS_BUILD_PROCESS_TES
719 name, *
_mesh_vec[0], std::move(jacobian_assembler),
725#ifdef OGS_BUILD_PROCESS_TH2M
732 name, *
_mesh_vec[0], std::move(jacobian_assembler),
739 name, *
_mesh_vec[0], std::move(jacobian_assembler),
745 OGS_FATAL(
"TH2M process does not support given dimension");
750#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
751 if (type ==
"HEAT_CONDUCTION")
754 name, *
_mesh_vec[0], std::move(jacobian_assembler),
760#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
761 if (type ==
"HEAT_TRANSPORT_BHE")
766 "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
772 name, *
_mesh_vec[0], std::move(jacobian_assembler),
778#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
779 if (type ==
"HYDRO_MECHANICS")
782 process_config.getConfigParameterOptional<
int>(
"dimension"))
785 "The 'dimension' tag has been removed in the merge-request "
787 "The dimension is now taken from the main mesh and the tag "
789 "removed. There is a python script in the merge-request "
791 "for automatic conversion.");
799 std::move(jacobian_assembler),
808 std::move(jacobian_assembler),
815 "HYDRO_MECHANICS process does not support given "
821#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
822 if (type ==
"LARGE_DEFORMATION")
829 name, *
_mesh_vec[0], std::move(jacobian_assembler),
837 name, *
_mesh_vec[0], std::move(jacobian_assembler),
844 "LARGE_DEFORMATION process does not support given "
850#ifdef OGS_BUILD_PROCESS_LIE
851 if (type ==
"HYDRO_MECHANICS_WITH_LIE")
854 process_config.getConfigParameterOptional<
int>(
"dimension"))
857 "The 'dimension' tag has been removed in the merge-request "
859 "The dimension is now taken from the main mesh and the tag "
861 "removed. There is a python script in the merge-request "
863 "for automatic conversion.");
870 name, *
_mesh_vec[0], std::move(jacobian_assembler),
878 name, *
_mesh_vec[0], std::move(jacobian_assembler),
885 "HYDRO_MECHANICS_WITH_LIE process does not support "
891#ifdef OGS_BUILD_PROCESS_HT
895 name, *
_mesh_vec[0], std::move(jacobian_assembler),
901#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
902 if (type ==
"ComponentTransport")
906 name, *
_mesh_vec[0], std::move(jacobian_assembler),
909 std::move(chemical_solver_interface));
913#ifdef OGS_BUILD_PROCESS_PHASEFIELD
914 if (type ==
"PHASE_FIELD")
921 name, *
_mesh_vec[0], std::move(jacobian_assembler),
929 name, *
_mesh_vec[0], std::move(jacobian_assembler),
938#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
939 if (type ==
"RichardsComponentTransport")
943 name, *
_mesh_vec[0], std::move(jacobian_assembler),
949#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
950 if (type ==
"SMALL_DEFORMATION")
957 name, *
_mesh_vec[0], std::move(jacobian_assembler),
965 name, *
_mesh_vec[0], std::move(jacobian_assembler),
972 "SMALL_DEFORMATION process does not support given "
978#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
979 if (type ==
"SMALL_DEFORMATION_NONLOCAL")
986 name, *
_mesh_vec[0], std::move(jacobian_assembler),
994 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1001 "SMALL_DEFORMATION_NONLOCAL process does not support "
1002 "given dimension {:d}",
1008#ifdef OGS_BUILD_PROCESS_LIE
1009 if (type ==
"SMALL_DEFORMATION_WITH_LIE")
1012 process_config.getConfigParameterOptional<
int>(
"dimension"))
1015 "The 'dimension' tag has been removed in the merge-request "
1017 "The dimension is now taken from the main mesh and the tag "
1019 "removed. There is a python script in the merge-request "
1021 "for automatic conversion.");
1028 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1036 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1043 "SMALL_DEFORMATION_WITH_LIE process does not support "
1049#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
1050 if (type ==
"THERMO_HYDRO_MECHANICS")
1053 process_config.getConfigParameterOptional<
int>(
"dimension"))
1056 "The 'dimension' tag has been removed in the merge-request "
1058 "The dimension is now taken from the main mesh and the tag "
1060 "removed. There is a python script in the merge-request "
1062 "for automatic conversion.");
1069 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1077 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1084 "THERMO_HYDRO_MECHANICS process does not support given "
1090#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
1091 if (type ==
"THERMO_MECHANICAL_PHASE_FIELD")
1098 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1106 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1115#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
1116 if (type ==
"THERMO_MECHANICS")
1123 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1131 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1140#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
1141 if (type ==
"RICHARDS_FLOW")
1144 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1150#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
1151 if (type ==
"RICHARDS_MECHANICS")
1154 process_config.getConfigParameterOptional<
int>(
"dimension"))
1157 "The 'dimension' tag has been removed in the merge-request "
1159 "The dimension is now taken from the main mesh and the tag "
1161 "removed. There is a python script in the merge-request "
1163 "for automatic conversion.");
1170 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1178 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1187#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
1188 if (type ==
"THERMO_RICHARDS_FLOW")
1192 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1198#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
1199 if (type ==
"THERMO_RICHARDS_MECHANICS")
1206 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1214 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1224#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
1225 if (type ==
"TWOPHASE_FLOW_PP")
1229 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1235#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
1236 if (type ==
"TWOPHASE_FLOW_PRHO")
1240 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1246#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1247 if (type ==
"THERMAL_TWOPHASE_WITH_PP")
1251 name, *
_mesh_vec[0], std::move(jacobian_assembler),
1258 OGS_FATAL(
"Unknown process type: {:s}", type);
1262 [](std::unique_ptr<ProcessLib::Process>
const& p)
1263 {
return p->name; }))
1265 OGS_FATAL(
"The process name '{:s}' is not unique.", name);
1272 std::string
const& output_directory)
1274 DBUG(
"Reading time loop configuration.");
1276 bool const compensate_non_equilibrium_initial_residuum = std::any_of(
1279 [](
auto const& process_variable)
1280 {
return process_variable.compensateNonEquilibriumInitialResiduum(); });
1284 compensate_non_equilibrium_initial_residuum);
1288 OGS_FATAL(
"Initialization of time loop failed.");
1294 DBUG(
"Reading linear solver configuration.");
1300 auto const name = conf.getConfigParameter<std::string>(
"name");
1301 auto const linear_solver_parser =
1303 auto const solver_options =
1304 linear_solver_parser.parseNameAndOptions(
"", &conf);
1309 std::make_unique<GlobalLinearSolver>(std::get<0>(solver_options),
1310 std::get<1>(solver_options)),
1311 "The linear solver name is not unique");
1317 DBUG(
"Reading non-linear solver configuration.");
1322 auto const ls_name =
1324 conf.getConfigParameter<std::string>(
"linear_solver");
1327 "A linear solver with the given name does not exist.");
1330 auto const name = conf.getConfigParameter<std::string>(
"name");
1335 "The nonlinear solver name is not unique");
1346 DBUG(
"Reading curves configuration.");
1349 for (
auto conf : config->getConfigSubtreeList(
"curve"))
1352 auto const name = conf.getConfigParameter<std::string>(
"name");
1358 "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.
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()
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
std::vector< int > splitMaterialIdString(std::string const &material_id_string)
void insertIfKeyUniqueElseError(Map &map, Key const &key, Value &&value, std::string const &error_message)
std::string copyPathToFileName(const std::string &file_name, const std::string &source)
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)
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)
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)
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::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 > createStokesFlowProcess< 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, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
std::unique_ptr< Process > createTESProcess(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)
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 > createThermoMechanicalPhaseFieldProcess< 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)
template std::unique_ptr< Process > createThermoMechanicalPhaseFieldProcess< 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 > 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 > createTwoPhaseFlowWithPrhoProcess(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< 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::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)
void readGeometry(std::string const &fname, GeoLib::GEOObjects &geo_objects)
Definition of readMeshFromFile function.
Single, constant value parameter.
static PROCESSLIB_EXPORT const std::string zero_parameter_name