OGS 6.2.1-97-g73d1aeda3
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  std::string name,
34  MeshLib::Mesh& mesh,
35  std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
36  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
37  unsigned const integration_order,
38  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
39  process_variables,
41  SecondaryVariableCollection&& secondary_variables,
42  NumLib::NamedFunctionCaller&& named_function_caller)
43  : Process(std::move(name), mesh, std::move(jacobian_assembler), parameters,
44  integration_order, std::move(process_variables),
45  std::move(secondary_variables), std::move(named_function_caller)),
46  _process_data(std::move(process_data))
47 {
48  std::vector<std::pair<std::size_t, std::vector<int>>>
49  vec_branch_nodeID_matIDs;
50  std::vector<std::pair<std::size_t, std::vector<int>>>
51  vec_junction_nodeID_matIDs;
55  _vec_fracture_nodes, vec_branch_nodeID_matIDs,
56  vec_junction_nodeID_matIDs);
57 
58  if (_vec_fracture_mat_IDs.size() !=
59  _process_data.fracture_properties.size())
60  {
61  OGS_FATAL(
62  "The number of the given fracture properties (%d) are not "
63  "consistent"
64  " with the number of fracture groups in a mesh (%d).",
65  _process_data.fracture_properties.size(),
66  _vec_fracture_mat_IDs.size());
67  }
68 
69  // create a map from a material ID to a fracture ID
70  auto max_frac_mat_id = std::max_element(_vec_fracture_mat_IDs.begin(),
71  _vec_fracture_mat_IDs.end());
72  _process_data._map_materialID_to_fractureID.resize(*max_frac_mat_id + 1);
73  for (unsigned i = 0; i < _vec_fracture_mat_IDs.size(); i++)
74  {
75  _process_data._map_materialID_to_fractureID[_vec_fracture_mat_IDs[i]] =
76  i;
77  }
78 
79  // create a table of connected fracture IDs for each element
80  _process_data._vec_ele_connected_fractureIDs.resize(
81  mesh.getNumberOfElements());
82  for (unsigned i = 0; i < _vec_fracture_matrix_elements.size(); i++)
83  {
84  for (auto e : _vec_fracture_matrix_elements[i])
85  {
86  _process_data._vec_ele_connected_fractureIDs[e->getID()].push_back(
87  i);
88  }
89  }
90 
91  // set fracture property
92  for (auto& fracture_prop : _process_data.fracture_properties)
93  {
94  // based on the 1st element assuming a fracture forms a straight line
96  DisplacementDim,
97  *_vec_fracture_elements[fracture_prop.fracture_id][0],
98  fracture_prop);
99  }
100 
101  // set branches
102  for (auto& vec_branch_nodeID_matID : vec_branch_nodeID_matIDs)
103  {
104  auto master_matId = vec_branch_nodeID_matID.second[0];
105  auto slave_matId = vec_branch_nodeID_matID.second[1];
106  auto& master_frac =
107  _process_data.fracture_properties
108  [_process_data._map_materialID_to_fractureID[master_matId]];
109  auto& slave_frac =
110  _process_data.fracture_properties
111  [_process_data._map_materialID_to_fractureID[slave_matId]];
112 
113  master_frac.branches_master.push_back(
114  createBranchProperty(*mesh.getNode(vec_branch_nodeID_matID.first),
115  master_frac, slave_frac));
116 
117  slave_frac.branches_slave.push_back(
118  createBranchProperty(*mesh.getNode(vec_branch_nodeID_matID.first),
119  master_frac, slave_frac));
120  }
121 
122  // set junctions
123  for (auto& vec_junction_nodeID_matID : vec_junction_nodeID_matIDs)
124  {
125  _vec_junction_nodes.push_back(const_cast<MeshLib::Node*>(
126  _mesh.getNode(vec_junction_nodeID_matID.first)));
127  }
128  for (std::size_t i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
129  {
130  auto const& material_ids = vec_junction_nodeID_matIDs[i].second;
131  assert(material_ids.size() == 2);
132  std::array<int, 2> fracture_ids{
133  {_process_data._map_materialID_to_fractureID[material_ids[0]],
134  _process_data._map_materialID_to_fractureID[material_ids[1]]}};
135 
136  _process_data.junction_properties.emplace_back(
137  i, *mesh.getNode(vec_junction_nodeID_matIDs[i].first),
138  fracture_ids);
139  }
140 
141  // create a table of connected junction IDs for each element
142  _process_data._vec_ele_connected_junctionIDs.resize(
143  mesh.getNumberOfElements());
144  for (unsigned i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
145  {
146  auto node = mesh.getNode(vec_junction_nodeID_matIDs[i].first);
147  for (auto e : node->getElements())
148  {
149  _process_data._vec_ele_connected_junctionIDs[e->getID()].push_back(
150  i);
151  }
152  }
153 
154  // create a table of junction node and connected elements
156  vec_junction_nodeID_matIDs.size());
157  for (unsigned i = 0; i < vec_junction_nodeID_matIDs.size(); i++)
158  {
159  auto node = mesh.getNode(vec_junction_nodeID_matIDs[i].first);
160  for (auto e : node->getElements())
161  {
163  }
164  }
165 
166  //
167  // If Neumann BCs for the displacement_jump variable are required they need
168  // special treatment because of the levelset function. The implementation
169  // exists in the version 6.1.0 (e54815cc07ee89c81f953a4955b1c788595dd725)
170  // and was removed due to lack of applications.
171  //
172 
173  MeshLib::PropertyVector<int> const* material_ids(
174  mesh.getProperties().getPropertyVector<int>("MaterialIDs"));
175  _process_data._mesh_prop_materialIDs = material_ids;
176 }
177 
178 template <int DisplacementDim>
180 {
181  //------------------------------------------------------------
182  // prepare mesh subsets to define DoFs
183  //------------------------------------------------------------
184  // for extrapolation
186  std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes());
187  // regular u
189  std::make_unique<MeshLib::MeshSubset>(_mesh, _mesh.getNodes());
190  // u jump
191  for (unsigned i = 0; i < _vec_fracture_nodes.size(); i++)
192  {
193  _mesh_subset_fracture_nodes.push_back(
194  std::make_unique<MeshLib::MeshSubset const>(
195  _mesh, _vec_fracture_nodes[i]));
196  }
197  // enrichment for junctions
199  std::make_unique<MeshLib::MeshSubset>(_mesh, _vec_junction_nodes);
200 
201  // Collect the mesh subsets in a vector.
202  std::vector<MeshLib::MeshSubset> all_mesh_subsets;
203  std::generate_n(std::back_inserter(all_mesh_subsets), DisplacementDim,
204  [&]() { return *_mesh_subset_matrix_nodes; });
205  for (auto& ms : _mesh_subset_fracture_nodes)
206  {
207  std::generate_n(std::back_inserter(all_mesh_subsets),
208  DisplacementDim,
209  [&]() { return *ms; });
210  }
211  std::generate_n(std::back_inserter(all_mesh_subsets),
212  DisplacementDim,
213  [&]() { return *_mesh_subset_junction_nodes; });
214 
215  std::vector<int> const vec_n_components(
216  1 + _vec_fracture_mat_IDs.size() + _vec_junction_nodes.size(),
217  DisplacementDim);
218 
219  std::vector<std::vector<MeshLib::Element*> const*> vec_var_elements;
220  vec_var_elements.push_back(&_vec_matrix_elements);
221  for (unsigned i = 0; i < _vec_fracture_matrix_elements.size(); i++)
222  {
223  vec_var_elements.push_back(&_vec_fracture_matrix_elements[i]);
224  }
225  for (unsigned i = 0; i < _vec_junction_fracture_matrix_elements.size(); i++)
226  {
227  vec_var_elements.push_back(&_vec_junction_fracture_matrix_elements[i]);
228  }
229 
231  std::make_unique<NumLib::LocalToGlobalIndexMap>(
232  std::move(all_mesh_subsets),
233  vec_n_components,
234  vec_var_elements,
236 }
237 
238 template <int DisplacementDim>
240  NumLib::LocalToGlobalIndexMap const& dof_table,
241  MeshLib::Mesh const& mesh,
242  unsigned const integration_order)
243 {
245  DisplacementDim, SmallDeformationLocalAssemblerMatrix,
248  mesh.getElements(), dof_table, _local_assemblers,
249  mesh.isAxiallySymmetric(), integration_order, _process_data);
250 
251  // TODO move the two data members somewhere else.
252  // for extrapolation of secondary variables
253  std::vector<MeshLib::MeshSubset> all_mesh_subsets_single_component{
256  std::make_unique<NumLib::LocalToGlobalIndexMap>(
257  std::move(all_mesh_subsets_single_component),
258  // by location order is needed for output
260 
262  "sigma_xx",
264  1, getExtrapolator(), _local_assemblers,
266 
268  "sigma_yy",
270  1, getExtrapolator(), _local_assemblers,
272 
274  "sigma_zz",
276  1, getExtrapolator(), _local_assemblers,
278 
280  "sigma_xy",
282  1, getExtrapolator(), _local_assemblers,
284 
285  if (DisplacementDim == 3)
286  {
288  "sigma_xz",
290  1, getExtrapolator(), _local_assemblers,
292 
294  "sigma_yz",
296  1, getExtrapolator(), _local_assemblers,
298  }
299 
301  "epsilon_xx",
303  1, getExtrapolator(), _local_assemblers,
305 
307  "epsilon_yy",
309  1, getExtrapolator(), _local_assemblers,
311 
313  "epsilon_zz",
315  1, getExtrapolator(), _local_assemblers,
317 
319  "epsilon_xy",
321  1, getExtrapolator(), _local_assemblers,
323 
324  if (DisplacementDim == 3)
325  {
327  "epsilon_xz",
329  1, getExtrapolator(), _local_assemblers,
331 
333  "epsilon_yz",
335  1, getExtrapolator(), _local_assemblers,
337  }
338 
339  auto mesh_prop_sigma_xx = MeshLib::getOrCreateMeshProperty<double>(
340  const_cast<MeshLib::Mesh&>(mesh), "stress_xx",
342  mesh_prop_sigma_xx->resize(mesh.getNumberOfElements());
343  _process_data._mesh_prop_stress_xx = mesh_prop_sigma_xx;
344 
345  auto mesh_prop_sigma_yy = MeshLib::getOrCreateMeshProperty<double>(
346  const_cast<MeshLib::Mesh&>(mesh), "stress_yy",
348  mesh_prop_sigma_yy->resize(mesh.getNumberOfElements());
349  _process_data._mesh_prop_stress_yy = mesh_prop_sigma_yy;
350 
351  auto mesh_prop_sigma_zz = MeshLib::getOrCreateMeshProperty<double>(
352  const_cast<MeshLib::Mesh&>(mesh), "stress_zz",
354  mesh_prop_sigma_zz->resize(mesh.getNumberOfElements());
355  _process_data._mesh_prop_stress_zz = mesh_prop_sigma_zz;
356 
357  auto mesh_prop_sigma_xy = MeshLib::getOrCreateMeshProperty<double>(
358  const_cast<MeshLib::Mesh&>(mesh), "stress_xy",
360  mesh_prop_sigma_xy->resize(mesh.getNumberOfElements());
361  _process_data._mesh_prop_stress_xy = mesh_prop_sigma_xy;
362 
363  if (DisplacementDim == 3)
364  {
365  auto mesh_prop_sigma_xz = MeshLib::getOrCreateMeshProperty<double>(
366  const_cast<MeshLib::Mesh&>(mesh), "stress_xz",
368  mesh_prop_sigma_xz->resize(mesh.getNumberOfElements());
369  _process_data._mesh_prop_stress_xz = mesh_prop_sigma_xz;
370 
371  auto mesh_prop_sigma_yz = MeshLib::getOrCreateMeshProperty<double>(
372  const_cast<MeshLib::Mesh&>(mesh), "stress_yz",
374  mesh_prop_sigma_yz->resize(mesh.getNumberOfElements());
375  _process_data._mesh_prop_stress_yz = mesh_prop_sigma_yz;
376  }
377 
378  auto mesh_prop_epsilon_xx = MeshLib::getOrCreateMeshProperty<double>(
379  const_cast<MeshLib::Mesh&>(mesh), "strain_xx",
381  mesh_prop_epsilon_xx->resize(mesh.getNumberOfElements());
382  _process_data._mesh_prop_strain_xx = mesh_prop_epsilon_xx;
383 
384  auto mesh_prop_epsilon_yy = MeshLib::getOrCreateMeshProperty<double>(
385  const_cast<MeshLib::Mesh&>(mesh), "strain_yy",
387  mesh_prop_epsilon_yy->resize(mesh.getNumberOfElements());
388  _process_data._mesh_prop_strain_yy = mesh_prop_epsilon_yy;
389 
390  auto mesh_prop_epsilon_zz = MeshLib::getOrCreateMeshProperty<double>(
391  const_cast<MeshLib::Mesh&>(mesh), "strain_zz",
393  mesh_prop_epsilon_zz->resize(mesh.getNumberOfElements());
394  _process_data._mesh_prop_strain_zz = mesh_prop_epsilon_zz;
395 
396  auto mesh_prop_epsilon_xy = MeshLib::getOrCreateMeshProperty<double>(
397  const_cast<MeshLib::Mesh&>(mesh), "strain_xy",
399  mesh_prop_epsilon_xy->resize(mesh.getNumberOfElements());
400  _process_data._mesh_prop_strain_xy = mesh_prop_epsilon_xy;
401 
402  if (DisplacementDim == 3)
403  {
404  auto mesh_prop_epsilon_xz = MeshLib::getOrCreateMeshProperty<double>(
405  const_cast<MeshLib::Mesh&>(mesh), "strain_xz",
407  mesh_prop_epsilon_xz->resize(mesh.getNumberOfElements());
408  _process_data._mesh_prop_strain_xz = mesh_prop_epsilon_xz;
409 
410  auto mesh_prop_epsilon_yz = MeshLib::getOrCreateMeshProperty<double>(
411  const_cast<MeshLib::Mesh&>(mesh), "strain_yz",
413  mesh_prop_epsilon_yz->resize(mesh.getNumberOfElements());
414  _process_data._mesh_prop_strain_yz = mesh_prop_epsilon_yz;
415  }
416 
417  for (MeshLib::Element const* e : _mesh.getElements())
418  {
419  if (e->getDimension() < DisplacementDim)
420  {
421  continue;
422  }
423 
424  Eigen::Vector3d const pt(e->getCenterOfGravity().getCoords());
425  std::vector<FractureProperty*> e_fracture_props;
426  std::unordered_map<int, int> e_fracID_to_local;
427  unsigned tmpi = 0;
428  for (auto fid :
429  _process_data._vec_ele_connected_fractureIDs[e->getID()])
430  {
431  e_fracture_props.push_back(&_process_data.fracture_properties[fid]);
432  e_fracID_to_local.insert({fid, tmpi++});
433  }
434  std::vector<JunctionProperty*> e_junction_props;
435  std::unordered_map<int, int> e_juncID_to_local;
436  tmpi = 0;
437  for (auto fid :
438  _process_data._vec_ele_connected_junctionIDs[e->getID()])
439  {
440  e_junction_props.push_back(&_process_data.junction_properties[fid]);
441  e_juncID_to_local.insert({fid, tmpi++});
442  }
443  std::vector<double> const levelsets(uGlobalEnrichments(
444  e_fracture_props, e_junction_props, e_fracID_to_local, pt));
445 
446  for (unsigned i = 0; i < e_fracture_props.size(); i++)
447  {
448  auto mesh_prop_levelset = MeshLib::getOrCreateMeshProperty<double>(
449  const_cast<MeshLib::Mesh&>(mesh),
450  "levelset" +
451  std::to_string(e_fracture_props[i]->fracture_id + 1),
453  mesh_prop_levelset->resize(mesh.getNumberOfElements());
454  (*mesh_prop_levelset)[e->getID()] = levelsets[i];
455  }
456  for (unsigned i = 0; i < e_junction_props.size(); i++)
457  {
458  auto mesh_prop_levelset = MeshLib::getOrCreateMeshProperty<double>(
459  const_cast<MeshLib::Mesh&>(mesh),
460  "levelset" +
461  std::to_string(e_junction_props[i]->junction_id + 1 +
462  _process_data.fracture_properties.size()),
464  mesh_prop_levelset->resize(mesh.getNumberOfElements());
465  (*mesh_prop_levelset)[e->getID()] =
466  levelsets[i + e_fracture_props.size()];
467  }
468  }
469 
470  auto mesh_prop_w_n = MeshLib::getOrCreateMeshProperty<double>(
471  const_cast<MeshLib::Mesh&>(mesh), "w_n", MeshLib::MeshItemType::Cell,
472  1);
473  mesh_prop_w_n->resize(mesh.getNumberOfElements());
474  _process_data._mesh_prop_w_n = mesh_prop_w_n;
475 
476  auto mesh_prop_w_s = MeshLib::getOrCreateMeshProperty<double>(
477  const_cast<MeshLib::Mesh&>(mesh), "w_s", MeshLib::MeshItemType::Cell,
478  1);
479  mesh_prop_w_s->resize(mesh.getNumberOfElements());
480  _process_data._mesh_prop_w_s = mesh_prop_w_s;
481 
482  auto mesh_prop_b = MeshLib::getOrCreateMeshProperty<double>(
483  const_cast<MeshLib::Mesh&>(mesh), "aperture",
485  mesh_prop_b->resize(mesh.getNumberOfElements());
486  auto const& mesh_prop_matid = *_process_data._mesh_prop_materialIDs;
487  for (auto const& fracture_prop : _process_data.fracture_properties)
488  {
489  for (MeshLib::Element const* e : _mesh.getElements())
490  {
491  if (e->getDimension() == DisplacementDim)
492  {
493  continue;
494  }
495  if (mesh_prop_matid[e->getID()] != fracture_prop.mat_id)
496  {
497  continue;
498  }
500  x.setElementID(e->getID());
501  (*mesh_prop_b)[e->getID()] = fracture_prop.aperture0(0, x)[0];
502  }
503  }
504  _process_data._mesh_prop_b = mesh_prop_b;
505 
506  auto mesh_prop_fracture_stress_shear =
507  MeshLib::getOrCreateMeshProperty<double>(
508  const_cast<MeshLib::Mesh&>(mesh), "f_stress_s",
510  mesh_prop_fracture_stress_shear->resize(mesh.getNumberOfElements());
511  _process_data._mesh_prop_fracture_stress_shear =
512  mesh_prop_fracture_stress_shear;
513 
514  auto mesh_prop_fracture_stress_normal =
515  MeshLib::getOrCreateMeshProperty<double>(
516  const_cast<MeshLib::Mesh&>(mesh), "f_stress_n",
518  mesh_prop_fracture_stress_normal->resize(mesh.getNumberOfElements());
519  _process_data._mesh_prop_fracture_stress_normal =
520  mesh_prop_fracture_stress_normal;
521 }
522 
523 template <int DisplacementDim>
525  const double t, GlobalVector const& x, int const process_id)
526 {
527  DBUG("Compute the secondary variables for SmallDeformationProcess.");
528 
529  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
533  getDOFTable(process_id), t, x, _coupled_solutions);
534 }
535 
536 template <int DisplacementDim>
538 {
539  return false;
540 }
541 
542 template <int DisplacementDim>
544  const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K,
545  GlobalVector& b)
546 {
547  DBUG("Assemble SmallDeformationProcess.");
548 
549  const int process_id = 0;
550  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
551 
552  std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>>
553  dof_table = {std::ref(*_local_to_global_index_map)};
554  // Call global assembler for each local assembly item.
557  pv.getActiveElementIDs(), dof_table, t, x, M, K, b,
559 }
560 template <int DisplacementDim>
562  assembleWithJacobianConcreteProcess(const double t, GlobalVector const& x,
563  GlobalVector const& xdot,
564  const double dxdot_dx,
565  const double dx_dx, GlobalMatrix& M,
566  GlobalMatrix& K, GlobalVector& b,
567  GlobalMatrix& Jac)
568 {
569  DBUG("AssembleWithJacobian SmallDeformationProcess.");
570 
571  // Call global assembler for each local assembly item.
572  const int process_id = 0;
573  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
574 
575  std::vector<std::reference_wrapper<NumLib::LocalToGlobalIndexMap>>
576  dof_table = {std::ref(*_local_to_global_index_map)};
579  _local_assemblers, pv.getActiveElementIDs(), dof_table, t,
580  x, xdot, dxdot_dx, dx_dx, M, K, b, Jac, _coupled_solutions);
581 }
582 template <int DisplacementDim>
584  GlobalVector const& x, double const t, double const dt,
585  const int process_id)
586 {
587  DBUG("PreTimestep SmallDeformationProcess.");
588 
589  _process_data.dt = dt;
590  _process_data.t = t;
591 
592  ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0];
596  *_local_to_global_index_map, x, t, dt);
597 }
598 // ------------------------------------------------------------------------------------
599 // template instantiation
600 // ------------------------------------------------------------------------------------
601 template class SmallDeformationProcess<2>;
602 template class SmallDeformationProcess<3>;
603 
604 } // namespace SmallDeformation
605 } // namespace LIE
606 } // 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:287
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:117
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)
void setElementID(std::size_t element_id)
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:288
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:213
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:125
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
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:134
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:152
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:137
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:290
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:292
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:305
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:63
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().
SmallDeformationProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::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)
std::vector< std::unique_ptr< LocalAssemblerInterface > > _local_assemblers
VectorMatrixAssembler _global_assembler
Definition: Process.h:299
std::vector< std::vector< MeshLib::Element * > > _vec_junction_fracture_matrix_elements
Ordering data by component type.
std::vector< std::size_t > & getActiveElementIDs() const