OGS
ProjectData.cpp
Go to the documentation of this file.
1 
14 #include "ProjectData.h"
15 
16 #include <algorithm>
17 #include <cctype>
18 #include "BaseLib/Logging.h"
19 #include <set>
20 
21 #ifdef OGS_USE_PYTHON
22 #include <pybind11/eval.h>
23 #endif
24 
25 #include "BaseLib/Algorithm.h"
26 #include "BaseLib/ConfigTree.h"
27 #include "BaseLib/FileTools.h"
28 #include "BaseLib/StringTools.h"
29 #include "GeoLib/GEOObjects.h"
35 #include "MeshLib/Mesh.h"
39 
40 // FileIO
43 
45 #include "ParameterLib/Utils.h"
47 #include "ProcessLib/TimeLoop.h"
48 
49 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
52 #endif
53 #ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
55 #endif
56 #ifdef OGS_BUILD_PROCESS_HT
58 #endif
59 #ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
61 #endif
62 #ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
64 #endif
65 #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
67 #endif
68 #ifdef OGS_BUILD_PROCESS_LIE
71 #endif
72 #ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
74 #endif
75 #ifdef OGS_BUILD_PROCESS_PHASEFIELD
77 #endif
78 #ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
80 #endif
81 #ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
83 #endif
84 #ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
86 #endif
87 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
89 #endif
90 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
92 #endif
93 #ifdef OGS_BUILD_PROCESS_TES
95 #endif
96 #ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
98 #endif
99 #ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
101 #endif
102 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
104 #endif
105 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
107 #endif
108 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
110 #endif
111 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
113 #endif
114 
115 namespace
116 {
117 void readGeometry(std::string const& fname, GeoLib::GEOObjects& geo_objects)
118 {
119  DBUG("Reading geometry file '{:s}'.", fname);
120  GeoLib::IO::BoostXmlGmlInterface gml_reader(geo_objects);
121  gml_reader.readFile(fname);
122 }
123 
124 std::unique_ptr<MeshLib::Mesh> readSingleMesh(
125  BaseLib::ConfigTree const& mesh_config_parameter,
126  std::string const& project_directory)
127 {
128  std::string const mesh_file = BaseLib::copyPathToFileName(
129  mesh_config_parameter.getValue<std::string>(), project_directory);
130  DBUG("Reading mesh file '{:s}'.", mesh_file);
131 
132  auto mesh = std::unique_ptr<MeshLib::Mesh>(
133  MeshLib::IO::readMeshFromFile(mesh_file));
134  if (!mesh)
135  {
136  OGS_FATAL("Could not read mesh from '{:s}' file. No mesh added.",
137  mesh_file);
138  }
139 
140 #ifdef DOXYGEN_DOCU_ONLY
141  mesh_config_parameter.getConfigAttributeOptional<bool>("axially_symmetric");
143 #endif // DOXYGEN_DOCU_ONLY
144 
145  if (auto const axially_symmetric =
147  mesh_config_parameter.getConfigAttributeOptional<bool>(
148  "axially_symmetric"))
149  {
150  mesh->setAxiallySymmetric(*axially_symmetric);
151  }
152 
153  return mesh;
154 }
155 
156 std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes(
157  BaseLib::ConfigTree const& config, std::string const& project_directory)
158 {
159  std::vector<std::unique_ptr<MeshLib::Mesh>> meshes;
160 
162  auto optional_meshes = config.getConfigSubtreeOptional("meshes");
163  if (optional_meshes)
164  {
165  DBUG("Reading multiple meshes.");
167  auto const configs = optional_meshes->getConfigParameterList("mesh");
168  std::transform(
169  configs.begin(), configs.end(), std::back_inserter(meshes),
170  [&project_directory](auto const& mesh_config) {
171  return readSingleMesh(mesh_config, project_directory);
172  });
173  }
174  else
175  { // Read single mesh with geometry.
176  WARN(
177  "Consider switching from mesh and geometry input to multiple "
178  "meshes input. See "
179  "https://www.opengeosys.org/docs/tools/model-preparation/"
180  "constructmeshesfromgeometry/ tool for conversion.");
182  meshes.push_back(readSingleMesh(config.getConfigParameter("mesh"),
184 
185  std::string const geometry_file = BaseLib::copyPathToFileName(
187  config.getConfigParameter<std::string>("geometry"),
189  GeoLib::GEOObjects geoObjects;
190  readGeometry(geometry_file, geoObjects);
191 
192  std::unique_ptr<MeshGeoToolsLib::SearchLength> search_length_algorithm =
194  bool const multiple_nodes_allowed = false;
195  auto additional_meshes =
197  geoObjects, *meshes[0], std::move(search_length_algorithm),
198  multiple_nodes_allowed);
199 
200  std::move(begin(additional_meshes), end(additional_meshes),
201  std::back_inserter(meshes));
202  }
203  return meshes;
204 }
205 
206 boost::optional<ParameterLib::CoordinateSystem> parseLocalCoordinateSystem(
207  boost::optional<BaseLib::ConfigTree> const& config,
208  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
209 {
210  if (!config)
211  {
212  return {};
213  }
214 
215  DBUG("Reading coordinate system configuration.");
216 
217  //
218  // Fetch the first basis vector; its length defines the dimension.
219  //
220  auto const& basis_vector_0 = ParameterLib::findParameter<double>(
221  *config,
223  "basis_vector_0", parameters, 0 /* any dimension */);
224  int const dimension = basis_vector_0.getNumberOfGlobalComponents();
225 
226  // check dimension
227  if (dimension != 2 && dimension != 3)
228  {
229  OGS_FATAL(
230  "Basis vector parameter '{:s}' must have two or three components, "
231  "but it has {:d}.",
232  basis_vector_0.name, dimension);
233  }
234 
235  //
236  // Fetch the second basis vector, which must be of the same dimension as the
237  // first one.
238  //
239  auto const& basis_vector_1 = ParameterLib::findParameter<double>(
240  *config,
242  "basis_vector_1", parameters, dimension);
243 
244  //
245  // For two dimensions, we are done; construct coordinate system;
246  //
247  if (dimension == 2)
248  {
249  return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1};
250  }
251 
252  //
253  // Parse the third vector, for three dimensions.
254  //
255  auto const& basis_vector_2 = ParameterLib::findParameter<double>(
256  *config,
258  "basis_vector_2", parameters, dimension);
259  return ParameterLib::CoordinateSystem{basis_vector_0, basis_vector_1,
260  basis_vector_2};
261 }
262 } // namespace
263 
264 ProjectData::ProjectData() = default;
265 
267  std::string const& project_directory,
268  std::string const& output_directory)
269  : _mesh_vec(readMeshes(project_config, project_directory))
270 {
271  if (auto const python_script =
273  project_config.getConfigParameterOptional<std::string>("python_script"))
274  {
275 #ifdef OGS_USE_PYTHON
276  namespace py = pybind11;
277 
278  // Append project's directory to python's module search path.
279  py::module::import("sys").attr("path").attr("append")(
281 
282  auto const script_path =
284 
285  // Evaluate in scope of main module
286  py::object scope = py::module::import("__main__").attr("__dict__");
287  py::eval_file(script_path, scope);
288 #else
289  OGS_FATAL("OpenGeoSys has not been built with Python support.");
290 #endif // OGS_USE_PYTHON
291  }
292 
294  parseCurves(project_config.getConfigSubtreeOptional("curves"));
295 
296  auto parameter_names_for_transformation =
298  parseParameters(project_config.getConfigSubtree("parameters"));
299 
302  project_config.getConfigSubtreeOptional("local_coordinate_system"),
303  _parameters);
304 
305  for (auto& parameter : _parameters)
306  {
307  if (std::find(begin(parameter_names_for_transformation),
308  end(parameter_names_for_transformation),
309  parameter->name) !=
310  end(parameter_names_for_transformation))
311  {
313  {
314  OGS_FATAL(
315  "The parameter '{:s}' is using the local coordinate system "
316  "but no local coordinate system was provided.",
317  parameter->name);
318  }
319  parameter->setCoordinateSystem(*_local_coordinate_system);
320  }
321 
322  parameter->initialize(_parameters);
323  }
324 
326  parseProcessVariables(project_config.getConfigSubtree("process_variables"));
327 
329  parseMedia(project_config.getConfigSubtreeOptional("media"));
330 
331  auto chemical_solver_interface = parseChemicalSolverInterface(
333  project_config.getConfigSubtreeOptional("chemical_system"),
334  output_directory);
335 
337  parseProcesses(project_config.getConfigSubtree("processes"),
338  project_directory, output_directory,
339  chemical_solver_interface.get());
340 
342  parseLinearSolvers(project_config.getConfigSubtree("linear_solvers"));
343 
345  parseNonlinearSolvers(project_config.getConfigSubtree("nonlinear_solvers"));
346 
348  parseTimeLoop(project_config.getConfigSubtree("time_loop"),
349  output_directory, std::move(chemical_solver_interface));
350 }
351 
353  BaseLib::ConfigTree const& process_variables_config)
354 {
355  DBUG("Parse process variables:");
356 
357  std::set<std::string> names;
358 
359  for (auto var_config
361  : process_variables_config.getConfigSubtreeList("process_variable"))
362  {
363  // Either the mesh name is given, or the first mesh's name will be
364  // taken. Taking the first mesh's value is deprecated.
365  auto const mesh_name =
367  var_config.getConfigParameter<std::string>("mesh",
368  _mesh_vec[0]->getName());
369 
370  auto& mesh = *BaseLib::findElementOrError(
371  begin(_mesh_vec), end(_mesh_vec),
372  [&mesh_name](auto const& m) { return m->getName() == mesh_name; },
373  "Expected to find a mesh named " + mesh_name + ".");
374 
375  auto pv = ProcessLib::ProcessVariable{var_config, mesh, _mesh_vec,
376  _parameters};
377  if (!names.insert(pv.getName()).second)
378  {
379  OGS_FATAL("A process variable with name `{:s}' already exists.",
380  pv.getName());
381  }
382 
383  _process_variables.push_back(std::move(pv));
384  }
385 }
386 
387 std::vector<std::string> ProjectData::parseParameters(
388  BaseLib::ConfigTree const& parameters_config)
389 {
390  using namespace ProcessLib;
391 
392  std::set<std::string> names;
393  std::vector<std::string> parameter_names_for_transformation;
394 
395  DBUG("Reading parameters:");
396  for (auto parameter_config :
398  parameters_config.getConfigSubtreeList("parameter"))
399  {
400  auto p =
401  ParameterLib::createParameter(parameter_config, _mesh_vec, _curves);
402  if (!names.insert(p->name).second)
403  {
404  OGS_FATAL("A parameter with name `{:s}' already exists.", p->name);
405  }
406 
407  auto const use_local_coordinate_system =
409  parameter_config.getConfigParameterOptional<bool>(
410  "use_local_coordinate_system");
411  if (!!use_local_coordinate_system && *use_local_coordinate_system)
412  {
413  parameter_names_for_transformation.push_back(p->name);
414  }
415 
416  _parameters.push_back(std::move(p));
417  }
418 
419  _parameters.push_back(
420  std::make_unique<ParameterLib::ConstantParameter<double>>(
422 
423  return parameter_names_for_transformation;
424 }
425 
427  boost::optional<BaseLib::ConfigTree> const& media_config)
428 {
429  if (!media_config)
430  {
431  return;
432  }
433 
434  DBUG("Reading media:");
435 
436  if (_mesh_vec.empty() || _mesh_vec[0] == nullptr)
437  {
438  ERR("A mesh is required to define medium materials.");
439  return;
440  }
441 
442  for (auto const& medium_config :
444  media_config->getConfigSubtreeList("medium"))
445  {
446  auto material_id_string =
448  medium_config.getConfigAttribute<std::string>("id", "0");
449  material_id_string.erase(
450  remove_if(begin(material_id_string), end(material_id_string),
451  [](unsigned char const c) { return std::isspace(c); }),
452  end(material_id_string));
453  auto const material_ids_strings =
454  BaseLib::splitString(material_id_string, ',');
455 
456  // Convert strings to ints;
457  std::vector<int> material_ids;
458  std::transform(
459  begin(material_ids_strings), end(material_ids_strings),
460  std::back_inserter(material_ids), [](std::string const& m_id) {
461  if (auto const it = std::find_if_not(
462  begin(m_id), end(m_id),
463  [](unsigned char const c) { return std::isdigit(c); });
464  it != end(m_id))
465  {
466  OGS_FATAL(
467  "Could not parse material ID's from '{:s}'. Please "
468  "separate multiple material ID's by comma only. "
469  "Invalid character: '%c'",
470  m_id, *it);
471  }
472  return std::stoi(m_id);
473  });
474 
475  for (auto const& id : material_ids)
476  {
477  if (_media.find(id) != end(_media))
478  {
479  OGS_FATAL(
480  "Multiple media were specified for the same material id "
481  "'{:d}'. "
482  "Keep in mind, that if no material id is specified, it is "
483  "assumed to be 0 by default.",
484  id);
485  }
486 
487  _media[id] =
488  (id == material_ids[0])
490  _mesh_vec[0]->getDimension(), medium_config,
491  _parameters,
493  : nullptr,
494  _curves)
495  : _media[material_ids[0]];
496  }
497  }
498 
499  if (_media.empty())
500  {
501  OGS_FATAL("No entity is found inside <media>.");
502  }
503 }
504 
505 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
507  boost::optional<BaseLib::ConfigTree> const& config,
508  std::string const& output_directory)
509 {
510  if (!config)
511  {
512  return nullptr;
513  }
514 
515  std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
516  chemical_solver_interface;
517 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
518  INFO(
519  "Ready for initializing interface to a chemical solver for water "
520  "chemistry calculation.");
521 
522  auto const chemical_solver =
524  config->getConfigAttribute<std::string>("chemical_solver");
525 
526  if (boost::iequals(chemical_solver, "Phreeqc"))
527  {
528  INFO(
529  "Configuring phreeqc interface for water chemistry "
530  "calculation using file-based approach.");
531 
532  chemical_solver_interface = ChemistryLib::createChemicalSolverInterface<
534  output_directory);
535  }
536  else if (boost::iequals(chemical_solver, "PhreeqcKernel"))
537  {
538  OGS_FATAL(
539  "The chemical solver option of PhreeqcKernel is not accessible "
540  "for the time being. Please set 'Phreeqc'' as the chemical "
541  "solver for reactive transport modeling.");
542  }
543  else
544  {
545  OGS_FATAL(
546  "Unknown chemical solver. Please specify either Phreeqc or "
547  "PhreeqcKernel as the solver for water chemistry calculation "
548  "instead.");
549  }
550 #else
551  (void)output_directory;
552 
553  OGS_FATAL(
554  "Found the type of the process to be solved is not component transport "
555  "process. Please specify the process type to ComponentTransport. At "
556  "the present, water chemistry calculation is only available for "
557  "component transport process.");
558 #endif
559  return chemical_solver_interface;
560 }
561 
563  BaseLib::ConfigTree const& processes_config,
564  std::string const& project_directory,
565  std::string const& output_directory,
566  [[maybe_unused]] ChemistryLib::ChemicalSolverInterface* const
567  chemical_solver_interface)
568 {
569  (void)project_directory; // to avoid compilation warning
570  (void)output_directory; // to avoid compilation warning
571 
572  DBUG("Reading processes:");
574  for (auto process_config : processes_config.getConfigSubtreeList("process"))
575  {
576  auto const type =
578  process_config.peekConfigParameter<std::string>("type");
579 
580  auto const name =
582  process_config.getConfigParameter<std::string>("name");
583 
584  auto const integration_order =
586  process_config.getConfigParameter<int>("integration_order");
587 
588  std::unique_ptr<ProcessLib::Process> process;
589 
590  auto jacobian_assembler = ProcessLib::createJacobianAssembler(
592  process_config.getConfigSubtreeOptional("jacobian_assembler"));
593 
594 #ifdef OGS_BUILD_PROCESS_STEADYSTATEDIFFUSION
595  if (type == "STEADY_STATE_DIFFUSION")
596  {
597  // The existence check of the in the configuration referenced
598  // process variables is checked in the physical process.
599  // TODO at the moment we have only one mesh, later there can be
600  // several meshes. Then we have to assign the referenced mesh
601  // here.
602  process =
604  name, *_mesh_vec[0], std::move(jacobian_assembler),
605  _process_variables, _parameters, integration_order,
606  process_config, _mesh_vec, output_directory, _media);
607  }
608  else
609 #endif
610 #ifdef OGS_BUILD_PROCESS_LIQUIDFLOW
611  if (type == "LIQUID_FLOW")
612  {
614  name, *_mesh_vec[0], std::move(jacobian_assembler),
615  _process_variables, _parameters, integration_order,
616  process_config, _mesh_vec, output_directory, _media);
617  }
618  else
619 #endif
620 #ifdef OGS_BUILD_PROCESS_TES
621  if (type == "TES")
622  {
624  name, *_mesh_vec[0], std::move(jacobian_assembler),
625  _process_variables, _parameters, integration_order,
626  process_config);
627  }
628  else
629 #endif
630 #ifdef OGS_BUILD_PROCESS_HEATCONDUCTION
631  if (type == "HEAT_CONDUCTION")
632  {
634  name, *_mesh_vec[0], std::move(jacobian_assembler),
635  _process_variables, _parameters, integration_order,
636  process_config, _media);
637  }
638  else
639 #endif
640 #ifdef OGS_BUILD_PROCESS_HEATTRANSPORTBHE
641  if (type == "HEAT_TRANSPORT_BHE")
642  {
643  if (_mesh_vec[0]->getDimension() != 3)
644  {
645  OGS_FATAL(
646  "HEAT_TRANSPORT_BHE can only work with a 3-dimensional "
647  "mesh! ");
648  }
649 
650  process =
652  name, *_mesh_vec[0], std::move(jacobian_assembler),
653  _process_variables, _parameters, integration_order,
654  process_config, _curves, _media);
655  }
656  else
657 #endif
658 #ifdef OGS_BUILD_PROCESS_HYDROMECHANICS
659  if (type == "HYDRO_MECHANICS")
660  {
662  switch (process_config.getConfigParameter<int>("dimension"))
663  {
664  case 2:
665  process =
667  2>(name, *_mesh_vec[0],
668  std::move(jacobian_assembler),
670  _local_coordinate_system, integration_order,
671  process_config, _media);
672  break;
673  case 3:
674  process =
676  3>(name, *_mesh_vec[0],
677  std::move(jacobian_assembler),
679  _local_coordinate_system, integration_order,
680  process_config, _media);
681  break;
682  default:
683  OGS_FATAL(
684  "HYDRO_MECHANICS process does not support given "
685  "dimension");
686  }
687  }
688  else
689 #endif
690 #ifdef OGS_BUILD_PROCESS_LIE
691  if (type == "HYDRO_MECHANICS_WITH_LIE")
692  {
694  switch (process_config.getConfigParameter<int>("dimension"))
695  {
696  case 2:
699  name, *_mesh_vec[0], std::move(jacobian_assembler),
701  _local_coordinate_system, integration_order,
702  process_config);
703  break;
704  case 3:
707  name, *_mesh_vec[0], std::move(jacobian_assembler),
709  _local_coordinate_system, integration_order,
710  process_config);
711  break;
712  default:
713  OGS_FATAL(
714  "HYDRO_MECHANICS_WITH_LIE process does not support "
715  "given dimension");
716  }
717  }
718  else
719 #endif
720 #ifdef OGS_BUILD_PROCESS_HT
721  if (type == "HT")
722  {
724  name, *_mesh_vec[0], std::move(jacobian_assembler),
725  _process_variables, _parameters, integration_order,
726  process_config, _mesh_vec, output_directory, _media);
727  }
728  else
729 #endif
730 #ifdef OGS_BUILD_PROCESS_COMPONENTTRANSPORT
731  if (type == "ComponentTransport")
732  {
733  process =
735  name, *_mesh_vec[0], std::move(jacobian_assembler),
736  _process_variables, _parameters, integration_order,
737  process_config, _mesh_vec, output_directory, _media,
738  chemical_solver_interface);
739  }
740  else
741 #endif
742 #ifdef OGS_BUILD_PROCESS_PHASEFIELD
743  if (type == "PHASE_FIELD")
744  {
745  switch (_mesh_vec[0]->getDimension())
746  {
747  case 2:
748  process =
750  name, *_mesh_vec[0], std::move(jacobian_assembler),
752  _local_coordinate_system, integration_order,
753  process_config);
754  break;
755  case 3:
756  process =
758  name, *_mesh_vec[0], std::move(jacobian_assembler),
760  _local_coordinate_system, integration_order,
761  process_config);
762  break;
763  }
764  }
765  else
766 #endif
767 #ifdef OGS_BUILD_PROCESS_RICHARDSCOMPONENTTRANSPORT
768  if (type == "RichardsComponentTransport")
769  {
772  name, *_mesh_vec[0], std::move(jacobian_assembler),
773  _process_variables, _parameters, integration_order,
774  process_config);
775  }
776  else
777 #endif
778 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATION
779  if (type == "SMALL_DEFORMATION")
780  {
781  switch (_mesh_vec[0]->getDimension())
782  {
783  case 2:
786  name, *_mesh_vec[0], std::move(jacobian_assembler),
788  _local_coordinate_system, integration_order,
789  process_config);
790  break;
791  case 3:
794  name, *_mesh_vec[0], std::move(jacobian_assembler),
796  _local_coordinate_system, integration_order,
797  process_config);
798  break;
799  default:
800  OGS_FATAL(
801  "SMALL_DEFORMATION process does not support "
802  "given dimension");
803  }
804  }
805  else
806 #endif
807 #ifdef OGS_BUILD_PROCESS_SMALLDEFORMATIONNONLOCAL
808  if (type == "SMALL_DEFORMATION_NONLOCAL")
809  {
810  switch (_mesh_vec[0]->getDimension())
811  {
812  case 2:
815  name, *_mesh_vec[0], std::move(jacobian_assembler),
817  _local_coordinate_system, integration_order,
818  process_config);
819  break;
820  case 3:
823  name, *_mesh_vec[0], std::move(jacobian_assembler),
825  _local_coordinate_system, integration_order,
826  process_config);
827  break;
828  default:
829  OGS_FATAL(
830  "SMALL_DEFORMATION_NONLOCAL process does not support "
831  "given dimension {:d}",
832  _mesh_vec[0]->getDimension());
833  }
834  }
835  else
836 #endif
837 #ifdef OGS_BUILD_PROCESS_LIE
838  if (type == "SMALL_DEFORMATION_WITH_LIE")
839  {
841  switch (process_config.getConfigParameter<int>("dimension"))
842  {
843  case 2:
846  name, *_mesh_vec[0], std::move(jacobian_assembler),
848  _local_coordinate_system, integration_order,
849  process_config);
850  break;
851  case 3:
854  name, *_mesh_vec[0], std::move(jacobian_assembler),
856  _local_coordinate_system, integration_order,
857  process_config);
858  break;
859  default:
860  OGS_FATAL(
861  "SMALL_DEFORMATION_WITH_LIE process does not support "
862  "given dimension");
863  }
864  }
865  else
866 #endif
867 #ifdef OGS_BUILD_PROCESS_THERMOHYDROMECHANICS
868  if (type == "THERMO_HYDRO_MECHANICS")
869  {
871  switch (process_config.getConfigParameter<int>("dimension"))
872  {
873  case 2:
876  name, *_mesh_vec[0], std::move(jacobian_assembler),
878  _local_coordinate_system, integration_order,
879  process_config, _media);
880  break;
881  case 3:
884  name, *_mesh_vec[0], std::move(jacobian_assembler),
886  _local_coordinate_system, integration_order,
887  process_config, _media);
888  break;
889  default:
890  OGS_FATAL(
891  "THERMO_HYDRO_MECHANICS process does not support given "
892  "dimension");
893  }
894  }
895  else
896 #endif
897 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICALPHASEFIELD
898  if (type == "THERMO_MECHANICAL_PHASE_FIELD")
899  {
900  switch (_mesh_vec[0]->getDimension())
901  {
902  case 2:
905  name, *_mesh_vec[0], std::move(jacobian_assembler),
907  _local_coordinate_system, integration_order,
908  process_config);
909  break;
910  case 3:
913  name, *_mesh_vec[0], std::move(jacobian_assembler),
915  _local_coordinate_system, integration_order,
916  process_config);
917  break;
918  }
919  }
920  else
921 #endif
922 #ifdef OGS_BUILD_PROCESS_THERMOMECHANICS
923  if (type == "THERMO_MECHANICS")
924  {
925  switch (_mesh_vec[0]->getDimension())
926  {
927  case 2:
930  name, *_mesh_vec[0], std::move(jacobian_assembler),
932  _local_coordinate_system, integration_order,
933  process_config);
934  break;
935  case 3:
938  name, *_mesh_vec[0], std::move(jacobian_assembler),
940  _local_coordinate_system, integration_order,
941  process_config);
942  break;
943  }
944  }
945  else
946 #endif
947 #ifdef OGS_BUILD_PROCESS_RICHARDSFLOW
948  if (type == "RICHARDS_FLOW")
949  {
951  name, *_mesh_vec[0], std::move(jacobian_assembler),
952  _process_variables, _parameters, integration_order,
953  process_config, _curves, _media);
954  }
955  else
956 #endif
957 #ifdef OGS_BUILD_PROCESS_RICHARDSMECHANICS
958  if (type == "RICHARDS_MECHANICS")
959  {
961  switch (process_config.getConfigParameter<int>("dimension"))
962  {
963  case 2:
966  name, *_mesh_vec[0], std::move(jacobian_assembler),
968  _local_coordinate_system, integration_order,
969  process_config, _media);
970  break;
971  case 3:
974  name, *_mesh_vec[0], std::move(jacobian_assembler),
976  _local_coordinate_system, integration_order,
977  process_config, _media);
978  break;
979  }
980  }
981  else
982 #endif
983 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPP
984  if (type == "TWOPHASE_FLOW_PP")
985  {
986  process =
988  name, *_mesh_vec[0], std::move(jacobian_assembler),
989  _process_variables, _parameters, integration_order,
990  process_config, _curves, _media);
991  }
992  else
993 #endif
994 #ifdef OGS_BUILD_PROCESS_TWOPHASEFLOWWITHPRHO
995  if (type == "TWOPHASE_FLOW_PRHO")
996  {
999  name, *_mesh_vec[0], std::move(jacobian_assembler),
1000  _process_variables, _parameters, integration_order,
1001  process_config, _curves);
1002  }
1003  else
1004 #endif
1005 #ifdef OGS_BUILD_PROCESS_THERMALTWOPHASEFLOWWITHPP
1006  if (type == "THERMAL_TWOPHASE_WITH_PP")
1007  {
1010  name, *_mesh_vec[0], std::move(jacobian_assembler),
1011  _process_variables, _parameters, integration_order,
1012  process_config, _curves);
1013  }
1014  else
1015 #endif
1016  {
1017  OGS_FATAL("Unknown process type: {:s}", type);
1018  }
1019 
1020  if (BaseLib::containsIf(
1021  _processes,
1022  [&name](std::unique_ptr<ProcessLib::Process> const& p) {
1023  return p->name == name;
1024  }))
1025  {
1026  OGS_FATAL("The process name '{:s}' is not unique.", name);
1027  }
1028  _processes.push_back(std::move(process));
1029  }
1030 }
1031 
1033  BaseLib::ConfigTree const& config,
1034  std::string const& output_directory,
1035  std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
1036  chemical_solver_interface)
1037 {
1038  DBUG("Reading time loop configuration.");
1039 
1041  config, output_directory, _processes, _nonlinear_solvers, _mesh_vec,
1042  std::move(chemical_solver_interface));
1043 
1044  if (!_time_loop)
1045  {
1046  OGS_FATAL("Initialization of time loop failed.");
1047  }
1048 }
1049 
1051 {
1052  DBUG("Reading linear solver configuration.");
1053 
1055  for (auto conf : config.getConfigSubtreeList("linear_solver"))
1056  {
1058  auto const name = conf.getConfigParameter<std::string>("name");
1061  name,
1062  std::make_unique<GlobalLinearSolver>("", &conf),
1063  "The linear solver name is not unique");
1064  }
1065 }
1066 
1068 {
1069  DBUG("Reading linear solver configuration.");
1070 
1072  for (auto conf : config.getConfigSubtreeList("nonlinear_solver"))
1073  {
1074  auto const ls_name =
1076  conf.getConfigParameter<std::string>("linear_solver");
1077  auto& linear_solver = BaseLib::getOrError(
1078  _linear_solvers, ls_name,
1079  "A linear solver with the given name does not exist.");
1080 
1082  auto const name = conf.getConfigParameter<std::string>("name");
1085  name,
1086  NumLib::createNonlinearSolver(*linear_solver, conf).first,
1087  "The nonlinear solver name is not unique");
1088  }
1089 }
1090 
1092  boost::optional<BaseLib::ConfigTree> const& config)
1093 {
1094  if (!config)
1095  {
1096  return;
1097  }
1098 
1099  DBUG("Reading curves configuration.");
1100 
1102  for (auto conf : config->getConfigSubtreeList("curve"))
1103  {
1105  auto const name = conf.getConfigParameter<std::string>("name");
1107  _curves,
1108  name,
1111  "The curve name is not unique.");
1112  }
1113 }
MathLib::createPiecewiseLinearCurve
std::unique_ptr< CurveType > createPiecewiseLinearCurve(BaseLib::ConfigTree const &config)
Definition: CreatePiecewiseLinearCurve-impl.h:21
ProcessLib::SteadyStateDiffusion::createSteadyStateDiffusion
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::string const &output_directory, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium >> const &media)
Definition: CreateSteadyStateDiffusion.cpp:41
ProjectData::_parameters
std::vector< std::unique_ptr< ParameterLib::ParameterBase > > _parameters
Buffer for each parameter config passed to the process.
Definition: ProjectData.h:130
ProjectData::parseLinearSolvers
void parseLinearSolvers(BaseLib::ConfigTree const &config)
Definition: ProjectData.cpp:1050
BaseLib::containsIf
bool containsIf(Container const &container, Predicate &&predicate)
Definition: Algorithm.h:266
ProcessLib::TwoPhaseFlowWithPP::createTwoPhaseFlowWithPPProcess
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)
Definition: CreateTwoPhaseFlowWithPPProcess.cpp:26
BaseLib::ConfigTree::getValue
T getValue() const
Definition: ConfigTree-impl.h:177
MaterialPropertyLib::name
@ name
Definition: PropertyType.h:62
ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess
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)
Definition: CreateHeatTransportBHEProcess.cpp:32
ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 3 >
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)
anonymous_namespace{ProjectData.cpp}::readSingleMesh
std::unique_ptr< MeshLib::Mesh > readSingleMesh(BaseLib::ConfigTree const &mesh_config_parameter, std::string const &project_directory)
Definition: ProjectData.cpp:124
MeshGeoToolsLib::createSearchLengthAlgorithm
std::unique_ptr< MeshGeoToolsLib::SearchLength > createSearchLengthAlgorithm(BaseLib::ConfigTree const &external_config, MeshLib::Mesh const &mesh)
Definition: CreateSearchLength.cpp:20
ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess< 3 >
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)
ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess< 2 >
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)
ProcessLib::RichardsComponentTransport::createRichardsComponentTransportProcess
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)
Definition: CreateRichardsComponentTransportProcess.cpp:27
GeoLib::IO::BoostXmlGmlInterface
Definition: BoostXmlGmlInterface.h:35
ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPProcess
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)
Definition: CreateThermalTwoPhaseFlowWithPPProcess.cpp:28
ChemistryLib::ChemicalSolverInterface
Definition: ChemicalSolverInterface.h:17
ProjectData::_nonlinear_solvers
std::map< std::string, std::unique_ptr< NumLib::NonlinearSolverBase > > _nonlinear_solvers
Definition: ProjectData.h:142
ProcessLib::createTimeLoop
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.
Definition: CreateTimeLoop.cpp:22
CreateThermoMechanicalPhaseFieldProcess.h
GeoLib::IO::BoostXmlGmlInterface::readFile
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
Definition: BoostXmlGmlInterface.cpp:38
ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess< 2 >
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)
ProcessLib::SmallDeformation::createSmallDeformationProcess< 2 >
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)
OGS_FATAL
#define OGS_FATAL(...)
Definition: Error.h:25
CreateSmallDeformationProcess.h
ProjectData::parseTimeLoop
void parseTimeLoop(BaseLib::ConfigTree const &config, const std::string &output_directory, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface)
Parses the time loop configuration.
Definition: ProjectData.cpp:1032
ProcessLib::RichardsFlow::createRichardsFlowProcess
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)
Definition: CreateRichardsFlowProcess.cpp:50
ProcessLib::PhaseField::createPhaseFieldProcess< 2 >
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)
CreateHeatConductionProcess.h
ChemistryLib::createChemicalSolverInterface
std::unique_ptr< ChemicalSolverInterface > createChemicalSolverInterface(std::vector< std::unique_ptr< MeshLib::Mesh >> const &meshes, BaseLib::ConfigTree const &config, std::string const &output_directory)
ConstantParameter.h
BaseLib::copyPathToFileName
std::string copyPathToFileName(const std::string &file_name, const std::string &source)
Definition: FileTools.cpp:192
ParameterLib::ConstantParameter
Single, constant value parameter.
Definition: ConstantParameter.h:19
CreateThermoHydroMechanicsProcess.h
ProcessLib::HeatConduction::createHeatConductionProcess
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)
Definition: CreateHeatConductionProcess.cpp:40
ProcessLib::SmallDeformation::createSmallDeformationProcess< 3 >
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)
readGeometry
std::unique_ptr< GeoLib::GEOObjects > readGeometry(std::string const &filename)
Definition: constructMeshesFromGeometry.cpp:21
CreateTESProcess.h
CreateThermalTwoPhaseFlowWithPPProcess.h
BoostXmlGmlInterface.h
Definition of the BoostXmlGmlInterface class.
ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 2 >
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)
MeshLib::IO::readMeshFromFile
MeshLib::Mesh * readMeshFromFile(const std::string &file_name)
Definition: readMeshFromFile.cpp:45
CreateSteadyStateDiffusion.h
ProjectData::_processes
std::vector< std::unique_ptr< ProcessLib::Process > > _processes
Definition: ProjectData.h:126
ProjectData::parseProcesses
void parseProcesses(BaseLib::ConfigTree const &processes_config, std::string const &project_directory, std::string const &output_directory, ChemistryLib::ChemicalSolverInterface *chemical_solver_interface)
Definition: ProjectData.cpp:562
ConvergenceCriterion.h
DBUG
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
ProcessLib::ThermoMechanics::createThermoMechanicsProcess< 3 >
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)
ProjectData::parseProcessVariables
void parseProcessVariables(BaseLib::ConfigTree const &process_variables_config)
Definition: ProjectData.cpp:352
BaseLib::ConfigTree::getConfigSubtreeOptional
boost::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
Definition: ConfigTree.cpp:161
ProcessLib::DeactivatedSubdomain::zero_parameter_name
static const std::string zero_parameter_name
Definition: DeactivatedSubdomain.h:66
BaseLib::ConfigTree::getConfigSubtreeList
Range< SubtreeIterator > getConfigSubtreeList(std::string const &root) const
Definition: ConfigTree.cpp:175
ProcessLib::RichardsMechanics::createRichardsMechanicsProcess< 2 >
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)
ProjectData::parseCurves
void parseCurves(boost::optional< BaseLib::ConfigTree > const &config)
Definition: ProjectData.cpp:1091
ProjectData::_mesh_vec
std::vector< std::unique_ptr< MeshLib::Mesh > > _mesh_vec
Definition: ProjectData.h:125
CreateJacobianAssembler.h
WARN
void WARN(char const *fmt, Args const &... args)
Definition: Logging.h:37
readMeshes
std::vector< std::unique_ptr< MeshLib::Mesh > > readMeshes(std::vector< std::string > const &filenames)
Definition: identifySubdomains.cpp:20
CreateRichardsMechanicsProcess.h
CreateComponentTransportProcess.h
readMeshFromFile.h
Definition of readMeshFromFile function.
CreateHeatTransportBHEProcess.h
CreateSmallDeformationNonlocalProcess.h
BaseLib::getOrError
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition: Algorithm.h:149
ProcessLib::SmallDeformationNonlocal::createSmallDeformationNonlocalProcess< 3 >
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)
ProjectData::parseNonlinearSolvers
void parseNonlinearSolvers(BaseLib::ConfigTree const &config)
Definition: ProjectData.cpp:1067
FileTools.h
Filename manipulation routines.
INFO
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
CreateTimeLoop.h
ConfigTree.h
CreateHydroMechanicsProcess.h
CreateThermoMechanicsProcess.h
MathLib::PiecewiseLinearInterpolation
Definition: PiecewiseLinearInterpolation.h:25
CreatePiecewiseLinearCurve.h
Algorithm.h
ProjectData::parseMedia
void parseMedia(boost::optional< BaseLib::ConfigTree > const &media_config)
Parses media configuration and saves them in an object.
Definition: ProjectData.cpp:426
ProjectData::_time_loop
std::unique_ptr< ProcessLib::TimeLoop > _time_loop
The time loop used to solve this project's processes.
Definition: ProjectData.h:137
ParameterLib::createParameter
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
ProcessLib::ProcessVariable
Definition: ProcessVariable.h:46
MathLib::p
static const double p
Definition: GaussLegendreTet.cpp:61
CreateSearchLength.h
Functionality to build different search length algorithm objects from given config.
CreateHydroMechanicsProcess.h
CreateMedium.h
anonymous_namespace{ProjectData.cpp}::parseLocalCoordinateSystem
boost::optional< ParameterLib::CoordinateSystem > parseLocalCoordinateSystem(boost::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
Definition: ProjectData.cpp:206
ProcessLib::ComponentTransport::createComponentTransportProcess
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::string const &output_directory, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium >> const &media, ChemistryLib::ChemicalSolverInterface *const chemical_solver_interface)
Definition: CreateComponentTransportProcess.cpp:77
CreateLiquidFlowProcess.h
ProjectData::_linear_solvers
std::map< std::string, std::unique_ptr< GlobalLinearSolver > > _linear_solvers
Definition: ProjectData.h:139
ProcessLib::createJacobianAssembler
std::unique_ptr< AbstractJacobianAssembler > createJacobianAssembler(boost::optional< BaseLib::ConfigTree > const &config)
Definition: CreateJacobianAssembler.cpp:20
ProjectData::_local_coordinate_system
boost::optional< ParameterLib::CoordinateSystem > _local_coordinate_system
Definition: ProjectData.h:132
ParameterLib::CoordinateSystem
Definition: CoordinateSystem.h:26
ProjectData::parseParameters
std::vector< std::string > parseParameters(BaseLib::ConfigTree const &parameters_config)
Definition: ProjectData.cpp:387
CreateTwoPhaseFlowWithPPProcess.h
ProjectData.h
CreateHTProcess.h
ProcessLib::HT::createHTProcess
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::string const &output_directory, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium >> const &media)
Definition: CreateHTProcess.cpp:53
BaseLib::ConfigTree::getConfigSubtree
ConfigTree getConfigSubtree(std::string const &root) const
Definition: ConfigTree.cpp:151
CreateTwoPhaseFlowWithPrhoProcess.h
ProcessLib::LiquidFlow::createLiquidFlowProcess
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::string const &output_directory, std::map< int, std::shared_ptr< MaterialPropertyLib::Medium >> const &media)
Definition: CreateLiquidFlowProcess.cpp:51
ProcessLib::RichardsMechanics::createRichardsMechanicsProcess< 3 >
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)
ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowWithPrhoProcess
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)
Definition: CreateTwoPhaseFlowWithPrhoProcess.cpp:24
MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects
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)
Definition: ConstructMeshesFromGeometries.cpp:75
Mesh.h
Definition of the Mesh class.
ConstructMeshesFromGeometries.h
ProcessLib
Definition: ProjectData.h:40
ProcessLib::TES::createTESProcess
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)
Definition: CreateTESProcess.cpp:20
ERR
void ERR(char const *fmt, Args const &... args)
Definition: Logging.h:42
CreateRichardsComponentTransportProcess.h
ProcessLib::LIE::SmallDeformation::createSmallDeformationProcess< 2 >
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)
MaterialPropertyLib::createMedium
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)
Definition: CreateMedium.cpp:27
ProcessLib::LIE::HydroMechanics::createHydroMechanicsProcess< 2 >
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)
ChemistryLib::ChemicalSolver::Phreeqc
@ Phreeqc
ProjectData::_media
std::map< int, std::shared_ptr< MaterialPropertyLib::Medium > > _media
Definition: ProjectData.h:134
BaseLib::ConfigTree
Definition: ConfigTree.h:95
ProjectData::parseChemicalSolverInterface
std::unique_ptr< ChemistryLib::ChemicalSolverInterface > parseChemicalSolverInterface(boost::optional< BaseLib::ConfigTree > const &config, const std::string &output_directory)
Definition: ProjectData.cpp:506
CreatePhaseFieldProcess.h
BaseLib::ConfigTree::getConfigParameter
T getConfigParameter(std::string const &param) const
Definition: ConfigTree-impl.h:41
BaseLib::ConfigTree::getConfigAttributeOptional
boost::optional< T > getConfigAttributeOptional(std::string const &attr) const
Definition: ConfigTree-impl.h:220
DeactivatedSubdomain.h
BaseLib::insertIfKeyUniqueElseError
void insertIfKeyUniqueElseError(Map &map, Key const &key, Value &&value, std::string const &error_message)
Definition: Algorithm.h:107
anonymous_namespace{generateStructuredMesh.cpp}::getDimension
unsigned getDimension(MeshLib::MeshElemType eleType)
Definition: generateStructuredMesh.cpp:35
CreateSmallDeformationProcess.h
ProcessLib::ThermoMechanics::createThermoMechanicsProcess< 2 >
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)
ProcessLib::HydroMechanics::createHydroMechanicsProcess
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)
Definition: CreateHydroMechanicsProcess.cpp:33
NumLib::createNonlinearSolver
std::pair< std::unique_ptr< NonlinearSolverBase >, NonlinearSolverTag > createNonlinearSolver(GlobalLinearSolver &linear_solver, BaseLib::ConfigTree const &config)
Definition: NonlinearSolver.cpp:408
anonymous_namespace{FileTools.cpp}::project_directory
std::string project_directory
The directory where the prj file resides.
Definition: FileTools.cpp:27
Logging.h
BaseLib::splitString
std::vector< std::string > splitString(std::string const &str)
Definition: StringTools.cpp:28
ProjectData::ProjectData
ProjectData()
ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess< 3 >
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)
CreateRichardsFlowProcess.h
GeoLib::GEOObjects
Container class for geometric objects.
Definition: GEOObjects.h:63
SearchLength.h
Base class for different search length strategies.
GEOObjects.h
Definition of the GEOObjects class.
ProcessLib::PhaseField::createPhaseFieldProcess< 3 >
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)
BaseLib::ConfigTree::getConfigParameterOptional
boost::optional< T > getConfigParameterOptional(std::string const &param) const
Definition: ConfigTree-impl.h:65
ProjectData::_curves
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > _curves
Definition: ProjectData.h:145
ProjectData::_process_variables
std::vector< ProcessLib::ProcessVariable > _process_variables
Definition: ProjectData.h:127
Utils.h
BaseLib::findElementOrError
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
Definition: Algorithm.h:70
StringTools.h
Definition of string helper functions.
TimeLoop.h
CreateChemicalSolverInterface.h
ProcessLib::ThermoMechanicalPhaseField::createThermoMechanicalPhaseFieldProcess< 3 >
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)