v0.16.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
EshelbianPlasticity::HMHHencky Struct Reference
Inheritance diagram for EshelbianPlasticity::HMHHencky:
[legend]
Collaboration diagram for EshelbianPlasticity::HMHHencky:
[legend]

Classes

struct  BlockData
 
struct  OpCalculateEnergy
 Calculate energy density for Hencky material model. More...
 
struct  OpCalculateStretchFromStress
 
struct  OpHenckyJacobian
 
struct  OpSpatialPhysical
 
struct  OpSpatialPhysical_du_du
 
struct  OpSpatialPhysicalExternalStrain
 
struct  OpTopoSpatialPhysical
 

Public Member Functions

 HMHHencky (MoFEM::Interface &m_field, const double E, const double nu)
 
virtual UserDataOperatorreturnOpJacobian (const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
virtual VolUserDataOperatorreturnOpSpatialPhysical (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
 
virtual VolUserDataOperatorreturnOpSpatialPhysicalExternalStrain (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)
 
VolUserDataOperatorreturnOpSpatialPhysical_du_du (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
 
VolUserDataOperatorreturnOpCalculateEnergy (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
 
VolUserDataOperatorreturnOpCalculateStretchFromStress (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr, boost::shared_ptr< MatrixDouble > strain_ptr) override
 
VolUserDataOperatorreturnOpCalculateVarStretchFromStress (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
MoFEMErrorCode getOptions (boost::shared_ptr< DataAtIntegrationPts > data_ptr)
 
MoFEMErrorCode extractBlockData (Sev sev)
 
MoFEMErrorCode extractBlockData (std::vector< const CubitMeshSets * > meshset_vec_ptr, Sev sev)
 
template<int STRIDEMATD, typename OP_PTR >
MoFEMErrorCode computeMaterialParamsAtPts (OP_PTR op_ptr, EntitiesFieldData::EntData &data, boost::shared_ptr< DataAtIntegrationPts > dataAtGaussPts)
 
virtual VolUserDataOperatorreturnOpTopoSpatialPhysical (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > assemble_vec, boost::shared_ptr< TopologicalData > topo_ptr, const double alpha_u, boost::shared_ptr< double > J_ptr) override
 
- Public Member Functions inherited from EshelbianPlasticity::PhysicalEquations
 PhysicalEquations ()=default
 
virtual ~PhysicalEquations ()=default
 
virtual VolUserDataOperatorreturnOpCalculateStretchFromStress (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, VectorPtr external_pressure_ptr)
 
virtual VolUserDataOperatorreturnOpCalculateExternalPressure (VectorPtr external_pressure_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
 

Static Public Attributes

static constexpr int StrideMatD
 

Private Types

enum  HenckyMatType { HOMOGENEOUS , HETEROGENEOUS , ANALYTICAL }
 

Private Attributes

MoFEM::InterfacemField
 
std::vector< BlockDatablockData
 
double E
 
double nu
 
PetscBool effectiveNehookeanStiffness = PETSC_FALSE
 
double effectiveDiagonalStrain = 0
 
Sev getOptionsSeverityLevels = Sev::inform
 

Detailed Description

Definition at line 59 of file HMHHencky.cpp.

Member Enumeration Documentation

◆ HenckyMatType

Enumerator
HOMOGENEOUS 
HETEROGENEOUS 
ANALYTICAL 

Definition at line 701 of file HMHHencky.cpp.

Constructor & Destructor Documentation

◆ HMHHencky()

EshelbianPlasticity::HMHHencky::HMHHencky ( MoFEM::Interface m_field,
const double  E,
const double  nu 
)
inline

Member Function Documentation

◆ computeMaterialParamsAtPts()

template<int STRIDEMATD, typename OP_PTR >
MoFEMErrorCode EshelbianPlasticity::HMHHencky::computeMaterialParamsAtPts ( OP_PTR  op_ptr,
EntitiesFieldData::EntData &  data,
boost::shared_ptr< DataAtIntegrationPts dataAtGaussPts 
)
inline

Definition at line 429 of file HMHHencky.cpp.

431 {
433
434 auto getMaterialParams = [&](double E, double nu) {
437 }
438
439 const double bulk_modulus_K = E / (3 * (1 - 2 * nu));
440 const double shear_modulus_G = E / (2 * (1 + nu));
441 const double lambda = bulk_modulus_K - 2 * shear_modulus_G / 3;
442 return EffectiveElasticParams{E, nu, bulk_modulus_K, shear_modulus_G,
443 lambda};
444 };
445
446 auto fe_ent = op_ptr->getNumeredEntFiniteElementPtr()->getEnt();
447 int nb_integration_pts = op_ptr->getGaussPts().size2();
448
449 dataAtGaussPts->muAtPts.resize(nb_integration_pts, false);
450 dataAtGaussPts->lambdaAtPts.resize(nb_integration_pts, false);
451 dataAtGaussPts->muAtPts.clear();
452 dataAtGaussPts->lambdaAtPts.clear();
453
454 dataAtGaussPts->youngModulusAtPts.resize(nb_integration_pts, false);
455 dataAtGaussPts->youngModulusAtPts.clear();
456
457 auto t_young_modulus =
458 getFTensor0FromVec(dataAtGaussPts->youngModulusAtPts);
459 auto t_mu = getFTensor0FromVec(dataAtGaussPts->muAtPts);
460 auto t_lambda = getFTensor0FromVec(dataAtGaussPts->lambdaAtPts);
461
462 MatrixSizeHelper<
463 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
464 DL>::size(dataAtGaussPts->matD, nb_integration_pts);
465 MatrixSizeHelper<
466 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
467 DL>::size(dataAtGaussPts->matAxiatorD, nb_integration_pts);
468 MatrixSizeHelper<
469 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
470 DL>::size(dataAtGaussPts->matDeviatorD, nb_integration_pts);
471 MatrixSizeHelper<
472 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
473 DL>::size(dataAtGaussPts->matInvD, nb_integration_pts);
474
475 dataAtGaussPts->matD.clear();
476 dataAtGaussPts->matAxiatorD.clear();
477 dataAtGaussPts->matDeviatorD.clear();
478 dataAtGaussPts->matInvD.clear();
479
485
486 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
487 dataAtGaussPts->matD);
488 auto t_axiator_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
489 dataAtGaussPts->matAxiatorD);
490 auto t_deviator_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
491 dataAtGaussPts->matDeviatorD);
492 auto t_inv_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
493 dataAtGaussPts->matInvD);
494
495 auto next = [&]() {
496 ++t_young_modulus;
497 ++t_mu;
498 ++t_lambda;
499 ++t_D;
500 ++t_axiator_D;
501 ++t_deviator_D;
502 ++t_inv_D;
503 };
504
505 auto evalMatD = [&](double bulk_modulus_K, double shear_modulus_G) {
507 t_axiator_D(i, j, k, l) = (bulk_modulus_K - (2. / 3.) * shear_modulus_G) *
508 t_kd(i, j) * t_kd(k, l);
509 t_deviator_D(i, j, k, l) =
510 2 * shear_modulus_G * ((t_kd(i, k) ^ t_kd(j, l)) / 4.);
511 t_D(i, j, k, l) = t_axiator_D(i, j, k, l) + t_deviator_D(i, j, k, l);
513 };
514
515 auto evalInvMatDPtr = [&](double bulk_modulus_K, double shear_modulus_G) {
517 const double A = 1. / (2. * shear_modulus_G);
518 const double B =
519 (1. / (9. * bulk_modulus_K)) - (1. / (6. * shear_modulus_G));
520 t_inv_D(i, j, k, l) =
521 A * ((t_kd(i, k) ^ t_kd(j, l)) / 4.) + B * t_kd(i, j) * t_kd(k, l);
523 };
524
525 // from block data (MAT_ELASTIC) or (ANALYTICAL_ELASTIC) if provided,
526 // otherwise from command line options
527 for (auto &b : this->blockData) {
528 if (b.blockEnts.find(op_ptr->getFEEntityHandle()) != b.blockEnts.end()) {
529
530 if (b.matType == HMHHencky::HenckyMatType::ANALYTICAL) {
532 analytical_elastic = getAnalyticalElastic(op_ptr, b.blockName);
533
534 auto t_analytical_elastic = getFTensor0FromVec(analytical_elastic);
535
536 for (int gg = 0; gg != nb_integration_pts; ++gg) {
537 const auto material_params =
538 getMaterialParams(t_analytical_elastic, b.poissonRatio);
539 t_young_modulus = material_params.youngModulus;
540 t_mu = material_params.shearModulusG;
541 t_lambda = material_params.lambda;
542
543 CHKERR evalMatD(material_params.bulkModulusK,
544 material_params.shearModulusG);
545 CHKERR evalInvMatDPtr(material_params.bulkModulusK,
546 material_params.shearModulusG);
547 ++t_analytical_elastic;
548 next();
549 }
550
551 } else if (b.matType == HMHHencky::HenckyMatType::HETEROGENEOUS) {
552 Tag tag_heterogenous_mat;
553 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_handle(
555 tag_heterogenous_mat);
556 int tag_length;
557 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_length(
558 tag_heterogenous_mat, tag_length);
559 if (tag_length != 1) {
560 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
561 "heterogeneous Young's modulus tag should be 1 but is %d",
562 tag_length);
563 }
565 // Constant interpolation (element-wise)
566 double elem_young_mod = 0.0;
567 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_data(
568 tag_heterogenous_mat, &fe_ent, 1, &elem_young_mod);
569
570 for (int gg = 0; gg != nb_integration_pts; ++gg) {
571 const auto material_params =
572 getMaterialParams(elem_young_mod, b.poissonRatio);
573 t_young_modulus = material_params.youngModulus;
574 t_mu = material_params.shearModulusG;
575 t_lambda = material_params.lambda;
576
577 CHKERR evalMatD(material_params.bulkModulusK,
578 material_params.shearModulusG);
579 CHKERR evalInvMatDPtr(material_params.bulkModulusK,
580 material_params.shearModulusG);
581 next();
582 }
584 // Linear interpolation (vertex-based)
585 const EntityHandle *vert_conn;
586 int vert_num;
587 CHKERR op_ptr->getPtrFE()->mField.get_moab().get_connectivity(
588 fe_ent, vert_conn, vert_num, true);
589
590 VectorDouble vert_young_mod(vert_num);
591 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_data(
592 tag_heterogenous_mat, vert_conn, vert_num, &vert_young_mod[0]);
593
594 auto t_shape_n = data.getFTensor0N();
595 int nb_shape_fn = data.getN(NOBASE).size2();
596
597 for (int gg = 0; gg != nb_integration_pts; ++gg) {
598 t_young_modulus = 0; // Initialize to zero before accumulation
599 auto t_vert_young_mod = getFTensor0FromVec(vert_young_mod);
600 for (int bb = 0; bb != nb_shape_fn; ++bb) {
601 t_young_modulus += t_vert_young_mod * t_shape_n;
602 ++t_vert_young_mod;
603 ++t_shape_n;
604 }
605 const auto material_params =
606 getMaterialParams(t_young_modulus, b.poissonRatio);
607 t_young_modulus = material_params.youngModulus;
608 t_mu = material_params.shearModulusG;
609 t_lambda = material_params.lambda;
610
611 CHKERR evalMatD(material_params.bulkModulusK,
612 material_params.shearModulusG);
613 CHKERR evalInvMatDPtr(material_params.bulkModulusK,
614 material_params.shearModulusG);
615 next();
616 }
617 } else {
618 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
619 "Unsupported heterogeneous Young's modulus interpolation "
620 "order %d",
622 }
623 } else {
624 // MAT_ELASTIC block with homogeneous material properties
625 for (int gg = 0; gg != nb_integration_pts; ++gg) {
626 t_young_modulus = b.youngModulus;
627 t_mu = b.shearModulusG;
628 t_lambda = b.bulkModulusK - 2 * b.shearModulusG / 3;
629
630 CHKERR evalMatD(b.bulkModulusK, b.shearModulusG);
631 CHKERR evalInvMatDPtr(b.bulkModulusK, b.shearModulusG);
632 next();
633 }
634 }
636 }
637 }
638
639 // From command line options if no block data is provided
640 const auto material_params = getMaterialParams(this->E, this->nu);
641
642 // Keep scalar Lamé parameters in sync for homogeneous/default material.
643 dataAtGaussPts->mu = material_params.shearModulusG;
644 dataAtGaussPts->lambda = material_params.lambda;
645
646 for (int gg = 0; gg != nb_integration_pts; ++gg) {
647 t_young_modulus = material_params.youngModulus;
648 t_mu = material_params.shearModulusG;
649 t_lambda = material_params.lambda;
650 CHKERR evalMatD(material_params.bulkModulusK,
651 material_params.shearModulusG);
652 CHKERR evalInvMatDPtr(material_params.bulkModulusK,
653 material_params.shearModulusG);
654 next();
655 }
656
658 }
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Kronecker Delta class symmetric.
@ NOBASE
Definition definitions.h:59
#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_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
double bulk_modulus_K
double shear_modulus_G
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
static double lambda
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto calc_effective_elastic_params(double E, double nu, double diagonal_strain)
Definition HMHHencky.cpp:46
VectorDouble getAnalyticalElastic(OP_PTR op_ptr, const std::string block_name)
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
UBlasVector< double > VectorDouble
Definition Types.hpp:68
analytical_elastic(delta_t, t, x, y, z, block_name)
constexpr AssemblyType A
static std::string heterogeneousYoungModTagName
static int meshTransferInterpOrder
std::vector< BlockData > blockData

◆ extractBlockData() [1/2]

MoFEMErrorCode EshelbianPlasticity::HMHHencky::extractBlockData ( Sev  sev)
inline

Definition at line 354 of file HMHHencky.cpp.

354 {
355 return extractBlockData(
356
357 mField.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
358
359 (boost::format("(.*)%s(.*)") % "_ELASTIC").str()
360
361 )),
362
363 sev);
364 }
MoFEMErrorCode extractBlockData(Sev sev)
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

◆ extractBlockData() [2/2]

MoFEMErrorCode EshelbianPlasticity::HMHHencky::extractBlockData ( std::vector< const CubitMeshSets * >  meshset_vec_ptr,
Sev  sev 
)
inline

Definition at line 367 of file HMHHencky.cpp.

368 {
370
371 for (auto m : meshset_vec_ptr) {
372 MOFEM_TAG_AND_LOG("WORLD", sev, "MatBlock") << *m;
373 std::string block_name = m->getName();
374
375 auto block_name_heterogeneous = "(.*)HETEROGENEOUS_ELASTIC(.*)";
376 auto block_name_analytical = "(.*)ANALYTICAL_ELASTIC(.*)";
377 std::regex reg_name_heterogeneous(block_name_heterogeneous);
378 std::regex reg_name_analytical(block_name_analytical);
379 const bool is_heterogeneous =
380 std::regex_match(block_name, reg_name_heterogeneous);
381 const bool is_analytical =
382 std::regex_match(block_name, reg_name_analytical);
383
384 std::vector<double> block_data;
385 CHKERR m->getAttributes(block_data);
386 if (block_data.size() < 2) {
387 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
388 "Expected that block has atleast two attributes");
389 }
390 auto get_block_ents = [&]() {
391 Range ents;
392 CHKERR mField.get_moab().get_entities_by_handle(m->meshset, ents, true);
393 return ents;
394 };
395
396 double young_modulus = block_data[0];
397 double poisson_ratio = block_data[1];
398
400 if (is_heterogeneous) {
402 } else if (is_analytical) {
403 mat_type = HenckyMatType::ANALYTICAL;
404 }
405
407 mat_type == HenckyMatType::HOMOGENEOUS) {
408 const auto effective_params = calc_effective_elastic_params(
410 young_modulus = effective_params.youngModulus;
411 poisson_ratio = effective_params.poissonRatio;
412 }
413
414 double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio));
415 double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio));
416
417 MOFEM_TAG_AND_LOG("WORLD", sev, "MatBlock")
418 << "E = " << young_modulus << " nu = " << poisson_ratio;
419
420 blockData.push_back({block_name, young_modulus, poisson_ratio,
421 bulk_modulus_K, shear_modulus_G, get_block_ents(),
422 mat_type});
423 }
424 MOFEM_LOG_CHANNEL("WORLD");
426 }
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
double young_modulus
Young modulus.
Definition plastic.cpp:126
double poisson_ratio
Poisson ratio.
Definition plastic.cpp:127

◆ getOptions()

MoFEMErrorCode EshelbianPlasticity::HMHHencky::getOptions ( boost::shared_ptr< DataAtIntegrationPts data_ptr)
inline

Definition at line 322 of file HMHHencky.cpp.

322 {
324 PetscOptionsBegin(PETSC_COMM_WORLD, "hencky_", "", "none");
325
326 CHKERR PetscOptionsScalar("-young_modulus", "Young modulus", "", E, &E,
327 PETSC_NULLPTR);
328 CHKERR PetscOptionsScalar("-poisson_ratio", "poisson ratio", "", nu, &nu,
329 PETSC_NULLPTR);
330 CHKERR PetscOptionsBool("-effective_neohookean_stiffness",
331 "Use effective Neo-Hookean stiffness", "",
333 &effectiveNehookeanStiffness, PETSC_NULLPTR);
334 CHKERR PetscOptionsScalar("-effective_diagonal_strain",
335 "Diagonal logarithmic strain for effective "
336 "Neo-Hookean stiffness",
338 &effectiveDiagonalStrain, PETSC_NULLPTR);
339
340 PetscOptionsEnd();
341
343 << "Hencky: E = " << E << " nu = " << nu
344 << " effective_neohookean_stiffness = "
345 << (effectiveNehookeanStiffness ? "true" : "false")
346 << " effective_diagonal_strain = " << effectiveDiagonalStrain;
347 getOptionsSeverityLevels = Sev::verbose;
348
349 CHKERRG(ierr);
350
352 }
static PetscErrorCode ierr
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
#define MOFEM_LOG(channel, severity)
Log.

◆ returnOpCalculateEnergy()

VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpCalculateEnergy ( boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< double total_energy_ptr 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 230 of file HMHHencky.cpp.

231 {
232
234 return new OpCalculateEnergy<StrideMatD>(data_ptr, total_energy_ptr);
235 } else {
236 return new OpCalculateEnergy<0>(data_ptr, total_energy_ptr);
237 }
238 }
static bool hasNonHomogeneousMaterialBlock

◆ returnOpCalculateStretchFromStress()

VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpCalculateStretchFromStress ( boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< PhysicalEquations physics_ptr,
boost::shared_ptr< MatrixDouble >  strain_ptr 
)
inlineoverridevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 257 of file HMHHencky.cpp.

260 {
261 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
262
263 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
264 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
265 "Can not get data from block");
266
267 // Check if any heterogeneous or analytical block exists
268 for (const auto &b : henckyPtr->blockData) {
269 if (b.matType != HenckyMatType::HOMOGENEOUS) {
271 MOFEM_LOG("WORLD", Sev::verbose)
272 << "Found non-homogeneous material block: " << b.blockName;
273 break;
274 }
275 }
276
278 return new OpCalculateStretchFromStress<StrideMatD>(
279 data_ptr,
280 strain_ptr ? strain_ptr : data_ptr->getLogStretchTensorAtPts(),
281 data_ptr->getApproxPAtPts(),
282 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
283 } else {
284 return new OpCalculateStretchFromStress<0>(
285 data_ptr,
286 strain_ptr ? strain_ptr : data_ptr->getLogStretchTensorAtPts(),
287 data_ptr->getApproxPAtPts(),
288 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
289 }
290 }
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
HMHHencky(MoFEM::Interface &m_field, const double E, const double nu)
Definition HMHHencky.cpp:61

◆ returnOpCalculateVarStretchFromStress()

VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpCalculateVarStretchFromStress ( boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< PhysicalEquations physics_ptr 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 292 of file HMHHencky.cpp.

294 {
295 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
296
297 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
298 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
299 "Can not get data from block");
300
301 // Check if any heterogeneous or analytical block exists
302 for (const auto &b : henckyPtr->blockData) {
303 if (b.matType != HenckyMatType::HOMOGENEOUS) {
305 MOFEM_LOG("WORLD", Sev::verbose)
306 << "Found non-homogeneous material block: " << b.blockName;
307 break;
308 }
309 }
310
312 return new OpCalculateStretchFromStress<StrideMatD>(
313 data_ptr, data_ptr->getVarLogStreachPts(), data_ptr->getVarPiolaPts(),
314 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
315 } else {
316 return new OpCalculateStretchFromStress<0>(
317 data_ptr, data_ptr->getVarLogStreachPts(), data_ptr->getVarPiolaPts(),
318 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
319 }
320 }

◆ returnOpJacobian()

virtual UserDataOperator * EshelbianPlasticity::HMHHencky::returnOpJacobian ( const bool  eval_rhs,
const bool  eval_lhs,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< PhysicalEquations physics_ptr 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 93 of file HMHHencky.cpp.

95 {
96
97 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
98
99 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
100 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
101 "Can not get data from block");
102
103 // Check if any heterogeneous or analytical block exists
104 for (const auto &b : henckyPtr->blockData) {
105 if (b.matType != HenckyMatType::HOMOGENEOUS) {
107 MOFEM_LOG("WORLD", Sev::verbose)
108 << "Found non-homogeneous material block: " << b.blockName;
109 break;
110 }
111 }
112
114 return (new OpHenckyJacobian<StrideMatD>(
115 data_ptr, boost::dynamic_pointer_cast<HMHHencky>(physics_ptr)));
116 } else {
117 return (new OpHenckyJacobian<0>(
118 data_ptr, boost::dynamic_pointer_cast<HMHHencky>(physics_ptr)));
119 }
120 }

◆ returnOpSpatialPhysical()

virtual VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpSpatialPhysical ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const double  alpha_u 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 141 of file HMHHencky.cpp.

143 {
145 return new OpSpatialPhysical<StrideMatD>(field_name, data_ptr, alpha_u);
146 } else {
147 return new OpSpatialPhysical<0>(field_name, data_ptr, alpha_u);
148 }
149 }
constexpr auto field_name

◆ returnOpSpatialPhysical_du_du()

VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpSpatialPhysical_du_du ( std::string  row_field,
std::string  col_field,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const double  alpha 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 191 of file HMHHencky.cpp.

193 {
194
196 return new OpSpatialPhysical_du_du<StrideMatD>(row_field, col_field,
197 data_ptr, alpha);
198 } else {
199 return new OpSpatialPhysical_du_du<0>(row_field, col_field, data_ptr,
200 alpha);
201 }
202 }

◆ returnOpSpatialPhysicalExternalStrain()

virtual VolUserDataOperator * EshelbianPlasticity::HMHHencky::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 
)
inlinevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 165 of file HMHHencky.cpp.

169 {
170 return new OpSpatialPhysicalExternalStrain(field_name, data_ptr,
171 external_strain_vec_ptr, smv);
172 }

◆ returnOpTopoSpatialPhysical()

virtual VolUserDataOperator * EshelbianPlasticity::HMHHencky::returnOpTopoSpatialPhysical ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
SmartPetscObj< Vec >  assemble_vec,
boost::shared_ptr< TopologicalData topo_ptr,
const double  alpha_u,
boost::shared_ptr< double J_ptr 
)
inlineoverridevirtual

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 688 of file HMHHencky.cpp.

693 {
694 return new OpTopoSpatialPhysical(field_name, data_ptr, assemble_vec,
695 topo_ptr, alpha_u, J_ptr);
696 }

Member Data Documentation

◆ blockData

std::vector<BlockData> EshelbianPlasticity::HMHHencky::blockData
private

Definition at line 711 of file HMHHencky.cpp.

◆ E

double EshelbianPlasticity::HMHHencky::E
private

Definition at line 713 of file HMHHencky.cpp.

◆ effectiveDiagonalStrain

double EshelbianPlasticity::HMHHencky::effectiveDiagonalStrain = 0
private

Definition at line 716 of file HMHHencky.cpp.

◆ effectiveNehookeanStiffness

PetscBool EshelbianPlasticity::HMHHencky::effectiveNehookeanStiffness = PETSC_FALSE
private

Definition at line 715 of file HMHHencky.cpp.

◆ getOptionsSeverityLevels

Sev EshelbianPlasticity::HMHHencky::getOptionsSeverityLevels = Sev::inform
private

Definition at line 720 of file HMHHencky.cpp.

◆ mField

MoFEM::Interface& EshelbianPlasticity::HMHHencky::mField
private

Definition at line 699 of file HMHHencky.cpp.

◆ nu

double EshelbianPlasticity::HMHHencky::nu
private

Definition at line 714 of file HMHHencky.cpp.

◆ StrideMatD

constexpr int EshelbianPlasticity::HMHHencky::StrideMatD
staticconstexpr

The documentation for this struct was generated from the following file: