#include <users_modules/basic_finite_elements/src/ConvectiveMassElement.hpp>
Definition at line 261 of file ConvectiveMassElement.hpp.
◆ OpEnergy()
Definition at line 727 of file ConvectiveMassElement.cpp.
731 : VolumeElementForcesAndSourcesCore::UserDataOperator(
732 field_name, ForcesAndSourcesCore::UserDataOperator::OPROW),
constexpr auto field_name
◆ doWork()
Definition at line 737 of file ConvectiveMassElement.cpp.
738 {
740
741 if (row_type != MBVERTEX) {
743 }
744 if (
dAta.
tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) ==
747 }
748
749 {
750 double energy = 0;
751 for (
unsigned int gg = 0; gg < row_data.
getN().size1(); gg++) {
752 double val = getVolume() * getGaussPts()(3, gg);
757 } else {
762 .size() > 0) {
770 noalias(
F) = prod(
h,
invH);
771 } else {
774 }
777 }
780 energy += 0.5 * (
rho * val) * inner_prod(
v,
v);
781 }
782 CHKERR VecSetValue(
V, 0, energy, ADD_VALUES);
783 }
784
786}
#define MoFEMFunctionReturnHot(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 ...
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.
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Range tEts
elements in block set
double rho0
reference density
std::map< std::string, std::vector< VectorDouble > > dataAtGaussPts
std::map< std::string, std::vector< MatrixDouble > > gradAtGaussPts
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
◆ commonData
CommonData& ConvectiveMassElement::OpEnergy::commonData |
◆ dAta
BlockData& ConvectiveMassElement::OpEnergy::dAta |
MatrixDouble3by3 ConvectiveMassElement::OpEnergy::F |
MatrixDouble3by3 ConvectiveMassElement::OpEnergy::h |
MatrixDouble3by3 ConvectiveMassElement::OpEnergy::H |
◆ invH
MatrixDouble3by3 ConvectiveMassElement::OpEnergy::invH |
◆ lInear
bool& ConvectiveMassElement::OpEnergy::lInear |
SmartPetscObj<Vec> ConvectiveMassElement::OpEnergy::V |
VectorDouble3 ConvectiveMassElement::OpEnergy::v |
The documentation for this struct was generated from the following files: