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");
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");
136 energy,
nullptr, &hessian);
147 using namespace LogarithmicDirectionalDerivatives;
154 const double jac = std::exp(
c.stretch(
i,
i));
155 const double g2 = parameters.bulkModulus * jac * (2 * jac - 1);
156 const double g3 = parameters.bulkModulus * jac * (4 * jac - 1);
158 c.stressResult(
a) = 0.;
159 const auto curvature =
160 deviatorCurvature(parameters.c10,
c.stretch,
c.adjoint,
c.direction);
161 for (
int n = 0;
n != 6; ++
n) {
166 e(
i,
j) = basis(
i,
j,
A) * unit(
A);
168 curvature.second(
i,
j) * e(
i,
j) -
169 (auxiliary ? 0. : curvature.third(
i,
j) * e(
i,
j)) +
170 (g2 -
c.adjoint(
i,
i) * g3) *
c.direction(
i,
i) * e(
i,
i);
173 using DL = DataLayoutTraits<DataLayout::GaussByCoeffs>;
174 const int count =
data.auxiliaryMaterialData->compliance->size1();
176 MatrixSizeHelper<GetFTensor2FromMatType<5, 5, -1,
DL>,
DL>::get(
177 *
data.auxiliaryMaterialData->compliance, count)();
178 auto dm = MatrixSizeHelper<GetFTensor1FromMatType<5, -1,
DL>,
DL>::get(
179 *
data.auxiliaryMaterialData->materialDeviator, count)();
180 for (
int gg = 0; gg != point; ++gg) {
185 p(
a) = compliance(
a, b) *
c.stressAdjoint(b);
186 s(
a) = compliance(
a, b) *
c.stressDirection(b);
187 const auto h = Tensor2SymmetricDeviatorBasis::getTensor(dm);
190 const auto stress_curvature =
191 deviatorCurvature(parameters.c10,
h, pt, st);
192 for (
int n = 0;
n != 5; ++
n) {
196 e(
a) = compliance(
a, b) * unit(b);
205 using EshelbianPlasticity::OpJacobian::OpJacobian;
212 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
213 boost::shared_ptr<PhysicalEquations> physics_ptr)
override {
214 return new OpJacobian(eval_rhs, eval_lhs, std::move(data_ptr),
215 std::move(physics_ptr));
219 OpEnergy(boost::shared_ptr<DataAtIntegrationPts> data_ptr,
220 boost::shared_ptr<double> total_energy_ptr)
227 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
228 const int nb_integration_pts = getGaussPts().size2();
229 auto t_eigenvalues =
dataAtPts->getFTensorEigenVals(nb_integration_pts);
230 dataAtPts->energyAtPts.resize(nb_integration_pts,
false);
231 auto t_energy = getFTensor0FromVec(
dataAtPts->energyAtPts);
232 auto t_weight = getFTensor0IntegrationWeight();
233 auto t_plasticF =
dataAtPts->getFTensorPlasticF(nb_integration_pts);
234 double element_energy = 0.;
235 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
239 t_eigenvalues(0), 0., 0., t_eigenvalues(1), 0., t_eigenvalues(2));
244 const double det_plasticF = determinantTensor3by3(t_plasticF);
245 element_energy += t_weight * energy * det_plasticF;
262 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
263 boost::shared_ptr<double> total_energy_ptr)
override {
264 return new OpEnergy(std::move(data_ptr), std::move(total_energy_ptr));
271 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
272 boost::shared_ptr<MatrixDouble> deviator_gradient_ptr,
273 boost::shared_ptr<MatrixDouble> volume_gradient_ptr)
281 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
282 const int nb_gauss = getGaussPts().size2();
283 const auto fields =
dataAtPts->auxiliaryData;
284 using DL = DataLayoutTraits<DataLayout::GaussByCoeffs>;
285 auto t_d = MatrixSizeHelper<GetFTensor1FromMatType<5, -1,
DL>,
DL>::get(
286 *fields->logDeviator, nb_gauss)();
288 MatrixSizeHelper<GetFTensor1FromMatType<1, -1,
DL>,
DL>::get(
289 *fields->logJacobian, nb_gauss)();
290 auto t_deviator_gradient =
291 MatrixSizeHelper<GetFTensor1FromMatType<5, -1,
DL>,
DL>
::size(
293 auto t_volume_gradient =
294 MatrixSizeHelper<GetFTensor1FromMatType<1, -1,
DL>,
DL>
::size(
297 for (
int gg = 0; gg != nb_gauss; ++gg) {
299 t_coordinates(L) = t_d(L);
307 t_deviator_gradient(L) = t_stress(L);
311 ++t_deviator_gradient;
324 const EshelbianCore &ep, boost::ptr_deque<UserDataOperator> &pipeline,
325 boost::shared_ptr<DataAtIntegrationPts> data_ptr)
override {
332 auto deviator_gradient = boost::make_shared<MatrixDouble>();
333 auto volume_gradient = boost::make_shared<MatrixDouble>();
335 data_ptr, deviator_gradient, volume_gradient));
336 using OpDeviatorGradient = FormsIntegrators<VolUserDataOperator>::Assembly<
338 using OpVolumeGradient = FormsIntegrators<VolUserDataOperator>::Assembly<
342 pipeline.push_back(
new OpVolumeGradient(
ep.
logJacobian, volume_gradient));
348 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
349 const double alpha_u)
353 "Unsupported direct Neo-Hookean configuration");
354 if (!std::isfinite(
alphaU))
356 "Neo-Hookean stretch viscosity must be finite");
365 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
366 const double alpha_grad_u = material_ptr->alphaGradU;
367 auto t_h =
dataAtPts->getFTensorLogStretch(nbIntegrationPts);
368 auto t_physical =
dataAtPts->getFTensorAdjointPdU(nbIntegrationPts);
370 std::optional<
decltype(
dataAtPts->getFTensorLogStretchDot(
373 std::optional<
decltype(
dataAtPts->getFTensorGradLogStretchDot(
377 t_dot_h.emplace(
dataAtPts->getFTensorLogStretchDot(nbIntegrationPts));
378 if (alpha_grad_u != 0.)
379 t_grad_dot_h.emplace(
380 dataAtPts->getFTensorGradLogStretchDot(nbIntegrationPts));
383 auto t_weight = getFTensor0IntegrationWeight();
384 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
386 t_log_stretch(
i,
j) = t_h(
i,
j);
390 const double alpha = getMeasure() * t_weight;
392 t_residual(L) = t_stress(L) - t_physical(L);
395 alphaU * (t_packed_basis(
i,
j, L) * (*t_dot_h)(
i,
j));
397 t_gradient(L,
i) = 0.;
399 t_gradient(L,
i) = alpha_grad_u * (*t_grad_dot_h)(L,
i);
400 auto t_nf = getNf<size_symm>();
404 (t_row * t_residual(L) + t_grad_row(
i) * t_gradient(L,
i));
409 for (; rr != nbRowBaseFunctions; ++rr) {
431 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
432 const double alpha_u)
override {
433 return new OpResidual(field, std::move(data_ptr), alpha_u);
437 OpTangent(
const std::string &row_field,
const std::string &col_field,
438 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
439 const double alpha_u)
444 "Unsupported direct Neo-Hookean configuration");
445 if (!std::isfinite(
alphaU))
447 "Neo-Hookean stretch viscosity must be finite");
455 const auto parameters = material_ptr->getParameters(getFEEntityHandle());
459 t_viscous_metric(L,
J) =
460 t_packed_basis(
i,
j, L) * t_packed_basis(
i,
j,
J);
461 const double ts_a = getTSa();
462 const double alpha_grad_u = material_ptr->alphaGradU;
463 auto t_h =
dataAtPts->getFTensorLogStretch(nbIntegrationPts);
464 auto t_pullback =
dataAtPts->getFTensorAdjointPdstretch(nbIntegrationPts);
465 auto t_eigenvalues =
dataAtPts->getFTensorEigenVals(nbIntegrationPts);
466 auto t_eigenvectors =
dataAtPts->getFTensorEigenVecs(nbIntegrationPts);
469 auto t_weight = getFTensor0IntegrationWeight();
471 if (
dataAtPts->nbUniq.size() != nbIntegrationPts)
473 "Neo-Hookean tangent requires current geometric eigendata");
475 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
477 t_log_stretch(
i,
j) = t_h(
i,
j);
483 t_symmetric_pullback(
i,
j) =
484 (t_pullback(
i,
j) || t_pullback(
j,
i)) / 2.;
489 t_packed_basis(
i,
j, L) *
490 (t_work_curvature(
i,
j,
k,
l) * t_packed_basis(
k,
l,
J));
491 t_tangent(L,
J) += (
alphaU * ts_a) * t_viscous_metric(L,
J);
492 const double alpha = getMeasure() * t_weight;
497 auto t_matrix = getLocMat<size_symm>(
size_symm * rr);
498 for (
int cc = 0; cc != nbCols /
size_symm; ++cc) {
499 t_matrix(L,
J) += alpha * t_row * t_col * t_tangent(L,
J);
500 const double gradient_weight =
501 alpha * alpha_grad_u * ts_a * (t_grad_row(
i) * t_grad_col(
i));
502 t_matrix(L,
J) += gradient_weight * t_identity(L,
J);
510 for (; rr != nbRowBaseFunctions; ++rr) {
529 std::string row_field, std::string col_field,
530 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
531 const double alpha_u)
override {
532 return new OpTangent(row_field, col_field, std::move(data_ptr), alpha_u);
537 const std::string &field,
538 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
539 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
550 : getFEMethod()->ts_t;
551 double pressure = 0.;
553 if (block.blockName.find(
"ANALYTICAL_EXTERNALSTRAIN") !=
557 "Analytical external strain is not implemented for Neo-Hookean");
558 if (block.ents.find(getFEEntityHandle()) == block.ents.end())
563 scale = scaling->second->getScale(time);
566 <<
"No scaling method found for " << block.blockName;
567 pressure += 3. * block.bulkModulusK * block.val *
scale;
569 if (!std::isfinite(pressure))
571 "Neo-Hookean prescribed external pressure must be finite");
577 t_load(L) = pressure * (t_packed_basis(
i,
j, L) * t_identity(
i,
j));
579 auto t_weight = getFTensor0IntegrationWeight();
580 for (
int gg = 0; gg != nbIntegrationPts; ++gg) {
581 const double alpha = getMeasure() * t_weight;
582 auto t_nf = getNf<size_symm>();
585 t_nf(L) -= alpha * t_row * t_load(L);
589 for (; rr != nbRowBaseFunctions; ++rr)
602 const std::string &field, boost::shared_ptr<DataAtIntegrationPts>,
603 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
604 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
607 std::move(scaling_methods));
612 boost::shared_ptr<ExternalStrainVec> external_strain_ptr,
613 std::map<std::string, boost::shared_ptr<ScalingMethod>> scaling_methods)
616 std::move(external_strain_ptr),
617 std::move(scaling_methods));
622 boost::shared_ptr<PhysicalEquations>,
623 boost::shared_ptr<MatrixDouble>)
override {
628 boost::shared_ptr<PhysicalEquations>,
629 boost::shared_ptr<MatrixDouble>,
634 boost::shared_ptr<DataAtIntegrationPts>,
635 boost::shared_ptr<PhysicalEquations>, boost::shared_ptr<MatrixDouble>,
636 boost::shared_ptr<MatrixDouble>,
VectorPtr)
override {
640 boost::shared_ptr<DataAtIntegrationPts>,
641 boost::shared_ptr<PhysicalEquations>)
override {
647 const boost::shared_ptr<DataAtIntegrationPts> &data_ptr) {
650 "Auxiliary material evaluation requires field data");
651 if (!data_ptr->auxiliaryMaterialData)
652 data_ptr->auxiliaryMaterialData =
653 boost::make_shared<AuxiliaryLogarithmicStressMaterialData>();
654 return [
this](EntityHandle entity) {
return getParameters(entity); };
661 "Neo-Hookean direct material equations require -grad no_h1");
665 "Neo-Hookean direct material equations require "
666 "-rotations large or -rotations small");
670 static boost::shared_ptr<HMHNeohookean>
671 getMaterial(
const boost::shared_ptr<DataAtIntegrationPts> &data_ptr) {
674 "Neo-Hookean integration-point data is missing");
675 const auto material_ptr =
676 boost::dynamic_pointer_cast<HMHNeohookean>(data_ptr->physicsPtr);
679 "Neo-Hookean material pointer is missing");
685 "Neo-Hookean physical-stress-to-stretch recovery was "
686 "retired; solve the logarithmic material fields");
692 PetscOptionsBegin(
mField.
get_comm(),
"neo_hookean_",
"Neo-Hookean material",
696 CHKERR PetscOptionsScalar(
"-K",
"Bulk modulus",
"",
699 CHKERR PetscOptionsScalar(
"-viscosity_alpha_grad_u",
700 "Logarithmic-stretch-gradient rate viscosity",
"",
707 "Neo-Hookean logarithmic-stretch-gradient viscosity must be finite");
708 char *options_ptr =
nullptr;
709 CHKERR PetscOptionsGetAll(
nullptr, &options_ptr);
710 std::istringstream options(options_ptr ? options_ptr :
"");
711 CHKERR PetscFree(options_ptr);
713 while (options >> option)
714 if (option.rfind(
"-nh_stretch_", 0) == 0 ||
715 option ==
"-neo_hookean_min_eigen_value")
717 "Option %s belongs to the retired Neo-Hookean physical inverse "
718 "or tangent projection; remove it",
730 for (
const auto block :
731 meshsets->getCubitMeshsetPtr(std::regex(
"MAT_NEOHOOKEAN(.*)"))) {
733 const auto json_parameters = json_config->getParamsFromBlockset(
734 "MAT_NEOHOOKEAN", block->getMeshsetId());
735 if (!json_parameters.empty()) {
736 if (json_parameters.size() != 2 || !json_parameters.count(
"c10") ||
737 !json_parameters.count(
"k"))
739 "MAT_NEOHOOKEAN JSON block must contain exactly c10,k");
740 parameters = {json_parameters.at(
"c10"), json_parameters.at(
"k")};
742 std::vector<double> attributes;
743 CHKERR block->getAttributes(attributes);
744 if (attributes.size() < 2)
746 "MAT_NEOHOOKEAN block requires C10,K attributes");
747 parameters = {attributes[0], attributes[1]};
753 blockData.push_back({parameters, std::move(entities)});
755 <<
"MAT_NEOHOOKEAN " << block->getMeshsetId()
Material and stress-work blocks for the independent D/theta/Td fields.
Neo-Hookean material law in orthonormal logarithmic coordinates.
boost::shared_ptr< DataAtIntegrationPts > data
#define FTENSOR_INDEXES(DIM,...)
#define FTENSOR_INDEX(DIM, I)
Kronecker Delta class symmetric.
Mapping from symmetric tensor indices to packed storage index.
#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
const double c
speed of light (cm/ns)
const double n
refractive index of diffusive medium
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
MoFEMErrorCode evaluateHelmholtzCurvature(EntityHandle entity, int point, DataAtIntegrationPts &data, LogarithmicMaterialCurvature &c) override
bool providesHelmholtzCurvature() const override
Contract material curvature for the incremental material-energy adjoint.
static boost::shared_ptr< HMHNeohookean > getMaterial(const boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
static MoFEMErrorCode checkDirectConfiguration()
MoFEMErrorCode extractBlockData()
MoFEMErrorCode evaluateElasticLogarithmicMaterialHessian(EntityHandle entity, int, DataAtIntegrationPts &, const Material::SymmetricTensor &elastic_log_stretch, Material::Tangent &hessian) override
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.