8#ifndef __VOLUME_LENGTH_QUALITY_HPP__
9#define __VOLUME_LENGTH_QUALITY_HPP__
12#error "MoFEM need to be compiled with ADOL-C"
24 "QUALITY",
"BARRIER_AND_QUALITY",
"BARRIER_AND_CHANGE_QUALITY",
25 "BARRIER_AND_CHANGE_QUALITY_SCALED_BY_VOLUME"};
31template <
typename TYPE>
49 CHKERRABORT(PETSC_COMM_WORLD,
ierr);
54 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
55 "Get VolumeLengthQuality material options",
58 "-volume_length_type",
"Volume length quality type",
"",
61 CHKERR PetscOptionsScalar(
"-volume_length_alpha",
62 "volume length alpha parameter",
"",
aLpha,
64 CHKERR PetscOptionsScalar(
"-volume_length_gamma",
65 "volume length parameter (barrier)",
"",
gAmma,
67 ierr = PetscOptionsEnd();
87 &coordsEdges[0 * 3 * 2 + 0], 1);
89 &coordsEdges[0 * 3 * 2 + 3], 1);
91 &coordsEdges[1 * 3 * 2 + 0], 1);
93 &coordsEdges[1 * 3 * 2 + 3], 1);
95 &coordsEdges[2 * 3 * 2 + 0], 1);
97 &coordsEdges[2 * 3 * 2 + 3], 1);
99 &coordsEdges[3 * 3 * 2 + 0], 1);
101 &coordsEdges[3 * 3 * 2 + 3], 1);
103 &coordsEdges[4 * 3 * 2 + 0], 1);
105 &coordsEdges[4 * 3 * 2 + 3], 1);
107 &coordsEdges[5 * 3 * 2 + 0], 1);
109 &coordsEdges[5 * 3 * 2 + 3], 1);
138 for (
int ee = 0; ee < 6; ee++) {
139 for (
int dd = 0; dd < 3; dd++) {
143 for (
int ii = 0; ii != 3; ++ii)
144 for (
int jj = 0; jj != 3; ++jj)
147 for (
int dd = 0; dd < 3; dd++) {
151 for (
int ii = 0; ii != 3; ++ii)
152 for (
int jj = 0; jj != 3; ++jj)
174 Q.resize(3, 3,
false);
207 boost::shared_ptr<const NumeredEntFiniteElement> fe_ptr) {
211 detF = determinantTensor3by3(this->
F);
212 if (this->
invF.size1() != 3)
213 this->
invF.resize(3, 3);
215 CHKERR invertTensor3by3(this->
F, detF, this->
invF);
225 if (this->
P.size1() != 3)
226 this->
P.resize(3, 3);
231 noalias(this->
P) = q *
Q;
236 noalias(this->
P) = tMp *
Q;
241 noalias(this->
P) = tMp *
Q;
248 noalias(this->
P) = tMp *
Q;
@ LASTOP_VOLUMELENGTHQUALITYTYPE
@ BARRIER_AND_CHANGE_QUALITY_SCALED_BY_VOLUME
@ BARRIER_AND_CHANGE_QUALITY
static const char * VolumeLengthQualityTypeNames[]
static PetscErrorCode ierr
#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 ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
VectorDouble & getCoords()
nodal coordinates
double getVolume() const
element volume (linear geometry)
data for calculation heat conductivity and heat capacity elements
Implementation of elastic (non-linear) St. Kirchhoff equation.
FunctionsToCalculatePiolaKirchhoffI()
FTensor::Tensor2< FTensor::PackPtr< TYPE *, 0 >, 3, 3 > t_invF
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator * opPtr
pointer to finite element tetrahedral operator
MatrixBoundedArray< TYPE, 9 > invF
MatrixBoundedArray< TYPE, 9 > F
MatrixBoundedArray< TYPE, 9 > P
structure grouping operators and data used for calculation of nonlinear elastic element
MoFEMErrorCode calculateQ()
Calculate Q.
VolumeLengthQuality(VolumeLengthQualityType type, double alpha, double gamma)
FTensor::Index< 'i', 3 > i
MoFEMErrorCode getEdgesFromElemCoords()
MoFEMErrorCode getMaterialOptions()
FTensor::Index< 'j', 3 > j
MoFEMErrorCode calculateLrms()
Calculate mean element edge length.
virtual MoFEMErrorCode calculateP_PiolaKirchhoffI(const NonlinearElasticElement::BlockData block_data, boost::shared_ptr< const NumeredEntFiniteElement > fe_ptr)
Volume Length Quality.
ublas::matrix< TYPE > dXdChiT
ublas::vector< TYPE > deltaX
FTensor::Index< 'k', 3 > k