v0.14.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
DataAtIntegrationPts Struct Reference

#include <tutorials/cor-7/src/ElasticityMixedFormulation.hpp>

Collaboration diagram for DataAtIntegrationPts:
[legend]

Public Member Functions

 DataAtIntegrationPts (MoFEM::Interface &m_field)
 
MoFEMErrorCode getParameters ()
 
MoFEMErrorCode getBlockData (BlockData &data)
 
MoFEMErrorCode setBlocks ()
 
 DataAtIntegrationPts (MoFEM::Interface &m_field)
 
 DataAtIntegrationPts ()
 

Public Attributes

boost::shared_ptr< MatrixDouble > gradDispPtr
 
boost::shared_ptr< VectorDouble > pPtr
 
FTensor::Ddg< double, 3, 3 > tD
 
double pOisson
 
double yOung
 
double lAmbda
 
double mU
 
std::map< int, BlockDatasetOfBlocksData
 
SmartPetscObj< Vec > petscVec
 
double blockPermittivity
 
double blockChrgDens
 
boost::shared_ptr< MatrixDouble > smallStrainMat
 
boost::shared_ptr< MatrixDouble > hMat
 
boost::shared_ptr< MatrixDouble > FMat
 
boost::shared_ptr< MatrixDouble > HMat
 
boost::shared_ptr< VectorDouble > detHVec
 
boost::shared_ptr< MatrixDouble > invHMat
 
boost::shared_ptr< MatrixDouble > cauchyStressMat
 
boost::shared_ptr< MatrixDouble > stiffnessMat
 
boost::shared_ptr< VectorDouble > energyVec
 
boost::shared_ptr< MatrixDouble > eshelbyStressMat
 
boost::shared_ptr< MatrixDouble > eshelbyStress_dx
 
Range forcesOnlyOnEntitiesRow
 
Range forcesOnlyOnEntitiesCol
 

Private Attributes

MoFEM::InterfacemField
 

Detailed Description

Examples
ElasticityMixedFormulation.hpp, HookeElement.hpp, and HookeInternalStressElement.hpp.

Definition at line 20 of file ElasticityMixedFormulation.hpp.

Constructor & Destructor Documentation

◆ DataAtIntegrationPts() [1/3]

DataAtIntegrationPts::DataAtIntegrationPts ( MoFEM::Interface m_field)
inline

Definition at line 33 of file ElasticityMixedFormulation.hpp.

33  : mField(m_field) {
34 
35  // Setting default values for coeffcients
36  gradDispPtr = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
37  pPtr = boost::shared_ptr<VectorDouble>(new VectorDouble());
38 
39  ierr = setBlocks();
40  CHKERRABORT(PETSC_COMM_WORLD, ierr);
41  }

◆ DataAtIntegrationPts() [2/3]

DataAtIntegrationPts::DataAtIntegrationPts ( MoFEM::Interface m_field)
inline

Definition at line 62 of file electrostatics.hpp.

62  {
63  blockPermittivity = 0.0;
64  blockChrgDens = 0.0;
65  PetscInt ghosts[2] = {0, 1};
66  if (!m_field.get_comm_rank())
67  petscVec = createGhostVector(m_field.get_comm(), 2, 2, 0, ghosts);
68  else
69  petscVec = createGhostVector(m_field.get_comm(), 0, 2, 2, ghosts);
70  }

◆ DataAtIntegrationPts() [3/3]

DataAtIntegrationPts::DataAtIntegrationPts ( )
inline
Examples
ElasticityMixedFormulation.hpp.

Definition at line 96 of file HookeElement.hpp.

96  {
97 
98  smallStrainMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
99  hMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
100  FMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
101 
102  HMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
103  detHVec = boost::shared_ptr<VectorDouble>(new VectorDouble());
104  invHMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
105 
106  cauchyStressMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
107  stiffnessMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
108  energyVec = boost::shared_ptr<VectorDouble>(new VectorDouble());
109  eshelbyStressMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
110 
111  eshelbyStress_dx = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
112  }

Member Function Documentation

◆ getBlockData()

MoFEMErrorCode DataAtIntegrationPts::getBlockData ( BlockData data)
inline
Examples
ElasticityMixedFormulation.hpp.

Definition at line 52 of file ElasticityMixedFormulation.hpp.

52  {
54 
55  yOung = data.yOung;
56  pOisson = data.pOisson;
57  lAmbda = (yOung * pOisson) / ((1. + pOisson) * (1. - 2. * pOisson));
58  mU = yOung / (2. * (1. + pOisson));
59 
64 
65  tD(i, j, k, l) = 0.;
66 
67  tD(0, 0, 0, 0) = 2 * mU;
68  tD(0, 1, 0, 1) = mU;
69  tD(0, 1, 1, 0) = mU;
70  tD(0, 2, 0, 2) = mU;
71  tD(0, 2, 2, 0) = mU;
72  tD(1, 0, 0, 1) = mU;
73  tD(1, 0, 1, 0) = mU;
74  tD(1, 1, 1, 1) = 2 * mU;
75  tD(1, 2, 1, 2) = mU;
76  tD(1, 2, 2, 1) = mU;
77  tD(2, 0, 0, 2) = mU;
78  tD(2, 0, 2, 0) = mU;
79  tD(2, 1, 1, 2) = mU;
80  tD(2, 1, 2, 1) = mU;
81  tD(2, 2, 2, 2) = 2 * mU;
82 
84  }

◆ getParameters()

MoFEMErrorCode DataAtIntegrationPts::getParameters ( )
inline
Examples
ElasticityMixedFormulation.hpp.

Definition at line 43 of file ElasticityMixedFormulation.hpp.

43  {
44  MoFEMFunctionBegin; // They will be overwriten by BlockData
45  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "Problem", "none");
46 
47  ierr = PetscOptionsEnd();
48  CHKERRQ(ierr);
50  }

◆ setBlocks()

MoFEMErrorCode DataAtIntegrationPts::setBlocks ( )
inline
Examples
ElasticityMixedFormulation.hpp.

Definition at line 86 of file ElasticityMixedFormulation.hpp.

86  {
89  mField, BLOCKSET | MAT_ELASTICSET, it)) {
90  Mat_Elastic mydata;
91  CHKERR it->getAttributeDataStructure(mydata);
92  int id = it->getMeshsetId();
93  EntityHandle meshset = it->getMeshset();
94  CHKERR mField.get_moab().get_entities_by_type(
95  meshset, MBTET, setOfBlocksData[id].tEts, true);
96  setOfBlocksData[id].iD = id;
97  setOfBlocksData[id].yOung = mydata.data.Young;
98  setOfBlocksData[id].pOisson = mydata.data.Poisson;
99  }
101  }

Member Data Documentation

◆ blockChrgDens

double DataAtIntegrationPts::blockChrgDens

Definition at line 61 of file electrostatics.hpp.

◆ blockPermittivity

double DataAtIntegrationPts::blockPermittivity

Definition at line 60 of file electrostatics.hpp.

◆ cauchyStressMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::cauchyStressMat

Definition at line 89 of file HookeElement.hpp.

◆ detHVec

boost::shared_ptr<VectorDouble> DataAtIntegrationPts::detHVec

Definition at line 86 of file HookeElement.hpp.

◆ energyVec

boost::shared_ptr<VectorDouble> DataAtIntegrationPts::energyVec

Definition at line 91 of file HookeElement.hpp.

◆ eshelbyStress_dx

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::eshelbyStress_dx

Definition at line 94 of file HookeElement.hpp.

◆ eshelbyStressMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::eshelbyStressMat

Definition at line 92 of file HookeElement.hpp.

◆ FMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::FMat

Definition at line 83 of file HookeElement.hpp.

◆ forcesOnlyOnEntitiesCol

Range DataAtIntegrationPts::forcesOnlyOnEntitiesCol

Definition at line 115 of file HookeElement.hpp.

◆ forcesOnlyOnEntitiesRow

Range DataAtIntegrationPts::forcesOnlyOnEntitiesRow

Definition at line 114 of file HookeElement.hpp.

◆ gradDispPtr

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::gradDispPtr

◆ hMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::hMat

Definition at line 82 of file HookeElement.hpp.

◆ HMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::HMat

Definition at line 85 of file HookeElement.hpp.

◆ invHMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::invHMat

Definition at line 87 of file HookeElement.hpp.

◆ lAmbda

double DataAtIntegrationPts::lAmbda

◆ mField

MoFEM::Interface& DataAtIntegrationPts::mField
private

◆ mU

double DataAtIntegrationPts::mU

◆ petscVec

SmartPetscObj<Vec> DataAtIntegrationPts::petscVec

Definition at line 59 of file electrostatics.hpp.

◆ pOisson

double DataAtIntegrationPts::pOisson

◆ pPtr

boost::shared_ptr<VectorDouble> DataAtIntegrationPts::pPtr

◆ setOfBlocksData

std::map<int, BlockData> DataAtIntegrationPts::setOfBlocksData

◆ smallStrainMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::smallStrainMat

Definition at line 81 of file HookeElement.hpp.

◆ stiffnessMat

boost::shared_ptr<MatrixDouble> DataAtIntegrationPts::stiffnessMat

Definition at line 90 of file HookeElement.hpp.

◆ tD

FTensor::Ddg<double, 3, 3> DataAtIntegrationPts::tD

◆ yOung

double DataAtIntegrationPts::yOung

The documentation for this struct was generated from the following files:
DataAtIntegrationPts::energyVec
boost::shared_ptr< VectorDouble > energyVec
Definition: HookeElement.hpp:91
DataAtIntegrationPts::blockPermittivity
double blockPermittivity
Definition: electrostatics.hpp:60
EntityHandle
DataAtIntegrationPts::FMat
boost::shared_ptr< MatrixDouble > FMat
Definition: HookeElement.hpp:83
BlockData::pOisson
double pOisson
Definition: ElasticityMixedFormulation.hpp:16
DataAtIntegrationPts::mU
double mU
Definition: ElasticityMixedFormulation.hpp:29
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
_IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
Definition: MeshsetsManager.hpp:49
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::CoreInterface::get_comm_rank
virtual int get_comm_rank() const =0
DataAtIntegrationPts::pOisson
double pOisson
Definition: ElasticityMixedFormulation.hpp:26
DataAtIntegrationPts::eshelbyStressMat
boost::shared_ptr< MatrixDouble > eshelbyStressMat
Definition: HookeElement.hpp:92
DataAtIntegrationPts::setOfBlocksData
std::map< int, BlockData > setOfBlocksData
Definition: ElasticityMixedFormulation.hpp:31
DataAtIntegrationPts::hMat
boost::shared_ptr< MatrixDouble > hMat
Definition: HookeElement.hpp:82
DataAtIntegrationPts::lAmbda
double lAmbda
Definition: ElasticityMixedFormulation.hpp:28
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
DataAtIntegrationPts::petscVec
SmartPetscObj< Vec > petscVec
Definition: electrostatics.hpp:59
MoFEM::createGhostVector
auto createGhostVector(MPI_Comm comm, PetscInt n, PetscInt N, PetscInt nghost, const PetscInt ghosts[])
Create smart ghost vector.
Definition: PetscSmartObj.hpp:179
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MAT_ELASTICSET
@ MAT_ELASTICSET
block name is "MAT_ELASTIC"
Definition: definitions.h:172
DataAtIntegrationPts::mField
MoFEM::Interface & mField
Definition: ElasticityMixedFormulation.hpp:104
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
DataAtIntegrationPts::invHMat
boost::shared_ptr< MatrixDouble > invHMat
Definition: HookeElement.hpp:87
DataAtIntegrationPts::yOung
double yOung
Definition: ElasticityMixedFormulation.hpp:27
DataAtIntegrationPts::HMat
boost::shared_ptr< MatrixDouble > HMat
Definition: HookeElement.hpp:85
DataAtIntegrationPts::pPtr
boost::shared_ptr< VectorDouble > pPtr
Definition: ElasticityMixedFormulation.hpp:23
DataAtIntegrationPts::gradDispPtr
boost::shared_ptr< MatrixDouble > gradDispPtr
Definition: ElasticityMixedFormulation.hpp:22
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
DataAtIntegrationPts::eshelbyStress_dx
boost::shared_ptr< MatrixDouble > eshelbyStress_dx
Definition: HookeElement.hpp:94
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
DataAtIntegrationPts::tD
FTensor::Ddg< double, 3, 3 > tD
Definition: ElasticityMixedFormulation.hpp:24
DataAtIntegrationPts::setBlocks
MoFEMErrorCode setBlocks()
Definition: ElasticityMixedFormulation.hpp:86
DataAtIntegrationPts::blockChrgDens
double blockChrgDens
Definition: electrostatics.hpp:61
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
BlockData::yOung
double yOung
Definition: ElasticityMixedFormulation.hpp:15
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
DataAtIntegrationPts::smallStrainMat
boost::shared_ptr< MatrixDouble > smallStrainMat
Definition: HookeElement.hpp:81
DataAtIntegrationPts::stiffnessMat
boost::shared_ptr< MatrixDouble > stiffnessMat
Definition: HookeElement.hpp:90
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
DataAtIntegrationPts::detHVec
boost::shared_ptr< VectorDouble > detHVec
Definition: HookeElement.hpp:86
DataAtIntegrationPts::cauchyStressMat
boost::shared_ptr< MatrixDouble > cauchyStressMat
Definition: HookeElement.hpp:89