OGS  v6.3.3
ProjectData.cpp
Go to the documentation of this file.
1 
14 #include "ProjectData.h"
15 
16 #include <algorithm>
17 #include <cctype>
18 #include <set>
19 
20 #ifdef OGS_USE_PYTHON
21 #include <pybind11/eval.h>
22 #endif
23 
24 #include "BaseLib/Algorithm.h"
25 #include "BaseLib/ConfigTree.h"
26 #include "BaseLib/FileTools.h"
27 #include "BaseLib/Logging.h"
28 #include "BaseLib/StringTools.h"
29 #include "GeoLib/GEOObjects.h"
30 #include "InfoLib/CMakeInfo.h"
36 #include "MeshLib/Mesh.h"
40 
41 // FileIO
44 
46 #include "ParameterLib/Utils.h"
48 #include "ProcessLib/TimeLoop.h"
49 
50 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
53 #endif
54 #ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
56 #endif
57 #ifdef OGS_BUILD_PROCESS_HT
59 #endif
60 #ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
62 #endif
63 #ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
65 #endif
66 #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
68 #endif
69 #ifdef OGS_BUILD_PROCESS_LIE
72 #endif
73 #ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
75 #endif
76 #ifdef OGS_BUILD_PROCESS_PHASEFIELD
78 #endif
79 #ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
81 #endif
82 #ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
84 #endif
85 #ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
87 #endif
88 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
90 #endif
91 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
93 #endif
94 #ifdef OGS_BUILD_PROCESS_TES
96 #endif
97 #ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
99 #endif
100 #ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
102 #endif
103 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
105 #endif
106 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
108 #endif
109 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
111 #endif
112 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
114 #endif
115 
116 namespace
117 {
118 void readGeometry(std::string const& fname, GeoLib::GEOObjects& geo_objects)
119 {
120  DBUG("Reading geometry file '{:s}'.", fname);
121  GeoLib::IO::BoostXmlGmlInterface gml_reader(geo_objects);
122  gml_reader.readFile(fname);
123 }
124 
125 std::unique_ptr<MeshLib::Mesh> readSingleMesh(
126  BaseLib::ConfigTree const& mesh_config_parameter,
127  std::string const& project_directory)
128 {
129  std::string const mesh_file = BaseLib::copyPathToFileName(
130  mesh_config_parameter.getValue<std::string>(), project_directory);
131  DBUG("Reading mesh file '{:s}'.", mesh_file);
132 
133  auto mesh = std::unique_ptr<MeshLib::Mesh>(
134  MeshLib::IO::readMeshFromFile(mesh_file));
135  if (!mesh)
136  {
137  OGS_FATAL("Could not read mesh from '{:s}' file. No mesh added.",
138  mesh_file);
139  }
140 
141 #ifdef DOXYGEN_DOCU_ONLY
143  mesh_config_parameter.getConfigAttributeOptional<bool>("axially_symmetric");
144 #endif // DOXYGEN_DOCU_ONLY
145 
146  if (auto const axially_symmetric =
148  mesh_config_parameter.getConfigAttributeOptional<bool>(
149  "axially_symmetric"))
150  {
151  mesh->setAxiallySymmetric(*axially_symmetric);
152  }
153 
154  return mesh;
155 }
156 
157 std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes(
158  BaseLib::ConfigTree const& config, std::string const& project_directory)
159 {
160  std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
161 
163  auto optional_meshes = config.getConfigSubtreeOptional("meshes");
164  if (optional_meshes)
165  {
166  DBUG("Reading multiple meshes.");
168  auto const configs = optional_meshes->getConfigParameterList("mesh");
169  std::transform(
170  configs.begin(), configs.end(), std::back_inserter(meshes),
171  [&project_directory](auto const& mesh_config) {
172  return readSingleMesh(mesh_config, project_directory);
173  });
174  }
175  else
176  { // Read single mesh with geometry.
177  WARN(
178  "Consider switching from mesh and geometry input to multiple "
179  "meshes input. See "
180  "https://www.opengeosys.org/docs/tools/model-preparation/"
181  "constructmeshesfromgeometry/ tool for conversion.");
183  meshes.push_back(readSingleMesh(config.getConfigParameter("mesh"),
185 
186  std::string const geometry_file = BaseLib::copyPathToFileName(
188  config.getConfigParameter<std::string>("geometry"),
190  GeoLib::GEOObjects geoObjects;
191  readGeometry(geometry_file, geoObjects);
192 
193  std::unique_ptr<MeshGeoToolsLib::SearchLength> search_length_algorithm =
195  bool const multiple_nodes_allowed = false;
196  auto additional_meshes =
198  geoObjects, *meshes[0], std::move(search_length_algorithm),
199  multiple_nodes_allowed);
200 
201  std::move(begin(additional_meshes), end(additional_meshes),
202  std::back_inserter(meshes));
203  }
204  return meshes;
205 }
206 
207 boost::optional<ParameterLib::CoordinateSystem> parseLocalCoordinateSystem(
208  boost::optional<BaseLib::ConfigTree> const& config,
209  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
210 {
211  if (!config)
212  {
213  return {};
214  }
215 
216  DBUG("Reading coordinate system configuration.");
217 
218  //
219  // Fetch the first basis vector; its length defines the dimension.
220  //
221  auto const& basis_vector_0 = ParameterLib::findParameter<double>(
222  *config,
224  "basis_vector_0", parameters, 0 /* any dimension */);
225  int const dimension = basis_vector_0.getNumberOfGlobalComponents();
226 
227  // check dimension
228  if (dimension != 2 && dimension != 3)
229  {
230  OGS_FATAL(
231  "Basis vector parameter '{:s}' must have two or three components, "
232  "but it has {:d}.",
233  basis_vector_0.name, dimension);
234  }
235 
236  //
237  // Fetch the second basis vector, which must be of the same dimension as the
238  // first one.
239  //
240  auto const& basis_vector_1 = ParameterLib::findParameter<double>(
241  *config,
243  "basis_vector_1", parameters, dimension);
244 
245  //
246  // For two dimensions, we are done; construct coordinate system;
247  //
248  if (dimension == 2)
249  {
250  return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1};
251  }
252 
253  //
254  // Parse the third vector, for three dimensions.
255  //
256  auto const& basis_vector_2 = ParameterLib::findParameter<double>(
257  *config,
259  "basis_vector_2", parameters, dimension);
260  return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1,
261  basis_vector_2};
262 }
263 } // namespace
264 
265 ProjectData::ProjectData() = default;
266 
268  std::string const& project_directory,
269  std::string const& output_directory)
270  : _mesh_vec(readMeshes(project_config, project_directory))
271 {
272  if (auto const python_script =
274  project_config.getConfigParameterOptional<std::string>("python_script"))
275  {
276 #ifdef OGS_USE_PYTHON
277  namespace py = pybind11;
278 
279  // Append to python's module search path
280  auto py_path = py::module::import("sys").attr("path");
281  py_path.attr("append")(project_directory); // .prj directory
282  // virtualenv
283  py_path.attr("append")(
284  CMakeInfoLib::CMakeInfo::python_virtualenv_sitepackages);
285 
286  auto const script_path =
288 
289  // Evaluate in scope of main module
290  py::object scope = py::module::import("__main__").attr("__dict__");
291  // add (global) variables
292  auto globals = py::dict(scope);
293  globals["ogs_prj_directory"] = project_directory;
294  py::eval_file(script_path, scope);
295 #else
296  OGS_FATAL("OpenGeoSys has not been built with Python support.");
297 #endif // OGS_USE_PYTHON
298  }
299 
301  parseCurves(project_config.getConfigSubtreeOptional("curves"));
302 
303  auto parameter_names_for_transformation =
305  parseParameters(project_config.getConfigSubtree("parameters"));
306 
309  project_config.getConfigSubtreeOptional("local_coordinate_system"),
310  _parameters);
311 
312  for (auto& parameter : _parameters)
313  {
314  if (std::find(begin(parameter_names_for_transformation),
315  end(parameter_names_for_transformation),
316  parameter->name) !=
317  end(parameter_names_for_transformation))
318  {
320  {
321  OGS_FATAL(
322  "The parameter '{:s}' is using the local coordinate system "
323  "but no local coordinate system was provided.",
324  parameter->name);
325  }
326  parameter->setCoordinateSystem(*_local_coordinate_system);
327  }
328 
329  parameter->initialize(_parameters);
330  }
331 
333  parseProcessVariables(project_config.getConfigSubtree("process_variables"));
334 
336  parseMedia(project_config.getConfigSubtreeOptional("media"));
337 
338  auto chemical_solver_interface = parseChemicalSolverInterface(
340  project_config.getConfigSubtreeOptional("chemical_system"),
341  output_directory);
342 
344  parseProcesses(project_config.getConfigSubtree("processes"),
345  project_directory, output_directory,
346  chemical_solver_interface.get());
347 
349  parseLinearSolvers(project_config.getConfigSubtree("linear_solvers"));
350 
352  parseNonlinearSolvers(project_config.getConfigSubtree("nonlinear_solvers"));
353 
355  parseTimeLoop(project_config.getConfigSubtree("time_loop"),
356  output_directory, std::move(chemical_solver_interface));
357 }
358 
360  BaseLib::ConfigTree const& process_variables_config)
361 {
362  DBUG("Parse process variables:");
363 
364  std::set<std::string> names;
365 
366  for (auto var_config
368  : process_variables_config.getConfigSubtreeList("process_variable"))
369  {
370  // Either the mesh name is given, or the first mesh's name will be
371  // taken. Taking the first mesh's value is deprecated.
372  auto const mesh_name =
374  var_config.getConfigParameter<std::string>("mesh",
375  _mesh_vec[0]->getName());
376 
377  auto& mesh = *BaseLib::findElementOrError(
378  begin(_mesh_vec), end(_mesh_vec),
379  [&mesh_name](auto const& m) { return m->getName() == mesh_name; },
380  "Expected to find a mesh named " + mesh_name + ".");
381 
382  auto pv = ProcessLib::ProcessVariable{var_config, mesh, _mesh_vec,
383  _parameters};
384  if (!names.insert(pv.getName()).second)
385  {
386  OGS_FATAL("A process variable with name `{:s}' already exists.",
387  pv.getName());
388  }
389 
390  _process_variables.push_back(std::move(pv));
391  }
392 }
393 
394 std::vector<std::string> ProjectData::parseParameters(
395  BaseLib::ConfigTree const& parameters_config)
396 {
397  using namespace ProcessLib;
398 
399  std::set<std::string> names;
400  std::vector<std::string> parameter_names_for_transformation;
401 
402  DBUG("Reading parameters:");
403  for (auto parameter_config :
405  parameters_config.getConfigSubtreeList("parameter"))
406  {
407  auto p =
408  ParameterLib::createParameter(parameter_config, _mesh_vec, _curves);
409  if (!names.insert(p->name).second)
410  {
411  OGS_FATAL("A parameter with name `{:s}' already exists.", p->name);
412  }
413 
414  auto const use_local_coordinate_system =
416  parameter_config.getConfigParameterOptional<bool>(
417  "use_local_coordinate_system");
418  if (!!use_local_coordinate_system && *use_local_coordinate_system)
419  {
420  parameter_names_for_transformation.push_back(p->name);
421  }
422 
423  _parameters.push_back(std::move(p));
424  }
425 
426  _parameters.push_back(
427  std::make_unique<ParameterLib::ConstantParameter<double>>(
429 
430  return parameter_names_for_transformation;
431 }
432 
434  boost::optional<BaseLib::ConfigTree> const& media_config)
435 {
436  if (!media_config)
437  {
438  return;
439  }
440 
441  DBUG("Reading media:");
442 
443  if (_mesh_vec.empty() || _mesh_vec[0] == nullptr)
444  {
445  ERR("A mesh is required to define medium materials.");
446  return;
447  }
448 
449  for (auto const& medium_config :
451  media_config->getConfigSubtreeList("medium"))
452  {
453  auto material_id_string =
455  medium_config.getConfigAttribute<std::string>("id", "0");
456  material_id_string.erase(
457  remove_if(begin(material_id_string), end(material_id_string),
458  [](unsigned char const c) { return std::isspace(c); }),
459  end(material_id_string));
460  auto const material_ids_strings =
461  BaseLib::splitString(material_id_string, ',');
462 
463  // Convert strings to ints;
464  std::vector<int> material_ids;
465  std::transform(
466  begin(material_ids_strings), end(material_ids_strings),
467  std::back_inserter(material_ids), [](std::string const& m_id) {
468  if (auto const it = std::find_if_not(
469  begin(m_id), end(m_id),
470  [](unsigned char const c) { return std::isdigit(c); });
471  it != end(m_id))
472  {
473  OGS_FATAL(
474  "Could not parse material ID's from '{:s}'. Please "
475  "separate multiple material ID's by comma only. "
476  "Invalid character: '%c'",
477  m_id, *it);
478  }
479  return std::stoi(m_id);
480  });
481 
482  for (auto const& id : material_ids)
483  {
484  if (_media.find(id) != end(_media))
485  {
486  OGS_FATAL(
487  "Multiple media were specified for the same material id "
488  "'{:d}'. "
489  "Keep in mind, that if no material id is specified, it is "
490  "assumed to be 0 by default.",
491  id);
492  }
493 
494  _media[id] =
495  (id == material_ids[0])
497  _mesh_vec[0]->getDimension(), medium_config,
498  _parameters,
500  : nullptr,
501  _curves)
502  : _media[material_ids[0]];
503  }
504  }
505 
506  if (_media.empty())
507  {
508  OGS_FATAL("No entity is found inside <media>.");
509  }
510 }
511 
512 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
514  boost::optional<BaseLib::ConfigTree> const& config,
515  std::string const& output_directory)
516 {
517  if (!config)
518  {
519  return nullptr;
520  }
521 
522  std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
523  chemical_solver_interface;
524 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
525  INFO(
526  "Ready for initializing interface to a chemical solver for water "
527  "chemistry calculation.");
528 
529  auto const chemical_solver =
531  config->getConfigAttribute<std::string>("chemical_solver");
532 
533  if (boost::iequals(chemical_solver, "Phreeqc"))
534  {
535  INFO(
536  "Configuring phreeqc interface for water chemistry "
537  "calculation using file-based approach.");
538 
539  chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
541  output_directory);
542  }
543  else if (boost::iequals(chemical_solver, "PhreeqcKernel"))
544  {
545  OGS_FATAL(
546  "The chemical solver option of PhreeqcKernel is not accessible "
547  "for the time being. Please set 'Phreeqc'' as the chemical "
548  "solver for reactive transport modeling.");
549  }
550  else
551  {
552  OGS_FATAL(
553  "Unknown chemical solver. Please specify either Phreeqc or "
554  "PhreeqcKernel as the solver for water chemistry calculation "
555  "instead.");
556  }
557 #else
558  (void)output_directory;
559 
560  OGS_FATAL(
561  "Found the type of the process to be solved is not component transport "
562  "process. Please specify the process type to ComponentTransport. At "
563  "the present, water chemistry calculation is only available for "
564  "component transport process.");
565 #endif
566  return chemical_solver_interface;
567 }
568 
570  BaseLib::ConfigTree const& processes_config,
571  std::string const& project_directory,
572  std::string const& output_directory,
573  [[maybe_unused]] ChemistryLib::ChemicalSolverInterface* const
574  chemical_solver_interface)
575 {
576  (void)project_directory; // to avoid compilation warning
577  (void)output_directory; // to avoid compilation warning
578 
579  DBUG("Reading processes:");
581  for (auto process_config : processes_config.getConfigSubtreeList("process"))
582  {
583  auto const type =
585  process_config.peekConfigParameter<std::string>("type");
586 
587  auto const name =
589  process_config.getConfigParameter<std::string>("name");
590 
591  auto const integration_order =
593  process_config.getConfigParameter<int>("integration_order");
594 
595  std::unique_ptr<ProcessLib::Process> process;
596 
597  auto jacobian_assembler = ProcessLib::createJacobianAssembler(
599  process_config.getConfigSubtreeOptional("jacobian_assembler"));
600 
601 #ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
602  if (type == "STEADY_STATE_DIFFUSION")
603  {
604  // The existence check of the in the configuration referenced
605  // process variables is checked in the physical process.
606  // TODO at the moment we have only one mesh, later there can be
607  // several meshes. Then we have to assign the referenced mesh
608  // here.
609  process =
611  name, *_mesh_vec[0], std::move(jacobian_assembler),
612  _process_variables, _parameters, integration_order,
613  process_config, _mesh_vec, _media);
614  }
615  else
616 #endif
617 #ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
618  if (type == "LIQUID_FLOW")
619  {
621  name, *_mesh_vec[0], std::move(jacobian_assembler),
622  _process_variables, _parameters, integration_order,
623  process_config, _mesh_vec, _media);
624  }
625  else
626 #endif
627 #ifdef OGS_BUILD_PROCESS_TES
628  if (type == "TES")
629  {
631  name, *_mesh_vec[0], std::move(jacobian_assembler),
632  _process_variables, _parameters, integration_order,
633  process_config);
634  }
635  else
636 #endif
637 #ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
638  if (type == "HEAT_CONDUCTION")
639  {
641  name, *_mesh_vec[0], std::move(jacobian_assembler),
642  _process_variables, _parameters, integration_order,
643  process_config, _media);
644  }
645  else
646 #endif
647 #ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
648  if (type == "HEAT_TRANSPORT_BHE")
649  {
650  if (_mesh_vec[0]->getDimension() != 3)
651  {
652  OGS_FATAL(
653  "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
654  "mesh! ");
655  }
656 
657  process =
659  name, *_mesh_vec[0], std::move(jacobian_assembler),
660  _process_variables, _parameters, integration_order,
661  process_config, _curves, _media);
662  }
663  else
664 #endif
665 #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
666  if (type == "HYDRO_MECHANICS")
667  {
669  switch (process_config.getConfigParameter<int>("dimension"))
670  {
671  case 2:
672  process =
674  2>(name, *_mesh_vec[0],
675  std::move(jacobian_assembler),
677  _local_coordinate_system, integration_order,
678  process_config, _media);
679  break;
680  case 3:
681  process =
683  3>(name, *_mesh_vec[0],
684  std::move(jacobian_assembler),
686  _local_coordinate_system, integration_order,
687  process_config, _media);
688  break;
689  default:
690  OGS_FATAL(
691  "HYDRO_MECHANICS process does not support given "
692  "dimension");
693  }
694  }
695  else
696 #endif
697 #ifdef OGS_BUILD_PROCESS_LIE
698  if (type == "HYDRO_MECHANICS_WITH_LIE")
699  {
701  switch (process_config.getConfigParameter<int>("dimension"))
702  {
703  case 2:
706  name, *_mesh_vec[0], std::move(jacobian_assembler),
708  _local_coordinate_system, integration_order,
709  process_config);
710  break;
711  case 3:
714  name, *_mesh_vec[0], std::move(jacobian_assembler),
716  _local_coordinate_system, integration_order,
717  process_config);
718  break;
719  default:
720  OGS_FATAL(
721  "HYDRO_MECHANICS_WITH_LIE process does not support "
722  "given dimension");
723  }
724  }
725  else
726 #endif
727 #ifdef OGS_BUILD_PROCESS_HT
728  if (type == "HT")
729  {
731  name, *_mesh_vec[0], std::move(jacobian_assembler),
732  _process_variables, _parameters, integration_order,
733  process_config, _mesh_vec, _media);
734  }
735  else
736 #endif
737 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
738  if (type == "ComponentTransport")
739  {
740  process =
742  name, *_mesh_vec[0], std::move(jacobian_assembler),
743  _process_variables, _parameters, integration_order,
744  process_config, _mesh_vec, _media,
745  chemical_solver_interface);
746  }
747  else
748 #endif
749 #ifdef OGS_BUILD_PROCESS_PHASEFIELD
750  if (type == "PHASE_FIELD")
751  {
752  switch (_mesh_vec[0]->getDimension())
753  {
754  case 2:
755  process =
757  name, *_mesh_vec[0], std::move(jacobian_assembler),
759  _local_coordinate_system, integration_order,
760  process_config);
761  break;
762  case 3:
763  process =
765  name, *_mesh_vec[0], std::move(jacobian_assembler),
767  _local_coordinate_system, integration_order,
768  process_config);
769  break;
770  }
771  }
772  else
773 #endif
774 #ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
775  if (type == "RichardsComponentTransport")
776  {
779  name, *_mesh_vec[0], std::move(jacobian_assembler),
780  _process_variables, _parameters, integration_order,
781  process_config);
782  }
783  else
784 #endif
785 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
786  if (type == "SMALL_DEFORMATION")
787  {
788  switch (_mesh_vec[0]->getDimension())
789  {
790  case 2:
793  name, *_mesh_vec[0], std::move(jacobian_assembler),
795  _local_coordinate_system, integration_order,
796  process_config);
797  break;
798  case 3:
801  name, *_mesh_vec[0], std::move(jacobian_assembler),
803  _local_coordinate_system, integration_order,
804  process_config);
805  break;
806  default:
807  OGS_FATAL(
808  "SMALL_DEFORMATION process does not support "
809  "given dimension");
810  }
811  }
812  else
813 #endif
814 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
815  if (type == "SMALL_DEFORMATION_NONLOCAL")
816  {
817  switch (_mesh_vec[0]->getDimension())
818  {
819  case 2:
822  name, *_mesh_vec[0], std::move(jacobian_assembler),
824  _local_coordinate_system, integration_order,
825  process_config);
826  break;
827  case 3:
830  name, *_mesh_vec[0], std::move(jacobian_assembler),
832  _local_coordinate_system, integration_order,
833  process_config);
834  break;
835  default:
836  OGS_FATAL(
837  "SMALL_DEFORMATION_NONLOCAL process does not support "
838  "given dimension {:d}",
839  _mesh_vec[0]->getDimension());
840  }
841  }
842  else
843 #endif
844 #ifdef OGS_BUILD_PROCESS_LIE
845  if (type == "SMALL_DEFORMATION_WITH_LIE")
846  {
848  switch (process_config.getConfigParameter<int>("dimension"))
849  {
850  case 2:
853  name, *_mesh_vec[0], std::move(jacobian_assembler),
855  _local_coordinate_system, integration_order,
856  process_config);
857  break;
858  case 3:
861  name, *_mesh_vec[0], std::move(jacobian_assembler),
863  _local_coordinate_system, integration_order,
864  process_config);
865  break;
866  default:
867  OGS_FATAL(
868  "SMALL_DEFORMATION_WITH_LIE process does not support "
869  "given dimension");
870  }
871  }
872  else
873 #endif
874 #ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
875  if (type == "THERMO_HYDRO_MECHANICS")
876  {
878  switch (process_config.getConfigParameter<int>("dimension"))
879  {
880  case 2:
883  name, *_mesh_vec[0], std::move(jacobian_assembler),
885  _local_coordinate_system, integration_order,
886  process_config, _media);
887  break;
888  case 3:
891  name, *_mesh_vec[0], std::move(jacobian_assembler),
893  _local_coordinate_system, integration_order,
894  process_config, _media);
895  break;
896  default:
897  OGS_FATAL(
898  "THERMO_HYDRO_MECHANICS process does not support given "
899  "dimension");
900  }
901  }
902  else
903 #endif
904 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
905  if (type == "THERMO_MECHANICAL_PHASE_FIELD")
906  {
907  switch (_mesh_vec[0]->getDimension())
908  {
909  case 2:
912  name, *_mesh_vec[0], std::move(jacobian_assembler),
914  _local_coordinate_system, integration_order,
915  process_config);
916  break;
917  case 3:
920  name, *_mesh_vec[0], std::move(jacobian_assembler),
922  _local_coordinate_system, integration_order,
923  process_config);
924  break;
925  }
926  }
927  else
928 #endif
929 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
930  if (type == "THERMO_MECHANICS")
931  {
932  switch (_mesh_vec[0]->getDimension())
933  {
934  case 2:
937  name, *_mesh_vec[0], std::move(jacobian_assembler),
939  _local_coordinate_system, integration_order,
940  process_config);
941  break;
942  case 3:
945  name, *_mesh_vec[0], std::move(jacobian_assembler),
947  _local_coordinate_system, integration_order,
948  process_config);
949  break;
950  }
951  }
952  else
953 #endif
954 #ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
955  if (type == "RICHARDS_FLOW")
956  {
958  name, *_mesh_vec[0], std::move(jacobian_assembler),
959  _process_variables, _parameters, integration_order,
960  process_config, _curves, _media);
961  }
962  else
963 #endif
964 #ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
965  if (type == "RICHARDS_MECHANICS")
966  {
968  switch (process_config.getConfigParameter<int>("dimension"))
969  {
970  case 2:
973  name, *_mesh_vec[0], std::move(jacobian_assembler),
975  _local_coordinate_system, integration_order,
976  process_config, _media);
977  break;
978  case 3:
981  name, *_mesh_vec[0], std::move(jacobian_assembler),
983  _local_coordinate_system, integration_order,
984  process_config, _media);
985  break;
986  }
987  }
988  else
989 #endif
990 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
991  if (type == "TWOPHASE_FLOW_PP")
992  {
993  process =
995  name, *_mesh_vec[0], std::move(jacobian_assembler),
996  _process_variables, _parameters, integration_order,
997  process_config, _curves, _media);
998  }
999  else
1000 #endif
1001 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
1002  if (type == "TWOPHASE_FLOW_PRHO")
1003  {
1006  name, *_mesh_vec[0], std::move(jacobian_assembler),
1007  _process_variables, _parameters, integration_order,
1008  process_config, _curves);
1009  }
1010  else
1011 #endif
1012 #ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1013  if (type == "THERMAL_TWOPHASE_WITH_PP")
1014  {
1017  name, *_mesh_vec[0], std::move(jacobian_assembler),
1018  _process_variables, _parameters, integration_order,
1019  process_config, _curves);
1020  }
1021  else
1022 #endif
1023  {
1024  OGS_FATAL("Unknown process type: {:s}", type);
1025  }
1026 
1027  if (BaseLib::containsIf(
1028  _processes,
1029  [&name](std::unique_ptr<ProcessLib::Process> const& p) {
1030  return p->name == name;
1031  }))
1032  {
1033  OGS_FATAL("The process name '{:s}' is not unique.", name);
1034  }
1035  _processes.push_back(std::move(process));
1036  }
1037 }
1038 
1040  BaseLib::ConfigTree const& config,
1041  std::string const& output_directory,
1042  std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
1043  chemical_solver_interface)
1044 {
1045  DBUG("Reading time loop configuration.");
1046 
1048  config, output_directory, _processes, _nonlinear_solvers, _mesh_vec,
1049  std::move(chemical_solver_interface));
1050 
1051  if (!_time_loop)
1052  {
1053  OGS_FATAL("Initialization of time loop failed.");
1054  }
1055 }
1056 
1058 {
1059  DBUG("Reading linear solver configuration.");
1060 
1062  for (auto conf : config.getConfigSubtreeList("linear_solver"))
1063  {
1065  auto const name = conf.getConfigParameter<std::string>("name");
1068  name,
1069  std::make_unique<GlobalLinearSolver>("", &conf),
1070  "The linear solver name is not unique");
1071  }
1072 }
1073 
1075 {
1076  DBUG("Reading linear solver configuration.");
1077 
1079  for (auto conf : config.getConfigSubtreeList("nonlinear_solver"))
1080  {
1081  auto const ls_name =
1083  conf.getConfigParameter<std::string>("linear_solver");
1084  auto& linear_solver = BaseLib::getOrError(
1085  _linear_solvers, ls_name,
1086  "A linear solver with the given name does not exist.");
1087 
1089  auto const name = conf.getConfigParameter<std::string>("name");
1092  name,
1093  NumLib::createNonlinearSolver(*linear_solver, conf).first,
1094  "The nonlinear solver name is not unique");
1095  }
1096 }
1097 
1099  boost::optional<BaseLib::ConfigTree> const& config)
1100 {
1101  if (!config)
1102  {
1103  return;
1104  }
1105 
1106  DBUG("Reading curves configuration.");
1107 
1109  for (auto conf : config->getConfigSubtreeList("curve"))
1110  {
1112  auto const name = conf.getConfigParameter<std::string>("name");
1114  _curves,
1115  name,
1118  "The curve name is not unique.");
1119  }
1120 }
Definition of the BoostXmlGmlInterface class.
Functionality to build different search length algorithm objects from given config.
#define OGS_FATAL(...)
Definition: Error.h:25
Filename manipulation routines.
Definition of the GEOObjects class.
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
void ERR(char const *fmt, Args const &... args)
Definition: Logging.h:42
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
void WARN(char const *fmt, Args const &... args)
Definition: Logging.h:37
Definition of the Mesh class.
Base class for different search length strategies.
Definition of string helper functions.
boost::optional< T > getConfigParameterOptional(std::string const &param) const
boost::optional< T > getConfigAttributeOptional(std::string const &attr) const
T getConfigParameter(std::string const &param) const
Range< SubtreeIterator > getConfigSubtreeList(std::string const &root) const
Definition: ConfigTree.cpp:175
ConfigTree getConfigSubtree(std::string const &root) const
Definition: ConfigTree.cpp:151
boost::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
Definition: ConfigTree.cpp:161
Container class for geometric objects.
Definition: GEOObjects.h:64
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
std::map< std::string, std::unique_ptr< GlobalLinearSolver > > _linear_solvers
Definition: ProjectData.h:139
boost::optional< ParameterLib::CoordinateSystem > _local_coordinate_system
Definition: ProjectData.h:132
std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > _nonlinear_solvers
Definition: ProjectData.h:142
void parseProcesses(BaseLib::ConfigTree const &processes_config, std::string const &project_directory, std::string const &output_directory, ChemistryLib::ChemicalSolverInterface *chemical_solver_interface)
void parseTimeLoop(BaseLib::ConfigTree const &config, const std::string &output_directory, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface)
Parses the time loop configuration.
void parseMedia(boost::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:130
std::vector< std::unique_ptr< ProcessLib::Process > > _processes
Definition: ProjectData.h:126
void parseNonlinearSolvers(BaseLib::ConfigTree const &config)
std::vector< ProcessLib::ProcessVariable > _process_variables
Definition: ProjectData.h:127
void parseProcessVariables(BaseLib::ConfigTree const &process_variables_config)
std::unique_ptr< ChemistryLib::ChemicalSolverInterface > parseChemicalSolverInterface(boost::optional< BaseLib::ConfigTree > const &config, const std::string &output_directory)
void parseCurves(boost::optional< BaseLib::ConfigTree > const &config)
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > _curves
Definition: ProjectData.h:145
std::vector< std::unique_ptr< MeshLib::Mesh > > _mesh_vec
Definition: ProjectData.h:125
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > _media
Definition: ProjectData.h:134
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:137
std::unique_ptr< GeoLib::GEOObjects > readGeometry(std::string const &filename)
std::pair< std::unique_ptr< NonlinearSolverBase >, NonlinearSolverTag > createNonlinearSolver(GlobalLinearSolver &linear_solver, BaseLib::ConfigTree const &config)
std::vector< std::unique_ptr< MeshLib::Mesh > > readMeshes(std::vector< std::string > const &filenames)
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition: Algorithm.h:149
void insertIfKeyUniqueElseError(Map &map, Key const &key, Value &&value, std::string const &error_message)
Definition: Algorithm.h:107
bool containsIf(Container const &container, Predicate &&predicate)
Definition: Algorithm.h:266
std::string copyPathToFileName(const std::string &file_name, const std::string &source)
Definition: FileTools.cpp:189
std::vector< std::string > splitString(std::string const &str)
Definition: StringTools.cpp:28
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
Definition: Algorithm.h:70
std::unique_ptr< ChemicalSolverInterface > createChemicalSolverInterface(std::vector< std::unique_ptr< MeshLib::Mesh >> const &meshes, BaseLib::ConfigTree const &config, std::string const &output_directory)
std::unique_ptr< Medium > createMedium(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)
static const double p
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)
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:25
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, ChemistryLib::ChemicalSolverInterface *const 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, boost::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, boost::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, boost::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, boost::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, boost::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< 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, boost::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
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, boost::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::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< 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, boost::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 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, boost::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, boost::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, boost::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, boost::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, boost::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)
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)
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)
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, boost::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, boost::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, boost::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, boost::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, boost::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
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, boost::optional< ParameterLib::CoordinateSystem > const &local_coordinate_system, unsigned const integration_order, BaseLib::ConfigTree const &config)
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< AbstractJacobianAssembler > createJacobianAssembler(boost::optional< BaseLib::ConfigTree > const &config)
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 >> const &meshes, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface)
Builds a TimeLoop from the given configuration.
std::string project_directory
The directory where the prj file resides.
Definition: FileTools.cpp:27
boost::optional< ParameterLib::CoordinateSystem > parseLocalCoordinateSystem(boost::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 &project_directory)
unsigned getDimension(MeshLib::MeshElemType eleType)
Definition of readMeshFromFile function.
Single, constant value parameter.
static const std::string zero_parameter_name