739 {
741
742 if (row_type != MBVERTEX) {
744 }
745 if (
dAta.
tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) ==
748 }
749
750 {
751 double energy = 0;
752 for (
unsigned int gg = 0; gg < row_data.
getN().size1(); gg++) {
753 double val = getVolume() * getGaussPts()(3, gg);
758 } else {
763 .size() > 0) {
771 noalias(
F) = prod(
h,
invH);
772 } else {
775 }
778 }
781 energy += 0.5 * (
rho * val) * inner_prod(
v,
v);
782 }
783 CHKERR VecSetValue(
V, 0, energy, ADD_VALUES);
784 }
785
787}
#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....