6#ifndef __ADJOINT_IMPL_HPP__
7#define __ADJOINT_IMPL_HPP__
13template <
int SPACE_DIM, IntegrationType I,
typename OpBase>
41template <
int SPACE_DIM,
typename OpBase>
46 boost::shared_ptr<MatrixDouble> diff_jac_ptr,
47 boost::shared_ptr<VectorDouble> diff_out_ptr
51 diffJacPtr(diff_jac_ptr), diffOutPtr(diff_out_ptr) {}
57 boost::shared_ptr<MatrixDouble>
jacPtr;
85template <
int SPACE_DIM,
typename OpBase>
90 auto nb_integration_pts = OpBase::getGaussPts().size2();
91 diffOutPtr->resize(nb_integration_pts,
false);
94 auto t_jac = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*jacPtr);
95 auto t_diff_jac = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*diffJacPtr);
97 for (
int gg = 0; gg != nb_integration_pts; gg++) {
105 t_diff_out = (t_inv_jac(
j,
i) * t_diff_jac(
i,
j)) * t_det;
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#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)
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
Pointer to output derivative vector.
boost::shared_ptr< MatrixDouble > jacPtr
Pointer to Jacobian matrix.
boost::shared_ptr< MatrixDouble > diffJacPtr
Pointer to Jacobian derivative matrix.
OpGetCoFactorImpl(boost::shared_ptr< MatrixDouble > jac_ptr, boost::shared_ptr< MatrixDouble > diff_jac_ptr, boost::shared_ptr< VectorDouble > diff_out_ptr)
[declarations of templates]