OGS
ProjectData.cpp
Go to the documentation of this file.
1
15#include "ProjectData.h"
16
17#include <pybind11/eval.h>
18
19#include <algorithm>
20#include <boost/algorithm/string/predicate.hpp>
21#include <cctype>
22#include <range/v3/action/sort.hpp>
23#include <range/v3/action/unique.hpp>
24#include <range/v3/algorithm/contains.hpp>
25#include <range/v3/range/conversion.hpp>
26#include <set>
27
28#include "BaseLib/Algorithm.h"
29#include "BaseLib/ConfigTree.h"
30#include "BaseLib/FileTools.h"
31#include "BaseLib/Logging.h"
32#include "BaseLib/StringTools.h"
33#include "GeoLib/GEOObjects.h"
36#include "GeoLib/Raster.h"
37#include "InfoLib/CMakeInfo.h"
40#if defined(USE_LIS)
42#elif defined(USE_PETSC)
44#else
46#endif
50#include "MeshLib/Mesh.h"
56
57// FileIO
62#include "ParameterLib/Utils.h"
64#include "ProcessLib/TimeLoop.h"
65
66#ifdef OGS_EMBED_PYTHON_INTERPRETER
68#endif
69
70#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
73#endif
74#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
76#endif
77#ifdef OGS_BUILD_PROCESS_HT
79#endif
80#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
82#endif
83#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
85#endif
86#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
88#endif
89#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
91#endif
92#ifdef OGS_BUILD_PROCESS_LIE
95#endif
96#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
98#endif
99#ifdef OGS_BUILD_PROCESS_STOKESFLOW
101#endif
102
103#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
105#endif
106
107#ifdef OGS_BUILD_PROCESS_PHASEFIELD
109#endif
110#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
112#endif
113#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
115#endif
116#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
118#endif
119#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
121#endif
122#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
124#endif
125#ifdef OGS_BUILD_PROCESS_TES
127#endif
128#ifdef OGS_BUILD_PROCESS_TH2M
130#endif
131#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
133#endif
134#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
136#endif
137#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
139#endif
140#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
142#endif
143#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
145#endif
146#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
148#endif
149#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
151#endif
152
153namespace
154{
155void readGeometry(std::string const& fname, GeoLib::GEOObjects& geo_objects)
156{
157 DBUG("Reading geometry file '{:s}'.", fname);
158 GeoLib::IO::BoostXmlGmlInterface gml_reader(geo_objects);
159 gml_reader.readFile(fname);
160}
161
162std::unique_ptr<MeshLib::Mesh> readSingleMesh(
163 BaseLib::ConfigTree const& mesh_config_parameter,
164 std::string const& directory)
165{
166 std::string const mesh_file = BaseLib::copyPathToFileName(
167 mesh_config_parameter.getValue<std::string>(), directory);
168 DBUG("Reading mesh file '{:s}'.", mesh_file);
169
170 auto mesh = std::unique_ptr<MeshLib::Mesh>(MeshLib::IO::readMeshFromFile(
171 mesh_file, true /* compute_element_neighbors */));
172 if (!mesh)
173 {
174 OGS_FATAL("Could not read mesh from '{:s}' file. No mesh added.",
175 mesh_file);
176 }
177
178#ifdef DOXYGEN_DOCU_ONLY
180 mesh_config_parameter.getConfigAttributeOptional<bool>("axially_symmetric");
181#endif // DOXYGEN_DOCU_ONLY
182
183 if (auto const axially_symmetric =
185 mesh_config_parameter.getConfigAttributeOptional<bool>(
186 "axially_symmetric"))
187 {
188 mesh->setAxiallySymmetric(*axially_symmetric);
189 }
190
191 return mesh;
192}
193
194std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes(
195 BaseLib::ConfigTree const& config, std::string const& directory)
196{
197 std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
198
199 GeoLib::GEOObjects geoObjects;
200
202 auto optional_meshes = config.getConfigSubtreeOptional("meshes");
203 if (optional_meshes)
204 {
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 =
214 config.getConfigParameterOptional<std::string>("geometry"))
215 {
216 std::string const geometry_file =
217 BaseLib::copyPathToFileName(*geometry_file_name, directory);
218 readGeometry(geometry_file, geoObjects);
219 }
220 }
221 else
222 { // Read single mesh with geometry.
223 meshes.push_back(
225 readSingleMesh(config.getConfigParameter("mesh"), directory));
226
227 std::string const geometry_file = BaseLib::copyPathToFileName(
229 config.getConfigParameter<std::string>("geometry"),
230 directory);
231 readGeometry(geometry_file, geoObjects);
232 }
233
234 { // generate meshes from geometries
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);
242
243 std::move(begin(additional_meshes), end(additional_meshes),
244 std::back_inserter(meshes));
245 }
246
247 auto mesh_names = MeshLib::views::names | ranges::to<std::vector>() |
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())
252 {
253 WARN(
254 "Mesh names aren't unique. From project file read mesh names are:");
255 for (auto const& name : meshes | MeshLib::views::names)
256 {
257 INFO("- {}", name);
258 }
259 }
260
261 auto const zero_mesh_field_data_by_material_ids =
263 config.getConfigParameterOptional<std::vector<int>>(
264 "zero_mesh_field_data_by_material_ids");
265 if (zero_mesh_field_data_by_material_ids)
266 {
267 WARN(
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 "
271 "care!");
273 *meshes[0], *zero_mesh_field_data_by_material_ids);
274 }
275
277
278 return meshes;
279}
280
281std::vector<GeoLib::NamedRaster> readRasters(
282 BaseLib::ConfigTree const& config, std::string const& raster_directory,
283 GeoLib::MinMaxPoints const& min_max_points)
284{
285 INFO("readRasters ...");
286 std::vector<GeoLib::NamedRaster> named_rasters;
287
289 auto optional_rasters = config.getConfigSubtreeOptional("rasters");
290 if (optional_rasters)
291 {
293 auto const configs = optional_rasters->getConfigSubtreeList("raster");
294 std::transform(
295 configs.begin(), configs.end(), std::back_inserter(named_rasters),
296 [&raster_directory, &min_max_points](auto const& raster_config)
297 {
298 return GeoLib::IO::readRaster(raster_config, raster_directory,
299 min_max_points);
300 });
301 }
302 INFO("readRasters done");
303 return named_rasters;
304}
305
306// for debugging raster reading implementation
307// void writeRasters(std::vector<GeoLib::NamedRaster> const& named_rasters,
308// std::string const& output_directory)
309//{
310// for (auto const& named_raster : named_rasters)
311// {
312// #if defined(USE_PETSC)
313// int my_mpi_rank;
314// MPI_Comm_rank(MPI_COMM_WORLD, &my_mpi_rank);
315// #endif
316// FileIO::AsciiRasterInterface::writeRasterAsASC(
317// named_raster.raster, output_directory + "/" +
318// named_raster.raster_name +
319// #if defined(USE_PETSC)
320// "_" + std::to_string(my_mpi_rank) +
321// #endif
322// ".asc");
323// }
324//}
325
326} // namespace
327
328ProjectData::ProjectData() = default;
329
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,
337 GeoLib::AABB(_mesh_vec[0]->getNodes().begin(),
338 _mesh_vec[0]->getNodes().end())
339 .getMinMaxPoints()))
340{
341 // for debugging raster reading implementation
342 // writeRasters(_named_rasters, output_directory);
343 if (auto const python_script =
345 project_config.getConfigParameterOptional<std::string>("python_script"))
346 {
347 namespace py = pybind11;
348
349#ifdef OGS_EMBED_PYTHON_INTERPRETER
350 _py_scoped_interpreter.emplace(ApplicationsLib::setupEmbeddedPython());
351#endif
352
353 // Append to python's module search path
354 auto py_path = py::module::import("sys").attr("path");
355 py_path.attr("append")(script_directory); // .prj or -s directory
356 // virtualenv
357 py_path.attr("append")(
358 CMakeInfoLib::CMakeInfo::python_virtualenv_sitepackages);
359
360 auto const script_path =
361 BaseLib::copyPathToFileName(*python_script, script_directory);
362
363 // Evaluate in scope of main module
364 py::object scope = py::module::import("__main__").attr("__dict__");
365 // add (global) variables
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);
371 }
372
374 parseCurves(project_config.getConfigSubtreeOptional("curves"));
375
376 auto parameter_names_for_transformation =
378 parseParameters(project_config.getConfigSubtree("parameters"));
379
382 project_config.getConfigSubtreeOptional("local_coordinate_system"),
384
385 for (auto& parameter : _parameters)
386 {
387 if (std::find(begin(parameter_names_for_transformation),
388 end(parameter_names_for_transformation),
389 parameter->name) !=
390 end(parameter_names_for_transformation))
391 {
393 {
394 OGS_FATAL(
395 "The parameter '{:s}' is using the local coordinate system "
396 "but no local coordinate system was provided.",
397 parameter->name);
398 }
399 parameter->setCoordinateSystem(*_local_coordinate_system);
400 }
401
402 parameter->initialize(_parameters);
403 }
404
406 parseProcessVariables(project_config.getConfigSubtree("process_variables"));
407
409 parseMedia(project_config.getConfigSubtreeOptional("media"));
410
412 parseLinearSolvers(project_config.getConfigSubtree("linear_solvers"));
413
414 auto chemical_solver_interface = parseChemicalSolverInterface(
416 project_config.getConfigSubtreeOptional("chemical_system"),
417 output_directory);
418
420 parseProcesses(project_config.getConfigSubtree("processes"),
421 project_directory, output_directory,
422 std::move(chemical_solver_interface));
423
425 parseNonlinearSolvers(project_config.getConfigSubtree("nonlinear_solvers"));
426
428 parseTimeLoop(project_config.getConfigSubtree("time_loop"),
429 output_directory);
430}
431
433 BaseLib::ConfigTree const& process_variables_config)
434{
435 DBUG("Parse process variables:");
436
437 std::set<std::string> names;
438
439 for (auto var_config
441 : process_variables_config.getConfigSubtreeList("process_variable"))
442 {
443 // Either the mesh name is given, or the first mesh's name will be
444 // taken. Taking the first mesh's value is deprecated.
445 auto const mesh_name =
447 var_config.getConfigParameter<std::string>("mesh",
448 _mesh_vec[0]->getName());
449
450 auto& mesh = MeshLib::findMeshByName(_mesh_vec, mesh_name);
451
452 auto pv = ProcessLib::ProcessVariable{var_config, mesh, _mesh_vec,
454 if (!names.insert(pv.getName()).second)
455 {
456 OGS_FATAL("A process variable with name `{:s}' already exists.",
457 pv.getName());
458 }
459
460 _process_variables.push_back(std::move(pv));
461 }
462}
463
464std::vector<std::string> ProjectData::parseParameters(
465 BaseLib::ConfigTree const& parameters_config)
466{
467 using namespace ProcessLib;
468
469 std::set<std::string> names;
470 std::vector<std::string> parameter_names_for_transformation;
471
472 DBUG("Reading parameters:");
473 for (auto parameter_config :
475 parameters_config.getConfigSubtreeList("parameter"))
476 {
477 auto p = ParameterLib::createParameter(parameter_config, _mesh_vec,
479 if (!names.insert(p->name).second)
480 {
481 OGS_FATAL("A parameter with name `{:s}' already exists.", p->name);
482 }
483
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)
489 {
490 parameter_names_for_transformation.push_back(p->name);
491 }
492
493 _parameters.push_back(std::move(p));
494 }
495
496 _parameters.push_back(
499 _parameters.push_back(
502
503 return parameter_names_for_transformation;
504}
505
507 std::optional<BaseLib::ConfigTree> const& media_config)
508{
509 if (!media_config)
510 {
511 return;
512 }
513
514 DBUG("Reading media:");
515
516 if (_mesh_vec.empty() || _mesh_vec[0] == nullptr)
517 {
518 ERR("A mesh is required to define medium materials.");
519 return;
520 }
521
522 for (auto const& medium_config :
524 media_config->getConfigSubtreeList("medium"))
525 {
526 auto material_id_string =
528 medium_config.getConfigAttribute<std::string>("id", "0");
529
530 auto const material_ids_of_this_medium =
531 BaseLib::splitMaterialIdString(material_id_string);
532
533 for (auto const& id : material_ids_of_this_medium)
534 {
535 if (_media.find(id) != end(_media))
536 {
537 OGS_FATAL(
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.",
541 id);
542 }
543
544 if (id == material_ids_of_this_medium[0])
545 {
547 id, _mesh_vec[0]->getDimension(), medium_config,
550 : nullptr,
551 _curves);
552 }
553 else
554 {
555 // This medium has multiple material IDs assigned and this is
556 // not the first material ID. Therefore we can reuse the medium
557 // we created before.
558 _media[id] = _media[material_ids_of_this_medium[0]];
559 }
560 }
561 }
562
563 if (_media.empty())
564 {
565 OGS_FATAL("No entity is found inside <media>.");
566 }
567}
568
569std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
571 std::optional<BaseLib::ConfigTree> const& config,
572 std::string const& output_directory)
573{
574 if (!config)
575 {
576 return nullptr;
577 }
578
579 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
580 chemical_solver_interface;
581#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
582 INFO(
583 "Ready for initializing interface to a chemical solver for water "
584 "chemistry calculation.");
585
586 auto const chemical_solver =
588 config->getConfigAttribute<std::string>("chemical_solver");
589
590 if (boost::iequals(chemical_solver, "Phreeqc"))
591 {
592 INFO(
593 "Configuring phreeqc interface for water chemistry calculation "
594 "using file-based approach.");
595
596 chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
598 *config, output_directory);
599 }
600 else if (boost::iequals(chemical_solver, "PhreeqcKernel"))
601 {
602 OGS_FATAL(
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.");
606 }
607 else if (boost::iequals(chemical_solver, "SelfContained"))
608 {
609 INFO(
610 "Use self-contained chemical solver for water chemistry "
611 "calculation.");
612
613 chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
615 _mesh_vec, _linear_solvers, *config, output_directory);
616 }
617 else
618 {
619 OGS_FATAL(
620 "Unknown chemical solver. Please specify either Phreeqc or "
621 "PhreeqcKernel as the solver for water chemistry calculation "
622 "instead.");
623 }
624#else
625 (void)output_directory;
626
627 OGS_FATAL(
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.");
632#endif
633 return chemical_solver_interface;
634}
635
637 BaseLib::ConfigTree const& processes_config,
638 std::string const& project_directory,
639 std::string const& output_directory,
640 [[maybe_unused]] std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
641 chemical_solver_interface)
642{
643 (void)project_directory; // to avoid compilation warning
644 (void)output_directory; // to avoid compilation warning
645
646 DBUG("Reading processes:");
648 for (auto process_config : processes_config.getConfigSubtreeList("process"))
649 {
650 auto const type =
652 process_config.peekConfigParameter<std::string>("type");
653
654 auto const name =
656 process_config.getConfigParameter<std::string>("name");
657
658 [[maybe_unused]] auto const integration_order =
660 process_config.getConfigParameter<int>("integration_order");
661
662 std::unique_ptr<ProcessLib::Process> process;
663
664 auto jacobian_assembler = ProcessLib::createJacobianAssembler(
666 process_config.getConfigSubtreeOptional("jacobian_assembler"));
667
668#ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
669 if (type == "STEADY_STATE_DIFFUSION")
670 {
671 // The existence check of the in the configuration referenced
672 // process variables is checked in the physical process.
673 // TODO at the moment we have only one mesh, later there can be
674 // several meshes. Then we have to assign the referenced mesh
675 // here.
676 process =
678 name, *_mesh_vec[0], std::move(jacobian_assembler),
679 _process_variables, _parameters, integration_order,
680 process_config, _mesh_vec, _media);
681 }
682 else
683#endif
684#ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
685 if (type == "LIQUID_FLOW")
686 {
688 name, *_mesh_vec[0], std::move(jacobian_assembler),
689 _process_variables, _parameters, integration_order,
690 process_config, _mesh_vec, _media);
691 }
692 else
693#endif
694#ifdef OGS_BUILD_PROCESS_STOKESFLOW
695 if (type == "StokesFlow")
696 {
697 switch (_mesh_vec[0]->getDimension())
698 {
699 case 2:
700 process =
702 name, *_mesh_vec[0], std::move(jacobian_assembler),
703 _process_variables, _parameters, integration_order,
704 process_config, _media);
705 break;
706 default:
707 OGS_FATAL(
708 "StokesFlow process does not support given "
709 "dimension {:d}",
710 _mesh_vec[0]->getDimension());
711 }
712 }
713 else
714#endif
715#ifdef OGS_BUILD_PROCESS_TES
716 if (type == "TES")
717 {
719 name, *_mesh_vec[0], std::move(jacobian_assembler),
720 _process_variables, _parameters, integration_order,
721 process_config);
722 }
723 else
724#endif
725#ifdef OGS_BUILD_PROCESS_TH2M
726 if (type == "TH2M")
727 {
728 switch (_mesh_vec[0]->getDimension())
729 {
730 case 2:
732 name, *_mesh_vec[0], std::move(jacobian_assembler),
734 _local_coordinate_system, integration_order,
735 process_config, _media);
736 break;
737 case 3:
739 name, *_mesh_vec[0], std::move(jacobian_assembler),
741 _local_coordinate_system, integration_order,
742 process_config, _media);
743 break;
744 default:
745 OGS_FATAL("TH2M process does not support given dimension");
746 }
747 }
748 else
749#endif
750#ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
751 if (type == "HEAT_CONDUCTION")
752 {
754 name, *_mesh_vec[0], std::move(jacobian_assembler),
755 _process_variables, _parameters, integration_order,
756 process_config, _media);
757 }
758 else
759#endif
760#ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
761 if (type == "HEAT_TRANSPORT_BHE")
762 {
763 if (_mesh_vec[0]->getDimension() != 3)
764 {
765 OGS_FATAL(
766 "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
767 "mesh! ");
768 }
769
770 process =
772 name, *_mesh_vec[0], std::move(jacobian_assembler),
773 _process_variables, _parameters, integration_order,
774 process_config, _curves, _media);
775 }
776 else
777#endif
778#ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
779 if (type == "HYDRO_MECHANICS")
780 {
781 if (
782 process_config.getConfigParameterOptional<int>("dimension"))
783 {
784 OGS_FATAL(
785 "The 'dimension' tag has been removed in the merge-request "
786 "!4766."
787 "The dimension is now taken from the main mesh and the tag "
788 "must be"
789 "removed. There is a python script in the merge-request "
790 "description"
791 "for automatic conversion.");
792 }
793 switch (_mesh_vec[0]->getDimension())
794 {
795 case 2:
796 process =
798 2>(name, *_mesh_vec[0],
799 std::move(jacobian_assembler),
801 _local_coordinate_system, integration_order,
802 process_config, _media);
803 break;
804 case 3:
805 process =
807 3>(name, *_mesh_vec[0],
808 std::move(jacobian_assembler),
810 _local_coordinate_system, integration_order,
811 process_config, _media);
812 break;
813 default:
814 OGS_FATAL(
815 "HYDRO_MECHANICS process does not support given "
816 "dimension");
817 }
818 }
819 else
820#endif
821#ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION
822 if (type == "LARGE_DEFORMATION")
823 {
824 switch (_mesh_vec[0]->getDimension())
825 {
826 case 2:
829 name, *_mesh_vec[0], std::move(jacobian_assembler),
831 _local_coordinate_system, integration_order,
832 process_config, _media);
833 break;
834 case 3:
837 name, *_mesh_vec[0], std::move(jacobian_assembler),
839 _local_coordinate_system, integration_order,
840 process_config, _media);
841 break;
842 default:
843 OGS_FATAL(
844 "LARGE_DEFORMATION process does not support given "
845 "dimension");
846 }
847 }
848 else
849#endif
850#ifdef OGS_BUILD_PROCESS_LIE
851 if (type == "HYDRO_MECHANICS_WITH_LIE")
852 {
853 if (
854 process_config.getConfigParameterOptional<int>("dimension"))
855 {
856 OGS_FATAL(
857 "The 'dimension' tag has been removed in the merge-request "
858 "!4766."
859 "The dimension is now taken from the main mesh and the tag "
860 "must be"
861 "removed. There is a python script in the merge-request "
862 "description"
863 "for automatic conversion.");
864 }
865 switch (_mesh_vec[0]->getDimension())
866 {
867 case 2:
870 name, *_mesh_vec[0], std::move(jacobian_assembler),
872 _local_coordinate_system, integration_order,
873 process_config);
874 break;
875 case 3:
878 name, *_mesh_vec[0], std::move(jacobian_assembler),
880 _local_coordinate_system, integration_order,
881 process_config);
882 break;
883 default:
884 OGS_FATAL(
885 "HYDRO_MECHANICS_WITH_LIE process does not support "
886 "given dimension");
887 }
888 }
889 else
890#endif
891#ifdef OGS_BUILD_PROCESS_HT
892 if (type == "HT")
893 {
895 name, *_mesh_vec[0], std::move(jacobian_assembler),
896 _process_variables, _parameters, integration_order,
897 process_config, _mesh_vec, _media);
898 }
899 else
900#endif
901#ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
902 if (type == "ComponentTransport")
903 {
904 process =
906 name, *_mesh_vec[0], std::move(jacobian_assembler),
907 _process_variables, _parameters, integration_order,
908 process_config, _mesh_vec, _media,
909 std::move(chemical_solver_interface));
910 }
911 else
912#endif
913#ifdef OGS_BUILD_PROCESS_PHASEFIELD
914 if (type == "PHASE_FIELD")
915 {
916 switch (_mesh_vec[0]->getDimension())
917 {
918 case 2:
919 process =
921 name, *_mesh_vec[0], std::move(jacobian_assembler),
923 _local_coordinate_system, integration_order,
924 process_config);
925 break;
926 case 3:
927 process =
929 name, *_mesh_vec[0], std::move(jacobian_assembler),
931 _local_coordinate_system, integration_order,
932 process_config);
933 break;
934 }
935 }
936 else
937#endif
938#ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
939 if (type == "RichardsComponentTransport")
940 {
943 name, *_mesh_vec[0], std::move(jacobian_assembler),
944 _process_variables, _parameters, integration_order,
945 process_config, _media);
946 }
947 else
948#endif
949#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
950 if (type == "SMALL_DEFORMATION")
951 {
952 switch (_mesh_vec[0]->getDimension())
953 {
954 case 2:
957 name, *_mesh_vec[0], std::move(jacobian_assembler),
959 _local_coordinate_system, integration_order,
960 process_config, _media);
961 break;
962 case 3:
965 name, *_mesh_vec[0], std::move(jacobian_assembler),
967 _local_coordinate_system, integration_order,
968 process_config, _media);
969 break;
970 default:
971 OGS_FATAL(
972 "SMALL_DEFORMATION process does not support given "
973 "dimension");
974 }
975 }
976 else
977#endif
978#ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
979 if (type == "SMALL_DEFORMATION_NONLOCAL")
980 {
981 switch (_mesh_vec[0]->getDimension())
982 {
983 case 2:
986 name, *_mesh_vec[0], std::move(jacobian_assembler),
988 _local_coordinate_system, integration_order,
989 process_config);
990 break;
991 case 3:
994 name, *_mesh_vec[0], std::move(jacobian_assembler),
996 _local_coordinate_system, integration_order,
997 process_config);
998 break;
999 default:
1000 OGS_FATAL(
1001 "SMALL_DEFORMATION_NONLOCAL process does not support "
1002 "given dimension {:d}",
1003 _mesh_vec[0]->getDimension());
1004 }
1005 }
1006 else
1007#endif
1008#ifdef OGS_BUILD_PROCESS_LIE
1009 if (type == "SMALL_DEFORMATION_WITH_LIE")
1010 {
1011 if (
1012 process_config.getConfigParameterOptional<int>("dimension"))
1013 {
1014 OGS_FATAL(
1015 "The 'dimension' tag has been removed in the merge-request "
1016 "!4766."
1017 "The dimension is now taken from the main mesh and the tag "
1018 "must be"
1019 "removed. There is a python script in the merge-request "
1020 "description"
1021 "for automatic conversion.");
1022 }
1023 switch (_mesh_vec[0]->getDimension())
1024 {
1025 case 2:
1028 name, *_mesh_vec[0], std::move(jacobian_assembler),
1030 _local_coordinate_system, integration_order,
1031 process_config);
1032 break;
1033 case 3:
1036 name, *_mesh_vec[0], std::move(jacobian_assembler),
1038 _local_coordinate_system, integration_order,
1039 process_config);
1040 break;
1041 default:
1042 OGS_FATAL(
1043 "SMALL_DEFORMATION_WITH_LIE process does not support "
1044 "given dimension");
1045 }
1046 }
1047 else
1048#endif
1049#ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
1050 if (type == "THERMO_HYDRO_MECHANICS")
1051 {
1052 if (
1053 process_config.getConfigParameterOptional<int>("dimension"))
1054 {
1055 OGS_FATAL(
1056 "The 'dimension' tag has been removed in the merge-request "
1057 "!4766."
1058 "The dimension is now taken from the main mesh and the tag "
1059 "must be"
1060 "removed. There is a python script in the merge-request "
1061 "description"
1062 "for automatic conversion.");
1063 }
1064 switch (_mesh_vec[0]->getDimension())
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 default:
1083 OGS_FATAL(
1084 "THERMO_HYDRO_MECHANICS process does not support given "
1085 "dimension");
1086 }
1087 }
1088 else
1089#endif
1090#ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
1091 if (type == "THERMO_MECHANICAL_PHASE_FIELD")
1092 {
1093 switch (_mesh_vec[0]->getDimension())
1094 {
1095 case 2:
1098 name, *_mesh_vec[0], std::move(jacobian_assembler),
1100 _local_coordinate_system, integration_order,
1101 process_config);
1102 break;
1103 case 3:
1106 name, *_mesh_vec[0], std::move(jacobian_assembler),
1108 _local_coordinate_system, integration_order,
1109 process_config);
1110 break;
1111 }
1112 }
1113 else
1114#endif
1115#ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
1116 if (type == "THERMO_MECHANICS")
1117 {
1118 switch (_mesh_vec[0]->getDimension())
1119 {
1120 case 2:
1123 name, *_mesh_vec[0], std::move(jacobian_assembler),
1125 _local_coordinate_system, integration_order,
1126 process_config, _media);
1127 break;
1128 case 3:
1131 name, *_mesh_vec[0], std::move(jacobian_assembler),
1133 _local_coordinate_system, integration_order,
1134 process_config, _media);
1135 break;
1136 }
1137 }
1138 else
1139#endif
1140#ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
1141 if (type == "RICHARDS_FLOW")
1142 {
1144 name, *_mesh_vec[0], std::move(jacobian_assembler),
1145 _process_variables, _parameters, integration_order,
1146 process_config, _media);
1147 }
1148 else
1149#endif
1150#ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
1151 if (type == "RICHARDS_MECHANICS")
1152 {
1153 if (
1154 process_config.getConfigParameterOptional<int>("dimension"))
1155 {
1156 OGS_FATAL(
1157 "The 'dimension' tag has been removed in the merge-request "
1158 "!4766."
1159 "The dimension is now taken from the main mesh and the tag "
1160 "must be"
1161 "removed. There is a python script in the merge-request "
1162 "description"
1163 "for automatic conversion.");
1164 }
1165 switch (_mesh_vec[0]->getDimension())
1166 {
1167 case 2:
1170 name, *_mesh_vec[0], std::move(jacobian_assembler),
1172 _local_coordinate_system, integration_order,
1173 process_config, _media);
1174 break;
1175 case 3:
1178 name, *_mesh_vec[0], std::move(jacobian_assembler),
1180 _local_coordinate_system, integration_order,
1181 process_config, _media);
1182 break;
1183 }
1184 }
1185 else
1186#endif
1187#ifdef OGS_BUILD_PROCESS_THERMORICHARDSFLOW
1188 if (type == "THERMO_RICHARDS_FLOW")
1189 {
1190 process =
1192 name, *_mesh_vec[0], std::move(jacobian_assembler),
1193 _process_variables, _parameters, integration_order,
1194 process_config, _media);
1195 }
1196 else
1197#endif
1198#ifdef OGS_BUILD_PROCESS_THERMORICHARDSMECHANICS
1199 if (type == "THERMO_RICHARDS_MECHANICS")
1200 {
1201 switch (_mesh_vec[0]->getDimension())
1202 {
1203 case 2:
1206 name, *_mesh_vec[0], std::move(jacobian_assembler),
1208 _local_coordinate_system, integration_order,
1209 process_config, _media);
1210 break;
1211 case 3:
1214 name, *_mesh_vec[0], std::move(jacobian_assembler),
1216 _local_coordinate_system, integration_order,
1217 process_config, _media);
1218 break;
1219 }
1220 }
1221 else
1222#endif
1223
1224#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
1225 if (type == "TWOPHASE_FLOW_PP")
1226 {
1227 process =
1229 name, *_mesh_vec[0], std::move(jacobian_assembler),
1230 _process_variables, _parameters, integration_order,
1231 process_config, _media);
1232 }
1233 else
1234#endif
1235#ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
1236 if (type == "TWOPHASE_FLOW_PRHO")
1237 {
1240 name, *_mesh_vec[0], std::move(jacobian_assembler),
1241 _process_variables, _parameters, integration_order,
1242 process_config, _media);
1243 }
1244 else
1245#endif
1246#ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1247 if (type == "THERMAL_TWOPHASE_WITH_PP")
1248 {
1251 name, *_mesh_vec[0], std::move(jacobian_assembler),
1252 _process_variables, _parameters, integration_order,
1253 process_config, _media);
1254 }
1255 else
1256#endif
1257 {
1258 OGS_FATAL("Unknown process type: {:s}", type);
1259 }
1260
1261 if (ranges::contains(_processes, name,
1262 [](std::unique_ptr<ProcessLib::Process> const& p)
1263 { return p->name; }))
1264 {
1265 OGS_FATAL("The process name '{:s}' is not unique.", name);
1266 }
1267 _processes.push_back(std::move(process));
1268 }
1269}
1270
1272 std::string const& output_directory)
1273{
1274 DBUG("Reading time loop configuration.");
1275
1276 bool const compensate_non_equilibrium_initial_residuum = std::any_of(
1277 std::begin(_process_variables),
1278 std::end(_process_variables),
1279 [](auto const& process_variable)
1280 { return process_variable.compensateNonEquilibriumInitialResiduum(); });
1281
1283 config, output_directory, _processes, _nonlinear_solvers, _mesh_vec,
1284 compensate_non_equilibrium_initial_residuum);
1285
1286 if (!_time_loop)
1287 {
1288 OGS_FATAL("Initialization of time loop failed.");
1289 }
1290}
1291
1293{
1294 DBUG("Reading linear solver configuration.");
1295
1297 for (auto conf : config.getConfigSubtreeList("linear_solver"))
1298 {
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);
1305
1308 name,
1309 std::make_unique<GlobalLinearSolver>(std::get<0>(solver_options),
1310 std::get<1>(solver_options)),
1311 "The linear solver name is not unique");
1312 }
1313}
1314
1316{
1317 DBUG("Reading non-linear solver configuration.");
1318
1320 for (auto conf : config.getConfigSubtreeList("nonlinear_solver"))
1321 {
1322 auto const ls_name =
1324 conf.getConfigParameter<std::string>("linear_solver");
1325 auto const& linear_solver = BaseLib::getOrError(
1326 _linear_solvers, ls_name,
1327 "A linear solver with the given name does not exist.");
1328
1330 auto const name = conf.getConfigParameter<std::string>("name");
1333 name,
1334 NumLib::createNonlinearSolver(*linear_solver, conf).first,
1335 "The nonlinear solver name is not unique");
1336 }
1337}
1338
1339void ProjectData::parseCurves(std::optional<BaseLib::ConfigTree> const& config)
1340{
1341 if (!config)
1342 {
1343 return;
1344 }
1345
1346 DBUG("Reading curves configuration.");
1347
1349 for (auto conf : config->getConfigSubtreeList("curve"))
1350 {
1352 auto const name = conf.getConfigParameter<std::string>("name");
1354 _curves,
1355 name,
1358 "The curve name is not unique.");
1359 }
1360}
1361
1362MeshLib::Mesh& ProjectData::getMesh(std::string const& mesh_name) const
1363{
1364 return MeshLib::findMeshByName(_mesh_vec, mesh_name);
1365}
Definition of the AsciiRasterInterface class.
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.
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)
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.
Definition of the GeoLib::Raster class.
Base class for different search length strategies.
Definition of string helper functions.
std::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
std::optional< T > getConfigParameterOptional(std::string const &param) const
T getConfigParameter(std::string const &param) 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.
Definition GEOObjects.h:57
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:46
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 &parameters_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)
Definition Algorithm.h:113
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:99
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 &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, bool const compute_element_neighbors)
constexpr ranges::views::view_closure names
For an element of a range view return its name.
Definition Mesh.h:229
Mesh & findMeshByName(std::vector< std::unique_ptr< Mesh > > const &meshes, std::string_view const name)
Definition Mesh.cpp:363
void setMeshSpaceDimension(std::vector< std::unique_ptr< Mesh > > const &meshes)
void zeroMeshFieldDataByMaterialIDs(MeshLib::Mesh &mesh, std::vector< int > const &selected_material_ids)
std::optional< ParameterLib::CoordinateSystem > createCoordinateSystem(std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
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)
Definition Parameter.cpp:27
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 &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 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 &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 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 &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 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 &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 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 &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 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 &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 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 &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 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 &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 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 &parameters, std::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
template std::unique_ptr< Process > createLargeDeformationProcess< 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 > createLargeDeformationProcess< 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 > 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 &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< 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 &parameters, 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 &parameters, 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 &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 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 &parameters, 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 &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< 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 &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 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 &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 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 &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 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 &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 > createSmallDeformationProcess< 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 &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 > 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 &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 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 &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 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 &parameters, 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 &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< 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 &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 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 &parameters, 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 &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 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 &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< 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 &parameters, 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 &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 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 &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 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 &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 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 &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 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 &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 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 &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 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 &parameters, 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 &parameters, 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