OGS 6.1.0-1699-ge946d4c5f
SmallDeformationProcess.cpp
Go to the documentation of this file.
1 
11 
13 #include "MeshLib/Mesh.h"
14 #include "MeshLib/Properties.h"
15 
17 
24 
25 namespace ProcessLib
26 {
27 namespace LIE
28 {
29 namespace SmallDeformation
30 {
31 template <int DisplacementDim>
33  MeshLib::Mesh& mesh,
34  std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
35  std::vector<std::unique_ptr<ParameterBase>> const& parameters,
36  unsigned const integration_order,
37  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
38  process_variables,
40  SecondaryVariableCollection&& secondary_variables,
41  NumLib::NamedFunctionCaller&& named_function_caller)
42  : Process(mesh, std::move(jacobian_assembler), parameters,
43  integration_order, std::move(process_variables),
44  std::move(secondary_variables), std::move(named_function_caller)),
45  _process_data(std::move(process_data))
46 {
47  std::vector<std::pair<std::size_t, std::vector<int>>>
48  vec_branch_nodeID_matIDs;
49  std::vector<std::pair<std::size_t, std::vector<int>>>
50  vec_junction_nodeID_matIDs;
54  _vec_fracture_nodes, vec_branch_nodeID_matIDs,
55  vec_junction_nodeID_matIDs);
56 
57  if (_vec_fracture_mat_IDs.size() !=
58  _process_data.fracture_properties.size())
59  {
60  OGS_FATAL(
61  "The number of the given fracture properties (%d) are not "
62  "consistent"
63  " with the number of fracture groups in a mesh (%d).",
64  _process_data.fracture_properties.size(),
65  _vec_fracture_mat_IDs.size());
66  }
67 
68  // create a map from a material ID to a fracture ID
69  auto max_frac_mat_id = std::max_element(_vec_fracture_mat_IDs.begin(),
70  _vec_fracture_mat_IDs.end());
71  _process_data._map_materialID_to_fractureID.resize(*max_frac_mat_id + 1);
72  for (unsigned i = 0; i < _vec_fracture_mat_IDs.size(); i++)
73  {
74  _process_data._map_materialID_to_fractureID[_vec_fracture_mat_IDs[i]] =
75  i;
76  }
77 
78  // create a table of connected fracture IDs for each element
79  _process_data._vec_ele_connected_fractureIDs.resize(
80  mesh.getNumberOfElements());
81  for (unsigned i = 0; i < _vec_fracture_matrix_elements.size(); i++)
82  {
83  for (auto e : _vec_fracture_matrix_elements[i])
84  {
85  _process_data._vec_ele_connected_fractureIDs[e->getID()].push_back(
86  i);
87  }
88  }
89 
90  // set fracture property
91  for (auto& fracture_prop : _process_data.fracture_properties)
92  {
93  // based on the 1st element assuming a fracture forms a straight line
95  DisplacementDim,
96  *_vec_fracture_elements[fracture_prop.fracture_id][0],
97  fracture_prop);
98  }
99 
100  // set branches
101  for (std::size_t i = 0; i < vec_branch_nodeID_matIDs.size(); i++)
102  {
103  auto master_matId = vec_branch_nodeID_matIDs[i].second[0];
104  auto slave_matId = vec_branch_nodeID_matIDs[i].second[1];
105  auto& master_frac =
106  _process_data.fracture_properties
107  [_process_data._map_materialID_to_fractureID[master_matId]];
108  auto& slave_frac =
109  _process_data.fracture_properties
110  [_process_data._map_materialID_to_fractureID[slave_matId]];
111 
112  master_frac.branches_master.push_back(createBranchProperty(
113  *mesh.getNode(vec_branch_nodeID_matIDs[i].first), master_frac,
114  slave_frac));
115 
116  slave_frac.branches_slave.push_back(createBranchProperty(
117  *mesh.getNode(vec_branch_nodeID_matIDs[i].first), master_frac,
118  slave_frac));
119  }
120 
121  // set junctions
122  for (std::size_t i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
123  {
124  _vec_junction_nodes.push_back(const_cast<MeshLib::Node*>(
125  _mesh.getNode(vec_junction_nodeID_matIDs[i].first)));
126  }
127  for (std::size_t i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
128  {
129  auto const& material_ids = vec_junction_nodeID_matIDs[i].second;
130  assert(material_ids.size() == 2);
131  std::array<int, 2> fracture_ids{
132  {_process_data._map_materialID_to_fractureID[material_ids[0]],
133  _process_data._map_materialID_to_fractureID[material_ids[1]]}};
134 
135  _process_data.junction_properties.emplace_back(
136  i, *mesh.getNode(vec_junction_nodeID_matIDs[i].first),
137  fracture_ids);
138  }
139 
140  // create a table of connected junction IDs for each element
141  _process_data._vec_ele_connected_junctionIDs.resize(
142  mesh.getNumberOfElements());
143  for (unsigned i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
144  {
145  auto node = mesh.getNode(vec_junction_nodeID_matIDs[i].first);
146  for (auto e : node->getElements())
147  {
148  _process_data._vec_ele_connected_junctionIDs[e->getID()].push_back(
149  i);
150  }
151  }
152 
153  // create a table of junction node and connected elements
155  vec_junction_nodeID_matIDs.size());
156  for (unsigned i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
157  {
158  auto node = mesh.getNode(vec_junction_nodeID_matIDs[i].first);
159  for (auto e : node->getElements())
160  {
162  }
163  }
164 
165  //
166  // If Neumann BCs for the displacement_jump variable are required they need
167  // special treatment because of the levelset function. The implementation
168  // exists in the version 6.1.0 (e54815cc07ee89c81f953a4955b1c788595dd725)
169  // and was removed due to lack of applications.
170  //
171 
172  MeshLib::PropertyVector<int> const* material_ids(
173  mesh.getProperties().getPropertyVector<int>("MaterialIDs"));
174  _process_data._mesh_prop_materialIDs = material_ids;
175 }
176 
177 template <int DisplacementDim>
179 {
180  //------------------------------------------------------------
181  // prepare mesh subsets to define DoFs
182  //------------------------------------------------------------
183  // for extrapolation
185  std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes());
186  // regular u
188  std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes());
189  // u jump
190  for (unsigned i = 0; i < _vec_fracture_nodes.size(); i++)
191  {
192  _mesh_subset_fracture_nodes.push_back(
193  std::make_unique<MeshLib::MeshSubset const>(
194  _mesh, _vec_fracture_nodes[i]));
195  }
196  // enrichment for junctions
198  std::make_unique<MeshLib::MeshSubset>(_mesh, _vec_junction_nodes);
199 
200  // Collect the mesh subsets in a vector.
201  std::vector<MeshLib::MeshSubset> all_mesh_subsets;
202  std::generate_n(std::back_inserter(all_mesh_subsets), DisplacementDim,
203  [&]() { return *_mesh_subset_matrix_nodes; });
204  for (auto& ms : _mesh_subset_fracture_nodes)
205  {
206  std::generate_n(std::back_inserter(all_mesh_subsets),
207  DisplacementDim,
208  [&]() { return *ms; });
209  }
210  std::generate_n(std::back_inserter(all_mesh_subsets),
211  DisplacementDim,
212  [&]() { return *_mesh_subset_junction_nodes; });
213 
214  std::vector<int> const vec_n_components(
215  1 + _vec_fracture_mat_IDs.size() + _vec_junction_nodes.size(),
216  DisplacementDim);
217 
218  std::vector<std::vector<MeshLib::Element*> const*> vec_var_elements;
219  vec_var_elements.push_back(&_vec_matrix_elements);
220  for (unsigned i = 0; i < _vec_fracture_matrix_elements.size(); i++)
221  {
222  vec_var_elements.push_back(&_vec_fracture_matrix_elements[i]);
223  }
224  for (unsigned i = 0; i < _vec_junction_fracture_matrix_elements.size(); i++)
225  {
226  vec_var_elements.push_back(&_vec_junction_fracture_matrix_elements[i]);
227  }
228 
230  std::make_unique<NumLib::LocalToGlobalIndexMap>(
231  std::move(all_mesh_subsets),
232  vec_n_components,
233  vec_var_elements,
235 }
236 
237 template <int DisplacementDim>
239  NumLib::LocalToGlobalIndexMap const& dof_table,
240  MeshLib::Mesh const& mesh,
241  unsigned const integration_order)
242 {
244  DisplacementDim, SmallDeformationLocalAssemblerMatrix,
247  mesh.getElements(), dof_table, _local_assemblers,
248  mesh.isAxiallySymmetric(), integration_order, _process_data);
249 
250  // TODO move the two data members somewhere else.
251  // for extrapolation of secondary variables
252  std::vector<MeshLib::MeshSubset> all_mesh_subsets_single_component{
255  std::make_unique<NumLib::LocalToGlobalIndexMap>(
256  std::move(all_mesh_subsets_single_component),
257  // by location order is needed for output
259 
261  "sigma_xx",
263  1, getExtrapolator(), _local_assemblers,
265 
267  "sigma_yy",
269  1, getExtrapolator(), _local_assemblers,
271 
273  "sigma_zz",
275  1, getExtrapolator(), _local_assemblers,
277 
279  "sigma_xy",
281  1, getExtrapolator(), _local_assemblers,
283 
284  if (DisplacementDim == 3)
285  {
287  "sigma_xz",
289  1, getExtrapolator(), _local_assemblers,
291 
293  "sigma_yz",
295  1, getExtrapolator(), _local_assemblers,
297  }
298 
300  "epsilon_xx",
302  1, getExtrapolator(), _local_assemblers,
304 
306  "epsilon_yy",
308  1, getExtrapolator(), _local_assemblers,
310 
312  "epsilon_zz",
314  1, getExtrapolator(), _local_assemblers,
316 
318  "epsilon_xy",
320  1, getExtrapolator(), _local_assemblers,
322 
323  if (DisplacementDim == 3)
324  {
326  "epsilon_xz",
328  1, getExtrapolator(), _local_assemblers,
330 
332  "epsilon_yz",
334  1, getExtrapolator(), _local_assemblers,
336  }
337 
338  auto mesh_prop_sigma_xx = MeshLib::getOrCreateMeshProperty<double>(
339  const_cast<MeshLib::Mesh&>(mesh), "stress_xx",
341  mesh_prop_sigma_xx->resize(mesh.getNumberOfElements());
342  _process_data._mesh_prop_stress_xx = mesh_prop_sigma_xx;
343 
344  auto mesh_prop_sigma_yy = MeshLib::getOrCreateMeshProperty<double>(
345  const_cast<MeshLib::Mesh&>(mesh), "stress_yy",
347  mesh_prop_sigma_yy->resize(mesh.getNumberOfElements());
348  _process_data._mesh_prop_stress_yy = mesh_prop_sigma_yy;
349 
350  auto mesh_prop_sigma_zz = MeshLib::getOrCreateMeshProperty<double>(
351  const_cast<MeshLib::Mesh&>(mesh), "stress_zz",
353  mesh_prop_sigma_zz->resize(mesh.getNumberOfElements());
354  _process_data._mesh_prop_stress_zz = mesh_prop_sigma_zz;
355 
356  auto mesh_prop_sigma_xy = MeshLib::getOrCreateMeshProperty<double>(
357  const_cast<MeshLib::Mesh&>(mesh), "stress_xy",
359  mesh_prop_sigma_xy->resize(mesh.getNumberOfElements());
360  _process_data._mesh_prop_stress_xy = mesh_prop_sigma_xy;
361 
362  if (DisplacementDim == 3)
363  {
364  auto mesh_prop_sigma_xz = MeshLib::getOrCreateMeshProperty<double>(
365  const_cast<MeshLib::Mesh&>(mesh), "stress_xz",
367  mesh_prop_sigma_xz->resize(mesh.getNumberOfElements());
368  _process_data._mesh_prop_stress_xz = mesh_prop_sigma_xz;
369 
370  auto mesh_prop_sigma_yz = MeshLib::getOrCreateMeshProperty<double>(
371  const_cast<MeshLib::Mesh&>(mesh), "stress_yz",
373  mesh_prop_sigma_yz->resize(mesh.getNumberOfElements());
374  _process_data._mesh_prop_stress_yz = mesh_prop_sigma_yz;
375  }
376 
377  auto mesh_prop_epsilon_xx = MeshLib::getOrCreateMeshProperty<double>(
378  const_cast<MeshLib::Mesh&>(mesh), "strain_xx",
380  mesh_prop_epsilon_xx->resize(mesh.getNumberOfElements());
381  _process_data._mesh_prop_strain_xx = mesh_prop_epsilon_xx;
382 
383  auto mesh_prop_epsilon_yy = MeshLib::getOrCreateMeshProperty<double>(
384  const_cast<MeshLib::Mesh&>(mesh), "strain_yy",
386  mesh_prop_epsilon_yy->resize(mesh.getNumberOfElements());
387  _process_data._mesh_prop_strain_yy = mesh_prop_epsilon_yy;
388 
389  auto mesh_prop_epsilon_zz = MeshLib::getOrCreateMeshProperty<double>(
390  const_cast<MeshLib::Mesh&>(mesh), "strain_zz",
392  mesh_prop_epsilon_zz->resize(mesh.getNumberOfElements());
393  _process_data._mesh_prop_strain_zz = mesh_prop_epsilon_zz;
394 
395  auto mesh_prop_epsilon_xy = MeshLib::getOrCreateMeshProperty<double>(
396  const_cast<MeshLib::Mesh&>(mesh), "strain_xy",
398  mesh_prop_epsilon_xy->resize(mesh.getNumberOfElements());
399  _process_data._mesh_prop_strain_xy = mesh_prop_epsilon_xy;
400 
401  if (DisplacementDim == 3)
402  {
403  auto mesh_prop_epsilon_xz = MeshLib::getOrCreateMeshProperty<double>(
404  const_cast<MeshLib::Mesh&>(mesh), "strain_xz",
406  mesh_prop_epsilon_xz->resize(mesh.getNumberOfElements());
407  _process_data._mesh_prop_strain_xz = mesh_prop_epsilon_xz;
408 
409  auto mesh_prop_epsilon_yz = MeshLib::getOrCreateMeshProperty<double>(
410  const_cast<MeshLib::Mesh&>(mesh), "strain_yz",
412  mesh_prop_epsilon_yz->resize(mesh.getNumberOfElements());
413  _process_data._mesh_prop_strain_yz = mesh_prop_epsilon_yz;
414  }
415 
416  for (MeshLib::Element const* e : _mesh.getElements())
417  {
418  if (e->getDimension() < DisplacementDim)
419  {
420  continue;
421  }
422 
423  Eigen::Vector3d const pt(e->getCenterOfGravity().getCoords());
424  std::vector<FractureProperty*> e_fracture_props;
425  std::unordered_map<int, int> e_fracID_to_local;
426  unsigned tmpi = 0;
427  for (auto fid :
428  _process_data._vec_ele_connected_fractureIDs[e->getID()])
429  {
430  e_fracture_props.push_back(&_process_data.fracture_properties[fid]);
431  e_fracID_to_local.insert({fid, tmpi++});
432  }
433  std::vector<JunctionProperty*> e_junction_props;
434  std::unordered_map<int, int> e_juncID_to_local;
435  tmpi = 0;
436  for (auto fid :
437  _process_data._vec_ele_connected_junctionIDs[e->getID()])
438  {
439  e_junction_props.push_back(&_process_data.junction_properties[fid]);
440  e_juncID_to_local.insert({fid, tmpi++});
441  }
442  std::vector<double> const levelsets(uGlobalEnrichments(
443  e_fracture_props, e_junction_props, e_fracID_to_local, pt));
444 
445  for (unsigned i = 0; i < e_fracture_props.size(); i++)
446  {
447  auto mesh_prop_levelset = MeshLib::getOrCreateMeshProperty<double>(
448  const_cast<MeshLib::Mesh&>(mesh),
449  "levelset" +
450  std::to_string(e_fracture_props[i]->fracture_id + 1),
452  mesh_prop_levelset->resize(mesh.getNumberOfElements());
453  (*mesh_prop_levelset)[e->getID()] = levelsets[i];
454  }
455  for (unsigned i = 0; i < e_junction_props.size(); i++)
456  {
457  auto mesh_prop_levelset = MeshLib::getOrCreateMeshProperty<double>(
458  const_cast<MeshLib::Mesh&>(mesh),
459  "levelset" +
460  std::to_string(e_junction_props[i]->junction_id + 1 +
461  _process_data.fracture_properties.size()),
463  mesh_prop_levelset->resize(mesh.getNumberOfElements());
464  (*mesh_prop_levelset)[e->getID()] =
465  levelsets[i + e_fracture_props.size()];
466  }
467  }
468 
469  auto mesh_prop_w_n = MeshLib::getOrCreateMeshProperty<double>(
470  const_cast<MeshLib::Mesh&>(mesh), "w_n", MeshLib::MeshItemType::Cell,
471  1);
472  mesh_prop_w_n->resize(mesh.getNumberOfElements());
473  _process_data._mesh_prop_w_n = mesh_prop_w_n;
474 
475  auto mesh_prop_w_s = MeshLib::getOrCreateMeshProperty<double>(
476  const_cast<MeshLib::Mesh&>(mesh), "w_s", MeshLib::MeshItemType::Cell,
477  1);
478  mesh_prop_w_s->resize(mesh.getNumberOfElements());
479  _process_data._mesh_prop_w_s = mesh_prop_w_s;
480 
481  auto mesh_prop_b = MeshLib::getOrCreateMeshProperty<double>(
482  const_cast<MeshLib::Mesh&>(mesh), "aperture",
484  mesh_prop_b->resize(mesh.getNumberOfElements());
485  auto const& mesh_prop_matid = *_process_data._mesh_prop_materialIDs;
486  for (auto const& fracture_prop : _process_data.fracture_properties)
487  {
488  for (MeshLib::Element const* e : _mesh.getElements())
489  {
490  if (e->getDimension() == DisplacementDim)
491  {
492  continue;
493  }
494  if (mesh_prop_matid[e->getID()] != fracture_prop.mat_id)
495  {
496  continue;
497  }
499  x.setElementID(e->getID());
500  (*mesh_prop_b)[e->getID()] = fracture_prop.aperture0(0, x)[0];
501  }
502  }
503  _process_data._mesh_prop_b = mesh_prop_b;
504 
505  auto mesh_prop_fracture_stress_shear =
506  MeshLib::getOrCreateMeshProperty<double>(
507  const_cast<MeshLib::Mesh&>(mesh), "f_stress_s",
509  mesh_prop_fracture_stress_shear->resize(mesh.getNumberOfElements());
510  _process_data._mesh_prop_fracture_stress_shear =
511  mesh_prop_fracture_stress_shear;
512 
513  auto mesh_prop_fracture_stress_normal =
514  MeshLib::getOrCreateMeshProperty<double>(
515  const_cast<MeshLib::Mesh&>(mesh), "f_stress_n",
517  mesh_prop_fracture_stress_normal->resize(mesh.getNumberOfElements());
518  _process_data._mesh_prop_fracture_stress_normal =
519  mesh_prop_fracture_stress_normal;
520 }
521 
522 template <int DisplacementDim>
524  const double t, GlobalVector const& x, int const process_id)
525 {
526  DBUG("Compute the secondary variables for SmallDeformationProcess.");
527 
528  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
532  getDOFTable(process_id), t, x, _coupled_solutions);
533 }
534 
535 template <int DisplacementDim>
537 {
538  return false;
539 }
540 
541 template <int DisplacementDim>
543  const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K,
544  GlobalVector& b)
545 {
546  DBUG("Assemble SmallDeformationProcess.");
547 
548  const int process_id = 0;
549  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
550 
551  std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>>
552  dof_table = {std::ref(*_local_to_global_index_map)};
553  // Call global assembler for each local assembly item.
556  pv.getActiveElementIDs(), dof_table, t, x, M, K, b,
558 }
559 template <int DisplacementDim>
561  assembleWithJacobianConcreteProcess(const double t, GlobalVector const& x,
562  GlobalVector const& xdot,
563  const double dxdot_dx,
564  const double dx_dx, GlobalMatrix& M,
565  GlobalMatrix& K, GlobalVector& b,
566  GlobalMatrix& Jac)
567 {
568  DBUG("AssembleWithJacobian SmallDeformationProcess.");
569 
570  // Call global assembler for each local assembly item.
571  const int process_id = 0;
572  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
573 
574  std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>>
575  dof_table = {std::ref(*_local_to_global_index_map)};
578  _local_assemblers, pv.getActiveElementIDs(), dof_table, t,
579  x, xdot, dxdot_dx, dx_dx, M, K, b, Jac, _coupled_solutions);
580 }
581 template <int DisplacementDim>
583  GlobalVector const& x, double const t, double const dt,
584  const int process_id)
585 {
586  DBUG("PreTimestep SmallDeformationProcess.");
587 
588  _process_data.dt = dt;
589  _process_data.t = t;
590 
591  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
595  *_local_to_global_index_map, x, t, dt);
596 }
597 // ------------------------------------------------------------------------------------
598 // template instantiation
599 // ------------------------------------------------------------------------------------
600 template class SmallDeformationProcess<2>;
601 template class SmallDeformationProcess<3>;
602 
603 } // namespace SmallDeformation
604 } // namespace LIE
605 } // namespace ProcessLib
virtual std::vector< double > const & getIntPtSigmaZZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
std::vector< std::vector< MeshLib::Element * > > _vec_fracture_matrix_elements
void setFractureProperty(int const dim, MeshLib::Element const &e, FractureProperty &frac_prop)
MeshLib::Mesh & _mesh
Definition: Process.h:261
BranchProperty createBranchProperty(MeshLib::Node const &branchNode, FractureProperty const &master_frac, FractureProperty const &slave_frac)
virtual NumLib::LocalToGlobalIndexMap const & getDOFTable(const int) const
Definition: Process.h:115
void createLocalAssemblers(std::vector< MeshLib::Element *> const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface >> &local_assemblers, ExtraCtorArgs &&... extra_ctor_args)
SmallDeformationProcess(MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterBase >> const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable >>> &&process_variables, SmallDeformationProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, NumLib::NamedFunctionCaller &&named_function_caller)
const Node * getNode(std::size_t idx) const
Get the node with the given index.
Definition: Mesh.h:84
virtual void computeSecondaryVariable(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, const double t, GlobalVector const &x, CoupledSolutionsForStaggeredScheme const *coupled_xs)
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_all_nodes
Definition: Process.h:262
void getFractureMatrixDataInMesh(MeshLib::Mesh const &mesh, std::vector< MeshLib::Element *> &vec_matrix_elements, std::vector< int > &vec_fracture_mat_IDs, std::vector< std::vector< MeshLib::Element *>> &vec_fracture_elements, std::vector< std::vector< MeshLib::Element *>> &vec_fracture_matrix_elements, std::vector< std::vector< MeshLib::Node *>> &vec_fracture_nodes, std::vector< std::pair< std::size_t, std::vector< int >>> &vec_branch_nodeID_matIDs, std::vector< std::pair< std::size_t, std::vector< int >>> &vec_junction_nodeID_matIDs)
Definition: MeshUtils.cpp:184
static void executeSelectedMemberOnDereferenced(Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)
virtual std::vector< double > const & getIntPtSigmaYY(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
std::vector< std::reference_wrapper< ProcessVariable > > const & getProcessVariables(const int process_id) const
Definition: Process.h:123
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_junction_nodes
SecondaryVariableFunctions makeExtrapolator(const unsigned num_components, NumLib::Extrapolator &extrapolator, LocalAssemblerCollection const &local_assemblers, typename NumLib::ExtrapolatableLocalAssemblerCollection< LocalAssemblerCollection >::IntegrationPointValuesMethod integration_point_values_method)
virtual std::vector< double > const & getIntPtEpsilonYZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
virtual std::vector< double > const & getIntPtEpsilonYY(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
virtual std::vector< double > const & getIntPtEpsilonXX(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
void setElementID(std::size_t element_id)
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
Definition: Mesh.h:105
virtual std::vector< double > const & getIntPtSigmaXY(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
virtual std::vector< double > const & getIntPtSigmaYZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
void assemble(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< std::reference_wrapper< NumLib::LocalToGlobalIndexMap >> const &dof_tables, double const t, GlobalVector const &x, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, CoupledSolutionsForStaggeredScheme const *const cpl_xs)
MeshLib::Properties & getProperties()
Definition: Mesh.h:131
Definition of the Mesh class.
virtual std::vector< double > const & getIntPtSigmaXZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
virtual std::vector< double > const & getIntPtEpsilonZZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
NumLib::Extrapolator & getExtrapolator() const
Definition: Process.h:150
void assembleWithJacobian(std::size_t const mesh_item_id, LocalAssemblerInterface &local_assembler, std::vector< std::reference_wrapper< NumLib::LocalToGlobalIndexMap >> const &dof_tables, const double t, GlobalVector const &x, GlobalVector const &xdot, const double dxdot_dx, const double dx_dx, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac, CoupledSolutionsForStaggeredScheme const *const cpl_xs)
bool isAxiallySymmetric() const
Definition: Mesh.h:134
void preTimestepConcreteProcess(GlobalVector const &x, double const t, double const dt, const int) override
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map
Definition: Process.h:264
std::vector< double > uGlobalEnrichments(std::vector< FractureProperty *> const &frac_props, std::vector< JunctionProperty *> const &junction_props, std::unordered_map< int, int > const &fracID_to_local, Eigen::Vector3d const &x)
Builds expression trees of named functions dynamically at runtime.
std::vector< std::unique_ptr< MeshLib::MeshSubset const > > _mesh_subset_fracture_nodes
virtual void preTimestep(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
void assembleConcreteProcess(const double t, GlobalVector const &x, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
virtual std::vector< double > const & getIntPtEpsilonXZ(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
static void executeSelectedMemberDereferenced(Object &object, Method method, Container const &container, std::vector< std::size_t > const &active_container_ids, Args &&... args)
SecondaryVariableCollection _secondary_variables
Definition: Process.h:266
virtual std::vector< double > const & getIntPtSigmaXX(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
virtual std::vector< double > const & getIntPtEpsilonXY(const double, GlobalVector const &, NumLib::LocalToGlobalIndexMap const &, std::vector< double > &cache) const =0
void computeSecondaryVariableConcrete(double const t, GlobalVector const &x, int const process_id) override
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_matrix_nodes
PropertyVector< T > const * getPropertyVector(std::string const &name) const
Definition: Properties.h:119
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
Definition: Mesh.h:108
SmallDeformationProcessData< DisplacementDim > _process_data
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_single_component
std::vector< std::vector< MeshLib::Element * > > _vec_fracture_elements
CoupledSolutionsForStaggeredScheme * _coupled_solutions
Definition: Process.h:279
Handles configuration of several secondary variables from the project file.
Definition of the class Properties that implements a container of properties.
std::vector< std::vector< MeshLib::Node * > > _vec_fracture_nodes
void assembleWithJacobianConcreteProcess(const double t, GlobalVector const &x, GlobalVector const &xdot, const double dxdot_dx, const double dx_dx, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac) override
std::size_t getNumberOfElements() const
Get the number of elements.
Definition: Mesh.h:96
Ordering data by spatial location.
#define OGS_FATAL(fmt,...)
Definition: Error.h:71
void addSecondaryVariable(std::string const &internal_name, SecondaryVariableFunctions &&fcts)
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
std::vector< std::unique_ptr< LocalAssemblerInterface > > _local_assemblers
VectorMatrixAssembler _global_assembler
Definition: Process.h:273
std::vector< std::vector< MeshLib::Element * > > _vec_junction_fracture_matrix_elements
Ordering data by component type.
std::vector< std::size_t > & getActiveElementIDs() const