OGS
ProjectData.cpp
Go to the documentation of this file.
1
14#include "ProjectData.h"
15
16#include <pybind11/eval.h>
17
18#include <algorithm>
19#include <boost/algorithm/string/predicate.hpp>
20#include <cctype>
21#include <range/v3/action/sort.hpp>
22#include <range/v3/action/unique.hpp>
23#include <range/v3/range/conversion.hpp>
24#include <set>
25
26#include "BaseLib/Algorithm.h"
27#include "BaseLib/ConfigTree.h"
28#include "BaseLib/FileTools.h"
29#include "BaseLib/Logging.h"
30#include "BaseLib/StringTools.h"
31#include "GeoLib/GEOObjects.h"
32#include "InfoLib/CMakeInfo.h"
35#if defined(USE_LIS)
37#elif defined(USE_PETSC)
39#else
41#endif
45#include "MeshLib/Mesh.h"
50
51// FileIO
55#include "ParameterLib/Utils.h"
57#include "ProcessLib/TimeLoop.h"
58
59#ifdef OGS_EMBED_PYTHON_INTERPRETER
61#endif
62
63#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
66#endif
67#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
69#endif
70#ifdef OGS_BUILD_PROCESS_HT
72#endif
73#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
75#endif
76#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
78#endif
79#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
81#endif
82#ifdef OGS_BUILD_PROCESS_LIE
85#endif
86#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
88#endif
89#ifdef OGS_BUILD_PROCESS_STOKESFLOW
91#endif
92
93#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
95#endif
96
97#ifdef OGS_BUILD_PROCESS_PHASEFIELD
99#endif
100#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
102#endif
103#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
105#endif
106#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
108#endif
109#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
111#endif
112#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
114#endif
115#ifdef OGS_BUILD_PROCESS_TES
117#endif
118#ifdef OGS_BUILD_PROCESS_TH2M
120#endif
121#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
123#endif
124#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
126#endif
127#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
129#endif
130#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
132#endif
133#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
135#endif
136#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
138#endif
139#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
141#endif
142
143namespace
144{
145void readGeometry(std::string const& fname, GeoLib::GEOObjects& geo_objects)
146{
147 DBUG("Reading geometry file '{:s}'.", fname);
148 GeoLib::IO::BoostXmlGmlInterface gml_reader(geo_objects);
149 gml_reader.readFile(fname);
150}
151
152std::unique_ptr<MeshLib::Mesh> readSingleMesh(
153 BaseLib::ConfigTree const& mesh_config_parameter,
154 std::string const& directory)
155{
156 std::string const mesh_file = BaseLib::copyPathToFileName(
157 mesh_config_parameter.getValue<std::string>(), directory);
158 DBUG("Reading mesh file '{:s}'.", mesh_file);
159
160 auto mesh = std::unique_ptr<MeshLib::Mesh>(
162 if (!mesh)
163 {
164 OGS_FATAL("Could not read mesh from '{:s}' file. No mesh added.",
165 mesh_file);
166 }
167
168#ifdef DOXYGEN_DOCU_ONLY
170 mesh_config_parameter.getConfigAttributeOptional<bool>("axially_symmetric");
171#endif // DOXYGEN_DOCU_ONLY
172
173 if (auto const axially_symmetric =
175 mesh_config_parameter.getConfigAttributeOptional<bool>(
176 "axially_symmetric"))
177 {
178 mesh->setAxiallySymmetric(*axially_symmetric);
179 }
180
181 return mesh;
182}
183
184std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes(
185 BaseLib::ConfigTree const& config, std::string const& directory)
186{
187 std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
188
189 GeoLib::GEOObjects geoObjects;
190
192 auto optional_meshes = config.getConfigSubtreeOptional("meshes");
193 if (optional_meshes)
194 {
195 DBUG("Reading multiple meshes.");
197 auto const configs = optional_meshes->getConfigParameterList("mesh");
198 std::transform(configs.begin(), configs.end(),
199 std::back_inserter(meshes),
200 [&directory](auto const& mesh_config)
201 { return readSingleMesh(mesh_config, directory); });
202 if (auto const geometry_file_name =
204 config.getConfigParameterOptional<std::string>("geometry"))
205 {
206 std::string const geometry_file =
207 BaseLib::copyPathToFileName(*geometry_file_name, directory);
208 readGeometry(geometry_file, geoObjects);
209 }
210 }
211 else
212 { // Read single mesh with geometry.
213 meshes.push_back(
215 readSingleMesh(config.getConfigParameter("mesh"), directory));
216
217 std::string const geometry_file = BaseLib::copyPathToFileName(
219 config.getConfigParameter<std::string>("geometry"),
220 directory);
221 readGeometry(geometry_file, geoObjects);
222 }
223
224 { // generate meshes from geometries
225 std::unique_ptr<MeshGeoToolsLib::SearchLength> search_length_algorithm =
227 bool const multiple_nodes_allowed = false;
228 auto additional_meshes =
230 geoObjects, *meshes[0], std::move(search_length_algorithm),
231 multiple_nodes_allowed);
232
233 std::move(begin(additional_meshes), end(additional_meshes),
234 std::back_inserter(meshes));
235 }
236
237 auto mesh_names = MeshLib::views::names | ranges::to<std::vector>() |
238 ranges::actions::sort;
239 auto const sorted_names = meshes | mesh_names;
240 auto const unique_names = meshes | mesh_names | ranges::actions::unique;
241 if (unique_names.size() < sorted_names.size())
242 {
243 WARN(
244 "Mesh names aren't unique. From project file read mesh names are:");
245 for (auto const& name : meshes | MeshLib::views::names)
246 {
247 INFO("- {}", name);
248 }
249 }
250
252
253 return meshes;
254}
255
256std::optional<ParameterLib::CoordinateSystem> parseLocalCoordinateSystem(
257 std::optional<BaseLib::ConfigTree> const& config,
258 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
259{
260 if (!config)
261 {
262 return {};
263 }
264
265 DBUG("Reading coordinate system configuration.");
266
267 //
268 // Fetch the first basis vector; its length defines the dimension.
269 //
270 auto const& basis_vector_0 = ParameterLib::findParameter<double>(
271 *config,
273 "basis_vector_0", parameters, 0 /* any dimension */);
274 int const dimension = basis_vector_0.getNumberOfGlobalComponents();
275
276 // check dimension
277 if (dimension != 2 && dimension != 3)
278 {
279 OGS_FATAL(
280 "Basis vector parameter '{:s}' must have two or three components, "
281 "but it has {:d}.",
282 basis_vector_0.name, dimension);
283 }
284
285 //
286 // Fetch the second basis vector, which must be of the same dimension as the
287 // first one.
288 //
289 auto const& basis_vector_1 = ParameterLib::findParameter<double>(
290 *config,
292 "basis_vector_1", parameters, dimension);
293
294 //
295 // For two dimensions, we are done; construct coordinate system;
296 //
297 if (dimension == 2)
298 {
299 return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1};
300 }
301
302 //
303 // Parse the third vector, for three dimensions.
304 //
305 auto const& basis_vector_2 = ParameterLib::findParameter<double>(
306 *config,
308 "basis_vector_2", parameters, dimension);
309 return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1,
310 basis_vector_2};
311}
312} // namespace
313
314ProjectData::ProjectData() = default;
315
317 std::string const& project_directory,
318 std::string const& output_directory,
319 std::string const& mesh_directory,
320 [[maybe_unused]] std::string const& script_directory)
321 : _mesh_vec(readMeshes(project_config, mesh_directory))
322{
323 if (auto const python_script =
325 project_config.getConfigParameterOptional<std::string>("python_script"))
326 {
327 namespace py = pybind11;
328
329#ifdef OGS_EMBED_PYTHON_INTERPRETER
330 _py_scoped_interpreter.emplace(ApplicationsLib::setupEmbeddedPython());
331#endif
332
333 // Append to python's module search path
334 auto py_path = py::module::import("sys").attr("path");
335 py_path.attr("append")(script_directory); // .prj or -s directory
336 // virtualenv
337 py_path.attr("append")(
338 CMakeInfoLib::CMakeInfo::python_virtualenv_sitepackages);
339
340 auto const script_path =
341 BaseLib::copyPathToFileName(*python_script, script_directory);
342
343 // Evaluate in scope of main module
344 py::object scope = py::module::import("__main__").attr("__dict__");
345 // add (global) variables
346 auto globals = py::dict(scope);
347 globals["ogs_prj_directory"] = project_directory;
348 globals["ogs_mesh_directory"] = mesh_directory;
349 globals["ogs_script_directory"] = script_directory;
350 py::eval_file(script_path, scope);
351 }
352
354 parseCurves(project_config.getConfigSubtreeOptional("curves"));
355
356 auto parameter_names_for_transformation =
358 parseParameters(project_config.getConfigSubtree("parameters"));
359
360 _local_coordinate_system = parseLocalCoordinateSystem(
362 project_config.getConfigSubtreeOptional("local_coordinate_system"),
364
365 for (auto& parameter : _parameters)
366 {
367 if (std::find(begin(parameter_names_for_transformation),
368 end(parameter_names_for_transformation),
369 parameter->name) !=
370 end(parameter_names_for_transformation))
371 {
373 {
374 OGS_FATAL(
375 "The parameter '{:s}' is using the local coordinate system "
376 "but no local coordinate system was provided.",
377 parameter->name);
378 }
379 parameter->setCoordinateSystem(*_local_coordinate_system);
380 }
381
382 parameter->initialize(_parameters);
383 }
384
386 parseProcessVariables(project_config.getConfigSubtree("process_variables"));
387
389 parseMedia(project_config.getConfigSubtreeOptional("media"));
390
392 parseLinearSolvers(project_config.getConfigSubtree("linear_solvers"));
393
394 auto chemical_solver_interface = parseChemicalSolverInterface(
396 project_config.getConfigSubtreeOptional("chemical_system"),
397 output_directory);
398
400 parseProcesses(project_config.getConfigSubtree("processes"),
401 project_directory, output_directory,
402 std::move(chemical_solver_interface));
403
405 parseNonlinearSolvers(project_config.getConfigSubtree("nonlinear_solvers"));
406
408 parseTimeLoop(project_config.getConfigSubtree("time_loop"),
409 output_directory);
410}
411
413 BaseLib::ConfigTree const& process_variables_config)
414{
415 DBUG("Parse process variables:");
416
417 std::set<std::string> names;
418
419 for (auto var_config
421 : process_variables_config.getConfigSubtreeList("process_variable"))
422 {
423 // Either the mesh name is given, or the first mesh's name will be
424 // taken. Taking the first mesh's value is deprecated.
425 auto const mesh_name =
427 var_config.getConfigParameter<std::string>("mesh",
428 _mesh_vec[0]->getName());
429
430 auto& mesh = *BaseLib::findElementOrError(
431 begin(_mesh_vec), end(_mesh_vec),
432 [&mesh_name](auto const& m) { return m->getName() == mesh_name; },
433 "Expected to find a mesh named " + mesh_name + ".");
434
435 auto pv = ProcessLib::ProcessVariable{var_config, mesh, _mesh_vec,
437 if (!names.insert(pv.getName()).second)
438 {
439 OGS_FATAL("A process variable with name `{:s}' already exists.",
440 pv.getName());
441 }
442
443 _process_variables.push_back(std::move(pv));
444 }
445}
446
447std::vector<std::string> ProjectData::parseParameters(
448 BaseLib::ConfigTree const& parameters_config)
449{
450 using namespace ProcessLib;
451
452 std::set<std::string> names;
453 std::vector<std::string> parameter_names_for_transformation;
454
455 DBUG("Reading parameters:");
456 for (auto parameter_config :
458 parameters_config.getConfigSubtreeList("parameter"))
459 {
460 auto p =
462 if (!names.insert(p->name).second)
463 {
464 OGS_FATAL("A parameter with name `{:s}' already exists.", p->name);
465 }
466
467 auto const use_local_coordinate_system =
469 parameter_config.getConfigParameterOptional<bool>(
470 "use_local_coordinate_system");
471 if (!!use_local_coordinate_system && *use_local_coordinate_system)
472 {
473 parameter_names_for_transformation.push_back(p->name);
474 }
475
476 _parameters.push_back(std::move(p));
477 }
478
479 _parameters.push_back(
482 _parameters.push_back(
485
486 return parameter_names_for_transformation;
487}
488
490 std::optional<BaseLib::ConfigTree> const& media_config)
491{
492 if (!media_config)
493 {
494 return;
495 }
496
497 DBUG("Reading media:");
498
499 if (_mesh_vec.empty() || _mesh_vec[0] == nullptr)
500 {
501 ERR("A mesh is required to define medium materials.");
502 return;
503 }
504
505 for (auto const& medium_config :
507 media_config->getConfigSubtreeList("medium"))
508 {
509 auto material_id_string =
511 medium_config.getConfigAttribute<std::string>("id", "0");
512
513 auto const material_ids_of_this_medium =
514 BaseLib::splitMaterialIdString(material_id_string);
515
516 for (auto const& id : material_ids_of_this_medium)
517 {
518 if (_media.find(id) != end(_media))
519 {
520 OGS_FATAL(
521 "Multiple media were specified for the same material id "
522 "'{:d}'. Keep in mind, that if no material id is "
523 "specified, it is assumed to be 0 by default.",
524 id);
525 }
526
527 if (id == material_ids_of_this_medium[0])
528 {
530 id, _mesh_vec[0]->getDimension(), medium_config,
533 : nullptr,
534 _curves);
535 }
536 else
537 {
538 // This medium has multiple material IDs assigned and this is
539 // not the first material ID. Therefore we can reuse the medium
540 // we created before.
541 _media[id] = _media[material_ids_of_this_medium[0]];
542 }
543 }
544 }
545
546 if (_media.empty())
547 {
548 OGS_FATAL("No entity is found inside <media>.");
549 }
550}
551
552std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
554 std::optional<BaseLib::ConfigTree> const& config,
555 std::string const& output_directory)
556{
557 if (!config)
558 {
559 return nullptr;
560 }
561
562 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
563 chemical_solver_interface;
564#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
565 INFO(
566 "Ready for initializing interface to a chemical solver for water "
567 "chemistry calculation.");
568
569 auto const chemical_solver =
571 config->getConfigAttribute<std::string>("chemical_solver");
572
573 if (boost::iequals(chemical_solver, "Phreeqc"))
574 {
575 INFO(
576 "Configuring phreeqc interface for water chemistry calculation "
577 "using file-based approach.");
578
579 chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
581 *config, output_directory);
582 }
583 else if (boost::iequals(chemical_solver, "PhreeqcKernel"))
584 {
585 OGS_FATAL(
586 "The chemical solver option of PhreeqcKernel is not accessible for "
587 "the time being. Please set 'Phreeqc'' as the chemical solver for "
588 "reactive transport modeling.");
589 }
590 else if (boost::iequals(chemical_solver, "SelfContained"))
591 {
592 INFO(
593 "Use self-contained chemical solver for water chemistry "
594 "calculation.");
595
596 chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
598 _mesh_vec, _linear_solvers, *config, output_directory);
599 }
600 else
601 {
602 OGS_FATAL(
603 "Unknown chemical solver. Please specify either Phreeqc or "
604 "PhreeqcKernel as the solver for water chemistry calculation "
605 "instead.");
606 }
607#else
608 (void)output_directory;
609
610 OGS_FATAL(
611 "Found the type of the process to be solved is not component transport "
612 "process. Please specify the process type to ComponentTransport. At "
613 "the present, water chemistry calculation is only available for "
614 "component transport process.");
615#endif
616 return chemical_solver_interface;
617}
618
620 BaseLib::ConfigTree const& processes_config,
621 std::string const& project_directory,
622 std::string const& output_directory,
623 [[maybe_unused]] std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
624 chemical_solver_interface)
625{
626 (void)project_directory; // to avoid compilation warning
627 (void)output_directory; // to avoid compilation warning
628
629 DBUG("Reading processes:");
631 for (auto process_config : processes_config.getConfigSubtreeList("process"))
632 {
633 auto const type =
635 process_config.peekConfigParameter<std::string>("type");
636
637 auto const name =
639 process_config.getConfigParameter<std::string>("name");
640
641 [[maybe_unused]] auto const integration_order =
643 process_config.getConfigParameter<int>("integration_order");
644
645 std::unique_ptr<ProcessLib::Process> process;
646
647 auto jacobian_assembler = ProcessLib::createJacobianAssembler(
649 process_config.getConfigSubtreeOptional("jacobian_assembler"));
650
651#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
652 if (type == "STEADY_STATE_DIFFUSION")
653 {
654 // The existence check of the in the configuration referenced
655 // process variables is checked in the physical process.
656 // TODO at the moment we have only one mesh, later there can be
657 // several meshes. Then we have to assign the referenced mesh
658 // here.
659 process =
661 name, *_mesh_vec[0], std::move(jacobian_assembler),
662 _process_variables, _parameters, integration_order,
663 process_config, _mesh_vec, _media);
664 }
665 else
666#endif
667#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
668 if (type == "LIQUID_FLOW")
669 {
671 name, *_mesh_vec[0], std::move(jacobian_assembler),
672 _process_variables, _parameters, integration_order,
673 process_config, _mesh_vec, _media);
674 }
675 else
676#endif
677#ifdef OGS_BUILD_PROCESS_STOKESFLOW
678 if (type == "StokesFlow")
679 {
680 switch (_mesh_vec[0]->getDimension())
681 {
682 case 2:
683 process =
685 name, *_mesh_vec[0], std::move(jacobian_assembler),
686 _process_variables, _parameters, integration_order,
687 process_config, _media);
688 break;
689 default:
690 OGS_FATAL(
691 "StokesFlow process does not support given "
692 "dimension {:d}",
693 _mesh_vec[0]->getDimension());
694 }
695 }
696 else
697#endif
698#ifdef OGS_BUILD_PROCESS_TES
699 if (type == "TES")
700 {
702 name, *_mesh_vec[0], std::move(jacobian_assembler),
703 _process_variables, _parameters, integration_order,
704 process_config);
705 }
706 else
707#endif
708#ifdef OGS_BUILD_PROCESS_TH2M
709 if (type == "TH2M")
710 {
711 switch (_mesh_vec[0]->getDimension())
712 {
713 case 2:
715 name, *_mesh_vec[0], std::move(jacobian_assembler),
717 _local_coordinate_system, integration_order,
718 process_config, _media);
719 break;
720 case 3:
722 name, *_mesh_vec[0], std::move(jacobian_assembler),
724 _local_coordinate_system, integration_order,
725 process_config, _media);
726 break;
727 default:
728 OGS_FATAL("TH2M process does not support given dimension");
729 }
730 }
731 else
732#endif
733#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
734 if (type == "HEAT_CONDUCTION")
735 {
737 name, *_mesh_vec[0], std::move(jacobian_assembler),
738 _process_variables, _parameters, integration_order,
739 process_config, _media);
740 }
741 else
742#endif
743#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
744 if (type == "HEAT_TRANSPORT_BHE")
745 {
746 if (_mesh_vec[0]->getDimension() != 3)
747 {
748 OGS_FATAL(
749 "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
750 "mesh! ");
751 }
752
753 process =
755 name, *_mesh_vec[0], std::move(jacobian_assembler),
756 _process_variables, _parameters, integration_order,
757 process_config, _curves, _media);
758 }
759 else
760#endif
761#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
762 if (type == "HYDRO_MECHANICS")
763 {
765 switch (process_config.getConfigParameter<int>("dimension"))
766 {
767 case 2:
768 process =
770 2>(name, *_mesh_vec[0],
771 std::move(jacobian_assembler),
773 _local_coordinate_system, integration_order,
774 process_config, _media);
775 break;
776 case 3:
777 process =
779 3>(name, *_mesh_vec[0],
780 std::move(jacobian_assembler),
782 _local_coordinate_system, integration_order,
783 process_config, _media);
784 break;
785 default:
786 OGS_FATAL(
787 "HYDRO_MECHANICS process does not support given "
788 "dimension");
789 }
790 }
791 else
792#endif
793#ifdef OGS_BUILD_PROCESS_LIE
794 if (type == "HYDRO_MECHANICS_WITH_LIE")
795 {
797 switch (process_config.getConfigParameter<int>("dimension"))
798 {
799 case 2:
802 name, *_mesh_vec[0], std::move(jacobian_assembler),
804 _local_coordinate_system, integration_order,
805 process_config);
806 break;
807 case 3:
810 name, *_mesh_vec[0], std::move(jacobian_assembler),
812 _local_coordinate_system, integration_order,
813 process_config);
814 break;
815 default:
816 OGS_FATAL(
817 "HYDRO_MECHANICS_WITH_LIE process does not support "
818 "given dimension");
819 }
820 }
821 else
822#endif
823#ifdef OGS_BUILD_PROCESS_HT
824 if (type == "HT")
825 {
827 name, *_mesh_vec[0], std::move(jacobian_assembler),
828 _process_variables, _parameters, integration_order,
829 process_config, _mesh_vec, _media);
830 }
831 else
832#endif
833#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
834 if (type == "ComponentTransport")
835 {
836 process =
838 name, *_mesh_vec[0], std::move(jacobian_assembler),
839 _process_variables, _parameters, integration_order,
840 process_config, _mesh_vec, _media,
841 std::move(chemical_solver_interface));
842 }
843 else
844#endif
845#ifdef OGS_BUILD_PROCESS_PHASEFIELD
846 if (type == "PHASE_FIELD")
847 {
848 switch (_mesh_vec[0]->getDimension())
849 {
850 case 2:
851 process =
853 name, *_mesh_vec[0], std::move(jacobian_assembler),
855 _local_coordinate_system, integration_order,
856 process_config);
857 break;
858 case 3:
859 process =
861 name, *_mesh_vec[0], std::move(jacobian_assembler),
863 _local_coordinate_system, integration_order,
864 process_config);
865 break;
866 }
867 }
868 else
869#endif
870#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
871 if (type == "RichardsComponentTransport")
872 {
875 name, *_mesh_vec[0], std::move(jacobian_assembler),
876 _process_variables, _parameters, integration_order,
877 process_config, _media);
878 }
879 else
880#endif
881#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
882 if (type == "SMALL_DEFORMATION")
883 {
884 switch (_mesh_vec[0]->getDimension())
885 {
886 case 2:
889 name, *_mesh_vec[0], std::move(jacobian_assembler),
891 _local_coordinate_system, integration_order,
892 process_config);
893 break;
894 case 3:
897 name, *_mesh_vec[0], std::move(jacobian_assembler),
899 _local_coordinate_system, integration_order,
900 process_config);
901 break;
902 default:
903 OGS_FATAL(
904 "SMALL_DEFORMATION process does not support given "
905 "dimension");
906 }
907 }
908 else
909#endif
910#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
911 if (type == "SMALL_DEFORMATION_NONLOCAL")
912 {
913 switch (_mesh_vec[0]->getDimension())
914 {
915 case 2:
918 name, *_mesh_vec[0], std::move(jacobian_assembler),
920 _local_coordinate_system, integration_order,
921 process_config);
922 break;
923 case 3:
926 name, *_mesh_vec[0], std::move(jacobian_assembler),
928 _local_coordinate_system, integration_order,
929 process_config);
930 break;
931 default:
932 OGS_FATAL(
933 "SMALL_DEFORMATION_NONLOCAL process does not support "
934 "given dimension {:d}",
935 _mesh_vec[0]->getDimension());
936 }
937 }
938 else
939#endif
940#ifdef OGS_BUILD_PROCESS_LIE
941 if (type == "SMALL_DEFORMATION_WITH_LIE")
942 {
944 switch (process_config.getConfigParameter<int>("dimension"))
945 {
946 case 2:
949 name, *_mesh_vec[0], std::move(jacobian_assembler),
951 _local_coordinate_system, integration_order,
952 process_config);
953 break;
954 case 3:
957 name, *_mesh_vec[0], std::move(jacobian_assembler),
959 _local_coordinate_system, integration_order,
960 process_config);
961 break;
962 default:
963 OGS_FATAL(
964 "SMALL_DEFORMATION_WITH_LIE process does not support "
965 "given dimension");
966 }
967 }
968 else
969#endif
970#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
971 if (type == "THERMO_HYDRO_MECHANICS")
972 {
974 switch (process_config.getConfigParameter<int>("dimension"))
975 {
976 case 2:
979 name, *_mesh_vec[0], std::move(jacobian_assembler),
981 _local_coordinate_system, integration_order,
982 process_config, _media);
983 break;
984 case 3:
987 name, *_mesh_vec[0], std::move(jacobian_assembler),
989 _local_coordinate_system, integration_order,
990 process_config, _media);
991 break;
992 default:
993 OGS_FATAL(
994 "THERMO_HYDRO_MECHANICS process does not support given "
995 "dimension");
996 }
997 }
998 else
999#endif
1000#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
1001 if (type == "THERMO_MECHANICAL_PHASE_FIELD")
1002 {
1003 switch (_mesh_vec[0]->getDimension())
1004 {
1005 case 2:
1008 name, *_mesh_vec[0], std::move(jacobian_assembler),
1010 _local_coordinate_system, integration_order,
1011 process_config);
1012 break;
1013 case 3:
1016 name, *_mesh_vec[0], std::move(jacobian_assembler),
1018 _local_coordinate_system, integration_order,
1019 process_config);
1020 break;
1021 }
1022 }
1023 else
1024#endif
1025#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
1026 if (type == "THERMO_MECHANICS")
1027 {
1028 switch (_mesh_vec[0]->getDimension())
1029 {
1030 case 2:
1033 name, *_mesh_vec[0], std::move(jacobian_assembler),
1035 _local_coordinate_system, integration_order,
1036 process_config, _media);
1037 break;
1038 case 3:
1041 name, *_mesh_vec[0], std::move(jacobian_assembler),
1043 _local_coordinate_system, integration_order,
1044 process_config, _media);
1045 break;
1046 }
1047 }
1048 else
1049#endif
1050#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
1051 if (type == "RICHARDS_FLOW")
1052 {
1054 name, *_mesh_vec[0], std::move(jacobian_assembler),
1055 _process_variables, _parameters, integration_order,
1056 process_config, _curves, _media);
1057 }
1058 else
1059#endif
1060#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
1061 if (type == "RICHARDS_MECHANICS")
1062 {
1064 switch (process_config.getConfigParameter<int>("dimension"))
1065 {
1066 case 2:
1069 name, *_mesh_vec[0], std::move(jacobian_assembler),
1071 _local_coordinate_system, integration_order,
1072 process_config, _media);
1073 break;
1074 case 3:
1077 name, *_mesh_vec[0], std::move(jacobian_assembler),
1079 _local_coordinate_system, integration_order,
1080 process_config, _media);
1081 break;
1082 }
1083 }
1084 else
1085#endif
1086#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
1087 if (type == "THERMO_RICHARDS_FLOW")
1088 {
1089 process =
1091 name, *_mesh_vec[0], std::move(jacobian_assembler),
1092 _process_variables, _parameters, integration_order,
1093 process_config, _media);
1094 }
1095 else
1096#endif
1097#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
1098 if (type == "THERMO_RICHARDS_MECHANICS")
1099 {
1100 switch (_mesh_vec[0]->getDimension())
1101 {
1102 case 2:
1105 name, *_mesh_vec[0], std::move(jacobian_assembler),
1107 _local_coordinate_system, integration_order,
1108 process_config, _media);
1109 break;
1110 case 3:
1113 name, *_mesh_vec[0], std::move(jacobian_assembler),
1115 _local_coordinate_system, integration_order,
1116 process_config, _media);
1117 break;
1118 }
1119 }
1120 else
1121#endif
1122
1123#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
1124 if (type == "TWOPHASE_FLOW_PP")
1125 {
1126 process =
1128 name, *_mesh_vec[0], std::move(jacobian_assembler),
1129 _process_variables, _parameters, integration_order,
1130 process_config, _curves, _media);
1131 }
1132 else
1133#endif
1134#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
1135 if (type == "TWOPHASE_FLOW_PRHO")
1136 {
1139 name, *_mesh_vec[0], std::move(jacobian_assembler),
1140 _process_variables, _parameters, integration_order,
1141 process_config, _curves);
1142 }
1143 else
1144#endif
1145#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1146 if (type == "THERMAL_TWOPHASE_WITH_PP")
1147 {
1150 name, *_mesh_vec[0], std::move(jacobian_assembler),
1151 _process_variables, _parameters, integration_order,
1152 process_config, _curves, _media);
1153 }
1154 else
1155#endif
1156 {
1157 OGS_FATAL("Unknown process type: {:s}", type);
1158 }
1159
1161 _processes,
1162 [&name](std::unique_ptr<ProcessLib::Process> const& p)
1163 { return p->name == name; }))
1164 {
1165 OGS_FATAL("The process name '{:s}' is not unique.", name);
1166 }
1167 _processes.push_back(std::move(process));
1168 }
1169}
1170
1172 std::string const& output_directory)
1173{
1174 DBUG("Reading time loop configuration.");
1175
1176 bool const compensate_non_equilibrium_initial_residuum = std::any_of(
1177 std::begin(_process_variables),
1178 std::end(_process_variables),
1179 [](auto const& process_variable)
1180 { return process_variable.compensateNonEquilibriumInitialResiduum(); });
1181
1183 config, output_directory, _processes, _nonlinear_solvers, _mesh_vec,
1184 compensate_non_equilibrium_initial_residuum);
1185
1186 if (!_time_loop)
1187 {
1188 OGS_FATAL("Initialization of time loop failed.");
1189 }
1190}
1191
1193{
1194 DBUG("Reading linear solver configuration.");
1195
1197 for (auto conf : config.getConfigSubtreeList("linear_solver"))
1198 {
1200 auto const name = conf.getConfigParameter<std::string>("name");
1201 auto const linear_solver_parser =
1203 auto const solver_options =
1204 linear_solver_parser.parseNameAndOptions("", &conf);
1205
1208 name,
1209 std::make_unique<GlobalLinearSolver>(std::get<0>(solver_options),
1210 std::get<1>(solver_options)),
1211 "The linear solver name is not unique");
1212 }
1213}
1214
1216{
1217 DBUG("Reading non-linear solver configuration.");
1218
1220 for (auto conf : config.getConfigSubtreeList("nonlinear_solver"))
1221 {
1222 auto const ls_name =
1224 conf.getConfigParameter<std::string>("linear_solver");
1225 auto& linear_solver = BaseLib::getOrError(
1226 _linear_solvers, ls_name,
1227 "A linear solver with the given name does not exist.");
1228
1230 auto const name = conf.getConfigParameter<std::string>("name");
1233 name,
1234 NumLib::createNonlinearSolver(*linear_solver, conf).first,
1235 "The nonlinear solver name is not unique");
1236 }
1237}
1238
1239void ProjectData::parseCurves(std::optional<BaseLib::ConfigTree> const& config)
1240{
1241 if (!config)
1242 {
1243 return;
1244 }
1245
1246 DBUG("Reading curves configuration.");
1247
1249 for (auto conf : config->getConfigSubtreeList("curve"))
1250 {
1252 auto const name = conf.getConfigParameter<std::string>("name");
1254 _curves,
1255 name,
1258 "The curve name is not unique.");
1259 }
1260}
Definition of the BoostXmlGmlInterface class.
Functionality to build different search length algorithm objects from given config.
#define OGS_FATAL(...)
Definition: Error.h:26
Filename manipulation routines.
Definition of the GEOObjects class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:35
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:30
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:45
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:40
Definition of the Mesh class.
Base class for different search length strategies.
Definition of string helper functions.
std::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
Definition: ConfigTree.cpp:160
std::optional< T > getConfigParameterOptional(std::string const &param) const
T getConfigParameter(std::string const &param) const
Range< SubtreeIterator > getConfigSubtreeList(std::string const &root) const
Definition: ConfigTree.cpp:174
ConfigTree getConfigSubtree(std::string const &root) const
Definition: ConfigTree.cpp:151
std::optional< T > getConfigAttributeOptional(std::string const &attr) const
Container class for geometric objects.
Definition: GEOObjects.h:61
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
static PROCESSLIB_EXPORT const std::string constant_one_parameter_name
Definition: Process.h:48
std::map< std::string, std::unique_ptr< GlobalLinearSolver > > _linear_solvers
Definition: ProjectData.h:145
std::optional< ParameterLib::CoordinateSystem > _local_coordinate_system
Definition: ProjectData.h:138
std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > _nonlinear_solvers
Definition: ProjectData.h:148
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.
Definition: ProjectData.h:136
std::vector< std::unique_ptr< ProcessLib::Process > > _processes
Definition: ProjectData.h:132
void parseNonlinearSolvers(BaseLib::ConfigTree const &config)
std::vector< ProcessLib::ProcessVariable > _process_variables
Definition: ProjectData.h:133
void parseProcessVariables(BaseLib::ConfigTree const &process_variables_config)
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > _curves
Definition: ProjectData.h:151
void parseCurves(std::optional< BaseLib::ConfigTree > const &config)
std::vector< std::unique_ptr< MeshLib::Mesh > > _mesh_vec
Definition: ProjectData.h:131
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
Definition: ProjectData.h:140
std::vector< std::string > parseParameters(BaseLib::ConfigTree const &parameters_config)
std::unique_ptr< ProcessLib::TimeLoop > _time_loop
The time loop used to solve this project's processes.
Definition: ProjectData.h:143
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)
Definition: Algorithm.h:147
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
Definition: Algorithm.h:69
std::vector< int > splitMaterialIdString(std::string const &material_id_string)
void insertIfKeyUniqueElseError(Map &map, Key const &key, Value &&value, std::string const &error_message)
Definition: Algorithm.h:106
bool containsIf(Container const &container, Predicate &&predicate)
Definition: Algorithm.h:264
std::string copyPathToFileName(const std::string &file_name, const std::string &source)
Definition: FileTools.cpp:200
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 &parameters, 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)
std::unique_ptr< MeshGeoToolsLib::SearchLength > createSearchLengthAlgorithm(BaseLib::ConfigTree const &external_config, MeshLib::Mesh const &mesh)
std::vector< std::unique_ptr< MeshLib::Mesh > > constructAdditionalMeshesFromGeoObjects(GeoLib::GEOObjects const &geo_objects, MeshLib::Mesh const &mesh, std::unique_ptr< SearchLength > search_length_algorithm, bool const multiple_nodes_allowed)
MeshLib::Mesh * readMeshFromFile(const std::string &file_name)
constexpr ranges::views::view_closure names
For an element of a range view return its name.
Definition: Mesh.h:327
void setMeshSpaceDimension(std::vector< std::unique_ptr< Mesh > > const &meshes)
std::unique_ptr< ParameterBase > createParameter(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
Definition: Parameter.cpp:26
std::unique_ptr< Process > createComponentTransportProcess(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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createSmallDeformationProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createSmallDeformationProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
std::unique_ptr< Process > createLiquidFlowProcess(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 &parameters, 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< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createPhaseFieldProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
std::unique_ptr< Process > createRichardsComponentTransportProcess(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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > const &media)
template std::unique_ptr< Process > createRichardsMechanicsProcess< 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 &parameters, 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< 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 &parameters, 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 > createSmallDeformationNonlocalProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createSmallDeformationNonlocalProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createSmallDeformationProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createSmallDeformationProcess< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
std::unique_ptr< Process > createSteadyStateDiffusion(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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createTH2MProcess< 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 &parameters, 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< 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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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)
template std::unique_ptr< Process > createThermoHydroMechanicsProcess< 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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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< 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createThermoMechanicalPhaseFieldProcess< 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 &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, 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 > createTwoPhaseFlowWithPrhoProcess(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 &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
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::optional< ParameterLib::CoordinateSystem > parseLocalCoordinateSystem(std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
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