6#ifndef __ADJOINT_IMPL_HPP__
7#define __ADJOINT_IMPL_HPP__
13template <
int SPACE_DIM, IntegrationType I,
typename OpBase>
20template <
int SPACE_DIM,
typename OpBase>
25 boost::shared_ptr<MatrixDouble> diff_jac_ptr,
26 boost::shared_ptr<VectorDouble> diff_out_ptr
30 diffJacPtr(diff_jac_ptr), diffOutPtr(diff_out_ptr) {}
36 boost::shared_ptr<MatrixDouble>
jacPtr;
45template <
int SPACE_DIM,
typename OpBase>
50 auto nb_integration_pts = OpBase::getGaussPts().size2();
51 diffOutPtr->resize(nb_integration_pts,
false);
57 for (
int gg = 0; gg != nb_integration_pts; gg++) {
62 t_diff_out = (t_inv_jac(
j,
i) * t_diff_jac(
i,
j)) * t_det;
#define FTENSOR_INDEX(DIM, I)
#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.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
static MoFEMErrorCode invertTensor(FTensor::Tensor2< T1, DIM, DIM > &t, T2 &det, FTensor::Tensor2< T3, DIM, DIM > &inv_t)
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
static auto determinantTensor(FTensor::Tensor2< T, DIM, DIM > &t)
Calculate the determinant of a tensor of rank DIM.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Data on single entity (This is passed as argument to DataOperator::doWork)
boost::shared_ptr< VectorDouble > diffOutPtr
boost::shared_ptr< MatrixDouble > jacPtr
boost::shared_ptr< MatrixDouble > diffJacPtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
OpGetCoFactorImpl(boost::shared_ptr< MatrixDouble > jac_ptr, boost::shared_ptr< MatrixDouble > diff_jac_ptr, boost::shared_ptr< VectorDouble > diff_out_ptr)
[declarations of templates]