v0.15.0
Loading...
Searching...
No Matches
EshelbianADOL-C.cpp
Go to the documentation of this file.
1/**
2 * \file EshelbianPlasticity.cpp
3 * \brief Implementation of automatic differentiation
4 */
5
6#include <MoFEM.hpp>
7using namespace MoFEM;
8
9#include <MatrixFunction.hpp>
10
12
13#include <EshelbianAux.hpp>
14
15#include <boost/math/constants/constants.hpp>
16
17constexpr double third = boost::math::constants::third<double>();
18
19namespace EshelbianPlasticity {
20
22
23 OpSpatialPhysical(const std::string &field_name,
24 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
25 const double alpha_u)
26 : OpAssembleVolume(field_name, data_ptr, OPROW), alphaU(alpha_u) {}
27
29
30private:
31 const double alphaU;
32};
33
36
38 auto t_L = symm_L_tensor();
39
40 int nb_dofs = data.getIndices().size();
41 int nb_integration_pts = data.getN().size1();
42 auto v = getVolume();
44 auto t_approx_P_adjoint_log_du =
46 auto t_P = getFTensor2FromMat<3, 3>(dataAtPts->PAtPts);
47 auto t_dot_log_u =
48 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
49 auto t_diff_u =
50 getFTensor4DdgFromMat<3, 3, 1>(dataAtPts->diffStretchTensorAtPts);
51
52 FTensor::Index<'i', 3> i;
53 FTensor::Index<'j', 3> j;
54 FTensor::Index<'k', 3> k;
55 FTensor::Index<'l', 3> l;
56 auto get_ftensor2 = [](auto &v) {
58 &v[0], &v[1], &v[2], &v[3], &v[4], &v[5]);
59 };
60
61 int nb_base_functions = data.getN().size2();
62 auto t_row_base_fun = data.getFTensor0N();
63 for (int gg = 0; gg != nb_integration_pts; ++gg) {
64 double a = v * t_w;
65 auto t_nf = get_ftensor2(nF);
66
68 t_Ldiff_u(i, j, L) = t_diff_u(i, j, k, l) * t_L(k, l, L);
69
71 t_viscous_P(i, j) =
72 alphaU *
73 t_dot_log_u(i,
74 j); // That is cheat, should be split on axial and deviator
75
77 t_residual(L) =
78 a * (t_approx_P_adjoint_log_du(L) - t_Ldiff_u(i, j, L) * t_P(i, j) -
79 t_L(i, j, L) * t_viscous_P(i, j));
80
81 int bb = 0;
82 for (; bb != nb_dofs / 6; ++bb) {
83 t_nf(L) -= t_row_base_fun * t_residual(L);
84 ++t_nf;
85 ++t_row_base_fun;
86 }
87 for (; bb != nb_base_functions; ++bb)
88 ++t_row_base_fun;
89
90 ++t_w;
91 ++t_approx_P_adjoint_log_du;
92 ++t_P;
93 ++t_dot_log_u;
94 ++t_diff_u;
95 }
97}
98
100 const std::string &field_name,
101 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha_u) {
102 return new OpSpatialPhysical(field_name, data_ptr, alpha_u);
103}
104
106 const std::string &field_name,
107 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
108 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
109 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv) {
110 return nullptr;
111}
112
114 OpSpatialPhysical_du_du(std::string row_field, std::string col_field,
115 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
116 const double alpha)
117 : OpAssembleVolume(row_field, col_field, data_ptr, OPROWCOL, false),
118 alphaU(alpha) {
119 sYmm = false;
120 }
121 MoFEMErrorCode integrate(EntData &row_data, EntData &col_data);
122 MoFEMErrorCode integratePiola(EntData &row_data, EntData &col_data);
123
124private:
125 const double alphaU;
126 MatrixDouble dP;
127
128};
129
131 EntData &col_data) {
132 return integratePiola(row_data, col_data);
133}
134
136 EntData &col_data) {
138
141 auto t_L = symm_L_tensor();
142 auto t_diff = diff_tensor();
143
144 int nb_integration_pts = row_data.getN().size1();
145 int row_nb_dofs = row_data.getIndices().size();
146 int col_nb_dofs = col_data.getIndices().size();
147
148 auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
150 size_symm>(
151
152 &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
153 &m(r + 0, c + 4), &m(r + 0, c + 5),
154
155 &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
156 &m(r + 1, c + 4), &m(r + 1, c + 5),
157
158 &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
159 &m(r + 2, c + 4), &m(r + 2, c + 5),
160
161 &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
162 &m(r + 3, c + 4), &m(r + 3, c + 5),
163
164 &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
165 &m(r + 4, c + 4), &m(r + 4, c + 5),
166
167 &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
168 &m(r + 5, c + 4), &m(r + 5, c + 5)
169
170 );
171 };
172 FTensor::Index<'i', 3> i;
173 FTensor::Index<'j', 3> j;
174 FTensor::Index<'k', 3> k;
175 FTensor::Index<'l', 3> l;
176 FTensor::Index<'m', 3> m;
177 FTensor::Index<'n', 3> n;
178
179 auto v = getVolume();
180 auto t_w = getFTensor0IntegrationWeight();
181
182 auto get_dP = [&]() {
183 dP.resize(size_symm * size_symm, nb_integration_pts, false);
184 auto ts_a = getTSa();
185
186 auto t_P = getFTensor2FromMat<3, 3>(dataAtPts->PAtPts);
187 auto r_P_du = getFTensor4FromMat<3, 3, 3, 3>(dataAtPts->P_du);
188 auto t_approx_P_adjoint__dstretch =
189 getFTensor2FromMat<3, 3>(dataAtPts->adjointPdstretchAtPts);
190 auto t_dot_log_u =
191 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
192 auto t_u = getFTensor2SymmetricFromMat<3>(dataAtPts->stretchTensorAtPts);
193 auto t_diff_u =
194 getFTensor4DdgFromMat<3, 3, 1>(dataAtPts->diffStretchTensorAtPts);
195 auto t_eigen_vals = getFTensor1FromMat<3>(dataAtPts->eigenVals);
196 auto t_eigen_vecs = getFTensor2FromMat<3, 3>(dataAtPts->eigenVecs);
197 auto &nbUniq = dataAtPts->nbUniq;
198
200 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
201
203 t_deltaP(i, j) = t_approx_P_adjoint__dstretch(i, j) - t_P(i, j);
204
206 t_Ldiff_u(i, j, L) = t_diff_u(i, j, m, n) * t_L(m, n, L);
207 t_dP(L, J) =
208 -t_Ldiff_u(i, j, L) * (r_P_du(i, j, k, l) * t_Ldiff_u(k, l, J));
209 // viscous stress derivative
210 t_dP(L, J) -= (alphaU * ts_a) *
211 (t_L(i, j, L) * (t_diff(i, j, k, l) * t_L(k, l, J)));
212
216 t_deltaP_sym(i, j) = (t_deltaP(i, j) || t_deltaP(j, i));
217 t_deltaP_sym(i, j) /= 2.0;
218 auto t_diff2_uP2 = EigenMatrix::getDiffDiffMat(
219 t_eigen_vals, t_eigen_vecs, EshelbianCore::f, EshelbianCore::d_f,
220 EshelbianCore::dd_f, t_deltaP_sym, nbUniq[gg]);
221 t_dP(L, J) += t_L(i, j, L) * (t_diff2_uP2(i, j, k, l) * t_L(k, l, J));
222 }
223
224 ++t_P;
225 ++t_dP;
226 ++r_P_du;
227 ++t_approx_P_adjoint__dstretch;
228 ++t_dot_log_u;
229 ++t_u;
230 ++t_diff_u;
231 ++t_eigen_vals;
232 ++t_eigen_vecs;
233 }
234
236 };
237
238 int row_nb_base_functions = row_data.getN().size2();
239 auto t_row_base_fun = row_data.getFTensor0N();
240
241 auto t_dP = get_dP();
242 for (int gg = 0; gg != nb_integration_pts; ++gg) {
243 double a = v * t_w;
244
245 int rr = 0;
246 for (; rr != row_nb_dofs / 6; ++rr) {
247 auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
248 auto t_m = get_ftensor2(K, 6 * rr, 0);
249 for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
250 const double b = a * t_row_base_fun * t_col_base_fun;
251 t_m(L, J) -= b * t_dP(L, J);
252 ++t_m;
253 ++t_col_base_fun;
254 }
255 ++t_row_base_fun;
256 }
257
258 for (; rr != row_nb_base_functions; ++rr) {
259 ++t_row_base_fun;
260 }
261
262 ++t_w;
263 ++t_dP;
264 }
266}
267
269 std::string row_field, std::string col_field,
270 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha) {
271 return new OpSpatialPhysical_du_du(row_field, col_field, data_ptr, alpha);
272}
273
275 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
276 boost::shared_ptr<double> total_energy_ptr) {
277 return nullptr;
278}
279
281 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
282 boost::shared_ptr<PhysicalEquations> physics_ptr) {
283 return nullptr;
284}
285
287 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
288 boost::shared_ptr<PhysicalEquations> physics_ptr) {
289 return nullptr;
290};
291
293 OpGetScale(boost::shared_ptr<double> scale_ptr)
295 scalePtr(scale_ptr) {}
296
297 MoFEMErrorCode doWork(int side, EntityType type,
300 *(scalePtr) = 1.;
302 }
303
304private:
305 boost::shared_ptr<double> scalePtr;
306};
307
309 boost::shared_ptr<double> scale_ptr,
310 boost::shared_ptr<PhysicalEquations> physics_ptr) {
311 return new OpGetScale(scale_ptr);
312};
313
314struct OpHMHH : public OpJacobian {
315 OpHMHH(const int tag, const bool eval_rhs, const bool eval_lhs,
316 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
317 boost::shared_ptr<PhysicalEquations> physics_ptr)
318 : OpJacobian(tag, eval_rhs, eval_lhs, data_ptr, physics_ptr) {}
319
322};
323
326 FTensor::Index<'i', 3> i;
327 FTensor::Index<'j', 3> j;
328 FTensor::Index<'k', 3> k;
329 FTensor::Index<'l', 3> l;
330 FTensor::Index<'m', 3> m;
331 FTensor::Index<'n', 3> n;
332
333 const auto nb_integration_pts = getGaussPts().size2();
334 auto iu = getFTensor2SymmetricFromMat<3>(dataAtPts->stretchTensorAtPts);
335 auto t_grad_h1 = getFTensor2FromMat<3, 3>(dataAtPts->wGradH1AtPts);
336
337 auto create_data_vec = [nb_integration_pts](auto &v) {
338 v.resize(nb_integration_pts, false);
339 };
340 auto create_data_mat = [nb_integration_pts](auto &m) {
341 m.resize(9, nb_integration_pts, false);
342 };
343
344 create_data_mat(dataAtPts->PAtPts);
345
346 constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
347 auto r_P = getFTensor2FromMat<3, 3>(dataAtPts->PAtPts);
348 for (unsigned int gg = 0; gg != nb_integration_pts; ++gg) {
349
351
354 t_h1(i, j) = t_kd(i, j);
355 physicsPtr->get_h()(i, j) = iu(i, j);
356 break;
357 case LARGE_ROT:
358 case MODERATE_ROT:
359 t_h1(i, j) = t_grad_h1(i, j) + t_kd(i, j);
360 physicsPtr->get_h()(i, j) = iu(i, k) * t_h1(k, j);
361 break;
362 case SMALL_ROT:
363 physicsPtr->get_h()(i, j) = iu(i, j);
364 break;
365 };
366
367 int r = ::function(tAg, physicsPtr->dependentVariablesPiola.size(),
368 physicsPtr->activeVariables.size(),
369 &physicsPtr->activeVariables[0],
370 &physicsPtr->dependentVariablesPiola[0]);
371 if (r < 0) { // function is locally analytic
372 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
373 "ADOL-C function evaluation with error r = %d", r);
374 }
375
378 r_P(i, j) = physicsPtr->get_P()(i, j);
379 break;
380 case LARGE_ROT:
381 case MODERATE_ROT: {
383 t_h1_du(i, j, m, n) = t_kd(i, m) * (t_kd(k, n) * t_h1(k, j));
384 r_P(k, l) = physicsPtr->get_P()(i, j) * t_h1_du(i, j, k, l);
385 }; break;
386 case SMALL_ROT:
387 r_P(i, j) = physicsPtr->get_P()(i, j);
388 break;
389 };
390
391 ++iu;
392 ++t_grad_h1;
393 ++r_P;
394 }
396}
397
400 FTensor::Index<'i', 3> i;
401 FTensor::Index<'j', 3> j;
402 FTensor::Index<'k', 3> k;
403 FTensor::Index<'l', 3> l;
404 FTensor::Index<'m', 3> m;
405 FTensor::Index<'n', 3> n;
406 FTensor::Index<'o', 3> o;
407 FTensor::Index<'p', 3> p;
408
409 const int number_of_active_variables = physicsPtr->activeVariables.size();
410 const int number_of_dependent_variables =
411 physicsPtr->dependentVariablesPiola.size();
412 std::vector<double *> jac_ptr(number_of_dependent_variables);
413 for (unsigned int n = 0; n != number_of_dependent_variables; ++n) {
414 jac_ptr[n] =
415 &(physicsPtr
416 ->dependentVariablesPiolaDirevatives[n *
417 number_of_active_variables]);
418 }
419
420 const auto nb_integration_pts = getGaussPts().size2();
421
422 auto create_data_mat = [nb_integration_pts](auto &m) {
423 m.resize(9, nb_integration_pts, false);
424 };
425
426 dataAtPts->P_du.resize(81, nb_integration_pts, false);
427
428 auto iu = getFTensor2SymmetricFromMat<3>(dataAtPts->stretchTensorAtPts);
429 auto t_grad_h1 = getFTensor2FromMat<3, 3>(dataAtPts->wGradH1AtPts);
430 auto r_P_du = getFTensor4FromMat<3, 3, 3, 3>(dataAtPts->P_du);
431
435
436 constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
437
438 for (unsigned int gg = 0; gg != nb_integration_pts; ++gg) {
439
441
444 t_h1(i, j) = t_kd(i, j);
445 physicsPtr->get_h()(i, j) = iu(i, k) * t_h1(k, j);
446 break;
447 case LARGE_ROT:
448 case MODERATE_ROT:
449 t_h1(i, j) = t_grad_h1(i, j) + t_kd(i, j);
450 physicsPtr->get_h()(i, j) = iu(i, k) * t_h1(k, j);
451 break;
452 case SMALL_ROT:
453 physicsPtr->get_h()(i, j) = iu(i, j);
454 break;
455 };
456
457 // play recorder for jacobians
458 int r = ::jacobian(tAg, number_of_dependent_variables,
459 number_of_active_variables,
460 &physicsPtr->activeVariables[0], &jac_ptr[0]);
461 if (r < 0) {
462 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
463 "ADOL-C function evaluation with error");
464 }
465
467 t_P_dh_tmp(i, j, N0, k) = physicsPtr->get_P_dh0()(i, j, k);
468 t_P_dh_tmp(i, j, N1, k) = physicsPtr->get_P_dh1()(i, j, k);
469 t_P_dh_tmp(i, j, N2, k) = physicsPtr->get_P_dh2()(i, j, k);
470
472 case NO_H1_CONFIGURATION: {
474 t_h1_du(i, j, m, n) = t_kd(i, m) * t_kd(j, n);
475 r_P_du(k, l, m, n) =
476 (t_P_dh_tmp(i, j, o, p) * t_h1_du(o, p, m, n)) * t_h1_du(i, j, k, l);
477 } break;
478 case LARGE_ROT: {
480 t_h1_du(i, j, m, n) = t_kd(i, m) * (t_kd(k, n) * t_h1(k, j));
481 r_P_du(k, l, m, n) =
482 (t_P_dh_tmp(i, j, o, p) * t_h1_du(o, p, m, n)) * t_h1_du(i, j, k, l);
483 } break;
484 case MODERATE_ROT:
485 case SMALL_ROT:
486 r_P_du(i, j, m, n) = t_P_dh_tmp(i, j, m, n);
487 break;
488 };
489
490 ++iu;
491 ++t_grad_h1;
492 ++r_P_du;
493 }
495}
496
498 const int tag, const bool eval_rhs, const bool eval_lhs,
499 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
500 boost::shared_ptr<PhysicalEquations> physics_ptr) {
501 return (new OpHMHH(tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
502}
503
504} // namespace EshelbianPlasticity
505
507#include <impl/HMHNeohookean.cpp>
509#include <impl/HMHHencky.cpp>
510
511namespace EshelbianPlasticity {
512
514 const int tape, const double lambda, const double mu,
515 const double sigma_y) {
517 physicalEquations = boost::make_shared<HMHStVenantKirchhoff>(lambda, mu);
518 CHKERR physicalEquations->recordTape(tape, nullptr);
520}
521
523 const int tape, const double alpha, const double beta, const double lambda,
524 const double sigma_y) {
527 boost::make_shared<HMHPMooneyRivlinWriggersEq63>(alpha, beta, lambda);
528 CHKERR physicalEquations->recordTape(tape, nullptr);
530}
532 const double c10,
533 const double K) {
535 physicalEquations = boost::make_shared<HMHNeohookean>(mField, c10, K);
536 CHKERR physicalEquations->recordTape(tape, nullptr);
538}
539
542 physicalEquations = boost::make_shared<HMHHencky>(mField, E, nu);
544}
545
546}; // namespace EshelbianPlasticity
constexpr double third
Auxilary functions for Eshelbian plasticity.
Eshelbian plasticity interface.
Implementation StVenantKirchhoff.
Implementation of NeoHookean material.
Implement of MooneyRivlinWriggersEq63.
ForcesAndSourcesCore::UserDataOperator UserDataOperator
constexpr double a
Kronecker Delta class.
@ NOSPACE
Definition definitions.h:83
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition definitions.h:34
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
static double lambda
const double c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getDiffDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, Fun< double > dd_f, C &&t_S, const int nb)
Get the Diff Diff Mat object.
static constexpr auto size_symm
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
static FTensor::Ddg< FTensor::PackPtr< T *, 1 >, Tensor_Dim01, Tensor_Dim23 > getFTensor4DdgFromMat(ublas::matrix< T, L, A > &data)
Get symmetric tensor rank 4 on first two and last indices from form data matrix.
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
static auto getFTensor2SymmetricFromMat(ublas::matrix< T, L, A > &data)
Get symmetric tensor rank 2 (matrix) form data matrix.
static FTensor::Tensor4< FTensor::PackPtr< T *, 1 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2, Tensor_Dim3 > getFTensor4FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 4 (non symmetric) form data matrix.
constexpr auto field_name
FTensor::Index< 'm', 3 > m
MoFEMErrorCode addMaterial_Hencky(double E, double nu)
MoFEMErrorCode addMaterial_HMHHStVenantKirchhoff(const int tape, const double lambda, const double mu, const double sigma_y)
MoFEMErrorCode addMaterial_HMHMooneyRivlin(const int tape, const double alpha, const double beta, const double lambda, const double sigma_y)
static enum StretchSelector stretchSelector
boost::shared_ptr< PhysicalEquations > physicalEquations
static boost::function< double(const double)> f
static boost::function< double(const double)> dd_f
static boost::function< double(const double)> d_f
MoFEMErrorCode addMaterial_HMHNeohookean(const int tape, const double c10, const double K)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
boost::shared_ptr< double > scalePtr
OpGetScale(boost::shared_ptr< double > scale_ptr)
OpHMHH(const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
MoFEMErrorCode evaluateLhs(EntData &data)
MoFEMErrorCode evaluateRhs(EntData &data)
boost::shared_ptr< PhysicalEquations > physicsPtr
material physical equations
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MoFEMErrorCode integratePiola(EntData &row_data, EntData &col_data)
MoFEMErrorCode integrate(EntData &row_data, EntData &col_data)
OpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
OpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
MoFEMErrorCode integrate(EntData &data)
virtual VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpCalculateEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
virtual VolUserDataOperator * returnOpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
virtual VolUserDataOperator * returnOpSpatialPhysicalExternalStrain(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpSetScale(boost::shared_ptr< double > scale_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
virtual UserDataOperator * returnOpJacobian(const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
bool sYmm
If true assume that matrix is symmetric structure.
Data on single entity (This is passed as argument to DataOperator::doWork)
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.
auto getFTensor0IntegrationWeight()
Get integration weights.
@ OPROW
operator doWork function is executed on FE rows
@ OPROWCOL
operator doWork is executed on FE rows &columns
@ OPSPACE
operator do Work is execute on space data