v0.14.0
HookeInternalStressElement.hpp

Operators and data structures for calculating internal stress

/**
* \file HookeInternalStressElement.hpp
* \example HookeInternalStressElement.hpp
*
* \brief Operators and data structures for calculating internal stress
*
*/
/*
* This file is part of MoFEM.
* MoFEM is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* MoFEM is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MoFEM. If not, see <http://www.gnu.org/licenses/>. */
#ifndef __HOOKE_INTERNAL_STRESS_ELEMENT_HPP__
#define __HOOKE_INTERNAL_STRESS_ELEMENT_HPP__
struct DataAtIntegrationPts : public HookeElement::DataAtIntegrationPts {
boost::shared_ptr<MatrixDouble> internalStressMat;
boost::shared_ptr<MatrixDouble> actualStressMat;
boost::shared_ptr<MatrixDouble> deviatoricStressMat;
boost::shared_ptr<MatrixDouble> hydrostaticStressMat;
boost::shared_ptr<MatrixDouble> spatPosMat;
boost::shared_ptr<MatrixDouble> meshNodePosMat;
internalStressMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
actualStressMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
deviatoricStressMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
boost::shared_ptr<MatrixDouble>(new MatrixDouble());
spatPosMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
meshNodePosMat = boost::shared_ptr<MatrixDouble>(new MatrixDouble());
}
};
struct OpGetInternalStress : public VolUserDataOperator {
OpGetInternalStress(const std::string row_field,
const std::string col_field,
boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
moab::Interface &input_mesh, char *stress_tag_name)
: VolUserDataOperator(row_field, col_field, OPROW, true),
dataAtPts(data_at_pts), inputMesh(input_mesh),
stressTagName(stress_tag_name) {
std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
};
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
protected:
boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
};
struct OpInternalStrain_dx : public OpAssemble {
OpInternalStrain_dx(const std::string row_field,
boost::shared_ptr<DataAtIntegrationPts> data_at_pts)
: OpAssemble(row_field, row_field, data_at_pts, OPROW, true),
dataAtPts(data_at_pts){};
protected:
boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
};
template <int S = 0>
struct OpGetAnalyticalInternalStress : public VolUserDataOperator {
typedef boost::function<
)
>
const std::string row_field, const std::string col_field,
boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
StrainFunction strain_fun)
: VolUserDataOperator(row_field, col_field, OPROW, true),
dataAtPts(data_at_pts), strainFun(strain_fun) {
std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE], false);
}
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
protected:
boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
};
struct OpSaveStress : public VolUserDataOperator {
boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
map<int, BlockData>
&blockSetsPtr; // FIXME: (works only with the first block)
bool isALE;
double scaleFactor;
bool saveMean;
OpSaveStress(const string row_field, const string col_field,
boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
map<int, BlockData> &block_sets_ptr,
moab::Interface &output_mesh, double scale_factor,
bool save_mean = false, bool is_ale = false,
bool is_field_disp = true)
: VolUserDataOperator(row_field, col_field, OPROW, true),
dataAtPts(data_at_pts), blockSetsPtr(block_sets_ptr),
outputMesh(output_mesh), scaleFactor(scale_factor), isALE(is_ale),
isFieldDisp(is_field_disp), saveMean(save_mean){};
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data);
};
template <class ELEMENT>
boost::shared_ptr<DataAtIntegrationPts> dataAtPts;
map<int, BlockData>
&blockSetsPtr; // FIXME: (works only with the first block)
std::vector<EntityHandle> &mapGaussPts;
bool isALE;
OpPostProcHookeElement(const string row_field,
boost::shared_ptr<DataAtIntegrationPts> data_at_pts,
map<int, BlockData> &block_sets_ptr,
moab::Interface &post_proc_mesh,
std::vector<EntityHandle> &map_gauss_pts,
bool is_ale = false, bool is_field_disp = true)
dataAtPts(data_at_pts), blockSetsPtr(block_sets_ptr),
postProcMesh(post_proc_mesh), mapGaussPts(map_gauss_pts),
isALE(is_ale), isFieldDisp(is_field_disp) {}
MoFEMErrorCode doWork(int side, EntityType type,
};
};
int row_side, EntityType row_type, EntData &row_data) {
const int nb_integration_pts = row_data.getN().size1();
const int val_num = 9 * nb_integration_pts;
std::vector<double> def_vals(val_num, 0.0);
Tag th_internal_stress;
CHKERR inputMesh.tag_get_handle(
stressTagName, val_num, MB_TYPE_DOUBLE, th_internal_stress,
MB_TAG_CREAT | MB_TAG_SPARSE, &*def_vals.begin());
dataAtPts->internalStressMat->resize(9, nb_integration_pts, false);
CHKERR inputMesh.tag_get_data(
th_internal_stress, &ent, 1,
&*(dataAtPts->internalStressMat->data().begin()));
}
auto get_tensor1 = [](VectorDouble &v, const int r) {
&v(r + 0), &v(r + 1), &v(r + 2));
};
const int nb_integration_pts = getGaussPts().size2();
auto t_internal_stress =
getFTensor2FromMat<3, 3>(*dataAtPts->internalStressMat);
// get element volume
double vol = getVolume();
auto t_w = getFTensor0IntegrationWeight();
nF.resize(nbRows, false);
nF.clear();
// get derivatives of base functions on rows
auto t_row_diff_base = row_data.getFTensor1DiffN<3>();
const int row_nb_base_fun = row_data.getN().size2();
for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
// calculate scalar weight times element volume
double a = t_w * vol;
auto t_nf = get_tensor1(nF, 0);
int rr = 0;
for (; rr != nbRows / 3; ++rr) {
t_nf(i) += a * t_row_diff_base(j) * t_internal_stress(i, j);
++t_row_diff_base;
++t_nf;
}
for (; rr != row_nb_base_fun; ++rr)
++t_row_diff_base;
++t_w;
++t_internal_stress;
}
}
template <int S>
int row_side, EntityType row_type, EntData &row_data) {
auto tensor_to_tensor = [](const auto &t1, auto &t2) {
t2(0, 0) = t1(0, 0);
t2(1, 1) = t1(1, 1);
t2(2, 2) = t1(2, 2);
t2(0, 1) = t2(1, 0) = t1(1, 0);
t2(0, 2) = t2(2, 0) = t1(2, 0);
t2(1, 2) = t2(2, 1) = t1(2, 1);
};
const int nb_integration_pts = getGaussPts().size2();
auto t_coords = getFTensor1CoordsAtGaussPts();
// elastic stiffness tensor (4th rank tensor with minor and major
// symmetry)
MAT_TO_DDG(dataAtPts->stiffnessMat));
dataAtPts->internalStressMat->resize(9, nb_integration_pts, false);
auto t_internal_stress =
getFTensor2FromMat<3, 3>(*dataAtPts->internalStressMat);
FTensor::Tensor2_symmetric<double, 3> t_internal_stress_symm;
for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
auto t_fun_strain = strainFun(t_coords);
t_internal_stress_symm(i, j) = -t_D(i, j, k, l) * t_fun_strain(k, l);
tensor_to_tensor(t_internal_stress_symm, t_internal_stress);
++t_coords;
++t_D;
++t_internal_stress;
}
}
int row_side, EntityType row_type, EntData &row_data) {
if (row_type != MBVERTEX) {
}
const EntityHandle ent = getFEEntityHandle();
auto tensor_to_tensor = [](const auto &t1, auto &t2) {
t2(0, 0) = t1(0, 0);
t2(1, 1) = t1(1, 1);
t2(2, 2) = t1(2, 2);
t2(0, 1) = t2(1, 0) = t1(1, 0);
t2(0, 2) = t2(2, 0) = t1(2, 0);
t2(1, 2) = t2(2, 1) = t1(2, 1);
};
auto tensor_to_vector = [](const auto &t, auto &v) {
v(0) = t(0, 0);
v(1) = t(1, 1);
v(2) = t(2, 2);
v(3) = t(0, 1);
v(4) = t(0, 2);
v(5) = t(1, 2);
};
auto get_tag_handle = [&](auto name, auto size) {
Tag th;
std::vector<double> def_vals(size, 0.0);
CHKERR outputMesh.tag_get_handle(name, size, MB_TYPE_DOUBLE, th,
MB_TAG_CREAT | MB_TAG_SPARSE,
def_vals.data());
return th;
};
const int nb_integration_pts = row_data.getN().size1();
auto th_internal_stress =
get_tag_handle("INTERNAL_STRESS", 9 * nb_integration_pts);
auto th_actual_stress =
get_tag_handle("ACTUAL_STRESS", 9 * nb_integration_pts);
auto th_deviatoric_stress =
get_tag_handle("DEVIATORIC_STRESS", 9 * nb_integration_pts);
auto th_hydrostatic_stress =
get_tag_handle("HYDROSTATIC_STRESS", 9 * nb_integration_pts);
auto th_internal_stress_mean = get_tag_handle("MED_INTERNAL_STRESS", 9);
auto th_actual_stress_mean = get_tag_handle("MED_ACTUAL_STRESS", 9);
auto t_h = getFTensor2FromMat<3, 3>(*dataAtPts->hMat);
auto t_H = getFTensor2FromMat<3, 3>(*dataAtPts->HMat);
dataAtPts->stiffnessMat->resize(36, 1, false);
MAT_TO_DDG(dataAtPts->stiffnessMat));
for (auto &m : (blockSetsPtr)) {
const double young = m.second.E;
const double poisson = m.second.PoissonRatio;
const double coefficient = young / ((1 + poisson) * (1 - 2 * poisson));
t_D(i, j, k, l) = 0.;
t_D(0, 0, 0, 0) = t_D(1, 1, 1, 1) = t_D(2, 2, 2, 2) = 1 - poisson;
t_D(0, 1, 0, 1) = t_D(0, 2, 0, 2) = t_D(1, 2, 1, 2) =
0.5 * (1 - 2 * poisson);
t_D(0, 0, 1, 1) = t_D(1, 1, 0, 0) = t_D(0, 0, 2, 2) = t_D(2, 2, 0, 0) =
t_D(1, 1, 2, 2) = t_D(2, 2, 1, 1) = poisson;
t_D(i, j, k, l) *= coefficient;
break; // FIXME: calculates only first block
}
double detH = 0.;
auto t_internal_stress =
getFTensor2FromMat<3, 3>(*dataAtPts->internalStressMat);
dataAtPts->actualStressMat->resize(9, nb_integration_pts, false);
auto t_actual_stress = getFTensor2FromMat<3, 3>(*dataAtPts->actualStressMat);
dataAtPts->deviatoricStressMat->resize(9, nb_integration_pts, false);
auto t_deviatoric_stress =
getFTensor2FromMat<3, 3>(*dataAtPts->deviatoricStressMat);
dataAtPts->hydrostaticStressMat->resize(9, nb_integration_pts, false);
auto t_hydrostatic_stress =
getFTensor2FromMat<3, 3>(*dataAtPts->hydrostaticStressMat);
FTensor::Tensor2<double, 3, 3> t_internal_stress_mean;
FTensor::Tensor2<double, 3, 3> t_actual_stress_mean;
t_internal_stress_mean(i, j) = 0.;
t_actual_stress_mean(i, j) = 0.;
auto t_w = getFTensor0IntegrationWeight();
for (int gg = 0; gg != nb_integration_pts; ++gg) {
if (!isALE) {
t_small_strain_symm(i, j) = (t_h(i, j) || t_h(j, i)) / 2.;
} else {
CHKERR invertTensor3by3(t_H, detH, t_invH);
t_F(i, j) = t_h(i, k) * t_invH(k, j);
t_small_strain_symm(i, j) = (t_F(i, j) || t_F(j, i)) / 2.;
++t_H;
}
if (isALE || !isFieldDisp) {
for (auto ii : {0, 1, 2}) {
t_small_strain_symm(ii, ii) -= 1.;
}
}
// symmetric tensors need improvement
t_stress_symm(i, j) = t_D(i, j, k, l) * t_small_strain_symm(k, l);
tensor_to_tensor(t_stress_symm, t_stress);
t_actual_stress(i, j) = t_stress(i, j) + t_internal_stress(i, j);
t_actual_stress(i, j) *= scaleFactor;
t_internal_stress(i, j) *= scaleFactor;
double hydrostatic_pressure =
(t_actual_stress(0, 0) + t_actual_stress(1, 1) +
t_actual_stress(2, 2)) /
3.;
t_hydrostatic_stress(i, j) = 0.;
for (auto ii : {0, 1, 2}) {
t_hydrostatic_stress(ii, ii) += hydrostatic_pressure;
}
t_deviatoric_stress(i, j) = t_actual_stress(i, j);
for (auto ii : {0, 1, 2}) {
t_deviatoric_stress(ii, ii) -= hydrostatic_pressure;
}
t_actual_stress_mean(i, j) += t_w * t_actual_stress(i, j);
t_internal_stress_mean(i, j) += t_w * t_internal_stress(i, j);
++t_w;
++t_h;
++t_actual_stress;
++t_internal_stress;
}
if (saveMean) {
VectorDouble vec_actual_stress_mean;
vec_actual_stress_mean.resize(9, false);
vec_actual_stress_mean.clear();
VectorDouble vec_internal_stress_mean;
vec_internal_stress_mean.resize(9, false);
vec_internal_stress_mean.clear();
tensor_to_vector(t_actual_stress_mean, vec_actual_stress_mean);
tensor_to_vector(t_internal_stress_mean, vec_internal_stress_mean);
CHKERR outputMesh.tag_set_data(th_actual_stress_mean, &ent, 1,
&*(vec_actual_stress_mean.data().begin()));
CHKERR outputMesh.tag_set_data(th_internal_stress_mean, &ent, 1,
&*(vec_internal_stress_mean.data().begin()));
} else {
CHKERR outputMesh.tag_set_data(
th_internal_stress, &ent, 1,
&*(dataAtPts->internalStressMat->data().begin()));
CHKERR outputMesh.tag_set_data(
th_actual_stress, &ent, 1,
&*(dataAtPts->actualStressMat->data().begin()));
CHKERR outputMesh.tag_set_data(
th_hydrostatic_stress, &ent, 1,
&*(dataAtPts->hydrostaticStressMat->data().begin()));
CHKERR outputMesh.tag_set_data(
th_deviatoric_stress, &ent, 1,
&*(dataAtPts->deviatoricStressMat->data().begin()));
}
}
template <class ELEMENT>
int side, EntityType type, EntitiesFieldData::EntData &data) {
if (type != MBVERTEX) {
}
auto tensor_to_tensor = [](const auto &t1, auto &t2) {
t2(0, 0) = t1(0, 0);
t2(1, 1) = t1(1, 1);
t2(2, 2) = t1(2, 2);
t2(0, 1) = t2(1, 0) = t1(1, 0);
t2(0, 2) = t2(2, 0) = t1(2, 0);
t2(1, 2) = t2(2, 1) = t1(2, 1);
};
auto get_tag_handle = [&](auto name, auto size) {
Tag th;
std::vector<double> def_vals(size, 0.0);
CHKERR postProcMesh.tag_get_handle(name, size, MB_TYPE_DOUBLE, th,
MB_TAG_CREAT | MB_TAG_SPARSE,
def_vals.data());
return th;
};
auto th_stress = get_tag_handle("STRESS", 9);
auto th_strain = get_tag_handle("STRAIN", 9);
auto th_psi = get_tag_handle("ENERGY", 1);
auto th_disp = get_tag_handle("DISPLACEMENT", 3);
const int nb_integration_pts = mapGaussPts.size();
auto t_h = getFTensor2FromMat<3, 3>(*dataAtPts->hMat);
auto t_H = getFTensor2FromMat<3, 3>(*dataAtPts->HMat);
dataAtPts->stiffnessMat->resize(36, 1, false);
MAT_TO_DDG(dataAtPts->stiffnessMat));
for (auto &m : (blockSetsPtr)) {
const double young = m.second.E;
const double poisson = m.second.PoissonRatio;
const double coefficient = young / ((1 + poisson) * (1 - 2 * poisson));
t_D(i, j, k, l) = 0.;
t_D(0, 0, 0, 0) = t_D(1, 1, 1, 1) = t_D(2, 2, 2, 2) = 1 - poisson;
t_D(0, 1, 0, 1) = t_D(0, 2, 0, 2) = t_D(1, 2, 1, 2) =
0.5 * (1 - 2 * poisson);
t_D(0, 0, 1, 1) = t_D(1, 1, 0, 0) = t_D(0, 0, 2, 2) = t_D(2, 2, 0, 0) =
t_D(1, 1, 2, 2) = t_D(2, 2, 1, 1) = poisson;
t_D(i, j, k, l) *= coefficient;
break; // FIXME: calculates only first block
}
double detH = 0.;
auto t_spat_pos = getFTensor1FromMat<3>(*dataAtPts->spatPosMat);
auto t_mesh_node_pos = getFTensor1FromMat<3>(*dataAtPts->meshNodePosMat);
for (int gg = 0; gg != nb_integration_pts; ++gg) {
if (isFieldDisp) {
t_h(0, 0) += 1;
t_h(1, 1) += 1;
t_h(2, 2) += 1;
}
if (!isALE) {
t_small_strain_symm(i, j) = (t_h(i, j) || t_h(j, i)) / 2.;
} else {
CHKERR invertTensor3by3(t_H, detH, t_invH);
t_F(i, j) = t_h(i, k) * t_invH(k, j);
t_small_strain_symm(i, j) = (t_F(i, j) || t_F(j, i)) / 2.;
++t_H;
}
t_small_strain_symm(0, 0) -= 1;
t_small_strain_symm(1, 1) -= 1;
t_small_strain_symm(2, 2) -= 1;
// symmetric tensors need improvement
t_stress_symm(i, j) = t_D(i, j, k, l) * t_small_strain_symm(k, l);
tensor_to_tensor(t_stress_symm, t_stress);
tensor_to_tensor(t_small_strain_symm, t_small_strain);
t_disp(i) = t_spat_pos(i) - t_mesh_node_pos(i);
const double psi = 0.5 * t_stress_symm(i, j) * t_small_strain_symm(i, j);
CHKERR postProcMesh.tag_set_data(th_psi, &mapGaussPts[gg], 1, &psi);
CHKERR postProcMesh.tag_set_data(th_stress, &mapGaussPts[gg], 1,
&t_stress(0, 0));
CHKERR postProcMesh.tag_set_data(th_strain, &mapGaussPts[gg], 1,
&t_small_strain(0, 0));
CHKERR postProcMesh.tag_set_data(th_disp, &mapGaussPts[gg], 1, &t_disp(0));
++t_h;
++t_spat_pos;
++t_mesh_node_pos;
}
}
#endif
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
HookeInternalStressElement::OpGetInternalStress::stressTagName
char * stressTagName
Definition: HookeInternalStressElement.hpp:71
MoFEM::EntitiesFieldData::EntData
Data on single entity (This is passed as argument to DataOperator::doWork)
Definition: EntitiesFieldData.hpp:128
HookeInternalStressElement::OpSaveStress::saveMean
bool saveMean
Definition: HookeInternalStressElement.hpp:125
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
EntityHandle
HookeInternalStressElement::OpGetAnalyticalInternalStress::StrainFunction
boost::function< FTensor::Tensor2_symmetric< double, 3 > FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > &t_coords) > StrainFunction
Definition: HookeInternalStressElement.hpp:99
HookeInternalStressElement::OpSaveStress::isALE
bool isALE
Definition: HookeInternalStressElement.hpp:122
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
HookeInternalStressElement::DataAtIntegrationPts::internalStressMat
boost::shared_ptr< MatrixDouble > internalStressMat
Definition: HookeInternalStressElement.hpp:33
HookeInternalStressElement::OpSaveStress::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data)
Operator for linear form, usually to calculate values on right hand side.
Definition: HookeInternalStressElement.hpp:291
MoFEM::th
Tag th
Definition: Projection10NodeCoordsOnField.cpp:122
HookeInternalStressElement::OpSaveStress::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: HookeInternalStressElement.hpp:118
HookeInternalStressElement::OpSaveStress::scaleFactor
double scaleFactor
Definition: HookeInternalStressElement.hpp:124
HookeInternalStressElement::OpGetAnalyticalInternalStress::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: HookeInternalStressElement.hpp:114
BasicFiniteElements.hpp
FTensor::Tensor2_symmetric
Definition: Tensor2_symmetric_value.hpp:13
HookeInternalStressElement::OpSaveStress::OpSaveStress
OpSaveStress(const string row_field, const string col_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, map< int, BlockData > &block_sets_ptr, moab::Interface &output_mesh, double scale_factor, bool save_mean=false, bool is_ale=false, bool is_field_disp=true)
Definition: HookeInternalStressElement.hpp:127
HookeInternalStressElement::OpGetInternalStress::OpGetInternalStress
OpGetInternalStress(const std::string row_field, const std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, moab::Interface &input_mesh, char *stress_tag_name)
Definition: HookeInternalStressElement.hpp:56
sdf.r
int r
Definition: sdf.py:8
FTensor::Tensor2< double, 3, 3 >
HookeInternalStressElement::OpPostProcHookeElement::blockSetsPtr
map< int, BlockData > & blockSetsPtr
Definition: HookeInternalStressElement.hpp:145
MoFEM::invertTensor3by3
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:1588
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
HookeInternalStressElement::OpPostProcHookeElement::OpPostProcHookeElement
OpPostProcHookeElement(const string row_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, map< int, BlockData > &block_sets_ptr, moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, bool is_ale=false, bool is_field_disp=true)
Definition: HookeInternalStressElement.hpp:151
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
a
constexpr double a
Definition: approx_sphere.cpp:30
HookeInternalStressElement::DataAtIntegrationPts::deviatoricStressMat
boost::shared_ptr< MatrixDouble > deviatoricStressMat
Definition: HookeInternalStressElement.hpp:35
convert.type
type
Definition: convert.py:64
HookeInternalStressElement::OpGetInternalStress::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: HookeInternalStressElement.hpp:69
DataAtIntegrationPts
Definition: ElasticityMixedFormulation.hpp:20
HookeInternalStressElement::OpSaveStress::isFieldDisp
bool isFieldDisp
Definition: HookeInternalStressElement.hpp:123
HookeElement
HookeInternalStressElement::OpInternalStrain_dx::iNtegrate
MoFEMErrorCode iNtegrate(EntData &row_data)
Definition: HookeInternalStressElement.hpp:192
HookeInternalStressElement::OpInternalStrain_dx::OpInternalStrain_dx
OpInternalStrain_dx(const std::string row_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts)
Definition: HookeInternalStressElement.hpp:76
HookeInternalStressElement::OpGetInternalStress::inputMesh
moab::Interface & inputMesh
Definition: HookeInternalStressElement.hpp:70
VolUserDataOperator
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
Definition: elasticity.cpp:76
FTensor::PackPtr
Definition: FTensor.hpp:54
HookeInternalStressElement::OpSaveStress::blockSetsPtr
map< int, BlockData > & blockSetsPtr
Definition: HookeInternalStressElement.hpp:120
HookeInternalStressElement::OpPostProcHookeElement::mapGaussPts
std::vector< EntityHandle > & mapGaussPts
Definition: HookeInternalStressElement.hpp:147
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
HookeInternalStressElement::OpInternalStrain_dx::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: HookeInternalStressElement.hpp:84
HookeInternalStressElement::OpPostProcHookeElement::isFieldDisp
bool isFieldDisp
Definition: HookeInternalStressElement.hpp:149
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
Definition: VolumeElementForcesAndSourcesCore.hpp:108
HookeInternalStressElement::OpPostProcHookeElement::postProcMesh
moab::Interface & postProcMesh
Definition: HookeInternalStressElement.hpp:146
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
FTensor::Index< 'i', 3 >
HookeInternalStressElement::OpGetAnalyticalInternalStress::OpGetAnalyticalInternalStress
OpGetAnalyticalInternalStress(const std::string row_field, const std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, StrainFunction strain_fun)
Definition: HookeInternalStressElement.hpp:101
MoFEM::determinantTensor3by3
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1540
OpAssemble::OpAssemble
OpAssemble(const std::string row_field, const std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_at_pts, const char type, bool symm=false)
v
const double v
phase velocity of light in medium (cm/ns)
Definition: initial_diffusion.cpp:40
HookeInternalStressElement::OpSaveStress::outputMesh
moab::Interface & outputMesh
Definition: HookeInternalStressElement.hpp:121
MoFEM::DataOperator::doEntities
std::array< bool, MBMAXTYPE > doEntities
If true operator is executed for entity.
Definition: DataOperators.hpp:85
HookeInternalStressElement::DataAtIntegrationPts::spatPosMat
boost::shared_ptr< MatrixDouble > spatPosMat
Definition: HookeInternalStressElement.hpp:38
MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
Definition: EntitiesFieldData.cpp:526
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFEEntityHandle
EntityHandle getFEEntityHandle() const
Return finite element entity handle.
Definition: ForcesAndSourcesCore.hpp:1004
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1318
HookeInternalStressElement::OpPostProcHookeElement::isALE
bool isALE
Definition: HookeInternalStressElement.hpp:148
MAT_TO_DDG
#define MAT_TO_DDG(SM)
Definition: HookeElement.hpp:142
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Ddg
Definition: Ddg_value.hpp:7
HookeInternalStressElement::DataAtIntegrationPts::hydrostaticStressMat
boost::shared_ptr< MatrixDouble > hydrostaticStressMat
Definition: HookeInternalStressElement.hpp:36
HookeInternalStressElement::OpPostProcHookeElement::doWork
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Definition: HookeInternalStressElement.hpp:487
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
HookeInternalStressElement::OpGetInternalStress::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data)
Operator for linear form, usually to calculate values on right hand side.
Definition: HookeInternalStressElement.hpp:167
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
OpAssemble
Definition: HookeElement.hpp:340
HookeInternalStressElement::DataAtIntegrationPts::actualStressMat
boost::shared_ptr< MatrixDouble > actualStressMat
Definition: HookeInternalStressElement.hpp:34
OpPostProcHookeElement
Definition: HookeElement.hpp:637
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
HookeInternalStressElement
Definition: HookeInternalStressElement.hpp:29
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
HookeInternalStressElement::DataAtIntegrationPts::DataAtIntegrationPts
DataAtIntegrationPts()
Definition: HookeInternalStressElement.hpp:41
HookeInternalStressElement::DataAtIntegrationPts::meshNodePosMat
boost::shared_ptr< MatrixDouble > meshNodePosMat
Definition: HookeInternalStressElement.hpp:39
HookeInternalStressElement::OpGetAnalyticalInternalStress::strainFun
StrainFunction strainFun
Definition: HookeInternalStressElement.hpp:113
HookeInternalStressElement::OpGetAnalyticalInternalStress::doWork
MoFEMErrorCode doWork(int row_side, EntityType row_type, EntData &row_data)
Operator for linear form, usually to calculate values on right hand side.
Definition: HookeInternalStressElement.hpp:245
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
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567
HookeInternalStressElement::OpPostProcHookeElement::dataAtPts
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
Definition: HookeInternalStressElement.hpp:143