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

Classes

struct  BlockedThermalParameters
 
struct  BlockedThermoElasticParameters
 

Public Member Functions

 ThermoElasticProblem (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 [Run problem]
 
 ThermoElasticProblem (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 

Private Member Functions

MoFEMErrorCode setupProblem ()
 add fields
 
MoFEMErrorCode getCommandLineParameters ()
 [Run problem]
 
MoFEMErrorCode bC ()
 [Set up problem]
 
MoFEMErrorCode OPs ()
 [Boundary condition]
 
MoFEMErrorCode tsSolve ()
 [Push operators to pipeline]
 
MoFEMErrorCode addMatThermalBlockOps (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermalParameters > blockedParamsPtr, Sev sev)
 
MoFEMErrorCode addMatThermoElasticBlockOps (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermoElasticParameters > blockedParamsPtr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainRhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, boost::shared_ptr< HenckyOps::CommonData > elastic_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters > thermal_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters > thermoelastic_common_ptr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainRhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string elastic_block_name, std::string thermal_block_name, std::string thermoelastic_block_name, Sev sev, double scale=1)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainLhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string coupled_field_name, boost::shared_ptr< HenckyOps::CommonData > elastic_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters > thermal_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters > thermoelastic_common_ptr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainLhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string coupled_field_name, std::string elastic_block_name, std::string thermal_block_name, std::string thermoelastic_block_name, Sev sev, double scale=1)
 
MoFEMErrorCode setupProblem ()
 add fields
 
MoFEMErrorCode getCommandLineParameters ()
 
MoFEMErrorCode bC ()
 
MoFEMErrorCode OPs ()
 
MoFEMErrorCode tsSolve ()
 
MoFEMErrorCode addMatThermalBlockOps (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermalParameters > blockedParamsPtr, Sev sev)
 
MoFEMErrorCode addMatThermoElasticBlockOps (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermoElasticParameters > blockedParamsPtr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainRhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, boost::shared_ptr< HenckyOps::CommonData > elastic_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters > thermal_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters > thermoelastic_common_ptr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainRhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string elastic_block_name, std::string thermal_block_name, std::string thermoelastic_block_name, Sev sev, double scale=1)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainLhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string coupled_field_name, boost::shared_ptr< HenckyOps::CommonData > elastic_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters > thermal_common_ptr, boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters > thermoelastic_common_ptr, Sev sev)
 
template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode opThermoElasticFactoryDomainLhs (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string field_name, std::string coupled_field_name, std::string elastic_block_name, std::string thermal_block_name, std::string thermoelastic_block_name, Sev sev, double scale=1)
 

Private Attributes

MoFEM::InterfacemField
 
PetscBool doEvalField
 
std::array< double, 3 > fieldEvalCoords = {0.0, 0.0, 0.0}
 
boost::shared_ptr< FieldEvaluatorInterface::SetPtsDatafieldEvalData
 
boost::shared_ptr< VectorDoubletempFieldPtr
 
boost::shared_ptr< MatrixDoublefluxFieldPtr
 
boost::shared_ptr< MatrixDoubledispFieldPtr
 
boost::shared_ptr< MatrixDoubledispGradPtr
 
boost::shared_ptr< MatrixDoublestrainFieldPtr
 
boost::shared_ptr< MatrixDoublestressFieldPtr
 
std::array< double, SPACE_DIMfieldEvalCoords
 

Detailed Description

Examples
thermo_elastic.cpp.

Definition at line 120 of file thermo_elastic.cpp.

Constructor & Destructor Documentation

◆ ThermoElasticProblem() [1/2]

ThermoElasticProblem::ThermoElasticProblem ( MoFEM::Interface m_field)
inline

Definition at line 122 of file thermo_elastic.cpp.

122: mField(m_field) {}
MoFEM::Interface & mField

◆ ThermoElasticProblem() [2/2]

ThermoElasticProblem::ThermoElasticProblem ( MoFEM::Interface m_field)
inline

Definition at line 128 of file thermo_elastic.cpp.

128: mField(m_field) {}

Member Function Documentation

◆ addMatThermalBlockOps() [1/2]

MoFEMErrorCode ThermoElasticProblem::addMatThermalBlockOps ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::string  block_name,
boost::shared_ptr< BlockedThermalParameters blockedParamsPtr,
Sev  sev 
)
private
Examples
thermo_elastic.cpp.

Definition at line 308 of file thermo_elastic.cpp.

311 {
313
314 struct OpMatThermalBlocks : public DomainEleOp {
315 OpMatThermalBlocks(boost::shared_ptr<double> conductivity_ptr,
316 boost::shared_ptr<double> capacity_ptr,
317 MoFEM::Interface &m_field, Sev sev,
318 std::vector<const CubitMeshSets *> meshset_vec_ptr)
319 : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE),
320 conductivityPtr(conductivity_ptr), capacityPtr(capacity_ptr) {
321 CHK_THROW_MESSAGE(extractThermalBlockData(m_field, meshset_vec_ptr, sev),
322 "Cannot get data from thermal block");
323 }
324
325 MoFEMErrorCode doWork(int side, EntityType type,
328
329 for (auto &b : blockData) {
330
331 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
332 *conductivityPtr = b.conductivity;
333 *capacityPtr = b.capacity;
335 }
336 }
337
338 *conductivityPtr = default_heat_conductivity;
339 *capacityPtr = default_heat_capacity;
340
342 }
343
344 private:
345 struct BlockData {
346 double conductivity;
347 double capacity;
348 Range blockEnts;
349 };
350
351 std::vector<BlockData> blockData;
352
354 extractThermalBlockData(MoFEM::Interface &m_field,
355 std::vector<const CubitMeshSets *> meshset_vec_ptr,
356 Sev sev) {
358
359 for (auto m : meshset_vec_ptr) {
360 MOFEM_TAG_AND_LOG("WORLD", sev, "Mat Thermal Block") << *m;
361 std::vector<double> block_data;
362 CHKERR m->getAttributes(block_data);
363 if (block_data.size() < 2) {
364 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
365 "Expected that block has at least two attributes");
366 }
367 auto get_block_ents = [&]() {
368 Range ents;
369 CHKERR
370 m_field.get_moab().get_entities_by_handle(m->meshset, ents, true);
371 return ents;
372 };
373
374 MOFEM_TAG_AND_LOG("WORLD", sev, "Mat Thermal Block")
375 << m->getName() << ": conductivity = " << block_data[0]
376 << " capacity = " << block_data[1];
377
378 blockData.push_back({block_data[0], block_data[1], get_block_ents()});
379 }
380 MOFEM_LOG_CHANNEL("WORLD");
382 }
383
384 boost::shared_ptr<double> conductivityPtr;
385 boost::shared_ptr<double> capacityPtr;
386 };
387
388 pipeline.push_back(new OpMatThermalBlocks(
389 blockedParamsPtr->getHeatConductivityPtr(),
390 blockedParamsPtr->getHeatCapacityPtr(), mField, sev,
391
392 // Get blockset using regular expression
394
395 (boost::format("%s(.*)") % block_name).str()
396
397 ))
398
399 ));
400
402}
std::string type
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#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()
@ NOSPACE
Definition definitions.h:83
#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
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
SeverityLevel
Severity levels.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
double default_heat_capacity
double default_heat_conductivity

◆ addMatThermalBlockOps() [2/2]

MoFEMErrorCode ThermoElasticProblem::addMatThermalBlockOps ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::string  block_name,
boost::shared_ptr< BlockedThermalParameters blockedParamsPtr,
Sev  sev 
)
private

◆ addMatThermoElasticBlockOps() [1/2]

MoFEMErrorCode ThermoElasticProblem::addMatThermoElasticBlockOps ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::string  block_name,
boost::shared_ptr< BlockedThermoElasticParameters blockedParamsPtr,
Sev  sev 
)
private
Examples
thermo_elastic.cpp.

Definition at line 404 of file thermo_elastic.cpp.

408 {
410
411 struct OpMatThermoElasticBlocks : public DomainEleOp {
412 OpMatThermoElasticBlocks(boost::shared_ptr<VectorDouble> expansion_ptr,
413 boost::shared_ptr<double> ref_temp_ptr,
414 MoFEM::Interface &m_field, Sev sev,
415 std::vector<const CubitMeshSets *> meshset_vec_ptr)
416 : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE),
417 expansionPtr(expansion_ptr), refTempPtr(ref_temp_ptr) {
419 extractThermoElasticBlockData(m_field, meshset_vec_ptr, sev),
420 "Cannot get data from thermoelastic block");
421 }
422
423 MoFEMErrorCode doWork(int side, EntityType type,
426
427 for (auto &b : blockData) {
428
429 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
430 *expansionPtr = b.expansion;
431 *refTempPtr = b.ref_temp;
433 }
434 }
435
437 *refTempPtr = default_ref_temp;
438
440 }
441
442 private:
443 struct BlockData {
444 double ref_temp;
445 VectorDouble expansion;
446 Range blockEnts;
447 };
448
449 std::vector<BlockData> blockData;
450
451 MoFEMErrorCode extractThermoElasticBlockData(
452 MoFEM::Interface &m_field,
453 std::vector<const CubitMeshSets *> meshset_vec_ptr, Sev sev) {
455
456 for (auto m : meshset_vec_ptr) {
457 MOFEM_TAG_AND_LOG("WORLD", sev, "Mat Thermoelastic Block") << *m;
458 std::vector<double> block_data;
459 CHKERR m->getAttributes(block_data);
460 if (block_data.size() < 2) {
461 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
462 "Expected that block has at least two attributes");
463 }
464 auto get_block_ents = [&]() {
465 Range ents;
466 CHKERR
467 m_field.get_moab().get_entities_by_handle(m->meshset, ents, true);
468 return ents;
469 };
470
471 auto get_expansion = [&]() {
472 VectorDouble expansion(SPACE_DIM, block_data[1]);
473 if (block_data.size() > 2) {
474 expansion[1] = block_data[2];
475 }
476 if (SPACE_DIM == 3 && block_data.size() > 3) {
477 expansion[2] = block_data[3];
478 }
479 return expansion;
480 };
481
482 auto coeff_exp_vec = get_expansion();
483
484 MOFEM_TAG_AND_LOG("WORLD", sev, "Mat Thermoelastic Block")
485 << " ref_temp = " << block_data[0]
486 << " expansion = " << coeff_exp_vec;
487
488 blockData.push_back({block_data[0], coeff_exp_vec, get_block_ents()});
489 }
490 MOFEM_LOG_CHANNEL("WORLD");
492 }
493
494 boost::shared_ptr<VectorDouble> expansionPtr;
495 boost::shared_ptr<double> refTempPtr;
496 };
497
498 pipeline.push_back(new OpMatThermoElasticBlocks(
499 blockedParamsPtr->getCoeffExpansionPtr(),
500 blockedParamsPtr->getRefTempPtr(), mField, sev,
501
502 // Get blockset using regular expression
504
505 (boost::format("%s(.*)") % block_name).str()
506
507 ))
508
509 ));
510
512}
constexpr int SPACE_DIM
UBlasVector< double > VectorDouble
Definition Types.hpp:68
double default_ref_temp
double default_coeff_expansion

◆ addMatThermoElasticBlockOps() [2/2]

MoFEMErrorCode ThermoElasticProblem::addMatThermoElasticBlockOps ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
std::string  block_name,
boost::shared_ptr< BlockedThermoElasticParameters blockedParamsPtr,
Sev  sev 
)
private

◆ bC() [1/2]

MoFEMErrorCode ThermoElasticProblem::bC ( )
private

[Set up problem]

[Boundary condition]

Examples
thermo_elastic.cpp.

Definition at line 713 of file thermo_elastic.cpp.

713 {
715
716 MOFEM_LOG("SYNC", Sev::noisy) << "bC";
718
720 auto bc_mng = mField.getInterface<BcManager>();
721
722 auto get_skin = [&]() {
723 Range body_ents;
724 CHKERR mField.get_moab().get_entities_by_dimension(0, SPACE_DIM, body_ents);
725 Skinner skin(&mField.get_moab());
726 Range skin_ents;
727 CHKERR skin.find_skin(0, body_ents, false, skin_ents);
728 return skin_ents;
729 };
730
731 auto filter_flux_blocks = [&](auto skin, bool temp_bc = false) {
732 auto remove_cubit_blocks = [&](auto c) {
734 for (auto m :
735
736 mField.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(c)
737
738 ) {
739 Range ents;
740 CHKERR mField.get_moab().get_entities_by_dimension(
741 m->getMeshset(), SPACE_DIM - 1, ents, true);
742 skin = subtract(skin, ents);
743 }
745 };
746
747 auto remove_named_blocks = [&](auto n) {
749 for (auto m : mField.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
750 std::regex(
751
752 (boost::format("%s(.*)") % n).str()
753
754 ))
755
756 ) {
757 Range ents;
758 CHKERR mField.get_moab().get_entities_by_dimension(
759 m->getMeshset(), SPACE_DIM - 1, ents, true);
760 skin = subtract(skin, ents);
761 }
763 };
764 if (!temp_bc) {
765 CHK_THROW_MESSAGE(remove_cubit_blocks(NODESET | TEMPERATURESET),
766 "remove_cubit_blocks");
767 CHK_THROW_MESSAGE(remove_named_blocks("TEMPERATURE"),
768 "remove_named_blocks");
769 }
770 CHK_THROW_MESSAGE(remove_cubit_blocks(SIDESET | HEATFLUXSET),
771 "remove_cubit_blocks");
772 CHK_THROW_MESSAGE(remove_named_blocks("HEATFLUX"), "remove_named_blocks");
773 CHK_THROW_MESSAGE(remove_named_blocks("CONVECTION"), "remove_named_blocks");
774 CHK_THROW_MESSAGE(remove_named_blocks("RADIATION"), "remove_named_blocks");
775 return skin;
776 };
777
778 auto filter_true_skin = [&](auto skin) {
779 Range boundary_ents;
780 ParallelComm *pcomm =
781 ParallelComm::get_pcomm(&mField.get_moab(), MYPCOMM_INDEX);
782 CHKERR pcomm->filter_pstatus(skin, PSTATUS_SHARED | PSTATUS_MULTISHARED,
783 PSTATUS_NOT, -1, &boundary_ents);
784 return boundary_ents;
785 };
786
787 auto remove_flux_ents = filter_true_skin(filter_flux_blocks(get_skin()));
788 auto remove_temp_bc_ents =
789 filter_true_skin(filter_flux_blocks(get_skin(), true));
790
791 CHKERR mField.getInterface<CommInterface>()->synchroniseEntities(
792 remove_flux_ents);
793 CHKERR mField.getInterface<CommInterface>()->synchroniseEntities(
794 remove_temp_bc_ents);
795
796 MOFEM_LOG("SYNC", Sev::noisy) << remove_flux_ents << endl;
798
799 MOFEM_LOG("SYNC", Sev::noisy) << remove_temp_bc_ents << endl;
801
802#ifndef NDEBUG
803
806 (boost::format("flux_remove_%d.vtk") % mField.get_comm_rank()).str(),
807 remove_flux_ents);
808
811 (boost::format("temp_bc_remove_%d.vtk") % mField.get_comm_rank()).str(),
812 remove_temp_bc_ents);
813
814#endif
815
816 CHKERR mField.getInterface<ProblemsManager>()->removeDofsOnEntities(
817 simple->getProblemName(), "FLUX", remove_flux_ents);
818 CHKERR mField.getInterface<ProblemsManager>()->removeDofsOnEntities(
819 simple->getProblemName(), "TBC", remove_temp_bc_ents);
820
821 auto set_init_temp = [](boost::shared_ptr<FieldEntity> field_entity_ptr) {
822 field_entity_ptr->getEntFieldData()[0] = default_init_temp;
823 return 0;
824 };
825 CHKERR mField.getInterface<FieldBlas>()->fieldLambdaOnEntities(set_init_temp,
826 "T");
827
828 CHKERR bc_mng->removeBlockDOFsOnEntities<DisplacementCubitBcData>(
829 simple->getProblemName(), "U");
830 CHKERR bc_mng->pushMarkDOFsOnEntities<HeatFluxCubitBcData>(
831 simple->getProblemName(), "FLUX", false);
832
834}
static auto filter_true_skin(MoFEM::Interface &m_field, Range &&skin)
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
#define MYPCOMM_INDEX
default communicator number PCOMM
@ TEMPERATURESET
@ HEATFLUXSET
@ NODESET
@ SIDESET
#define MOFEM_LOG(channel, severity)
Log.
const double c
speed of light (cm/ns)
const double n
refractive index of diffusive medium
Boundary condition manager for finite element problem setup.
Managing BitRefLevels.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
Definition of the displacement bc data structure.
Definition BCData.hpp:72
Basic algebra on fields.
Definition FieldBlas.hpp:21
Definition of the heat flux bc data structure.
Definition BCData.hpp:423
Problem manager is used to build and partition problems.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
auto save_range
constexpr int SPACE_DIM
double default_init_temp

◆ bC() [2/2]

MoFEMErrorCode ThermoElasticProblem::bC ( )
private

◆ getCommandLineParameters() [1/2]

MoFEMErrorCode ThermoElasticProblem::getCommandLineParameters ( )
private

[Run problem]

[Get command line parameters]

Examples
thermo_elastic.cpp.

Definition at line 527 of file thermo_elastic.cpp.

527 {
529
530 auto get_command_line_parameters = [&]() {
532
533 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-order", &order_temp,
534 PETSC_NULLPTR);
535 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-order_temp", &order_temp,
536 PETSC_NULLPTR);
538 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-order_flux", &order_flux,
539 PETSC_NULLPTR);
541 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-order_disp", &order_disp,
542 PETSC_NULLPTR);
543 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-atom_test", &atom_test,
544 PETSC_NULLPTR);
545 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-save_every", &save_every,
546 PETSC_NULLPTR);
547
548 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-young_modulus",
549 &default_young_modulus, PETSC_NULLPTR);
550 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-poisson_ratio",
551 &default_poisson_ratio, PETSC_NULLPTR);
552 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-coeff_expansion",
553 &default_coeff_expansion, PETSC_NULLPTR);
554 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-ref_temp", &default_ref_temp,
555 PETSC_NULLPTR);
556 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-init_temp",
557 &default_init_temp, PETSC_NULLPTR);
558
559 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-capacity",
560 &default_heat_capacity, PETSC_NULLPTR);
561 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-conductivity",
562 &default_heat_conductivity, PETSC_NULLPTR);
563
564 if constexpr (SPACE_DIM == 2) {
565 do_output_domain = PETSC_TRUE;
566 do_output_skin = PETSC_FALSE;
567 } else {
568 do_output_domain = PETSC_FALSE;
569 do_output_skin = PETSC_TRUE;
570 }
571
572 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "", "-output_domain",
573 &do_output_domain, PETSC_NULLPTR);
574 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "", "-output_skin", &do_output_skin,
575 PETSC_NULLPTR);
576
577 MOFEM_LOG("ThermoElastic", Sev::inform)
578 << "Young's modulus " << default_young_modulus;
579 MOFEM_LOG("ThermoElastic", Sev::inform)
580 << "Poisson's ratio " << default_poisson_ratio;
581 MOFEM_LOG("ThermoElastic", Sev::inform)
582 << "Coeff of expansion " << default_coeff_expansion;
583 MOFEM_LOG("ThermoElastic", Sev::inform)
584 << "Default heat capacity " << default_heat_capacity;
585 MOFEM_LOG("ThermoElastic", Sev::inform)
586 << "Heat conductivity " << default_heat_conductivity;
587
588 MOFEM_LOG("ThermoElastic", Sev::inform)
589 << "Reference temperature " << default_ref_temp;
590 MOFEM_LOG("ThermoElastic", Sev::inform)
591 << "Initial temperature " << default_init_temp;
592
594 };
595
596 CHKERR get_command_line_parameters();
597
599}
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
int save_every
int order_flux
int atom_test
double default_ref_temp
double default_heat_capacity
int order_disp
double default_young_modulus
[Essential boundary conditions (Least square approach)]
PetscBool do_output_skin
double default_coeff_expansion
int order_temp
PetscBool do_output_domain
double default_heat_conductivity
double default_poisson_ratio

◆ getCommandLineParameters() [2/2]

MoFEMErrorCode ThermoElasticProblem::getCommandLineParameters ( )
private

◆ OPs() [1/2]

MoFEMErrorCode ThermoElasticProblem::OPs ( )
private

[Boundary condition]

[Push operators to pipeline]

Examples
thermo_elastic.cpp.

Definition at line 838 of file thermo_elastic.cpp.

838 {
840
841 MOFEM_LOG("SYNC", Sev::noisy) << "OPs";
843
844 auto pipeline_mng = mField.getInterface<PipelineManager>();
845
846 auto integration_rule = [](int, int, int approx_order) {
847 return 2 * approx_order;
848 };
850 CHKERR pipeline_mng->setDomainLhsIntegrationRule(integration_rule);
851 CHKERR pipeline_mng->setBoundaryRhsIntegrationRule(integration_rule);
852 CHKERR pipeline_mng->setBoundaryLhsIntegrationRule(integration_rule);
853
854 auto block_thermal_params = boost::make_shared<BlockedThermalParameters>();
855 auto heat_conductivity_ptr = block_thermal_params->getHeatConductivityPtr();
856 auto heat_capacity_ptr = block_thermal_params->getHeatCapacityPtr();
857
858 auto block_thermoelastic_params =
859 boost::make_shared<BlockedThermoElasticParameters>();
860 auto coeff_expansion_ptr = block_thermoelastic_params->getCoeffExpansionPtr();
861 auto ref_temp_ptr = block_thermoelastic_params->getRefTempPtr();
862
863 // Default time scaling of BCs and sources, from command line arguments
864 auto time_scale =
865 boost::make_shared<TimeScale>("", false, [](const double) { return 1; });
866 auto def_time_scale = [time_scale](const double time) {
867 return (!time_scale->argFileScale) ? time : 1;
868 };
869 auto def_file_name = [time_scale](const std::string &&name) {
870 return (!time_scale->argFileScale) ? name : "";
871 };
872
873 // Files which define scaling for separate variables, if provided
874 auto time_bodyforce_scaling = boost::make_shared<TimeScale>(
875 def_file_name("bodyforce_scale.txt"), false, def_time_scale);
876 auto time_heatsource_scaling = boost::make_shared<TimeScale>(
877 def_file_name("heatsource_scale.txt"), false, def_time_scale);
878 auto time_temperature_scaling = boost::make_shared<TimeScale>(
879 def_file_name("temperature_bc_scale.txt"), false, def_time_scale);
880 auto time_displacement_scaling = boost::make_shared<TimeScale>(
881 def_file_name("displacement_bc_scale.txt"), false, def_time_scale);
882 auto time_flux_scaling = boost::make_shared<TimeScale>(
883 def_file_name("flux_bc_scale.txt"), false, def_time_scale);
884 auto time_force_scaling = boost::make_shared<TimeScale>(
885 def_file_name("force_bc_scale.txt"), false, def_time_scale);
886 auto time_convection_temp_scaling = boost::make_shared<TimeScale>(
887 def_file_name("convection_temp_scale.txt"), false, def_time_scale);
888 auto time_radiation_temp_scaling = boost::make_shared<TimeScale>(
889 def_file_name("radiation_temp_scale.txt"), false, def_time_scale);
890
891 auto add_domain_rhs_ops = [&](auto &pipeline) {
893 CHKERR addMatThermalBlockOps(pipeline, "MAT_THERMAL", block_thermal_params,
894 Sev::inform);
895 CHKERR addMatThermoElasticBlockOps(pipeline, "MAT_THERMOELASTIC",
896 block_thermoelastic_params, Sev::inform);
898
899 auto hencky_common_data_ptr =
900 HenckyOps::commonDataFactory<SPACE_DIM, IT, DomainEleOp>(
901 mField, pipeline, "U", "MAT_ELASTIC", Sev::inform);
902 auto mat_D_ptr = hencky_common_data_ptr->matDPtr;
903 auto mat_grad_ptr = hencky_common_data_ptr->matGradPtr;
904 auto mat_strain_ptr = boost::make_shared<MatrixDouble>();
905 auto mat_stress_ptr = boost::make_shared<MatrixDouble>();
906
907 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
908 auto vec_temp_dot_ptr = boost::make_shared<VectorDouble>();
909 auto mat_flux_ptr = boost::make_shared<MatrixDouble>();
910 auto vec_temp_div_ptr = boost::make_shared<VectorDouble>();
911
912 pipeline.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
913 pipeline.push_back(
914 new OpCalculateScalarFieldValuesDot("T", vec_temp_dot_ptr));
916 "FLUX", vec_temp_div_ptr));
917 pipeline.push_back(
918 new OpCalculateHVecVectorField<3, SPACE_DIM>("FLUX", mat_flux_ptr));
919
920 CHKERR opThermoElasticFactoryDomainRhs<SPACE_DIM, AT, IT, DomainEleOp>(
921 mField, pipeline, "U", "MAT_ELASTIC", "MAT_THERMAL",
922 "MAT_THERMOELASTIC", Sev::inform);
923
924 auto resistance = [heat_conductivity_ptr](const double, const double,
925 const double) {
926 return (1. / (*heat_conductivity_ptr));
927 };
928 // negative value is consequence of symmetric system
929 auto capacity = [heat_capacity_ptr](const double, const double,
930 const double) {
931 return -(*heat_capacity_ptr);
932 };
933 auto unity = [](const double, const double, const double) constexpr {
934 return -1.;
935 };
936 pipeline.push_back(
937 new OpHdivFlux("FLUX", mat_flux_ptr, resistance, mat_grad_ptr));
938 pipeline.push_back(new OpHDivTemp("FLUX", vec_temp_ptr, unity));
939 auto op_OpBaseDivFlux = new OpBaseDivFlux("T", vec_temp_div_ptr, unity);
940 op_OpBaseDivFlux->feScalingFun = [](const FEMethod *fe_ptr) {
941 return fe_ptr->ts_dt;
942 };
943 pipeline.push_back(op_OpBaseDivFlux);
944 auto op_OpBaseDotT = new OpBaseDotT("T", vec_temp_dot_ptr, capacity);
945 op_OpBaseDotT->feScalingFun = [](const FEMethod *fe_ptr) {
946 return fe_ptr->ts_dt;
947 };
948 pipeline.push_back(op_OpBaseDotT);
949
950 // Set source terms
952 pipeline, mField, "T", {time_scale, time_heatsource_scaling},
953 "HEAT_SOURCE", [](double, double, double) { return 1; },
954 [](const FEMethod *fe_ptr) { return fe_ptr->ts_dt; }, Sev::inform);
956 pipeline, mField, "T", vec_temp_ptr, "SETTEMP",
957 [](const FEMethod *fe_ptr) { return fe_ptr->ts_dt; }, Sev::inform);
959 pipeline, mField, "U", {time_scale, time_bodyforce_scaling},
960 "BODY_FORCE", Sev::inform);
961
963 };
964
965 auto add_domain_lhs_ops = [&](auto &pipeline) {
967 CHKERR addMatThermalBlockOps(pipeline, "MAT_THERMAL", block_thermal_params,
968 Sev::verbose);
969 CHKERR addMatThermoElasticBlockOps(pipeline, "MAT_THERMOELASTIC",
970 block_thermoelastic_params,
971 Sev::verbose);
973
974 auto hencky_common_data_ptr =
975 HenckyOps::commonDataFactory<SPACE_DIM, IT, DomainEleOp>(
976 mField, pipeline, "U", "MAT_ELASTIC", Sev::inform, 1);
977 auto mat_D_ptr = hencky_common_data_ptr->matDPtr;
978 auto mat_grad_ptr = hencky_common_data_ptr->matGradPtr;
979
980 auto resistance = [heat_conductivity_ptr](const double, const double,
981 const double) {
982 return (1. / (*heat_conductivity_ptr));
983 };
984 auto capacity = [heat_capacity_ptr](const double, const double,
985 const double) {
986 return -(*heat_capacity_ptr);
987 };
988 pipeline.push_back(
989 new OpHdivHdiv("FLUX", "FLUX", resistance, mat_grad_ptr));
990 pipeline.push_back(
991 new OpHdivT("FLUX", "T", []() constexpr { return -1; }, false, false));
992 auto op_OpHdivT =
993 new OpHdivT("FLUX", "T", []() constexpr { return -1; }, true, true);
994 op_OpHdivT->feScalingFun = [](const FEMethod *fe_ptr) {
995 return fe_ptr->ts_dt;
996 };
997 pipeline.push_back(op_OpHdivT);
998
999 auto mat_flux_ptr = boost::make_shared<MatrixDouble>();
1000 pipeline.push_back(
1001 new OpCalculateHVecVectorField<3, SPACE_DIM>("FLUX", mat_flux_ptr));
1002
1003 pipeline.push_back(
1004 new OpHdivU("FLUX", "U", mat_flux_ptr, resistance, mat_grad_ptr));
1005
1006 CHKERR opThermoElasticFactoryDomainLhs<SPACE_DIM, AT, IT, DomainEleOp>(
1007 mField, pipeline, "U", "T", "MAT_ELASTIC", "MAT_THERMAL",
1008 "MAT_THERMOELASTIC", Sev::inform);
1009
1010 auto op_capacity = new OpCapacity("T", "T", capacity);
1011 op_capacity->feScalingFun = [](const FEMethod *fe_ptr) {
1012 return fe_ptr->ts_a * fe_ptr->ts_dt;
1013 };
1014 pipeline.push_back(op_capacity);
1015
1016 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
1017 pipeline.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
1019 pipeline, mField, "T", "SETTEMP",
1020 [](const FEMethod *fe_ptr) { return fe_ptr->ts_dt; }, Sev::verbose);
1021
1023 };
1024
1025 auto add_boundary_rhs_ops = [&](auto &pipeline) {
1027
1029
1031 pipeline, mField, "U", {time_scale, time_force_scaling}, "FORCE",
1032 "PRESSURE", Sev::inform);
1033
1034 // Temperature BC
1035
1036 using OpTemperatureBC =
1039 pipeline, mField, "FLUX", {time_scale, time_temperature_scaling},
1040 "TEMPERATURE", Sev::inform);
1041
1042 // Note: fluxes for temperature should be aggregated. Here separate is
1043 // NaturalMeshsetType<HEATFLUXSET>, we should add version with BLOCKSET,
1044 // convection, see example tutorials/vec-0_elasticity/src/NaturalBoundaryBC.hpp.
1045 // and vec-0_elasticity/elastic.cpp
1046
1047 using OpFluxBC =
1050 pipeline, mField, "TBC", {time_scale, time_flux_scaling}, "",
1051 [](double, double, double) { return -1; }, Sev::inform);
1052 using OpFluxBlocksetBC =
1055 pipeline, mField, "TBC", {time_scale, time_flux_scaling}, "HEATFLUX",
1056 [](double, double, double) { return -1; }, Sev::inform);
1057
1059 using OpConvectionRhsBC =
1060 T::OpFlux<ThermoElasticOps::ConvectionBcType<BLOCKSET>, 1, 1>;
1061 using OpRadiationRhsBC =
1062 T::OpFlux<ThermoElasticOps::RadiationBcType<BLOCKSET>, 1, 1>;
1063 auto temp_bc_ptr = boost::make_shared<VectorDouble>();
1064 pipeline.push_back(new OpCalculateScalarFieldValues("TBC", temp_bc_ptr));
1065 T::AddFluxToPipeline<OpConvectionRhsBC>::add(
1066 pipeline, mField, "TBC", temp_bc_ptr,
1067 {time_scale, time_convection_temp_scaling}, "CONVECTION", Sev::inform);
1068 T::AddFluxToPipeline<OpRadiationRhsBC>::add(
1069 pipeline, mField, "TBC", temp_bc_ptr,
1070 {time_scale, time_radiation_temp_scaling}, "RADIATION", Sev::inform);
1071
1072 auto mat_flux_ptr = boost::make_shared<MatrixDouble>();
1073 pipeline.push_back(
1074 new OpCalculateHVecVectorField<3, SPACE_DIM>("FLUX", mat_flux_ptr));
1075
1076 // This is temporary implementation. It be moved to LinearFormsIntegrators,
1077 // however for hybridised case, what is goal of this changes, such function
1078 // is implemented for fluxes in broken space. Thus ultimately this operator
1079 // would be not needed.
1080
1081 struct OpTBCTimesNormalFlux
1082 : public FormsIntegrators<BoundaryEleOp>::Assembly<PETSC>::OpBase {
1083
1085
1086 OpTBCTimesNormalFlux(const std::string field_name,
1087 boost::shared_ptr<MatrixDouble> vec,
1088 boost::shared_ptr<Range> ents_ptr = nullptr)
1089 : OP(field_name, field_name, OP::OPROW, ents_ptr), sourceVec(vec) {}
1090
1091 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data) {
1094 // get integration weights
1095 auto t_w = OP::getFTensor0IntegrationWeight();
1096 // get base function values on rows
1097 auto t_row_base = row_data.getFTensor0N();
1098 // get normal vector
1099 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1100 // get vector values
1101 auto t_vec = getFTensor1FromMat<SPACE_DIM, SPACE_DIM>(*sourceVec);
1102 // loop over integration points
1103 for (int gg = 0; gg != OP::nbIntegrationPts; gg++) {
1104 // take into account Jacobian
1105 const double alpha = t_w * (t_vec(i) * t_normal(i));
1106 // loop over rows base functions
1107 int rr = 0;
1108 for (; rr != OP::nbRows; ++rr) {
1109 OP::locF[rr] += alpha * t_row_base;
1110 ++t_row_base;
1111 }
1112 for (; rr < OP::nbRowBaseFunctions; ++rr)
1113 ++t_row_base;
1114 ++t_w; // move to another integration weight
1115 ++t_vec;
1116 ++t_normal;
1117 }
1118 EntityType fe_type = OP::getNumeredEntFiniteElementPtr()->getEntType();
1119 if (fe_type == MBTRI) {
1120 OP::locF /= 2;
1121 }
1123 }
1124
1125 protected:
1126 boost::shared_ptr<MatrixDouble> sourceVec;
1127 };
1128 pipeline.push_back(new OpTBCTimesNormalFlux("TBC", mat_flux_ptr));
1129
1130 struct OpBaseNormalTimesTBC
1131 : public FormsIntegrators<BoundaryEleOp>::Assembly<PETSC>::OpBase {
1132
1134
1135 OpBaseNormalTimesTBC(const std::string field_name,
1136 boost::shared_ptr<VectorDouble> vec,
1137 boost::shared_ptr<Range> ents_ptr = nullptr)
1138 : OP(field_name, field_name, OP::OPROW, ents_ptr), sourceVec(vec) {}
1139
1140 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data) {
1143 // get integration weights
1144 auto t_w = OP::getFTensor0IntegrationWeight();
1145 // get base function values on rows
1146 auto t_row_base = row_data.getFTensor1N<3>();
1147 // get normal vector
1148 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1149 // get vector values
1150 auto t_vec = getFTensor0FromVec(*sourceVec);
1151 // loop over integration points
1152 for (int gg = 0; gg != OP::nbIntegrationPts; gg++) {
1153 // take into account Jacobian
1154 const double alpha = t_w * t_vec;
1155 // loop over rows base functions
1156 int rr = 0;
1157 for (; rr != OP::nbRows; ++rr) {
1158 OP::locF[rr] += alpha * (t_row_base(i) * t_normal(i));
1159 ++t_row_base;
1160 }
1161 for (; rr < OP::nbRowBaseFunctions; ++rr)
1162 ++t_row_base;
1163 ++t_w; // move to another integration weight
1164 ++t_vec;
1165 ++t_normal;
1166 }
1167 EntityType fe_type = OP::getNumeredEntFiniteElementPtr()->getEntType();
1168 if (fe_type == MBTRI) {
1169 OP::locF /= 2;
1170 }
1172 }
1173
1174 protected:
1175 boost::shared_ptr<VectorDouble> sourceVec;
1176 };
1177
1178 pipeline.push_back(new OpBaseNormalTimesTBC("FLUX", temp_bc_ptr));
1179
1181 };
1182
1183 auto add_boundary_lhs_ops = [&](auto &pipeline) {
1185
1187
1188 using T =
1189 NaturalBC<BoundaryEleOp>::template Assembly<PETSC>::BiLinearForm<GAUSS>;
1190 using OpConvectionLhsBC =
1191 T::OpFlux<ThermoElasticOps::ConvectionBcType<BLOCKSET>, 1, 1>;
1192 using OpRadiationLhsBC =
1193 T::OpFlux<ThermoElasticOps::RadiationBcType<BLOCKSET>, 1, 1>;
1194 auto temp_bc_ptr = boost::make_shared<VectorDouble>();
1195 pipeline.push_back(new OpCalculateScalarFieldValues("TBC", temp_bc_ptr));
1196 T::AddFluxToPipeline<OpConvectionLhsBC>::add(pipeline, mField, "TBC", "TBC",
1197 "CONVECTION", Sev::verbose);
1198 T::AddFluxToPipeline<OpRadiationLhsBC>::add(
1199 pipeline, mField, "TBC", "TBC", temp_bc_ptr, "RADIATION", Sev::verbose);
1200
1201 // This is temporary implementation. It be moved to LinearFormsIntegrators,
1202 // however for hybridised case, what is goal of this changes, such function
1203 // is implemented for fluxes in broken space. Thus ultimately this operator
1204 // would be not needed.
1205
1206 struct OpTBCTimesNormalFlux
1207 : public FormsIntegrators<BoundaryEleOp>::Assembly<PETSC>::OpBase {
1208
1210
1211 OpTBCTimesNormalFlux(const std::string row_field_name,
1212 const std::string col_field_name,
1213 boost::shared_ptr<Range> ents_ptr = nullptr)
1214 : OP(row_field_name, col_field_name, OP::OPROWCOL, ents_ptr) {
1215 this->sYmm = false;
1216 this->assembleTranspose = true;
1217 this->onlyTranspose = false;
1218 }
1219
1220 MoFEMErrorCode iNtegrate(EntitiesFieldData::EntData &row_data,
1221 EntitiesFieldData::EntData &col_data) {
1223
1225
1226 // get integration weights
1227 auto t_w = OP::getFTensor0IntegrationWeight();
1228 // get base function values on rows
1229 auto t_row_base = row_data.getFTensor0N();
1230 // get normal vector
1231 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1232 // loop over integration points
1233 for (int gg = 0; gg != OP::nbIntegrationPts; gg++) {
1234 // loop over rows base functions
1235 auto a_mat_ptr = &*OP::locMat.data().begin();
1236 int rr = 0;
1237 for (; rr != OP::nbRows; rr++) {
1238 // take into account Jacobian
1239 const double alpha = t_w * t_row_base;
1240 // get column base functions values at gauss point gg
1241 auto t_col_base = col_data.getFTensor1N<3>(gg, 0);
1242 // loop over columns
1243 for (int cc = 0; cc != OP::nbCols; cc++) {
1244 // calculate element of local matrix
1245 // using L2 norm of normal vector for convenient area calculation
1246 // for quads, tris etc.
1247 *a_mat_ptr += alpha * (t_col_base(i) * t_normal(i));
1248 ++t_col_base;
1249 ++a_mat_ptr;
1250 }
1251 ++t_row_base;
1252 }
1253 for (; rr < OP::nbRowBaseFunctions; ++rr)
1254 ++t_row_base;
1255 ++t_normal;
1256 ++t_w; // move to another integration weight
1257 }
1258 EntityType fe_type = OP::getNumeredEntFiniteElementPtr()->getEntType();
1259 if (fe_type == MBTRI) {
1260 OP::locMat /= 2;
1261 }
1263 }
1264 };
1265
1266 pipeline.push_back(new OpTBCTimesNormalFlux("TBC", "FLUX"));
1267
1269 };
1270
1271 // Set BCs by eliminating degrees of freedom
1272 auto get_bc_hook_rhs = [&]() {
1274 mField, pipeline_mng->getDomainRhsFE(),
1275 {time_scale, time_displacement_scaling});
1276 return hook;
1277 };
1278 auto get_bc_hook_lhs = [&]() {
1280 mField, pipeline_mng->getDomainLhsFE(),
1281 {time_scale, time_displacement_scaling});
1282 return hook;
1283 };
1284
1285 pipeline_mng->getDomainRhsFE()->preProcessHook = get_bc_hook_rhs();
1286 pipeline_mng->getDomainLhsFE()->preProcessHook = get_bc_hook_lhs();
1287
1288 CHKERR add_domain_rhs_ops(pipeline_mng->getOpDomainRhsPipeline());
1289 CHKERR add_domain_lhs_ops(pipeline_mng->getOpDomainLhsPipeline());
1290 CHKERR add_boundary_rhs_ops(pipeline_mng->getOpBoundaryRhsPipeline());
1291 CHKERR add_boundary_lhs_ops(pipeline_mng->getOpBoundaryLhsPipeline());
1292
1294}
#define FTENSOR_INDEX(DIM, I)
@ H1
continuous field
Definition definitions.h:85
@ HDIV
field with continuous normal traction
Definition definitions.h:87
auto integration_rule
@ GAUSS
Gaussian quadrature integration.
@ PETSC
Standard PETSc assembly.
FTensor::Index< 'i', SPACE_DIM > i
OpCalculateScalarFieldValuesFromPetscVecImpl< PetscData::CTX_SET_X_T > OpCalculateScalarFieldValuesDot
static auto getFTensor0FromVec(V &data)
Get tensor rank 0 (scalar) form data vector.
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixDivTimesScalar< SPACE_DIM > OpHdivT
Integrate Lhs div of base of flux times base of temperature (FLUX x T) and transpose of it,...
OpHdivHdivImpl< SPACE_DIM, IS_LARGE_STRAINS > OpHdivHdiv
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 > OpCapacity
Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T)
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalar< 1 > OpBaseDotT
Integrate Rhs base of temperature time heat capacity times heat rate (T)
OpBaseDotT OpBaseDivFlux
Integrate Rhs base of temperature times divergence of flux (T)
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpMixDivTimesU< 3, 1, SPACE_DIM > OpHDivTemp
Integrate Rhs div flux base times temperature (T)
OpCalculateQdotQLhs_dU< SPACE_DIM, GAUSS, AssemblyDomainEleOp, IS_LARGE_STRAINS > OpHdivU
Integrate Lhs of flux term coupled to displacement field.
OpHdivFluxImpl< SPACE_DIM, IS_LARGE_STRAINS > OpHdivFlux
constexpr auto field_name
static constexpr int approx_order
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Definition radiation.cpp:29
Add operators pushing bases from local to physical configuration.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
auto getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
Class (Function) to enforce essential constrains.
Definition Essential.hpp:25
Structure for user loop methods on finite elements.
Assembly methods.
Definition Natural.hpp:65
Natural boundary conditions.
Definition Natural.hpp:57
Get vector field for H-div approximation.
Calculate divergence of vector field.
Specialization for double precision scalar field values calculation.
PipelineManager interface.
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
Set integration rule for domain right-hand side finite element.
PetscReal ts_dt
Current time step size.
PetscReal ts_a
Shift parameter for U_t (see PETSc Time Solver documentation)
MoFEMErrorCode addMatThermalBlockOps(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermalParameters > blockedParamsPtr, Sev sev)
MoFEMErrorCode addMatThermoElasticBlockOps(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, std::string block_name, boost::shared_ptr< BlockedThermoElasticParameters > blockedParamsPtr, Sev sev)

◆ OPs() [2/2]

MoFEMErrorCode ThermoElasticProblem::OPs ( )
private

◆ opThermoElasticFactoryDomainLhs() [1/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainLhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  coupled_field_name,
boost::shared_ptr< HenckyOps::CommonData elastic_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters thermal_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters thermoelastic_common_ptr,
Sev  sev 
)
inlineprivate
Examples
thermo_elastic.cpp.

Definition at line 245 of file thermo_elastic.cpp.

254 {
256
257 using B = typename FormsIntegrators<DomainEleOp>::template Assembly<
258 A>::template BiLinearForm<I>;
259 using OpKPiola = typename B::template OpGradTensorGrad<1, DIM, DIM, -1>;
260
262 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
263 pip.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
264 auto coeff_expansion_ptr = thermoelastic_common_ptr->getCoeffExpansionPtr();
265 auto ref_temp_ptr = thermoelastic_common_ptr->getRefTempPtr();
266 pip.push_back(
267 new typename H::template OpCalculateHenckyThermalStress<DIM, I, 0>(
268 "U", vec_temp_ptr, elastic_common_ptr, coeff_expansion_ptr,
269 ref_temp_ptr));
270 pip.push_back(new typename H::template OpHenckyTangent<DIM, I, 0>(
271 field_name, elastic_common_ptr));
272 pip.push_back(new OpKPiola(field_name, field_name,
273 elastic_common_ptr->getMatTangent()));
274 pip.push_back(new typename H::template OpCalculateHenckyThermalStressdT<
275 DIM, I, AssemblyDomainEleOp, 0>(
276 field_name, coupled_field_name, elastic_common_ptr,
277 coeff_expansion_ptr));
278
280 }
constexpr IntegrationType I
constexpr AssemblyType A
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradTensorGrad< 1, SPACE_DIM, SPACE_DIM, -1 > OpKPiola
[Only used for dynamics]
Definition seepage.cpp:63
double H
Hardening.
Definition plastic.cpp:129

◆ opThermoElasticFactoryDomainLhs() [2/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainLhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  coupled_field_name,
boost::shared_ptr< HenckyOps::CommonData elastic_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters thermal_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters thermoelastic_common_ptr,
Sev  sev 
)
inlineprivate

Definition at line 251 of file thermo_elastic.cpp.

260 {
262
263 using B = typename FormsIntegrators<DomainEleOp>::template Assembly<
264 A>::template BiLinearForm<I>;
265 using OpKPiola = typename B::template OpGradTensorGrad<1, DIM, DIM, 1>;
266
268 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
269 pip.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
270 auto coeff_expansion_ptr = thermoelastic_common_ptr->getCoeffExpansionPtr();
271 auto ref_temp_ptr = thermoelastic_common_ptr->getRefTempPtr();
272 pip.push_back(
273 new typename H::template OpCalculateHenckyThermalStress<DIM, I, 0>(
274 "U", vec_temp_ptr, elastic_common_ptr, coeff_expansion_ptr,
275 ref_temp_ptr));
276 pip.push_back(new typename H::template OpHenckyTangent<DIM, I, 0>(
277 field_name, elastic_common_ptr));
278 pip.push_back(new OpKPiola(field_name, field_name,
279 elastic_common_ptr->getMatTangent()));
280 pip.push_back(new typename H::template OpCalculateHenckyThermalStressdT<
281 DIM, I, AssemblyDomainEleOp, 0>(
282 field_name, coupled_field_name, elastic_common_ptr,
283 coeff_expansion_ptr));
284
286 }

◆ opThermoElasticFactoryDomainLhs() [3/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainLhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  coupled_field_name,
std::string  elastic_block_name,
std::string  thermal_block_name,
std::string  thermoelastic_block_name,
Sev  sev,
double  scale = 1 
)
inlineprivate

Definition at line 283 of file thermo_elastic.cpp.

288 {
290
291 auto elastic_common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
292 m_field, pip, field_name, elastic_block_name, sev, scale);
293 auto thermal_common_ptr = boost::make_shared<BlockedThermalParameters>();
294 CHKERR addMatThermalBlockOps(pip, thermal_block_name, thermal_common_ptr,
295 Sev::inform);
296 auto thermoelastic_common_ptr =
297 boost::make_shared<BlockedThermoElasticParameters>();
298 CHKERR addMatThermoElasticBlockOps(pip, thermoelastic_block_name,
299 thermoelastic_common_ptr, Sev::inform);
300 CHKERR opThermoElasticFactoryDomainLhs<DIM, A, I, DomainEleOp>(
301 m_field, pip, field_name, coupled_field_name, elastic_common_ptr,
302 thermal_common_ptr, thermoelastic_common_ptr, sev);
303
305 }
double scale
Definition plastic.cpp:124

◆ opThermoElasticFactoryDomainLhs() [4/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainLhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  coupled_field_name,
std::string  elastic_block_name,
std::string  thermal_block_name,
std::string  thermoelastic_block_name,
Sev  sev,
double  scale = 1 
)
inlineprivate

Definition at line 289 of file thermo_elastic.cpp.

294 {
296
297 auto elastic_common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
298 m_field, pip, field_name, elastic_block_name, sev, scale);
299 auto thermal_common_ptr = boost::make_shared<BlockedThermalParameters>();
300 CHKERR addMatThermalBlockOps(pip, thermal_block_name, thermal_common_ptr,
301 Sev::inform);
302 auto thermoelastic_common_ptr =
303 boost::make_shared<BlockedThermoElasticParameters>();
304 CHKERR addMatThermoElasticBlockOps(pip, thermoelastic_block_name,
305 thermoelastic_common_ptr, Sev::inform);
306 CHKERR opThermoElasticFactoryDomainLhs<DIM, A, I, DomainEleOp>(
307 m_field, pip, field_name, coupled_field_name, elastic_common_ptr,
308 thermal_common_ptr, thermoelastic_common_ptr, sev);
309
311 }

◆ opThermoElasticFactoryDomainRhs() [1/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainRhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
boost::shared_ptr< HenckyOps::CommonData elastic_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters thermal_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters thermoelastic_common_ptr,
Sev  sev 
)
inlineprivate
Examples
thermo_elastic.cpp.

Definition at line 188 of file thermo_elastic.cpp.

197 {
199
200 using B = typename FormsIntegrators<DomainEleOp>::template Assembly<
201 A>::template LinearForm<I>;
203 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
204 pip.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
205 auto coeff_expansion_ptr = thermoelastic_common_ptr->getCoeffExpansionPtr();
206 auto ref_temp_ptr = thermoelastic_common_ptr->getRefTempPtr();
207 pip.push_back(
208 new typename H::template OpCalculateHenckyThermalStress<DIM, I, 0>(
209 "U", vec_temp_ptr, elastic_common_ptr, coeff_expansion_ptr,
210 ref_temp_ptr));
212 typename B::template OpGradTimesTensor<1, DIM, DIM>;
213 pip.push_back(new OpInternalForcePiola(
214 "U", elastic_common_ptr->getMatFirstPiolaStress()));
215
217 }
FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpGradTimesTensor< 1, FIELD_DIM, SPACE_DIM > OpGradTimesTensor
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM > OpInternalForcePiola
Definition seepage.cpp:65

◆ opThermoElasticFactoryDomainRhs() [2/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainRhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
boost::shared_ptr< HenckyOps::CommonData elastic_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermalParameters thermal_common_ptr,
boost::shared_ptr< ThermoElasticProblem::BlockedThermoElasticParameters thermoelastic_common_ptr,
Sev  sev 
)
inlineprivate

Definition at line 194 of file thermo_elastic.cpp.

203 {
205
206 using B = typename FormsIntegrators<DomainEleOp>::template Assembly<
207 A>::template LinearForm<I>;
209 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
210 pip.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
211 auto coeff_expansion_ptr = thermoelastic_common_ptr->getCoeffExpansionPtr();
212 auto ref_temp_ptr = thermoelastic_common_ptr->getRefTempPtr();
213 pip.push_back(
214 new typename H::template OpCalculateHenckyThermalStress<DIM, I, 0>(
215 "U", vec_temp_ptr, elastic_common_ptr, coeff_expansion_ptr,
216 ref_temp_ptr));
218 typename B::template OpGradTimesTensor<1, DIM, DIM>;
219 pip.push_back(new OpInternalForcePiola(
220 "U", elastic_common_ptr->getMatFirstPiolaStress()));
221
223 }

◆ opThermoElasticFactoryDomainRhs() [3/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainRhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  elastic_block_name,
std::string  thermal_block_name,
std::string  thermoelastic_block_name,
Sev  sev,
double  scale = 1 
)
inlineprivate

Definition at line 220 of file thermo_elastic.cpp.

225 {
227
228 auto elastic_common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
229 m_field, pip, field_name, elastic_block_name, sev, scale);
230 auto thermal_common_ptr = boost::make_shared<BlockedThermalParameters>();
231 CHKERR addMatThermalBlockOps(pip, thermal_block_name, thermal_common_ptr,
232 Sev::inform);
233 auto thermoelastic_common_ptr =
234 boost::make_shared<BlockedThermoElasticParameters>();
235 CHKERR addMatThermoElasticBlockOps(pip, thermoelastic_block_name,
236 thermoelastic_common_ptr, Sev::inform);
237 CHKERR opThermoElasticFactoryDomainRhs<DIM, A, I, DomainEleOp>(
238 m_field, pip, field_name, elastic_common_ptr, thermal_common_ptr,
239 thermoelastic_common_ptr, sev);
240
242 }

◆ opThermoElasticFactoryDomainRhs() [4/4]

template<int DIM, AssemblyType A, IntegrationType I, typename DomainEleOp >
MoFEMErrorCode ThermoElasticProblem::opThermoElasticFactoryDomainRhs ( MoFEM::Interface m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  field_name,
std::string  elastic_block_name,
std::string  thermal_block_name,
std::string  thermoelastic_block_name,
Sev  sev,
double  scale = 1 
)
inlineprivate

Definition at line 226 of file thermo_elastic.cpp.

231 {
233
234 auto elastic_common_ptr = commonDataFactory<DIM, I, DomainEleOp>(
235 m_field, pip, field_name, elastic_block_name, sev, scale);
236 auto thermal_common_ptr = boost::make_shared<BlockedThermalParameters>();
237 CHKERR addMatThermalBlockOps(pip, thermal_block_name, thermal_common_ptr,
238 Sev::inform);
239 auto thermoelastic_common_ptr =
240 boost::make_shared<BlockedThermoElasticParameters>();
241 CHKERR addMatThermoElasticBlockOps(pip, thermoelastic_block_name,
242 thermoelastic_common_ptr, Sev::inform);
243 CHKERR opThermoElasticFactoryDomainRhs<DIM, A, I, DomainEleOp>(
244 m_field, pip, field_name, elastic_common_ptr, thermal_common_ptr,
245 thermoelastic_common_ptr, sev);
246
248 }

◆ runProblem() [1/2]

MoFEMErrorCode ThermoElasticProblem::runProblem ( )

[Run problem]

Examples
thermo_elastic.cpp.

Definition at line 515 of file thermo_elastic.cpp.

515 {
519 CHKERR bC();
520 CHKERR OPs();
521 CHKERR tsSolve();
523}
MoFEMErrorCode getCommandLineParameters()
[Run problem]
MoFEMErrorCode setupProblem()
add fields
MoFEMErrorCode bC()
[Set up problem]
MoFEMErrorCode OPs()
[Boundary condition]
MoFEMErrorCode tsSolve()
[Push operators to pipeline]

◆ runProblem() [2/2]

MoFEMErrorCode ThermoElasticProblem::runProblem ( )

◆ setupProblem() [1/2]

MoFEMErrorCode ThermoElasticProblem::setupProblem ( )
private

add fields

[Get command line parameters]

[Set up problem]

Examples
thermo_elastic.cpp.

Definition at line 603 of file thermo_elastic.cpp.

603 {
606 // Add field
608 // Mechanical fields
610 CHKERR simple->addBoundaryField("U", H1, AINSWORTH_LEGENDRE_BASE, SPACE_DIM);
611 // Temperature
612 constexpr auto flux_space = (SPACE_DIM == 2) ? HCURL : HDIV;
613 CHKERR simple->addDomainField("T", L2, base, 1);
614 CHKERR simple->addDomainField("FLUX", flux_space, base, 1);
615 CHKERR simple->addBoundaryField("FLUX", flux_space, base, 1);
616 CHKERR simple->addBoundaryField("TBC", L2, base, 1);
617
618 CHKERR simple->setFieldOrder("U", order_disp);
619 CHKERR simple->setFieldOrder("FLUX", order_flux);
620 CHKERR simple->setFieldOrder("T", order_temp);
621 CHKERR simple->setFieldOrder("TBC", order_temp);
622
623 CHKERR simple->setUp();
624
625 int coords_dim = 3;
626 CHKERR PetscOptionsGetRealArray(NULL, NULL, "-field_eval_coords",
627 fieldEvalCoords.data(), &coords_dim,
628 &doEvalField);
629
630 tempFieldPtr = boost::make_shared<VectorDouble>();
631 fluxFieldPtr = boost::make_shared<MatrixDouble>();
632 dispFieldPtr = boost::make_shared<MatrixDouble>();
633 dispGradPtr = boost::make_shared<MatrixDouble>();
634 strainFieldPtr = boost::make_shared<MatrixDouble>();
635 stressFieldPtr = boost::make_shared<MatrixDouble>();
636
637 if (doEvalField) {
639 mField.getInterface<FieldEvaluatorInterface>()->getData<DomainEle>();
640
641 CHKERR mField.getInterface<FieldEvaluatorInterface>()->buildTree<SPACE_DIM>(
642 fieldEvalData, simple->getDomainFEName());
643
644 fieldEvalData->setEvalPoints(fieldEvalCoords.data(), 1);
645 auto no_rule = [](int, int, int) { return -1; };
646
647 auto field_eval_fe_ptr = fieldEvalData->feMethodPtr;
648 field_eval_fe_ptr->getRuleHook = no_rule;
649
650 auto block_thermal_params = boost::make_shared<BlockedThermalParameters>();
651 auto block_thermoelastic_params =
652 boost::make_shared<BlockedThermoElasticParameters>();
653 auto coeff_expansion_ptr =
654 block_thermoelastic_params->getCoeffExpansionPtr();
655 auto ref_temp_ptr = block_thermoelastic_params->getRefTempPtr();
656
657 CHKERR addMatThermalBlockOps(field_eval_fe_ptr->getOpPtrVector(),
658 "MAT_THERMAL", block_thermal_params,
659 Sev::verbose);
661 field_eval_fe_ptr->getOpPtrVector(), "MAT_THERMOELASTIC",
662 block_thermoelastic_params, Sev::verbose);
663
665 field_eval_fe_ptr->getOpPtrVector(), {H1, HDIV});
666
667 auto hencky_common_data_ptr =
668 HenckyOps::commonDataFactory<SPACE_DIM, IT, DomainEleOp>(
669 mField, field_eval_fe_ptr->getOpPtrVector(), "U", "MAT_ELASTIC",
670 Sev::inform);
671 auto mat_D_ptr = hencky_common_data_ptr->matDPtr;
672 auto dispGradPtr = hencky_common_data_ptr->matGradPtr;
673 auto mat_stress_ptr = boost::make_shared<MatrixDouble>();
674
675 field_eval_fe_ptr->getOpPtrVector().push_back(
677 field_eval_fe_ptr->getOpPtrVector().push_back(
679 field_eval_fe_ptr->getOpPtrVector().push_back(
681 field_eval_fe_ptr->getOpPtrVector().push_back(
683 dispGradPtr));
684
686
687 field_eval_fe_ptr->getOpPtrVector().push_back(
688 new
689 typename H::template OpCalculateHenckyThermalStress<SPACE_DIM, IT, 0>(
690 "U", tempFieldPtr, hencky_common_data_ptr, coeff_expansion_ptr,
691 ref_temp_ptr));
692 if (!IS_LARGE_STRAINS) {
693 field_eval_fe_ptr->getOpPtrVector().push_back(
695 hencky_common_data_ptr->getMatFirstPiolaStress(),
697 field_eval_fe_ptr->getOpPtrVector().push_back(
699 } else {
700 field_eval_fe_ptr->getOpPtrVector().push_back(
701 new typename H::template OpCalculateLogC<SPACE_DIM, IT>(
702 "U", hencky_common_data_ptr));
703 stressFieldPtr = hencky_common_data_ptr->getMatFirstPiolaStress();
704 strainFieldPtr = hencky_common_data_ptr->getMatLogC();
705 };
706 }
707
709}
FieldApproximationBase
approximation base
Definition definitions.h:58
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition definitions.h:60
@ DEMKOWICZ_JACOBI_BASE
Definition definitions.h:66
@ L2
field with C-1 continuity
Definition definitions.h:88
@ HCURL
field with continuous tangents
Definition definitions.h:86
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
Field evaluator interface.
Get field gradients at integration pts for scalar field rank 0, i.e. vector field.
Specialization for MatrixDouble vector field values calculation.
Operator for symmetrizing tensor fields.
MoFEMErrorCode addDomainField(const std::string name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
Definition Simple.cpp:261
boost::shared_ptr< MatrixDouble > dispFieldPtr
boost::shared_ptr< MatrixDouble > strainFieldPtr
std::array< double, 3 > fieldEvalCoords
boost::shared_ptr< VectorDouble > tempFieldPtr
boost::shared_ptr< MatrixDouble > fluxFieldPtr
boost::shared_ptr< MatrixDouble > stressFieldPtr
boost::shared_ptr< MatrixDouble > dispGradPtr
boost::shared_ptr< FieldEvaluatorInterface::SetPtsData > fieldEvalData
constexpr bool IS_LARGE_STRAINS

◆ setupProblem() [2/2]

MoFEMErrorCode ThermoElasticProblem::setupProblem ( )
private

add fields

◆ tsSolve() [1/2]

MoFEMErrorCode ThermoElasticProblem::tsSolve ( )
private

[Push operators to pipeline]

[Solve]

Examples
thermo_elastic.cpp.

Definition at line 1298 of file thermo_elastic.cpp.

1298 {
1300
1303 // ISManager *is_manager = mField.getInterface<ISManager>();
1304
1305 auto dm = simple->getDM();
1306 auto solver = pipeline_mng->createTSIM();
1307 auto snes_ctx_ptr = getDMSnesCtx(dm);
1308
1309 auto set_section_monitor = [&](auto solver) {
1311 SNES snes;
1312 CHKERR TSGetSNES(solver, &snes);
1313 CHKERR SNESMonitorSet(snes,
1314 (MoFEMErrorCode(*)(SNES, PetscInt, PetscReal,
1315 void *))MoFEMSNESMonitorFields,
1316 (void *)(snes_ctx_ptr.get()), nullptr);
1318 };
1319
1320 auto create_post_process_elements = [&]() {
1321 auto block_thermal_params = boost::make_shared<BlockedThermalParameters>();
1322
1323 auto block_thermoelastic_params =
1324 boost::make_shared<BlockedThermoElasticParameters>();
1325 auto coeff_expansion_ptr =
1326 block_thermoelastic_params->getCoeffExpansionPtr();
1327 auto ref_temp_ptr = block_thermoelastic_params->getRefTempPtr();
1328
1329 auto u_ptr = boost::make_shared<MatrixDouble>();
1330 auto mat_grad_ptr = boost::make_shared<MatrixDouble>();
1331 auto mat_strain_ptr = boost::make_shared<MatrixDouble>();
1332 auto mat_stress_ptr = boost::make_shared<MatrixDouble>();
1333 auto vec_temp_ptr = boost::make_shared<VectorDouble>();
1334 auto mat_flux_ptr = boost::make_shared<MatrixDouble>();
1335
1336 auto push_domain_ops = [&](auto &pp_fe) {
1338 auto &pip = pp_fe->getOpPtrVector();
1339
1340 CHKERR addMatThermalBlockOps(pip, "MAT_THERMAL", block_thermal_params,
1341 Sev::verbose);
1343 pip, "MAT_THERMOELASTIC", block_thermoelastic_params, Sev::verbose);
1344
1346
1347 pip.push_back(new OpCalculateScalarFieldValues("T", vec_temp_ptr));
1348 pip.push_back(
1349 new OpCalculateHVecVectorField<3, SPACE_DIM>("FLUX", mat_flux_ptr));
1350
1351 pip.push_back(new OpCalculateVectorFieldValues<SPACE_DIM>("U", u_ptr));
1353 "U", mat_grad_ptr));
1354 auto elastic_common_ptr = commonDataFactory<SPACE_DIM, IT, DomainEleOp>(
1355 mField, pip, "U", "MAT_ELASTIC", Sev::inform);
1357 pip.push_back(
1358 new
1359 typename H::template OpCalculateHenckyThermalStress<SPACE_DIM, IT, 0>(
1360 "U", vec_temp_ptr, elastic_common_ptr, coeff_expansion_ptr,
1361 ref_temp_ptr));
1362 if (!IS_LARGE_STRAINS) {
1363 pip.push_back(new OpSymmetrizeTensor<SPACE_DIM>(
1364 elastic_common_ptr->getMatFirstPiolaStress(), mat_stress_ptr));
1365 pip.push_back(
1366 new OpSymmetrizeTensor<SPACE_DIM>(mat_grad_ptr, mat_strain_ptr));
1367 } else {
1368 mat_stress_ptr = elastic_common_ptr->getMatFirstPiolaStress();
1369 mat_strain_ptr = elastic_common_ptr->getMatLogC();
1370 }
1371
1373 };
1374
1375 auto push_post_proc_ops = [&](auto &pp_fe) {
1377 auto &pip = pp_fe->getOpPtrVector();
1379
1380 if (!IS_LARGE_STRAINS) {
1381 pip.push_back(
1382
1383 new OpPPMap(
1384
1385 pp_fe->getPostProcMesh(), pp_fe->getMapGaussPts(),
1386
1387 {{"T", vec_temp_ptr}},
1388
1389 {{"U", u_ptr}, {"FLUX", mat_flux_ptr}},
1390
1391 {},
1392
1393 {{"CAUCHY", mat_stress_ptr}, {"STRAIN", mat_strain_ptr}}
1394
1395 )
1396
1397 );
1398 } else {
1399 pip.push_back(
1400
1401 new OpPPMap(
1402
1403 pp_fe->getPostProcMesh(), pp_fe->getMapGaussPts(),
1404
1405 {{"T", vec_temp_ptr}},
1406
1407 {{"U", u_ptr}, {"FLUX", mat_flux_ptr}},
1408
1409 {{"PIOLA", mat_stress_ptr}},
1410
1411 {{"HENCKY_STRAIN", mat_strain_ptr}}
1412
1413 )
1414
1415 );
1416 }
1417
1419 };
1420
1421 auto domain_post_proc = [&]() {
1422 if (do_output_domain == PETSC_FALSE)
1423 return boost::shared_ptr<PostProcEle>();
1424 auto pp_fe = boost::make_shared<PostProcEle>(mField);
1425 CHK_MOAB_THROW(push_domain_ops(pp_fe),
1426 "push domain ops to domain element");
1427 CHK_MOAB_THROW(push_post_proc_ops(pp_fe),
1428 "push post proc ops to domain element");
1429 return pp_fe;
1430 };
1431
1432 auto skin_post_proc = [&]() {
1433 if (do_output_skin == PETSC_FALSE)
1434 return boost::shared_ptr<SkinPostProcEle>();
1435 auto pp_fe = boost::make_shared<SkinPostProcEle>(mField);
1436 auto simple = mField.getInterface<Simple>();
1437 auto op_side = new OpLoopSide<SideEle>(mField, simple->getDomainFEName(),
1438 SPACE_DIM, Sev::verbose);
1439 CHK_MOAB_THROW(push_domain_ops(op_side),
1440 "push domain ops to side element");
1441 pp_fe->getOpPtrVector().push_back(op_side);
1442 CHK_MOAB_THROW(push_post_proc_ops(pp_fe),
1443 "push post proc ops to skin element");
1444 return pp_fe;
1445 };
1446
1447 return std::make_pair(domain_post_proc(), skin_post_proc());
1448 };
1449
1450 auto monitor_ptr = boost::make_shared<FEMethod>();
1451
1452 auto set_time_monitor = [&](auto dm, auto solver, auto domain_post_proc_fe,
1453 auto skin_post_proc_fe) {
1455 monitor_ptr->preProcessHook = [&]() {
1457
1458 if (save_every && (monitor_ptr->ts_step % save_every == 0)) {
1459 if (do_output_domain) {
1460 CHKERR DMoFEMLoopFiniteElements(dm, simple->getDomainFEName(),
1461 domain_post_proc_fe,
1462 monitor_ptr->getCacheWeakPtr());
1463 CHKERR domain_post_proc_fe->writeFile(
1464 "out_" + boost::lexical_cast<std::string>(monitor_ptr->ts_step) +
1465 ".h5m");
1466 }
1467 if (do_output_skin) {
1468 CHKERR DMoFEMLoopFiniteElements(dm, simple->getBoundaryFEName(),
1469 skin_post_proc_fe,
1470 monitor_ptr->getCacheWeakPtr());
1471 CHKERR skin_post_proc_fe->writeFile(
1472 "out_skin_" +
1473 boost::lexical_cast<std::string>(monitor_ptr->ts_step) + ".h5m");
1474 }
1475 }
1476
1477 struct AtomTestResult {
1478 bool fail = false;
1479 std::string msg = "";
1480 };
1481 AtomTestResult atom_test_result;
1482
1483 auto fail_atom_test = [&atom_test_result](const std::string &msg) {
1484 atom_test_result.fail = true;
1485 atom_test_result.msg = msg;
1486 };
1487
1488 struct AtomTestData{
1489 double expected = 0.0;
1490 double tol = 0.0;
1491 };
1492
1493 if (doEvalField) {
1494
1496 ->evalFEAtThePoint<SPACE_DIM>(
1497 fieldEvalCoords.data(), 1e-12, simple->getProblemName(),
1498 simple->getDomainFEName(), fieldEvalData,
1500 MF_EXIST, QUIET);
1501
1502 if (atom_test) {
1503 auto eval_num_vec =
1504 createVectorMPI(mField.get_comm(), PETSC_DECIDE, 1);
1505 CHKERR VecZeroEntries(eval_num_vec);
1506 if (tempFieldPtr->size()) {
1507 CHKERR VecSetValue(eval_num_vec, 0, 1, ADD_VALUES);
1508 }
1509 CHKERR VecAssemblyBegin(eval_num_vec);
1510 CHKERR VecAssemblyEnd(eval_num_vec);
1511
1512 double eval_num;
1513 CHKERR VecSum(eval_num_vec, &eval_num);
1514 if (!(int)eval_num) {
1515 fail_atom_test(
1516 "did not find elements to evaluate the field, check the "
1517 "coordinates");
1518 }
1519 }
1520
1521 if (tempFieldPtr->size()) {
1522 auto t_temp = getFTensor0FromVec(*tempFieldPtr);
1523 MOFEM_LOG("ThermoElasticSync", Sev::inform)
1524 << "Eval point T: " << t_temp;
1525 if (atom_test && fabs(monitor_ptr->ts_t - 10) < 1e-12) {
1526 AtomTestData atom_test_data;
1527 switch (atom_test) {
1528 case 1:
1529 case 2:
1530 case 3:
1531 atom_test_data = {554.48, 1e-2};
1532 break;
1533 case 4:
1534 atom_test_data = {325.0, 2e-2};
1535 break;
1536 case 5:
1537 atom_test_data = {1.0, 1e-2};
1538 break;
1539 default:
1540 fail_atom_test("unknown atom test number");
1541 }
1542 if (fabs(t_temp - atom_test_data.expected) > atom_test_data.tol) {
1543 fail_atom_test("wrong temperature value");
1544 }
1545 }
1546 }
1547 if (fluxFieldPtr->size1()) {
1549 auto t_flux = getFTensor1FromMat<SPACE_DIM>(*fluxFieldPtr);
1550 auto flux_mag = sqrt(t_flux(i) * t_flux(i));
1551 MOFEM_LOG("ThermoElasticSync", Sev::inform)
1552 << "Eval point FLUX magnitude: " << flux_mag;
1553 if (atom_test && fabs(monitor_ptr->ts_t - 10) < 1e-12) {
1554 AtomTestData atom_test_data;
1555 switch (atom_test) {
1556 case 1:
1557 case 2:
1558 case 3:
1559 atom_test_data = {27008.0, 2e1};
1560 break;
1561 case 4:
1562 atom_test_data = {150e3, 2.1e1};
1563 break;
1564 case 5:
1565 atom_test_data = {0.0, 1e-6};
1566 break;
1567 default:
1568 fail_atom_test("unknown atom test number");
1569 }
1570 if (fabs(flux_mag - atom_test_data.expected) > atom_test_data.tol) {
1571 fail_atom_test("wrong flux value");
1572 }
1573 }
1574 }
1575 if (dispFieldPtr->size1()) {
1577 auto t_disp = getFTensor1FromMat<SPACE_DIM>(*dispFieldPtr);
1578 auto disp_mag = sqrt(t_disp(i) * t_disp(i));
1579 MOFEM_LOG("ThermoElasticSync", Sev::inform)
1580 << "Eval point U magnitude: " << disp_mag;
1581 if (atom_test && fabs(monitor_ptr->ts_t - 10) < 1e-12) {
1582 AtomTestData atom_test_data;
1583 switch (atom_test) {
1584 case 1:
1585 atom_test_data = {0.00345, 1e-5};
1586 break;
1587 case 2:
1588 case 3:
1589 atom_test_data = {0.00265, 1e-5};
1590 break;
1591 case 4:
1592 atom_test_data = {0.00075, 1e-5};
1593 break;
1594 case 5:
1595 atom_test_data = {std::sqrt(2) * (std::sqrt(std::exp(0.2)) - 1),
1596 1e-5};
1597 break;
1598 default:
1599 fail_atom_test("unknown atom test number");
1600 }
1601 if (fabs(disp_mag - atom_test_data.expected) > atom_test_data.tol) {
1602 fail_atom_test("wrong displacement value");
1603 }
1604 }
1605 }
1606 if (strainFieldPtr->size1()) {
1608 auto t_strain = getFTensor2SymmetricFromMat<SPACE_DIM>(*strainFieldPtr);
1609 auto t_strain_trace = t_strain(i, i);
1610 if (atom_test && fabs(monitor_ptr->ts_t - 10) < 1e-12) {
1611 AtomTestData atom_test_data;
1612 switch (atom_test) {
1613 case 1:
1614 atom_test_data = {0.00679, 1e-5};
1615 break;
1616 case 2:
1617 case 3:
1618 atom_test_data = {0.00522, 1e-5};
1619 break;
1620 case 4:
1621 atom_test_data = {0.00055, 1e-5};
1622 break;
1623 case 5:
1624 atom_test_data = {0.2, 1e-5};
1625 break;
1626 default:
1627 fail_atom_test("unknown atom test number");
1628 }
1629 if (fabs(t_strain_trace - atom_test_data.expected) >
1630 atom_test_data.tol) {
1631 fail_atom_test("wrong strain value");
1632 }
1633 }
1634 }
1635 if (stressFieldPtr->size1()) {
1636 double von_mises_stress;
1637 auto getVonMisesStress = [&](auto t_stress) {
1639 PetscBool plane_strain_flag = PETSC_FALSE;
1640 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "", "-plane_strain",
1641 &plane_strain_flag, PETSC_NULLPTR);
1642 // FIXME: this is valid only for default Poisson's ratio
1643 const double s33 =
1644 (SPACE_DIM == 3)
1645 ? t_stress(2, 2)
1646 : (plane_strain_flag ? default_poisson_ratio *
1647 (t_stress(0, 0) + t_stress(1, 1))
1648 : 0.0);
1649 von_mises_stress = std::sqrt(
1650 0.5 * ((t_stress(0, 0) - t_stress(1, 1)) *
1651 (t_stress(0, 0) - t_stress(1, 1)) +
1652 (t_stress(1, 1) - s33) * (t_stress(1, 1) - s33) +
1653 (s33 - t_stress(0, 0)) * (s33 - t_stress(0, 0)) +
1654 6.0 * (t_stress(0, 1) * t_stress(0, 1) +
1655 (SPACE_DIM == 3 ? t_stress(1, 2) * t_stress(1, 2)
1656 : 0.0) +
1657 (SPACE_DIM == 3 ? t_stress(2, 0) * t_stress(2, 0)
1658 : 0.0))));
1660 };
1661 if (!IS_LARGE_STRAINS) {
1662 auto t_stress = getFTensor2SymmetricFromMat<SPACE_DIM>(*stressFieldPtr);
1663 CHKERR getVonMisesStress(t_stress);
1664 } else {
1665 auto t_stress =
1666 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*stressFieldPtr);
1667 CHKERR getVonMisesStress(t_stress);
1668 }
1669 MOFEM_LOG("ThermoElasticSync", Sev::inform)
1670 << "Eval point von Mises Stress: " << von_mises_stress;
1671 if (atom_test && fabs(monitor_ptr->ts_t - 10) < 1e-12) {
1672 AtomTestData atom_test_data;
1673 switch (atom_test) {
1674 case 1:
1675 atom_test_data = {523.0, 5e-1};
1676 break;
1677 case 2:
1678 atom_test_data = {16.3, 6e-2};
1679 break;
1680 case 3:
1681 atom_test_data = {14.9, 5e-2};
1682 break;
1683 case 4:
1684 atom_test_data = {69.2, 1e-1};
1685 break;
1686 case 5:
1687 atom_test_data = {0.0, 5e-2};
1688 break;
1689 default:
1690 fail_atom_test("unknown atom test number");
1691 }
1692 if (fabs(von_mises_stress - atom_test_data.expected) >
1693 atom_test_data.tol) {
1694 fail_atom_test("wrong von Mises stress value");
1695 }
1696 }
1697 }
1699 }
1700
1701 if (atom_test_result.fail) {
1702 SETERRQ(PETSC_COMM_SELF, MOFEM_ATOM_TEST_INVALID,
1703 "atom test %d failed: %s", atom_test,
1704 atom_test_result.msg.c_str());
1705 }
1706
1708 };
1709 auto null = boost::shared_ptr<FEMethod>();
1710 CHKERR DMMoFEMTSSetMonitor(dm, solver, simple->getDomainFEName(), null,
1711 monitor_ptr, null);
1713 };
1714
1715 auto set_fieldsplit_preconditioner = [&](auto solver) {
1717
1718 SNES snes;
1719 CHKERR TSGetSNES(solver, &snes);
1720 KSP ksp;
1721 CHKERR SNESGetKSP(snes, &ksp);
1722 PC pc;
1723 CHKERR KSPGetPC(ksp, &pc);
1724 PetscBool is_pcfs = PETSC_FALSE;
1725 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
1726
1727 // Setup fieldsplit (block) solver - optional: yes/no
1728 if (is_pcfs == PETSC_TRUE) {
1729 auto is_mng = mField.getInterface<ISManager>();
1730 auto name_prb = simple->getProblemName();
1731
1732 SmartPetscObj<IS> is_u;
1733 CHKERR is_mng->isCreateProblemFieldAndRank(name_prb, ROW, "U", 0,
1734 SPACE_DIM, is_u);
1735 SmartPetscObj<IS> is_flux;
1736 CHKERR is_mng->isCreateProblemFieldAndRank(name_prb, ROW, "FLUX", 0, 0,
1737 is_flux);
1738 SmartPetscObj<IS> is_T;
1739 CHKERR is_mng->isCreateProblemFieldAndRank(name_prb, ROW, "T", 0, 0,
1740 is_T);
1741 SmartPetscObj<IS> is_TBC;
1742 CHKERR is_mng->isCreateProblemFieldAndRank(name_prb, ROW, "TBC", 0, 0,
1743 is_TBC);
1744 IS is_tmp, is_tmp2;
1745 CHKERR ISExpand(is_T, is_flux, &is_tmp);
1746 CHKERR ISExpand(is_TBC, is_tmp, &is_tmp2);
1747 CHKERR ISDestroy(&is_tmp);
1748 auto is_TFlux = SmartPetscObj<IS>(is_tmp2);
1749
1750 CHKERR ISSort(is_u);
1751 CHKERR ISSort(is_TFlux);
1752 CHKERR PCFieldSplitSetIS(pc, PETSC_NULLPTR, is_TFlux);
1753 CHKERR PCFieldSplitSetIS(pc, PETSC_NULLPTR, is_u);
1754 }
1755
1757 };
1758
1759 auto B = createDMMatrix(dm);
1760 CHKERR TSSetIJacobian(solver, B, B, PETSC_NULLPTR, PETSC_NULLPTR);
1761 auto D = createDMVector(dm);
1762 CHKERR DMoFEMMeshToLocalVector(dm, D, INSERT_VALUES, SCATTER_FORWARD);
1763 CHKERR TSSetSolution(solver, D);
1764 CHKERR TSSetFromOptions(solver);
1765
1766 CHKERR set_section_monitor(solver);
1767 CHKERR set_fieldsplit_preconditioner(solver);
1768
1769 auto [domain_post_proc_fe, skin_post_proc_fe] =
1770 create_post_process_elements();
1771 CHKERR set_time_monitor(dm, solver, domain_post_proc_fe, skin_post_proc_fe);
1772
1773 CHKERR TSSetUp(solver);
1774 CHKERR TSSolve(solver, NULL);
1775
1777}
#define MOFEM_LOG_SYNCHRONISE(comm)
Synchronise "SYNC" channel.
@ QUIET
@ ROW
@ MF_EXIST
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_ATOM_TEST_INVALID
Definition definitions.h:40
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode, RowColData rc=RowColData::COL)
set local (or ghosted) vector values on mesh for partition only
Definition DMMoFEM.cpp:514
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
Definition DMMoFEM.cpp:576
auto createDMVector(DM dm, RowColData rc=RowColData::COL)
Get smart vector from DM.
Definition DMMoFEM.hpp:1237
auto createDMMatrix(DM dm)
Get smart matrix from DM.
Definition DMMoFEM.hpp:1194
SmartPetscObj< TS > createTSIM(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit solver.
double D
PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
Set Monitor To TS solver.
Definition DMMoFEM.cpp:1046
MoFEMErrorCode MoFEMSNESMonitorFields(SNES snes, PetscInt its, PetscReal fgnorm, SnesCtx *ctx)
Sens monitor printing residual field by field.
Definition SnesCtx.cpp:600
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
Definition DMMoFEM.hpp:1265
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
Section manager is used to create indexes and sections.
Definition ISManager.hpp:23
Element used to execute operators on side of the element.
Post post-proc data at points from hash maps.
intrusive_ptr for managing petsc objects
double tol

◆ tsSolve() [2/2]

MoFEMErrorCode ThermoElasticProblem::tsSolve ( )
private

Member Data Documentation

◆ dispFieldPtr

boost::shared_ptr< MatrixDouble > ThermoElasticProblem::dispFieldPtr
private
Examples
thermo_elastic.cpp.

Definition at line 135 of file thermo_elastic.cpp.

◆ dispGradPtr

boost::shared_ptr< MatrixDouble > ThermoElasticProblem::dispGradPtr
private
Examples
thermo_elastic.cpp.

Definition at line 136 of file thermo_elastic.cpp.

◆ doEvalField

PetscBool ThermoElasticProblem::doEvalField
private
Examples
thermo_elastic.cpp.

Definition at line 129 of file thermo_elastic.cpp.

◆ fieldEvalCoords [1/2]

std::array<double, 3> ThermoElasticProblem::fieldEvalCoords = {0.0, 0.0, 0.0}
private
Examples
thermo_elastic.cpp.

Definition at line 130 of file thermo_elastic.cpp.

130{0.0, 0.0, 0.0};

◆ fieldEvalCoords [2/2]

std::array<double, SPACE_DIM> ThermoElasticProblem::fieldEvalCoords
private

Definition at line 136 of file thermo_elastic.cpp.

◆ fieldEvalData

boost::shared_ptr< FieldEvaluatorInterface::SetPtsData > ThermoElasticProblem::fieldEvalData
private
Examples
thermo_elastic.cpp.

Definition at line 131 of file thermo_elastic.cpp.

◆ fluxFieldPtr

boost::shared_ptr< MatrixDouble > ThermoElasticProblem::fluxFieldPtr
private
Examples
thermo_elastic.cpp.

Definition at line 134 of file thermo_elastic.cpp.

◆ mField

MoFEM::Interface & ThermoElasticProblem::mField
private
Examples
thermo_elastic.cpp.

Definition at line 127 of file thermo_elastic.cpp.

◆ strainFieldPtr

boost::shared_ptr< MatrixDouble > ThermoElasticProblem::strainFieldPtr
private
Examples
thermo_elastic.cpp.

Definition at line 137 of file thermo_elastic.cpp.

◆ stressFieldPtr

boost::shared_ptr< MatrixDouble > ThermoElasticProblem::stressFieldPtr
private
Examples
thermo_elastic.cpp.

Definition at line 138 of file thermo_elastic.cpp.

◆ tempFieldPtr

boost::shared_ptr< VectorDouble > ThermoElasticProblem::tempFieldPtr
private
Examples
thermo_elastic.cpp.

Definition at line 133 of file thermo_elastic.cpp.


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