20 typename FormsIntegrators<VolUserDataOperator>::Assembly<
A>
::OpBase;
23 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
24 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
bool lhs)
override {
28 ep, pipeline, data_ptr, data_ptr->auxiliaryMaterialData,
29 std::move(parameters), lhs);
34 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
35 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
bool lhs)
override {
38 ep, pipeline, data_ptr->auxiliaryMaterialData, lhs);
49 "Neo-Hookean -no_stretch physical-stress recovery was "
50 "retired; omit -no_stretch and solve the material fields");
54 "Neo-Hookean requires natural logarithms: -stretches log");
57 "Neo-Hookean material blocks are invalid");
62 if (block.entities.find(entity) != block.entities.end())
63 return block.parameters;
67 "MAT_NEOHOOKEAN blocks must cover every material element");
89 stress_ptr ? &t_stress :
nullptr,
90 tangent_ptr ? &t_hessian :
nullptr);
93 if (!std::isfinite(energy))
95 "Neo-Hookean total strain energy is not representable");
96 const auto t_packed_basis = FTensor::SymmLTensor<double, 3>();
101 t_total_stress(
i,
j) =
103 (*stress_ptr)(L) = t_packed_basis(
i,
j, L) * t_total_stress(
i,
j);
104 for (
int component = 0; component !=
size_symm; ++component)
105 if (!std::isfinite((*stress_ptr)(component)))
107 "Neo-Hookean packed material stress is not representable");
110 const auto &t_basis = Tensor2SymmetricDeviatorBasis::getBasis();
112 t_projection(
a, L) = t_basis(
i,
j,
a) * t_packed_basis(
i,
j, L);
114 t_trace(L) = t_packed_basis(
i,
j, L) * t_identity(
i,
j);
116 t_hessian_projection(
a,
J) = t_hessian(
a, b) * t_projection(b,
J);
117 (*tangent_ptr)(L,
J) = t_projection(
a, L) * t_hessian_projection(
a,
J) +
119 for (
int row = 0; row !=
size_symm; ++row)
120 for (
int col = 0; col !=
size_symm; ++col)
121 if (!std::isfinite((*tangent_ptr)(row, col)))
123 "Neo-Hookean packed material tangent is not representable");
129 using EshelbianPlasticity::OpJacobian::OpJacobian;
136 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
137 boost::shared_ptr<PhysicalEquations> physics_ptr)
override {
138 return new OpJacobian(eval_rhs, eval_lhs, std::move(data_ptr),
139 std::move(physics_ptr));
143 OpEnergy(boost::shared_ptr<DataAtIntegrationPts> data_ptr,
144 boost::shared_ptr<double> total_energy_ptr)
151 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
152 const int nb_integration_pts = getGaussPts().size2();
153 auto t_eigenvalues =
dataAtPts->getFTensorEigenVals(nb_integration_pts);
154 dataAtPts->energyAtPts.resize(nb_integration_pts,
false);
155 auto t_energy = getFTensor0FromVec(
dataAtPts->energyAtPts);
156 auto t_weight = getFTensor0IntegrationWeight();
157 double element_energy = 0.;
158 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
162 t_eigenvalues(0), 0., 0., t_eigenvalues(1), 0., t_eigenvalues(2));
166 element_energy += t_weight * energy;
182 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
183 boost::shared_ptr<double> total_energy_ptr)
override {
184 return new OpEnergy(std::move(data_ptr), std::move(total_energy_ptr));
191 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
192 boost::shared_ptr<MatrixDouble> deviator_gradient_ptr,
193 boost::shared_ptr<MatrixDouble> volume_gradient_ptr)
201 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
202 const int nb_gauss = getGaussPts().size2();
203 const auto fields =
dataAtPts->auxiliaryData;
204 using DL = DataLayoutTraits<DataLayout::GaussByCoeffs>;
205 auto t_d = MatrixSizeHelper<GetFTensor1FromMatType<5, -1,
DL>,
DL>::get(
206 *fields->logDeviator, nb_gauss)();
208 MatrixSizeHelper<GetFTensor1FromMatType<1, -1,
DL>,
DL>::get(
209 *fields->logJacobian, nb_gauss)();
210 auto t_deviator_gradient =
211 MatrixSizeHelper<GetFTensor1FromMatType<5, -1,
DL>,
DL>::size(
213 auto t_volume_gradient =
214 MatrixSizeHelper<GetFTensor1FromMatType<1, -1,
DL>,
DL>::size(
217 for (
int gg = 0; gg != nb_gauss; ++gg) {
219 t_coordinates(L) = t_d(L);
227 t_deviator_gradient(L) = t_stress(L);
231 ++t_deviator_gradient;
244 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
245 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
override {
252 auto deviator_gradient = boost::make_shared<MatrixDouble>();
253 auto volume_gradient = boost::make_shared<MatrixDouble>();
255 data_ptr, deviator_gradient, volume_gradient));
256 using OpDeviatorGradient = FormsIntegrators<VolUserDataOperator>::Assembly<
258 using OpVolumeGradient = FormsIntegrators<VolUserDataOperator>::Assembly<
261 new OpDeviatorGradient(ep.
logDeviator, deviator_gradient));
262 pipeline.push_back(
new OpVolumeGradient(ep.
logJacobian, volume_gradient));
268 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
269 const double alpha_u)
273 "Unsupported direct Neo-Hookean configuration");
274 if (!std::isfinite(
alphaU))
276 "Neo-Hookean stretch viscosity must be finite");
283 const auto t_packed_basis = FTensor::SymmLTensor<double, 3>();
285 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
286 const double alpha_grad_u = material_ptr->alphaGradU;
287 auto t_h =
dataAtPts->getFTensorLogStretch(nbIntegrationPts);
288 auto t_physical =
dataAtPts->getFTensorAdjointPdU(nbIntegrationPts);
290 std::optional<
decltype(
dataAtPts->getFTensorLogStretchDot(
293 std::optional<
decltype(
dataAtPts->getFTensorGradLogStretchDot(
297 t_dot_h.emplace(
dataAtPts->getFTensorLogStretchDot(nbIntegrationPts));
298 if (alpha_grad_u != 0.)
299 t_grad_dot_h.emplace(
300 dataAtPts->getFTensorGradLogStretchDot(nbIntegrationPts));
303 auto t_weight = getFTensor0IntegrationWeight();
304 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
306 t_log_stretch(
i,
j) = t_h(
i,
j);
310 const double alpha = getMeasure() * t_weight;
312 t_residual(L) = t_stress(L) - t_physical(L);
315 alphaU * (t_packed_basis(
i,
j, L) * (*t_dot_h)(
i,
j));
317 t_gradient(L,
i) = 0.;
319 t_gradient(L,
i) = alpha_grad_u * (*t_grad_dot_h)(L,
i);
320 auto t_nf = getNf<size_symm>();
324 (t_row * t_residual(L) + t_grad_row(
i) * t_gradient(L,
i));
329 for (; rr != nbRowBaseFunctions; ++rr) {
351 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
352 const double alpha_u)
override {
353 return new OpResidual(field, std::move(data_ptr), alpha_u);
357 OpTangent(
const std::string &row_field,
const std::string &col_field,
358 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
359 const double alpha_u)
364 "Unsupported direct Neo-Hookean configuration");
365 if (!std::isfinite(
alphaU))
367 "Neo-Hookean stretch viscosity must be finite");
375 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
376 const auto t_packed_basis = FTensor::SymmLTensor<double, 3>();
379 t_viscous_metric(L,
J) =
380 t_packed_basis(
i,
j, L) * t_packed_basis(
i,
j,
J);
381 const double ts_a = getTSa();
382 const double alpha_grad_u = material_ptr->alphaGradU;
383 auto t_h =
dataAtPts->getFTensorLogStretch(nbIntegrationPts);
384 auto t_pullback =
dataAtPts->getFTensorAdjointPdstretch(nbIntegrationPts);
385 auto t_eigenvalues =
dataAtPts->getFTensorEigenVals(nbIntegrationPts);
386 auto t_eigenvectors =
dataAtPts->getFTensorEigenVecs(nbIntegrationPts);
389 auto t_weight = getFTensor0IntegrationWeight();
391 if (
dataAtPts->nbUniq.size() != nbIntegrationPts)
393 "Neo-Hookean tangent requires current geometric eigendata");
395 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
397 t_log_stretch(
i,
j) = t_h(
i,
j);
403 t_symmetric_pullback(
i,
j) =
404 (t_pullback(
i,
j) || t_pullback(
j,
i)) / 2.;
409 t_packed_basis(
i,
j, L) *
410 (t_work_curvature(
i,
j,
k,
l) * t_packed_basis(
k,
l,
J));
411 t_tangent(L,
J) += (
alphaU * ts_a) * t_viscous_metric(L,
J);
412 const double alpha = getMeasure() * t_weight;
417 auto t_matrix = getLocMat<size_symm>(
size_symm * rr);
418 for (
int cc = 0; cc != nbCols /
size_symm; ++cc) {
419 t_matrix(L,
J) += alpha * t_row * t_col * t_tangent(L,
J);
420 const double gradient_weight =
421 alpha * alpha_grad_u * ts_a * (t_grad_row(
i) * t_grad_col(
i));
422 t_matrix(L,
J) += gradient_weight * t_identity(L,
J);
430 for (; rr != nbRowBaseFunctions; ++rr) {
449 std::string row_field, std::string col_field,
450 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
451 const double alpha_u)
override {
452 return new OpTangent(row_field, col_field, std::move(data_ptr), alpha_u);
457 const std::string &field,
458 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
459 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
470 : getFEMethod()->ts_t;
471 double pressure = 0.;
473 if (block.blockName.find(
"ANALYTICAL_EXTERNALSTRAIN") !=
477 "Analytical external strain is not implemented for Neo-Hookean");
478 if (block.ents.find(getFEEntityHandle()) == block.ents.end())
483 scale = scaling->second->getScale(time);
486 <<
"No scaling method found for " << block.blockName;
487 pressure += 3. * block.bulkModulusK * block.val *
scale;
489 if (!std::isfinite(pressure))
491 "Neo-Hookean prescribed external pressure must be finite");
494 const auto t_packed_basis = FTensor::SymmLTensor<double, 3>();
497 t_load(L) = pressure * (t_packed_basis(
i,
j, L) * t_identity(
i,
j));
499 auto t_weight = getFTensor0IntegrationWeight();
500 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
501 const double alpha = getMeasure() * t_weight;
502 auto t_nf = getNf<size_symm>();
505 t_nf(L) -= alpha * t_row * t_load(L);
509 for (; rr != nbRowBaseFunctions; ++rr)
522 const std::string &field, boost::shared_ptr<DataAtIntegrationPts>,
523 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
524 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
527 std::move(scaling_methods));
532 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
533 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
536 std::move(external_strain_ptr),
537 std::move(scaling_methods));
542 boost::shared_ptr<PhysicalEquations>,
543 boost::shared_ptr<MatrixDouble>)
override {
548 boost::shared_ptr<PhysicalEquations>,
549 boost::shared_ptr<MatrixDouble>,
554 boost::shared_ptr<DataAtIntegrationPts>,
555 boost::shared_ptr<PhysicalEquations>, boost::shared_ptr<MatrixDouble>,
556 boost::shared_ptr<MatrixDouble>,
VectorPtr)
override {
560 boost::shared_ptr<DataAtIntegrationPts>,
561 boost::shared_ptr<PhysicalEquations>)
override {
567 const boost::shared_ptr<DataAtIntegrationPts> &data_ptr) {
570 "Auxiliary material evaluation requires field data");
571 if (!data_ptr->auxiliaryMaterialData)
572 data_ptr->auxiliaryMaterialData =
573 boost::make_shared<AuxiliaryLogarithmicStressMaterialData>();
574 return [
this](EntityHandle entity) {
return getParameters(entity); };
581 "Neo-Hookean direct material equations require -grad no_h1");
585 "Neo-Hookean direct material equations require "
586 "-rotations large or -rotations small");
590 static boost::shared_ptr<HMHNeohookean>
591 getMaterial(
const boost::shared_ptr<DataAtIntegrationPts> &data_ptr) {
594 "Neo-Hookean integration-point data is missing");
595 const auto material_ptr =
596 boost::dynamic_pointer_cast<HMHNeohookean>(data_ptr->physicsPtr);
599 "Neo-Hookean material pointer is missing");
605 "Neo-Hookean physical-stress-to-stretch recovery was "
606 "retired; solve the logarithmic material fields");
612 PetscOptionsBegin(
mField.
get_comm(),
"neo_hookean_",
"Neo-Hookean material",
616 CHKERR PetscOptionsScalar(
"-K",
"Bulk modulus",
"",
619 CHKERR PetscOptionsScalar(
"-viscosity_alpha_grad_u",
620 "Logarithmic-stretch-gradient rate viscosity",
"",
627 "Neo-Hookean logarithmic-stretch-gradient viscosity must be finite");
628 char *options_ptr =
nullptr;
629 CHKERR PetscOptionsGetAll(
nullptr, &options_ptr);
630 std::istringstream options(options_ptr ? options_ptr :
"");
631 CHKERR PetscFree(options_ptr);
633 while (options >> option)
634 if (option.rfind(
"-nh_stretch_", 0) == 0 ||
635 option ==
"-neo_hookean_min_eigen_value")
637 "Option %s belongs to the retired Neo-Hookean physical inverse "
638 "or tangent projection; remove it",
650 for (
const auto block :
651 meshsets->getCubitMeshsetPtr(std::regex(
"MAT_NEOHOOKEAN(.*)"))) {
653 const auto json_parameters = json_config->getParamsFromBlockset(
654 "MAT_NEOHOOKEAN", block->getMeshsetId());
655 if (!json_parameters.empty()) {
656 if (json_parameters.size() != 2 || !json_parameters.count(
"c10") ||
657 !json_parameters.count(
"k"))
659 "MAT_NEOHOOKEAN JSON block must contain exactly c10,k");
660 parameters = {json_parameters.at(
"c10"), json_parameters.at(
"k")};
662 std::vector<double> attributes;
663 CHKERR block->getAttributes(attributes);
664 if (attributes.size() < 2)
666 "MAT_NEOHOOKEAN block requires C10,K attributes");
667 parameters = {attributes[0], attributes[1]};
673 blockData.push_back({parameters, std::move(entities)});
675 <<
"MAT_NEOHOOKEAN " << block->getMeshsetId()
Material and stress-work blocks for the independent D/theta/Td fields.
Neo-Hookean material law in orthonormal logarithmic coordinates.
#define FTENSOR_INDEXES(DIM,...)
#define FTENSOR_INDEX(DIM, I)
Kronecker Delta class symmetric.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
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.
MoFEMErrorCode pushAuxiliaryLogarithmicMaterialEvaluation(const EshelbianCore &ep, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data, boost::shared_ptr< AuxiliaryLogarithmicStressMaterialData > material_data, AuxiliaryLogarithmicMaterialParameters parameters, bool lhs=false)
std::function< NeoHookeanLogarithmicMaterial::Parameters(EntityHandle)> AuxiliaryLogarithmicMaterialParameters
Return parameters already checked by the material's setup validation.
static constexpr auto size_symm
MoFEMErrorCode pushAuxiliaryLogarithmicMaterialOps(const EshelbianCore &ep, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, boost::shared_ptr< AuxiliaryLogarithmicStressMaterialData > material_data, bool lhs)
boost::shared_ptr< VectorDouble > VectorPtr
OpBaseImpl< PETSC, EdgeEleOp > OpBase
static enum StretchSelector stretchSelector
static enum RotSelector rotSelector
static enum RotSelector gradApproximator
const std::string logDeviator
const std::string logJacobian
static PetscBool physicalTimeFlg
static double currentPhysicalTime
static boost::function< double(const double)> f
static boost::function< double(const double)> dd_f
static boost::function< double(const double)> d_f
Material::Parameters parameters
OpAuxiliaryHelmholtzGradient(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< MatrixDouble > deviator_gradient_ptr, boost::shared_ptr< MatrixDouble > volume_gradient_ptr)
boost::shared_ptr< MatrixDouble > deviatorGradientPtr
boost::shared_ptr< MatrixDouble > volumeGradientPtr
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode doWork(int, EntityType, EntData &) override
OpEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
boost::shared_ptr< double > totalEnergyPtr
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode doWork(int, EntityType, EntData &) override
OpExternalStrain(const std::string &field, boost::shared_ptr< ExternalStrainVec > external_strain_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > scaling_methods)
boost::shared_ptr< ExternalStrainVec > externalStrainPtr
MoFEMErrorCode iNtegrate(EntData &row_data) override
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethods
MoFEMErrorCode evaluateLhs(EntData &) override
MoFEMErrorCode evaluateRhs(EntData &) override
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
OpResidual(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
MoFEMErrorCode iNtegrate(EntData &row_data) override
OpTangent(const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
MoFEMErrorCode iNtegrate(EntData &row_data, EntData &col_data) override
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode pushAuxiliaryLogarithmicStressOps(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, bool lhs) override
Assemble the selected material field group after kinematic reconstruction.
VolUserDataOperator * returnOpSpatialPhysical(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u) override
static boost::shared_ptr< HMHNeohookean > getMaterial(const boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
static MoFEMErrorCode checkDirectConfiguration()
MoFEMErrorCode extractBlockData()
MoFEMErrorCode pushAuxiliaryLogarithmicMaterialEvaluation(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr, bool lhs) override
Evaluate the auxiliary material copy and energies without assembly.
std::vector< BlockData > blockData
VolUserDataOperator * returnOpCalculateHelmholtzFreeEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr) override
VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u) override
UserDataOperator * returnOpJacobian(const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr) override
VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts >, boost::shared_ptr< PhysicalEquations >, boost::shared_ptr< MatrixDouble >) override
MoFEMErrorCode pushHelmholtzStateGradient(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr) override
Assemble the physical Helmholtz state derivative at equilibrium.
Material::Parameters getParameters(const EntityHandle entity) const
VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts >, boost::shared_ptr< PhysicalEquations >, boost::shared_ptr< MatrixDouble >, boost::shared_ptr< MatrixDouble >, VectorPtr) override
bool providesHelmholtzFreeEnergy() const override
MoFEMErrorCode getOptions()
HMHNeohookean(MoFEM::Interface &m_field, const double c10, const double bulk_modulus, const Features features)
AuxiliaryLogarithmicMaterialParameters prepareAuxiliaryEvaluation(const boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
MoFEM::Interface & mField
static MoFEMErrorCode evaluateDirect(const Material::Parameters ¶meters, const Material::SymmetricTensor &t_log_stretch, double &energy, PackedStress *stress_ptr=nullptr, PackedTangent *tangent_ptr=nullptr)
static VolUserDataOperator * retiredInverse()
Material::Parameters defaultParameters
VolUserDataOperator * returnOpCalculateExternalPressure(VectorPtr pressure_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > scaling_methods) override
VolUserDataOperator * returnOpSpatialPhysicalExternalStrain(const std::string &field, boost::shared_ptr< DataAtIntegrationPts >, boost::shared_ptr< ExternalStrainVec > external_strain_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > scaling_methods) override
VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts >, boost::shared_ptr< PhysicalEquations >) override
VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts >, boost::shared_ptr< PhysicalEquations >, boost::shared_ptr< MatrixDouble >, VectorPtr) override
double firstDerivative
d[g(exp(theta))]/d theta
double secondDerivative
d2[g(exp(theta))]/d theta2
static MoFEMErrorCode validateParameters(const Parameters ¶meters)
Check finite, strictly positive C10, K and representable mu = 2*C10.
static SymmetricTensor getTensor(const Coordinates &t_coordinates, double theta=0.)
Reconstruct H = D + theta*I/3 from the fixed five-coordinate basis.
static MoFEMErrorCode evaluateDeviator(const Parameters ¶meters, const Coordinates &t_deviator, double &energy, Coordinates *stress_ptr=nullptr, Tangent *hessian_ptr=nullptr)
Evaluate f(D), optionally its five-component gradient and Hessian.
static Coordinates getCoordinates(const SymmetricTensor &t_tensor)
Project a symmetric tensor onto the fixed trace-free basis.
static MoFEMErrorCode evaluateVolume(const Parameters ¶meters, double theta, VolumeState &state)
Evaluate g(J) = K*(J-1)^2/2 and its logarithmic-volume derivatives.
static const Features noStretchMask
virtual MoFEMErrorCode pushHelmholtzStateGradient(const EshelbianCore &ep, boost::ptr_deque< UserDataOperator > &pipeline, boost::shared_ptr< DataAtIntegrationPts > data_ptr)
Assemble the physical Helmholtz state derivative at equilibrium.
const Features & getFeatures() const
std::bitset< LAST_FEATURE > Features
@ AUXILIARY_LOGARITHMIC_STRESS
Auxiliary logarithmic stress formulation.
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
Deprecated interface functions.
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.
auto getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Calculate q = 3 K_ext epsilon_ext at integration points.