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)
 
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
 

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
 
Sev getOptionsSeverityLevels = Sev::inform
 

Detailed Description

Definition at line 12 of file HMHHencky.cpp.

Member Enumeration Documentation

◆ HenckyMatType

Enumerator
HOMOGENEOUS 
HETEROGENEOUS 
ANALYTICAL 

Definition at line 626 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 354 of file HMHHencky.cpp.

356 {
358
359 auto getLamesParam = [](double E, double nu) {
360 double bulk_modulus_K = E / (3 * (1 - 2 * nu));
361 double shear_modulus_G = E / (2 * (1 + nu));
362 double mu = shear_modulus_G;
363 double lambda = bulk_modulus_K - 2 * shear_modulus_G / 3;
364 return std::make_pair(mu, lambda);
365 };
366
367 auto fe_ent = op_ptr->getNumeredEntFiniteElementPtr()->getEnt();
368 int nb_integration_pts = op_ptr->getGaussPts().size2();
369
370 dataAtGaussPts->muAtPts.resize(nb_integration_pts, false);
371 dataAtGaussPts->lambdaAtPts.resize(nb_integration_pts, false);
372 dataAtGaussPts->muAtPts.clear();
373 dataAtGaussPts->lambdaAtPts.clear();
374
375 dataAtGaussPts->youngModulusAtPts.resize(nb_integration_pts, false);
376 dataAtGaussPts->youngModulusAtPts.clear();
377
378 auto t_young_modulus =
379 getFTensor0FromVec(dataAtGaussPts->youngModulusAtPts);
380 auto t_mu = getFTensor0FromVec(dataAtGaussPts->muAtPts);
381 auto t_lambda = getFTensor0FromVec(dataAtGaussPts->lambdaAtPts);
382
383 MatrixSizeHelper<
384 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
385 DL>::size(dataAtGaussPts->matD, nb_integration_pts);
386 MatrixSizeHelper<
387 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
388 DL>::size(dataAtGaussPts->matAxiatorD, nb_integration_pts);
389 MatrixSizeHelper<
390 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
391 DL>::size(dataAtGaussPts->matDeviatorD, nb_integration_pts);
392 MatrixSizeHelper<
393 GetFTensor4DdgFromMatType<SPACE_DIM, SPACE_DIM, STRIDEMATD, DL>,
394 DL>::size(dataAtGaussPts->matInvD, nb_integration_pts);
395
396 dataAtGaussPts->matD.clear();
397 dataAtGaussPts->matAxiatorD.clear();
398 dataAtGaussPts->matDeviatorD.clear();
399 dataAtGaussPts->matInvD.clear();
400
406
407 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
408 dataAtGaussPts->matD);
409 auto t_axiator_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
410 dataAtGaussPts->matAxiatorD);
411 auto t_deviator_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
412 dataAtGaussPts->matDeviatorD);
413 auto t_inv_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, STRIDEMATD>(
414 dataAtGaussPts->matInvD);
415
416 auto next = [&]() {
417 ++t_young_modulus;
418 ++t_mu;
419 ++t_lambda;
420 ++t_D;
421 ++t_axiator_D;
422 ++t_deviator_D;
423 ++t_inv_D;
424 };
425
426 auto evalMatD = [&](double bulk_modulus_K, double shear_modulus_G) {
428 t_axiator_D(i, j, k, l) = (bulk_modulus_K - (2. / 3.) * shear_modulus_G) *
429 t_kd(i, j) * t_kd(k, l);
430 t_deviator_D(i, j, k, l) =
431 2 * shear_modulus_G * ((t_kd(i, k) ^ t_kd(j, l)) / 4.);
432 t_D(i, j, k, l) = t_axiator_D(i, j, k, l) + t_deviator_D(i, j, k, l);
434 };
435
436 auto evalInvMatDPtr = [&](double bulk_modulus_K, double shear_modulus_G) {
438 const double A = 1. / (2. * shear_modulus_G);
439 const double B =
440 (1. / (9. * bulk_modulus_K)) - (1. / (6. * shear_modulus_G));
441 t_inv_D(i, j, k, l) =
442 A * ((t_kd(i, k) ^ t_kd(j, l)) / 4.) + B * t_kd(i, j) * t_kd(k, l);
444 };
445
446 // from block data (MAT_ELASTIC) or (ANALYTICAL_ELASTIC) if provided,
447 // otherwise from command line options
448 for (auto &b : this->blockData) {
449 if (b.blockEnts.find(op_ptr->getFEEntityHandle()) != b.blockEnts.end()) {
450
451 if (b.matType == HMHHencky::HenckyMatType::ANALYTICAL) {
453 analytical_elastic = getAnalyticalElastic(op_ptr, b.blockName);
454
455 auto t_analytical_elastic = getFTensor0FromVec(analytical_elastic);
456
457 for (int gg = 0; gg != nb_integration_pts; ++gg) {
458 t_young_modulus = t_analytical_elastic;
459 double bulk_modulus_K =
460 t_analytical_elastic / (3 * (1 - 2 * b.poissonRatio));
461 double shear_modulus_G =
462 t_analytical_elastic / (2 * (1 + b.poissonRatio));
463 t_mu = shear_modulus_G;
464 t_lambda = bulk_modulus_K - 2 * shear_modulus_G / 3;
465
467 CHKERR evalInvMatDPtr(bulk_modulus_K, shear_modulus_G);
468 ++t_analytical_elastic;
469 next();
470 }
471
472 } else if (b.matType == HMHHencky::HenckyMatType::HETEROGENEOUS) {
473 Tag tag_heterogenous_mat;
474 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_handle(
476 tag_heterogenous_mat);
477 int tag_length;
478 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_length(
479 tag_heterogenous_mat, tag_length);
480 if (tag_length != 1) {
481 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
482 "heterogeneous Young's modulus tag should be 1 but is %d",
483 tag_length);
484 }
486 // Constant interpolation (element-wise)
487 double elem_young_mod = 0.0;
488 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_data(
489 tag_heterogenous_mat, &fe_ent, 1, &elem_young_mod);
490
491 for (int gg = 0; gg != nb_integration_pts; ++gg) {
492 t_young_modulus = elem_young_mod;
493 auto [mu, lambda] = getLamesParam(elem_young_mod, b.poissonRatio);
494 t_mu = mu;
495 t_lambda = lambda;
496 double bulk_modulus_K =
497 elem_young_mod / (3 * (1 - 2 * b.poissonRatio));
498 double shear_modulus_G =
499 elem_young_mod / (2 * (1 + b.poissonRatio));
500
502 CHKERR evalInvMatDPtr(bulk_modulus_K, shear_modulus_G);
503 next();
504 }
506 // Linear interpolation (vertex-based)
507 const EntityHandle *vert_conn;
508 int vert_num;
509 CHKERR op_ptr->getPtrFE()->mField.get_moab().get_connectivity(
510 fe_ent, vert_conn, vert_num, true);
511
512 VectorDouble vert_young_mod(vert_num);
513 CHKERR op_ptr->getPtrFE()->mField.get_moab().tag_get_data(
514 tag_heterogenous_mat, vert_conn, vert_num, &vert_young_mod[0]);
515
516 auto t_shape_n = data.getFTensor0N();
517 int nb_shape_fn = data.getN(NOBASE).size2();
518
519 for (int gg = 0; gg != nb_integration_pts; ++gg) {
520 t_young_modulus = 0; // Initialize to zero before accumulation
521 auto t_vert_young_mod = getFTensor0FromVec(vert_young_mod);
522 for (int bb = 0; bb != nb_shape_fn; ++bb) {
523 t_young_modulus += t_vert_young_mod * t_shape_n;
524 ++t_vert_young_mod;
525 ++t_shape_n;
526 }
527 auto [mu, lambda] =
528 getLamesParam(t_young_modulus, b.poissonRatio);
529 t_mu = mu;
530 t_lambda = lambda;
531 double bulk_modulus_K =
532 t_young_modulus / (3 * (1 - 2 * b.poissonRatio));
533 double shear_modulus_G =
534 t_young_modulus / (2 * (1 + b.poissonRatio));
535
537 CHKERR evalInvMatDPtr(bulk_modulus_K, shear_modulus_G);
538 next();
539 }
540 } else {
541 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
542 "Unsupported heterogeneous Young's modulus interpolation "
543 "order %d",
545 }
546 } else {
547 // MAT_ELASTIC block with homogeneous material properties
548 for (int gg = 0; gg != nb_integration_pts; ++gg) {
549 t_young_modulus = b.youngModulus;
550 t_mu = b.shearModulusG;
551 t_lambda = b.bulkModulusK - 2 * b.shearModulusG / 3;
552
553 CHKERR evalMatD(b.bulkModulusK, b.shearModulusG);
554 CHKERR evalInvMatDPtr(b.bulkModulusK, b.shearModulusG);
555 next();
556 }
557 }
559 }
560 }
561
562 // From command line options if no block data is provided
563 const auto E = this->E;
564 const auto nu = this->nu;
565
566 double bulk_modulus_K = E / (3 * (1 - 2 * nu));
567 double shear_modulus_G = E / (2 * (1 + nu));
568
569 // Keep scalar Lamé parameters in sync for homogeneous/default material.
570 dataAtGaussPts->mu = shear_modulus_G;
571 dataAtGaussPts->lambda = bulk_modulus_K - 2 * shear_modulus_G / 3;
572
573 for (int gg = 0; gg != nb_integration_pts; ++gg) {
574 t_young_modulus = E;
575 t_mu = shear_modulus_G;
576 t_lambda = bulk_modulus_K - 2 * shear_modulus_G / 3;
578 CHKERR evalInvMatDPtr(bulk_modulus_K, shear_modulus_G);
579 next();
580 }
581
583 }
#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
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 292 of file HMHHencky.cpp.

292 {
293 return extractBlockData(
294
295 mField.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
296
297 (boost::format("(.*)%s(.*)") % "_ELASTIC").str()
298
299 )),
300
301 sev);
302 }
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 305 of file HMHHencky.cpp.

306 {
308
309 for (auto m : meshset_vec_ptr) {
310 MOFEM_TAG_AND_LOG("WORLD", sev, "MatBlock") << *m;
311 std::vector<double> block_data;
312 CHKERR m->getAttributes(block_data);
313 if (block_data.size() < 2) {
314 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
315 "Expected that block has atleast two attributes");
316 }
317 auto get_block_ents = [&]() {
318 Range ents;
319 CHKERR mField.get_moab().get_entities_by_handle(m->meshset, ents, true);
320 return ents;
321 };
322
323 double young_modulus = block_data[0];
324 double poisson_ratio = block_data[1];
325 double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio));
326 double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio));
327
328 MOFEM_TAG_AND_LOG("WORLD", sev, "MatBlock")
329 << "E = " << young_modulus << " nu = " << poisson_ratio;
330
331 std::string block_name = m->getName();
332
333 auto block_name_heterogeneous = "(.*)HETEROGENEOUS_ELASTIC(.*)";
334 auto block_name_analytical = "(.*)ANALYTICAL_ELASTIC(.*)";
335 std::regex reg_name_heterogeneous(block_name_heterogeneous);
336 std::regex reg_name_analytical(block_name_analytical);
337
339 if (std::regex_match(block_name, reg_name_heterogeneous)) {
341 } else if (std::regex_match(block_name, reg_name_analytical)) {
342 mat_type = HenckyMatType::ANALYTICAL;
343 }
344
345 blockData.push_back({block_name, young_modulus, poisson_ratio,
346 bulk_modulus_K, shear_modulus_G, get_block_ents(),
347 mat_type});
348 }
349 MOFEM_LOG_CHANNEL("WORLD");
351 }
#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 272 of file HMHHencky.cpp.

272 {
274 PetscOptionsBegin(PETSC_COMM_WORLD, "hencky_", "", "none");
275
276 CHKERR PetscOptionsScalar("-young_modulus", "Young modulus", "", E, &E,
277 PETSC_NULLPTR);
278 CHKERR PetscOptionsScalar("-poisson_ratio", "poisson ratio", "", nu, &nu,
279 PETSC_NULLPTR);
280
281 PetscOptionsEnd();
282
284 << "Hencky: E = " << E << " nu = " << nu;
285 getOptionsSeverityLevels = Sev::verbose;
286
287 CHKERRG(ierr);
288
290 }
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 183 of file HMHHencky.cpp.

184 {
185
187 return new OpCalculateEnergy<StrideMatD>(data_ptr, total_energy_ptr);
188 } else {
189 return new OpCalculateEnergy<0>(data_ptr, total_energy_ptr);
190 }
191 }
static bool hasNonHomogeneousMaterialBlock

◆ returnOpCalculateStretchFromStress()

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

Reimplemented from EshelbianPlasticity::PhysicalEquations.

Definition at line 210 of file HMHHencky.cpp.

212 {
213 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
214
215 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
216 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
217 "Can not get data from block");
218
219 // Check if any heterogeneous or analytical block exists
220 for (const auto &b : henckyPtr->blockData) {
221 if (b.matType != HenckyMatType::HOMOGENEOUS) {
223 MOFEM_LOG("WORLD", Sev::verbose)
224 << "Found non-homogeneous material block: " << b.blockName;
225 break;
226 }
227 }
228
230 return new OpCalculateStretchFromStress<StrideMatD>(
231 data_ptr, data_ptr->getLogStretchTensorAtPts(),
232 data_ptr->getApproxPAtPts(),
233 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
234 } else {
235 return new OpCalculateStretchFromStress<0>(
236 data_ptr, data_ptr->getLogStretchTensorAtPts(),
237 data_ptr->getApproxPAtPts(),
238 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
239 }
240 }
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.

◆ 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 242 of file HMHHencky.cpp.

244 {
245 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
246
247 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
248 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
249 "Can not get data from block");
250
251 // Check if any heterogeneous or analytical block exists
252 for (const auto &b : henckyPtr->blockData) {
253 if (b.matType != HenckyMatType::HOMOGENEOUS) {
255 MOFEM_LOG("WORLD", Sev::verbose)
256 << "Found non-homogeneous material block: " << b.blockName;
257 break;
258 }
259 }
260
262 return new OpCalculateStretchFromStress<StrideMatD>(
263 data_ptr, data_ptr->getVarLogStreachPts(), data_ptr->getVarPiolaPts(),
264 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
265 } else {
266 return new OpCalculateStretchFromStress<0>(
267 data_ptr, data_ptr->getVarLogStreachPts(), data_ptr->getVarPiolaPts(),
268 boost::dynamic_pointer_cast<HMHHencky>(physics_ptr));
269 }
270 }

◆ 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 46 of file HMHHencky.cpp.

48 {
49
50 auto henckyPtr = boost::dynamic_pointer_cast<HMHHencky>(physics_ptr);
51
52 CHK_THROW_MESSAGE(henckyPtr->getOptions(data_ptr), "getOptions failed");
53 CHK_THROW_MESSAGE(henckyPtr->extractBlockData(Sev::verbose),
54 "Can not get data from block");
55
56 // Check if any heterogeneous or analytical block exists
57 for (const auto &b : henckyPtr->blockData) {
58 if (b.matType != HenckyMatType::HOMOGENEOUS) {
60 MOFEM_LOG("WORLD", Sev::verbose)
61 << "Found non-homogeneous material block: " << b.blockName;
62 break;
63 }
64 }
65
67 return (new OpHenckyJacobian<StrideMatD>(
68 data_ptr, boost::dynamic_pointer_cast<HMHHencky>(physics_ptr)));
69 } else {
70 return (new OpHenckyJacobian<0>(
71 data_ptr, boost::dynamic_pointer_cast<HMHHencky>(physics_ptr)));
72 }
73 }

◆ 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 94 of file HMHHencky.cpp.

96 {
98 return new OpSpatialPhysical<StrideMatD>(field_name, data_ptr, alpha_u);
99 } else {
100 return new OpSpatialPhysical<0>(field_name, data_ptr, alpha_u);
101 }
102 }
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 144 of file HMHHencky.cpp.

146 {
147
149 return new OpSpatialPhysical_du_du<StrideMatD>(row_field, col_field,
150 data_ptr, alpha);
151 } else {
152 return new OpSpatialPhysical_du_du<0>(row_field, col_field, data_ptr,
153 alpha);
154 }
155 }

◆ 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 118 of file HMHHencky.cpp.

122 {
123 return new OpSpatialPhysicalExternalStrain(field_name, data_ptr,
124 external_strain_vec_ptr, smv);
125 }

◆ 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 613 of file HMHHencky.cpp.

618 {
619 return new OpTopoSpatialPhysical(field_name, data_ptr, assemble_vec,
620 topo_ptr, alpha_u, J_ptr);
621 }

Member Data Documentation

◆ blockData

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

Definition at line 636 of file HMHHencky.cpp.

◆ E

double EshelbianPlasticity::HMHHencky::E
private

Definition at line 638 of file HMHHencky.cpp.

◆ getOptionsSeverityLevels

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

Definition at line 643 of file HMHHencky.cpp.

◆ mField

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

Definition at line 624 of file HMHHencky.cpp.

◆ nu

double EshelbianPlasticity::HMHHencky::nu
private

Definition at line 639 of file HMHHencky.cpp.

◆ StrideMatD

constexpr int EshelbianPlasticity::HMHHencky::StrideMatD
staticconstexpr

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