OGS
SmallDeformationNonlocalFEM.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <algorithm>
14#include <limits>
15#include <memory>
16#include <vector>
17
18#include "Damage.h"
37
38namespace ProcessLib
39{
40namespace SmallDeformationNonlocal
41{
42namespace MPL = MaterialPropertyLib;
43
46template <typename ShapeMatrixType>
48{
49 std::vector<ShapeMatrixType, Eigen::aligned_allocator<ShapeMatrixType>> N;
50};
51
52template <typename ShapeFunction, int DisplacementDim>
55{
56public:
64
70 using IpData =
72
77
79 MeshLib::Element const& e,
80 std::size_t const /*local_matrix_size*/,
81 NumLib::GenericIntegrationMethod const& integration_method,
82 bool const is_axially_symmetric,
84 : _process_data(process_data),
85 _integration_method(integration_method),
86 _element(e),
87 _is_axially_symmetric(is_axially_symmetric)
88 {
89 unsigned const n_integration_points =
91
92 _ip_data.reserve(n_integration_points);
93 _secondary_data.N.resize(n_integration_points);
94
95 auto const shape_matrices =
97 DisplacementDim>(e, is_axially_symmetric,
99
100 auto& solid_material =
102 _process_data.solid_materials,
103 _process_data.material_ids,
104 e.getID());
105 auto* ehlers_solid_material = dynamic_cast<
107 &solid_material);
108 if (ehlers_solid_material == nullptr)
109 {
110 OGS_FATAL(
111 "The SmallDeformationNonlocalLocal process supports only "
112 "Ehlers material at the moment. For other materials the "
113 "interface must be extended first.");
114 }
115
116 for (unsigned ip = 0; ip < n_integration_points; ip++)
117 {
118 _ip_data.emplace_back(*ehlers_solid_material);
119 auto& ip_data = _ip_data[ip];
120 auto const& sm = shape_matrices[ip];
121 _ip_data[ip].integration_weight =
123 sm.integralMeasure * sm.detJ;
124
125 ip_data.N = sm.N;
126 ip_data.dNdx = sm.dNdx;
127
128 // Initialize current time step values
129 ip_data.sigma.setZero(
131 DisplacementDim));
133 DisplacementDim));
134
135 // Previous time step values are not initialized and are set later.
136 ip_data.sigma_prev.resize(
138 DisplacementDim));
139 ip_data.eps_prev.resize(
141 DisplacementDim));
142
143 _secondary_data.N[ip] = shape_matrices[ip].N;
144
145 ip_data.coordinates = getSingleIntegrationPointCoordinates(ip);
146 }
147 }
148
149 std::size_t setIPDataInitialConditions(std::string_view const name,
150 double const* values,
151 int const integration_order) override
152 {
153 if (integration_order !=
154 static_cast<int>(_integration_method.getIntegrationOrder()))
155 {
156 OGS_FATAL(
157 "Setting integration point initial conditions; The integration "
158 "order of the local assembler for element {:d} is different "
159 "from the integration order in the initial condition.",
160 _element.getID());
161 }
162
163 if (name == "sigma")
164 {
165 return setSigma(values);
166 }
167
168 if (name == "kappa_d")
169 {
172 }
173
174 return 0;
175 }
176
178 std::string const& name, std::vector<double> const& value) override
179 {
180 if (name == "kappa_d_ip")
181 {
182 if (value.size() != 1)
183 {
184 OGS_FATAL(
185 "CellData for kappa_d initial conditions has wrong number "
186 "of components. 1 expected, got {:d}.",
187 value.size());
188 }
189 setKappaD(value[0]);
190 }
191 }
192
193 double alpha_0(double const distance2) const
194 {
195 double const internal_length2 = _process_data.internal_length_squared;
196 return (distance2 > internal_length2)
197 ? 0
198 : (1 - distance2 / (internal_length2)) *
199 (1 - distance2 / (internal_length2));
200 }
201
203 std::size_t const /*mesh_item_id*/,
204 std::vector<
206 DisplacementDim>>> const& local_assemblers) override
207 {
208 auto const search_element_ids = MeshLib::findElementsWithinRadius(
209 _element, _process_data.internal_length_squared);
210
211 unsigned const n_integration_points =
213
214 std::vector<double> distances; // Cache for ip-ip distances.
215 //
216 // For every integration point in this element collect the neighbouring
217 // integration points falling in given radius (internal length) and
218 // compute the alpha_kl weight.
219 //
220 for (unsigned k = 0; k < n_integration_points; k++)
221 {
222 //
223 // Collect the integration points.
224 //
225
226 auto const& xyz = _ip_data[k].coordinates;
227
228 // For all neighbors of element
229 for (auto const search_element_id : search_element_ids)
230 {
231 auto const& la = local_assemblers[search_element_id];
232 la->getIntegrationPointCoordinates(xyz, distances);
233 for (int ip = 0; ip < static_cast<int>(distances.size()); ++ip)
234 {
235 if (distances[ip] >= _process_data.internal_length_squared)
236 {
237 continue;
238 }
239 // save into current ip_k
240 _ip_data[k].non_local_assemblers.push_back(
241 {la->getIPDataPtr(ip),
242 std::numeric_limits<double>::quiet_NaN(),
243 distances[ip]});
244 }
245 }
246 if (_ip_data[k].non_local_assemblers.size() == 0)
247 {
248 OGS_FATAL("no neighbours found!");
249 }
250
251 double a_k_sum_m = 0;
252 for (auto const& tuple : _ip_data[k].non_local_assemblers)
253 {
254 double const distance2_m = tuple.distance2;
255
256 auto const& w_m = tuple.ip_l_pointer->integration_weight;
257
258 a_k_sum_m += w_m * alpha_0(distance2_m);
259 }
260
261 //
262 // Calculate alpha_kl =
263 // alpha_0(|x_k - x_l|) / int_{m \in ip} alpha_0(|x_k - x_m|)
264 //
265 for (auto& tuple : _ip_data[k].non_local_assemblers)
266 {
267 double const distance2_l = tuple.distance2;
268 double const a_kl = alpha_0(distance2_l) / a_k_sum_m;
269
270 // Store the a_kl already multiplied with the integration
271 // weight of that l integration point.
272 auto const w_l = tuple.ip_l_pointer->integration_weight;
273 tuple.alpha_kl_times_w_l = a_kl * w_l;
274 }
275 }
276 }
277
279 int integration_point) const
280 {
281 auto const& N = _secondary_data.N[integration_point];
282
283 Eigen::Vector3d xyz = Eigen::Vector3d::Zero(); // Resulting coordinates
284 auto* nodes = _element.getNodes();
285 for (int i = 0; i < N.size(); ++i)
286 {
287 auto const& node_coordinates{nodes[i]->asEigenVector3d()};
288 xyz += node_coordinates * N[i];
289 }
290 return xyz;
291 }
292
297 Eigen::Vector3d const& coords,
298 std::vector<double>& distances) const override
299 {
300 unsigned const n_integration_points =
302
303 distances.resize(n_integration_points);
304
305 for (unsigned ip = 0; ip < n_integration_points; ip++)
306 {
307 auto const& xyz = _ip_data[ip].coordinates;
308 distances[ip] = (xyz - coords).squaredNorm();
309 }
310 }
311
312 void assemble(double const /*t*/, double const /*dt*/,
313 std::vector<double> const& /*local_x*/,
314 std::vector<double> const& /*local_x_prev*/,
315 std::vector<double>& /*local_M_data*/,
316 std::vector<double>& /*local_K_data*/,
317 std::vector<double>& /*local_b_data*/) override
318 {
319 OGS_FATAL(
320 "SmallDeformationNonlocalLocalAssembler: assembly without jacobian "
321 "is not "
322 "implemented.");
323 }
324
325 void preAssemble(double const t, double const dt,
326 std::vector<double> const& local_x) override
327 {
328 auto const n_integration_points =
330
331 MPL::VariableArray variables;
332 MPL::VariableArray variables_prev;
334 x_position.setElementID(_element.getID());
335
336 for (unsigned ip = 0; ip < n_integration_points; ip++)
337 {
338 x_position.setIntegrationPoint(ip);
339
340 auto const& N = _ip_data[ip].N;
341 auto const& dNdx = _ip_data[ip].dNdx;
342
343 auto const x_coord =
344 NumLib::interpolateXCoordinate<ShapeFunction,
346 auto const B = LinearBMatrix::computeBMatrix<
347 DisplacementDim, ShapeFunction::NPOINTS,
348 typename BMatricesType::BMatrixType>(dNdx, N, x_coord,
350 auto const& eps_prev = _ip_data[ip].eps_prev;
351 auto const& sigma_prev = _ip_data[ip].sigma_prev;
352
353 auto& eps = _ip_data[ip].eps;
354 auto& sigma = _ip_data[ip].sigma;
355 auto& C = _ip_data[ip].C;
356 auto& state = _ip_data[ip].material_state_variables;
357 double const& damage_prev = _ip_data[ip].damage_prev;
358
359 eps.noalias() =
360 B *
361 Eigen::Map<typename BMatricesType::NodalForceVectorType const>(
362 local_x.data(), ShapeFunction::NPOINTS * DisplacementDim);
363
364 // sigma is for plastic part only.
365 std::unique_ptr<
367 new_C;
368 std::unique_ptr<typename MaterialLib::Solids::MechanicsBase<
369 DisplacementDim>::MaterialStateVariables>
370 new_state;
371
372 // Compute sigma_eff from damage total stress sigma
373 using KelvinVectorType = typename BMatricesType::KelvinVectorType;
374 KelvinVectorType const sigma_eff_prev =
375 sigma_prev /
376 (1. - damage_prev); // damage_prev is in [0,1) range. See
377 // calculateDamage() function.
378
379 variables_prev.stress.emplace<
381 sigma_eff_prev);
382 variables_prev.mechanical_strain.emplace<
384 eps_prev);
385 variables_prev.temperature = _process_data.reference_temperature;
386 variables.mechanical_strain.emplace<
388 variables.temperature = _process_data.reference_temperature;
389
390 auto&& solution = _ip_data[ip].solid_material.integrateStress(
391 variables_prev, variables, t, x_position, dt, *state);
392
393 if (!solution)
394 {
395 OGS_FATAL("Computation of local constitutive relation failed.");
396 }
397
398 std::tie(sigma, state, C) = std::move(*solution);
399
401 {
402 auto const& ehlers_material =
404 DisplacementDim> const&>(_ip_data[ip].solid_material);
405 auto const damage_properties =
406 ehlers_material.evaluatedDamageProperties(t, x_position);
407 auto const material_properties =
408 ehlers_material.evaluatedMaterialProperties(t, x_position);
409
410 // Ehlers material state variables
411 auto& state_vars =
413 DisplacementDim>&>(
414 *_ip_data[ip].material_state_variables);
415
416 double const eps_p_eff_diff =
417 state_vars.eps_p.eff - state_vars.eps_p_prev.eff;
418
420 eps_p_eff_diff, sigma, _ip_data[ip].kappa_d_prev,
421 damage_properties.h_d, material_properties);
422
423 if (!_ip_data[ip].active_self)
424 {
425 _ip_data[ip].active_self |= _ip_data[ip].kappa_d > 0;
426 if (_ip_data[ip].active_self)
427 {
428 for (auto const& tuple :
429 _ip_data[ip].non_local_assemblers)
430 {
431 // Activate the integration point.
432 tuple.ip_l_pointer->activated = true;
433 }
434 }
435 }
436 }
437 }
438 }
439
440 void assembleWithJacobian(double const t, double const /*dt*/,
441 std::vector<double> const& local_x,
442 std::vector<double> const& /*local_x_prev*/,
443 std::vector<double>& local_b_data,
444 std::vector<double>& local_Jac_data) override
445 {
446 auto const local_matrix_size = local_x.size();
447
449 local_Jac_data, local_matrix_size, local_matrix_size);
450
452 local_b_data, local_matrix_size);
453
454 unsigned const n_integration_points =
456
458 x_position.setElementID(_element.getID());
459
460 // Non-local integration.
461 for (unsigned ip = 0; ip < n_integration_points; ip++)
462 {
463 x_position.setIntegrationPoint(ip);
464 auto const& w = _ip_data[ip].integration_weight;
465
466 auto const& N = _ip_data[ip].N;
467 auto const& dNdx = _ip_data[ip].dNdx;
468
469 auto const x_coord =
470 NumLib::interpolateXCoordinate<ShapeFunction,
472 auto const B = LinearBMatrix::computeBMatrix<
473 DisplacementDim, ShapeFunction::NPOINTS,
474 typename BMatricesType::BMatrixType>(dNdx, N, x_coord,
476
477 auto& sigma = _ip_data[ip].sigma;
478 auto& C = _ip_data[ip].C;
479 double& damage = _ip_data[ip].damage;
480
481 {
482 double nonlocal_kappa_d = 0;
483
484 if (_ip_data[ip].active_self || _ip_data[ip].activated)
485 {
486 for (auto const& tuple : _ip_data[ip].non_local_assemblers)
487 {
488 // Get local variable for the integration point l.
489 double const kappa_d_l = tuple.ip_l_pointer->kappa_d;
490 double const a_kl_times_w_l = tuple.alpha_kl_times_w_l;
491 nonlocal_kappa_d += a_kl_times_w_l * kappa_d_l;
492 }
493 }
494
495 auto const& ehlers_material =
497 DisplacementDim> const&>(_ip_data[ip].solid_material);
498
499 //
500 // Overnonlocal formulation
501 //
502 // See (Di Luzio & Bazant 2005, IJSS) for details.
503 // The implementation would go here and would be for a given
504 // gamma_nonlocal:
505 //
506 // Update nonlocal damage with local damage (scaled with 1 -
507 // \gamma_{nonlocal}) for the current integration point and the
508 // nonlocal integral part.
509 // nonlocal_kappa_d = (1. - gamma_nonlocal) * kappa_d +
510 // gamma_nonlocal * nonlocal_kappa_d;
511
512 nonlocal_kappa_d = std::max(0., nonlocal_kappa_d);
513
514 // Update damage based on nonlocal kappa_d
515 {
516 auto const damage_properties =
517 ehlers_material.evaluatedDamageProperties(t,
518 x_position);
519 damage = calculateDamage(nonlocal_kappa_d,
520 damage_properties.alpha_d,
521 damage_properties.beta_d);
522 damage = std::max(0., damage);
523 }
524 sigma = sigma * (1. - damage);
525 }
526
527 local_b.noalias() -= B.transpose() * sigma * w;
528 local_Jac.noalias() += B.transpose() * C * (1. - damage) * B * w;
529 }
530 }
531
532 void initializeConcrete() override
533 {
534 unsigned const n_integration_points =
536
537 for (unsigned ip = 0; ip < n_integration_points; ip++)
538 {
539 _ip_data[ip].pushBackState();
540 }
541 }
542
543 void postTimestepConcrete(Eigen::VectorXd const& /*local_x*/,
544 Eigen::VectorXd const& /*local_x_prev*/,
545 double const /*t*/, double const /*dt*/,
546 int const /*process_id*/) override
547 {
548 unsigned const n_integration_points =
550
551 for (unsigned ip = 0; ip < n_integration_points; ip++)
552 {
553 _ip_data[ip].pushBackState();
554 }
555 }
556
557 void computeCrackIntegral(std::size_t mesh_item_id,
558 NumLib::LocalToGlobalIndexMap const& dof_table,
559 GlobalVector const& x,
560 double& crack_volume) override
561 {
562 auto const indices = NumLib::getIndices(mesh_item_id, dof_table);
563 auto local_x = x.get(indices);
564
565 auto u = Eigen::Map<typename BMatricesType::NodalForceVectorType const>(
566 local_x.data(), ShapeFunction::NPOINTS * DisplacementDim);
567
568 int const n_integration_points =
570
571 for (int ip = 0; ip < n_integration_points; ip++)
572 {
573 auto const& dNdx = _ip_data[ip].dNdx;
574 auto const& d = _ip_data[ip].damage;
575 auto const& w = _ip_data[ip].integration_weight;
576
577 double const div_u =
578 Deformation::divergence<DisplacementDim,
579 ShapeFunction::NPOINTS>(u, dNdx);
580 crack_volume += div_u * d * w;
581 }
582 }
583
584 Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix(
585 const unsigned integration_point) const override
586 {
587 auto const& N = _secondary_data.N[integration_point];
588
589 // assumes N is stored contiguously in memory
590 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
591 }
592
593 std::vector<double> const& getNodalValues(
594 std::vector<double>& nodal_values) const override
595 {
596 nodal_values.clear();
598 nodal_values, ShapeFunction::NPOINTS * DisplacementDim);
599
600 unsigned const n_integration_points =
602
603 for (unsigned ip = 0; ip < n_integration_points; ip++)
604 {
605 auto const& w = _ip_data[ip].integration_weight;
606
607 auto const& N = _ip_data[ip].N;
608 auto const& dNdx = _ip_data[ip].dNdx;
609
610 auto const x_coord =
611 NumLib::interpolateXCoordinate<ShapeFunction,
613 auto const B = LinearBMatrix::computeBMatrix<
614 DisplacementDim, ShapeFunction::NPOINTS,
615 typename BMatricesType::BMatrixType>(dNdx, N, x_coord,
617 auto& sigma = _ip_data[ip].sigma;
618
619 local_b.noalias() += B.transpose() * sigma * w;
620 }
621
622 return nodal_values;
623 }
624
625 std::vector<double> const& getIntPtFreeEnergyDensity(
626 const double /*t*/,
627 std::vector<GlobalVector*> const& /*x*/,
628 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
629 std::vector<double>& cache) const override
630 {
631 cache.clear();
632 cache.reserve(_ip_data.size());
633
634 transform(cbegin(_ip_data), cend(_ip_data), back_inserter(cache),
635 [](auto const& ip_data)
636 { return ip_data.free_energy_density; });
637
638 return cache;
639 }
640
641 std::vector<double> const& getIntPtEpsPV(
642 const double /*t*/,
643 std::vector<GlobalVector*> const& /*x*/,
644 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
645 std::vector<double>& cache) const override
646 {
647 cache.clear();
648 cache.reserve(_ip_data.size());
649
650 transform(cbegin(_ip_data), cend(_ip_data), back_inserter(cache),
651 [](auto const& ip_data) { return *ip_data.eps_p_V; });
652
653 return cache;
654 }
655
656 std::vector<double> const& getIntPtEpsPDXX(
657 const double /*t*/,
658 std::vector<GlobalVector*> const& /*x*/,
659 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
660 std::vector<double>& cache) const override
661 {
662 cache.clear();
663 cache.reserve(_ip_data.size());
664
665 transform(cbegin(_ip_data), cend(_ip_data), back_inserter(cache),
666 [](auto const& ip_data) { return *ip_data.eps_p_D_xx; });
667
668 return cache;
669 }
670
671 std::vector<double> const& getIntPtSigma(
672 const double /*t*/,
673 std::vector<GlobalVector*> const& /*x*/,
674 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
675 std::vector<double>& cache) const override
676 {
678 _ip_data, &IpData::sigma, cache);
679 }
680
681 std::vector<double> const& getIntPtEpsilon(
682 const double /*t*/,
683 std::vector<GlobalVector*> const& /*x*/,
684 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
685 std::vector<double>& cache) const override
686 {
688 _ip_data, &IpData::eps, cache);
689 }
690
691 std::size_t setSigma(double const* values)
692 {
694 values, _ip_data, &IpData::sigma);
695 }
696
697 // TODO (naumov) This method is same as getIntPtSigma but for arguments and
698 // the ordering of the cache_mat.
699 // There should be only one.
700 std::vector<double> getSigma() const override
701 {
704 }
705
706 void setKappaD(double value)
707 {
708 for (auto& ip_data : _ip_data)
709 {
710 ip_data.kappa_d = value;
711 }
712 }
713 std::vector<double> getKappaD() const override
714 {
715 unsigned const n_integration_points =
717
718 std::vector<double> result_values;
719 result_values.resize(n_integration_points);
720
721 for (unsigned ip = 0; ip < n_integration_points; ++ip)
722 {
723 result_values[ip] = _ip_data[ip].kappa_d;
724 }
725
726 return result_values;
727 }
728
729 std::vector<double> const& getIntPtDamage(
730 const double /*t*/,
731 std::vector<GlobalVector*> const& /*x*/,
732 std::vector<NumLib::LocalToGlobalIndexMap const*> const& /*dof_table*/,
733 std::vector<double>& cache) const override
734 {
736 _ip_data, &IpData::damage, cache);
737 }
738
739 unsigned getNumberOfIntegrationPoints() const override
740 {
742 }
743
745 DisplacementDim>::MaterialStateVariables const&
746 getMaterialStateVariablesAt(int const integration_point) const override
747 {
748 return *_ip_data[integration_point].material_state_variables;
749 }
750
751private:
752 std::vector<double> const& getIntPtSigma(std::vector<double>& cache,
753 std::size_t const component) const
754 {
755 cache.clear();
756 cache.reserve(_ip_data.size());
757
758 for (auto const& ip_data : _ip_data)
759 {
760 if (component < 3)
761 { // xx, yy, zz components
762 cache.push_back(ip_data.sigma[component]);
763 }
764 else
765 { // mixed xy, yz, xz components
766 cache.push_back(ip_data.sigma[component] / std::sqrt(2));
767 }
768 }
769
770 return cache;
771 }
772
773 std::vector<double> const& getIntPtEpsilon(
774 std::vector<double>& cache, std::size_t const component) const
775 {
776 cache.clear();
777 cache.reserve(_ip_data.size());
778
779 for (auto const& ip_data : _ip_data)
780 {
781 if (component < 3) // xx, yy, zz components
782 cache.push_back(ip_data.eps[component]);
783 else // mixed xy, yz, xz components
784 cache.push_back(ip_data.eps[component] / std::sqrt(2));
785 }
786
787 return cache;
788 }
789
791 {
792 return &_ip_data[ip];
793 }
794
795private:
797
798 std::vector<IpData, Eigen::aligned_allocator<IpData>> _ip_data;
799
804
805 static const int displacement_size =
806 ShapeFunction::NPOINTS * DisplacementDim;
807};
808
809} // namespace SmallDeformationNonlocal
810} // namespace ProcessLib
#define OGS_FATAL(...)
Definition Error.h:26
DamageProperties evaluatedDamageProperties(double const t, ParameterLib::SpatialPosition const &x) const
Definition Ehlers.h:343
Global vector based on Eigen vector.
Definition EigenVector.h:25
double get(IndexType rowId) const
get entry
Definition EigenVector.h:58
double getWeight() const
virtual Node *const * getNodes() const =0
Get array of element nodes.
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:89
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
void setElementID(std::size_t element_id)
void setIntegrationPoint(unsigned integration_point)
MatrixType< _kelvin_vector_size, _number_of_dof > BMatrixType
MatrixType< _number_of_dof, _number_of_dof > StiffnessMatrixType
VectorType< _number_of_dof > NodalForceVectorType
Rhs residual.
VectorType< _kelvin_vector_size > KelvinVectorType
void postTimestepConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
std::size_t setIPDataInitialConditions(std::string_view const name, double const *values, int const integration_order) override
void computeCrackIntegral(std::size_t mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double &crack_volume) override
std::vector< double > const & getIntPtEpsilon(std::vector< double > &cache, std::size_t const component) const
void assemble(double const, double const, std::vector< double > const &, std::vector< double > const &, std::vector< double > &, std::vector< double > &, std::vector< double > &) override
IntegrationPointDataNonlocalInterface * getIPDataPtr(int const ip) override
SmallDeformationNonlocalLocalAssembler(MeshLib::Element const &e, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, SmallDeformationNonlocalProcessData< DisplacementDim > &process_data)
void setIPDataInitialConditionsFromCellData(std::string const &name, std::vector< double > const &value) override
void nonlocal(std::size_t const, std::vector< std::unique_ptr< SmallDeformationNonlocalLocalAssemblerInterface< DisplacementDim > > > const &local_assemblers) override
std::vector< double > const & getIntPtSigma(std::vector< double > &cache, std::size_t const component) const
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
std::vector< double > const & getIntPtEpsPDXX(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
MaterialLib::Solids::MechanicsBase< DisplacementDim >::MaterialStateVariables const & getMaterialStateVariablesAt(int const integration_point) const override
std::vector< double > const & getIntPtEpsPV(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
void preAssemble(double const t, double const dt, std::vector< double > const &local_x) override
std::vector< double > const & getIntPtFreeEnergyDensity(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
SmallDeformationNonlocalLocalAssembler(SmallDeformationNonlocalLocalAssembler const &)=delete
std::vector< double > const & getIntPtSigma(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< double > const & getIntPtEpsilon(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
void getIntegrationPointCoordinates(Eigen::Vector3d const &coords, std::vector< double > &distances) const override
std::vector< double > const & getNodalValues(std::vector< double > &nodal_values) const override
void assembleWithJacobian(double const t, double const, std::vector< double > const &local_x, std::vector< double > const &, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data) override
SmallDeformationNonlocalLocalAssembler(SmallDeformationNonlocalLocalAssembler &&)=delete
std::vector< double > const & getIntPtDamage(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
auto & selectSolidConstitutiveRelation(SolidMaterialsMap const &constitutive_relations, MeshLib::PropertyVector< int > const *const material_ids, std::size_t const element_id)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
std::vector< std::size_t > findElementsWithinRadius(Element const &start_element, double const radius_squared)
double interpolateXCoordinate(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
double divergence(const Eigen::Ref< Eigen::Matrix< double, NPOINTS *DisplacementDim, 1 > const > &u, DNDX_Type const &dNdx)
Divergence of displacement, the volumetric strain.
Definition Divergence.h:19
BMatrixType computeBMatrix(DNDX_Type const &dNdx, N_Type const &N, const double radius, const bool is_axially_symmetric)
Fills a B-matrix based on given shape function dN/dx values.
double calculateDamage(double const kappa_d, double const alpha_d, double const beta_d)
Definition Damage.h:25
double calculateDamageKappaD(double const eps_p_eff_diff, KelvinVectorType const &sigma, double const kappa_d_prev, double const h_d, MaterialLib::Solids::Ehlers::MaterialProperties const &mp)
Definition Damage.h:39
std::vector< double > const & getIntegrationPointScalarData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
std::vector< double > const & getIntegrationPointKelvinVectorData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
std::size_t setIntegrationPointKelvinVectorData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
std::size_t setIntegrationPointScalarData(double const *values, IntegrationPointDataVector &ip_data_vector, MemberType IpData::*const member)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
PlasticStrain< KelvinVector > eps_p
plastic part of the state.
Definition Ehlers.h:244
std::vector< ShapeMatrixType, Eigen::aligned_allocator< ShapeMatrixType > > N