v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
EdgeSlidingConstrains::OpJacobian Struct Reference

#include "tools/src/SurfaceSlidingConstrains.hpp"

Inheritance diagram for EdgeSlidingConstrains::OpJacobian:
[legend]
Collaboration diagram for EdgeSlidingConstrains::OpJacobian:
[legend]

Public Member Functions

 OpJacobian (int tag, const std::string field_name, boost::shared_ptr< VectorDouble > &active_variables_ptr, boost::shared_ptr< VectorDouble > &results_ptr, boost::shared_ptr< MatrixDouble > &jacobian_ptr, bool evaluate_jacobian, const double &alpha)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 
 OpJacobian (int tag, const std::string field_name, boost::shared_ptr< VectorDouble > &active_variables_ptr, boost::shared_ptr< VectorDouble > &results_ptr, boost::shared_ptr< MatrixDouble > &jacobian_ptr, bool evaluate_jacobian, const double &alpha)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 
- Public Member Functions inherited from MoFEM::EdgeElementForcesAndSourcesCore::UserDataOperator
const EntityHandlegetConn ()
 get element connectivity
 
double getLength ()
 get edge length
 
VectorDoublegetDirection ()
 get edge direction
 
auto getFTensor1Normal ()
 get edge normal NOTE: it should be used only in 2D analysis
 
auto getFTensor1Normal (const FTensor::Tensor1< double, 3 > &vec)
 get ftensor1 edge normal
 
auto getFTensor1NormalsAtGaussPts (const FTensor::Tensor1< double, 3 > &vec)
 
auto getFTensor1NormalsAtGaussPts ()
 get normal at integration points
 
VectorDoublegetCoords ()
 get edge node coordinates
 
MatrixDoublegetTangentAtGaussPts ()
 get tangent vector to edge curve at integration points
 
DEPRECATED MatrixDoublegetTangetAtGaussPts ()
 
const EdgeElementForcesAndSourcesCoregetEdgeFE ()
 get pointer to this finite element
 
FTensor::Tensor1< double, 3 > getFTensor1Direction ()
 
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1Coords ()
 get get coords at gauss points
 
DEPRECATED FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getTensor1Coords ()
 
template<int DIM = 3>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, DIM > getFTensor1TangentAtGaussPts ()
 Get tangent vector at integration points.
 
MoFEMErrorCode loopSideFaces (const string fe_name, FaceElementForcesAndSourcesCoreOnSide &fe_side)
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1TangentAtGaussPts ()
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space, const char type=OPSPACE, const bool symm=true)
 Constructor for operators working on finite element spaces.
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 Constructor for operators working on a single field.
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 Constructor for operators working on two fields (bilinear forms)
 
boost::shared_ptr< const NumeredEntFiniteElementgetNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement.
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle.
 
int getFEDim () const
 Get dimension of finite element.
 
EntityType getFEType () const
 Get dimension of finite element.
 
boost::weak_ptr< SideNumbergetSideNumberPtr (const int side_number, const EntityType type)
 Get the side number pointer.
 
EntityHandle getSideEntity (const int side_number, const EntityType type)
 Get the side entity.
 
int getNumberOfNodesOnElement () const
 Get the number of nodes on finite element.
 
MoFEMErrorCode getProblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices.
 
MoFEMErrorCode getProblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices.
 
const FEMethodgetFEMethod () const
 Return raw pointer to Finite Element Method object.
 
int getOpType () const
 Get operator types.
 
void setOpType (const OpType type)
 Set operator type.
 
void addOpType (const OpType type)
 Add operator type.
 
int getNinTheLoop () const
 get number of finite element in the loop
 
int getLoopSize () const
 get size of elements in the loop
 
std::string getFEName () const
 Get name of the element.
 
ForcesAndSourcesCoregetPtrFE () const
 
ForcesAndSourcesCoregetSidePtrFE () const
 
ForcesAndSourcesCoregetRefinePtrFE () const
 
const PetscData::SwitchesgetDataCtx () const
 
const KspMethod::KSPContext getKSPCtx () const
 
const SnesMethod::SNESContext getSNESCtx () const
 
const TSMethod::TSContext getTSCtx () const
 
Vec getKSPf () const
 
Mat getKSPA () const
 
Mat getKSPB () const
 
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
Vec getTSu () const
 
Vec getTSu_t () const
 
Vec getTSu_tt () const
 
Vec getTSf () const
 
Mat getTSA () const
 
Mat getTSB () const
 
int getTSstep () const
 
double getTStime () const
 
double getTStimeStep () const
 
double getTSa () const
 
double getTSaa () const
 
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element
 
auto getFTensor0IntegrationWeight ()
 Get integration weights.
 
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3)
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry.
 
double getMeasure () const
 get measure of element
 
doublegetMeasure ()
 get measure of element
 
MoFEM::InterfacegetMField ()
 
moab::Interface & getMoab ()
 
virtual boost::weak_ptr< ForcesAndSourcesCoregetSubPipelinePtr () const
 
MoFEMErrorCode loopSide (const string &fe_name, ForcesAndSourcesCore *side_fe, const size_t dim, const EntityHandle ent_for_side=0, boost::shared_ptr< Range > fe_range=nullptr, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy, AdjCache *adj_cache=nullptr)
 User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopThis (const string &fe_name, ForcesAndSourcesCore *this_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopParent (const string &fe_name, ForcesAndSourcesCore *parent_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopChildren (const string &fe_name, ForcesAndSourcesCore *child_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopRange (const string &fe_name, ForcesAndSourcesCore *range_fe, boost::shared_ptr< Range > fe_range, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 Iterate over range of elements.
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side.
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 Operator for linear form, usually to calculate values on right hand side.
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not.
 
void setSymm ()
 set if operator is executed taking in account symmetry
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem
 

Public Attributes

const int tAg
 
boost::shared_ptr< VectorDouble > activeVariablesPtr
 
boost::shared_ptr< VectorDouble > resultsPtr
 
boost::shared_ptr< MatrixDouble > jacobianPtr
 
bool evaluateJacobian
 
const doubleaLpha
 
- Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure.
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity.
 
booldoVertices
 \deprectaed If false skip vertices
 
booldoEdges
 \deprectaed If false skip edges
 
booldoQuads
 \deprectaed
 
booldoTris
 \deprectaed
 
booldoTets
 \deprectaed
 
booldoPrisms
 \deprectaed
 

Additional Inherited Members

- Public Types inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
enum  OpType {
  OPROW = 1 << 0 , OPCOL = 1 << 1 , OPROWCOL = 1 << 2 , OPSPACE = 1 << 3 ,
  OPLAST = 1 << 3
}
 Controls loop over entities on element. More...
 
using AdjCache = std::map< EntityHandle, std::vector< boost::weak_ptr< NumeredEntFiniteElement > > >
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)>
 
using DoWorkRhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int side, EntityType type, EntitiesFieldData::EntData &data)>
 
- Static Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
static const char *const OpTypeNames []
 
- Protected Member Functions inherited from MoFEM::EdgeElementForcesAndSourcesCore::UserDataOperator
MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 

Detailed Description

Definition at line 919 of file SurfaceSlidingConstrains.hpp.

Constructor & Destructor Documentation

◆ OpJacobian() [1/2]

EdgeSlidingConstrains::OpJacobian::OpJacobian ( int  tag,
const std::string  field_name,
boost::shared_ptr< VectorDouble > &  active_variables_ptr,
boost::shared_ptr< VectorDouble > &  results_ptr,
boost::shared_ptr< MatrixDouble > &  jacobian_ptr,
bool  evaluate_jacobian,
const double alpha 
)
inline

Definition at line 930 of file SurfaceSlidingConstrains.hpp.

936 field_name, UserDataOperator::OPCOL),
937 tAg(tag), activeVariablesPtr(active_variables_ptr),
938 resultsPtr(results_ptr), jacobianPtr(jacobian_ptr),
939 evaluateJacobian(evaluate_jacobian), aLpha(alpha) {}
constexpr auto field_name
boost::shared_ptr< VectorDouble > activeVariablesPtr
boost::shared_ptr< VectorDouble > resultsPtr
boost::shared_ptr< MatrixDouble > jacobianPtr

◆ OpJacobian() [2/2]

EdgeSlidingConstrains::OpJacobian::OpJacobian ( int  tag,
const std::string  field_name,
boost::shared_ptr< VectorDouble > &  active_variables_ptr,
boost::shared_ptr< VectorDouble > &  results_ptr,
boost::shared_ptr< MatrixDouble > &  jacobian_ptr,
bool  evaluate_jacobian,
const double alpha 
)
inline

Definition at line 935 of file SurfaceSlidingConstrains.hpp.

941 field_name, UserDataOperator::OPCOL),
942 tAg(tag), activeVariablesPtr(active_variables_ptr),
943 resultsPtr(results_ptr), jacobianPtr(jacobian_ptr),
944 evaluateJacobian(evaluate_jacobian), aLpha(alpha) {}

Member Function Documentation

◆ doWork() [1/2]

MoFEMErrorCode EdgeSlidingConstrains::OpJacobian::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData &  data 
)
inline

Definition at line 941 of file SurfaceSlidingConstrains.hpp.

942 {
944 if (type != MBVERTEX)
946
947 FTensor::Index<'i', 3> i;
948 FTensor::Index<'j', 2> j;
951
952 Tag th0, th1, th2, th3;
954 th1, th2, th3);
955 FTensor::Tensor1<double, 3> t_edge_base0, t_edge_base1;
957 CHKERR getEdgeFE()->mField.get_moab().tag_get_data(th0, &fe_ent, 1,
958 &t_edge_base0(0));
959 CHKERR getEdgeFE()->mField.get_moab().tag_get_data(th1, &fe_ent, 1,
960 &t_edge_base1(0));
961
962 VectorInt &indices = data.getIndices();
963
964 trace_on(tAg);
965
966 ublas::vector<adouble> lambda_dofs(4);
967 for (int dd = 0; dd != 4; ++dd) {
968 lambda_dofs[dd] <<= (*activeVariablesPtr)[dd];
969 }
970 ublas::vector<adouble> position_dofs(6);
971 for (int dd = 0; dd != 6; ++dd) {
972 position_dofs[dd] <<= (*activeVariablesPtr)[4 + dd];
973 }
974
976 &position_dofs[0], &position_dofs[1], &position_dofs[2]);
978 &position_dofs[3], &position_dofs[4], &position_dofs[5]);
979
981 t_tangent(i) = t_node1(i) - t_node0(i);
982 adouble l = sqrt(t_tangent(i) * t_tangent(i));
983 t_tangent(i) /= l;
984
985 adouble t_dot0, t_dot1;
986 t_dot0 = t_edge_base0(i) * t_tangent(i);
987 t_dot1 = t_edge_base1(i) * t_tangent(i);
988
989 FTensor::Tensor1<adouble, 3> t_base0, t_base1;
990 t_base0(i) = t_edge_base0(i) - t_dot0 * t_tangent(i);
991 t_base1(i) = t_edge_base1(i) - t_dot1 * t_tangent(i);
992 t_base0(i) /= sqrt(t_base0(i) * t_base0(i));
993 t_base1(i) /= sqrt(t_base1(i) * t_base1(i));
994
995 auto t_base_fun1 = data.getFTensor0N();
996 auto t_base_fun2 = data.getFTensor0N();
1000 auto t_coord_ref = getFTensor1CoordsAtGaussPts();
1001
1002 ublas::vector<adouble> c_vec(4);
1003 ublas::vector<adouble> f_vec(6);
1004 c_vec.clear();
1005 f_vec.clear();
1006
1007 auto t_w = getFTensor0IntegrationWeight();
1008 int nb_gauss_pts = data.getN().size1();
1009 int nb_base_functions = data.getN().size2();
1010 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
1011
1013 &position_dofs[0], &position_dofs[1], &position_dofs[2]);
1015 &lambda_dofs[0], &lambda_dofs[1]);
1016
1017 t_position(i) = 0;
1018 t_lambda(j) = 0;
1019 for (int bb = 0; bb != nb_base_functions; ++bb) {
1020 t_position(i) += t_base_fun1 * t_position_dofs(i);
1021 t_lambda(j) += t_base_fun1 * t_lambda_dof(j);
1022 ++t_base_fun1;
1023 ++t_position_dofs;
1024 ++t_lambda_dof;
1025 }
1026
1027 t_delta(i) = t_position(i) - t_coord_ref(i);
1028 adouble dot0 = t_base0(i) * t_delta(i);
1029 adouble dot1 = t_base1(i) * t_delta(i);
1030
1031 double w = t_w * aLpha;
1032 adouble val, val1, val2;
1034 &c_vec[1]);
1036 &f_vec[0], &f_vec[1], &f_vec[2]);
1037 for (int bb = 0; bb != nb_base_functions; ++bb) {
1038 if (indices[2 * bb] != -1) {
1039 val = w * t_base_fun2 * l;
1040 t_c(N0) += val * dot0;
1041 t_c(N1) += val * dot1;
1042 val1 = val * t_lambda(N0);
1043 val2 = val * t_lambda(N1);
1044 t_f(i) += val1 * t_base0(i) + val2 * t_base1(i);
1045 }
1046 ++t_c;
1047 ++t_f;
1048 ++t_base_fun2;
1049 }
1050
1051 ++t_w;
1052 ++t_coord_ref;
1053 }
1054
1055 for (int rr = 0; rr != 4; ++rr) {
1056 c_vec[rr] >>= (*resultsPtr)[rr];
1057 }
1058 for (int rr = 0; rr != 6; ++rr) {
1059 f_vec(rr) >>= (*resultsPtr)[4 + rr];
1060 }
1061
1062 trace_off();
1063
1064 if (evaluateJacobian) {
1065 double *jac_ptr[4 + 6];
1066 for (int rr = 0; rr != 4 + 6; ++rr) {
1067 jac_ptr[rr] = &(*jacobianPtr)(rr, 0);
1068 }
1069 // play recorder for jacobians
1070 int r =
1071 ::jacobian(tAg, 4 + 6, 4 + 6, &(*activeVariablesPtr)[0], jac_ptr);
1072 if (r < 0) {
1073 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
1074 "ADOL-C function evaluation with error");
1075 }
1076 }
1077
1079 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition definitions.h:34
#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< 'l', 3 > l
FTensor::Index< 'j', 3 > j
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition ddTensor0.hpp:33
UBlasVector< int > VectorInt
Definition Types.hpp:67
int r
Definition sdf.py:205
static MoFEMErrorCode createTag(moab::Interface &moab, Tag &th0, Tag &th1, Tag &th2, Tag &th3)
virtual moab::Interface & get_moab()=0
const EdgeElementForcesAndSourcesCore * getEdgeFE()
get pointer to this finite element
EntityHandle getFEEntityHandle() const
Return finite element entity handle.
auto getFTensor1CoordsAtGaussPts()
Get coordinates at integration points assuming linear geometry.
auto getFTensor0IntegrationWeight()
Get integration weights.

◆ doWork() [2/2]

MoFEMErrorCode EdgeSlidingConstrains::OpJacobian::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData &  data 
)
inline

Definition at line 946 of file SurfaceSlidingConstrains.hpp.

947 {
949 if (type != MBVERTEX)
951
952 FTensor::Index<'i', 3> i;
953 FTensor::Index<'j', 2> j;
956
957 Tag th0, th1, th2, th3;
959 th1, th2, th3);
960 FTensor::Tensor1<double, 3> t_edge_base0, t_edge_base1;
962 CHKERR getEdgeFE()->mField.get_moab().tag_get_data(th0, &fe_ent, 1,
963 &t_edge_base0(0));
964 CHKERR getEdgeFE()->mField.get_moab().tag_get_data(th1, &fe_ent, 1,
965 &t_edge_base1(0));
966
967 VectorInt &indices = data.getIndices();
968
969 trace_on(tAg);
970
971 ublas::vector<adouble> lambda_dofs(4);
972 for (int dd = 0; dd != 4; ++dd) {
973 lambda_dofs[dd] <<= (*activeVariablesPtr)[dd];
974 }
975 ublas::vector<adouble> position_dofs(6);
976 for (int dd = 0; dd != 6; ++dd) {
977 position_dofs[dd] <<= (*activeVariablesPtr)[4 + dd];
978 }
979
981 &position_dofs[0], &position_dofs[1], &position_dofs[2]);
983 &position_dofs[3], &position_dofs[4], &position_dofs[5]);
984
986 t_tangent(i) = t_node1(i) - t_node0(i);
987 adouble l = sqrt(t_tangent(i) * t_tangent(i));
988 t_tangent(i) /= l;
989
990 adouble t_dot0, t_dot1;
991 t_dot0 = t_edge_base0(i) * t_tangent(i);
992 t_dot1 = t_edge_base1(i) * t_tangent(i);
993
994 FTensor::Tensor1<adouble, 3> t_base0, t_base1;
995 t_base0(i) = t_edge_base0(i) - t_dot0 * t_tangent(i);
996 t_base1(i) = t_edge_base1(i) - t_dot1 * t_tangent(i);
997 t_base0(i) /= sqrt(t_base0(i) * t_base0(i));
998 t_base1(i) /= sqrt(t_base1(i) * t_base1(i));
999
1000 auto t_base_fun1 = data.getFTensor0N();
1001 auto t_base_fun2 = data.getFTensor0N();
1005 auto t_coord_ref = getFTensor1CoordsAtGaussPts();
1006
1007 ublas::vector<adouble> c_vec(4);
1008 ublas::vector<adouble> f_vec(6);
1009 c_vec.clear();
1010 f_vec.clear();
1011
1012 auto t_w = getFTensor0IntegrationWeight();
1013 int nb_gauss_pts = data.getN().size1();
1014 int nb_base_functions = data.getN().size2();
1015 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
1016
1018 &position_dofs[0], &position_dofs[1], &position_dofs[2]);
1020 &lambda_dofs[0], &lambda_dofs[1]);
1021
1022 t_position(i) = 0;
1023 t_lambda(j) = 0;
1024 for (int bb = 0; bb != nb_base_functions; ++bb) {
1025 t_position(i) += t_base_fun1 * t_position_dofs(i);
1026 t_lambda(j) += t_base_fun1 * t_lambda_dof(j);
1027 ++t_base_fun1;
1028 ++t_position_dofs;
1029 ++t_lambda_dof;
1030 }
1031
1032 t_delta(i) = t_position(i) - t_coord_ref(i);
1033 adouble dot0 = t_base0(i) * t_delta(i);
1034 adouble dot1 = t_base1(i) * t_delta(i);
1035
1036 double w = t_w * aLpha;
1037 adouble val, val1, val2;
1039 &c_vec[1]);
1041 &f_vec[0], &f_vec[1], &f_vec[2]);
1042 for (int bb = 0; bb != nb_base_functions; ++bb) {
1043 if (indices[2 * bb] != -1) {
1044 val = w * t_base_fun2 * l;
1045 t_c(N0) += val * dot0;
1046 t_c(N1) += val * dot1;
1047 val1 = val * t_lambda(N0);
1048 val2 = val * t_lambda(N1);
1049 t_f(i) += val1 * t_base0(i) + val2 * t_base1(i);
1050 }
1051 ++t_c;
1052 ++t_f;
1053 ++t_base_fun2;
1054 }
1055
1056 ++t_w;
1057 ++t_coord_ref;
1058 }
1059
1060 for (int rr = 0; rr != 4; ++rr) {
1061 c_vec[rr] >>= (*resultsPtr)[rr];
1062 }
1063 for (int rr = 0; rr != 6; ++rr) {
1064 f_vec(rr) >>= (*resultsPtr)[4 + rr];
1065 }
1066
1067 trace_off();
1068
1069 if (evaluateJacobian) {
1070 double *jac_ptr[4 + 6];
1071 for (int rr = 0; rr != 4 + 6; ++rr) {
1072 jac_ptr[rr] = &(*jacobianPtr)(rr, 0);
1073 }
1074 // play recorder for jacobians
1075 int r =
1076 ::jacobian(tAg, 4 + 6, 4 + 6, &(*activeVariablesPtr)[0], jac_ptr);
1077 if (r < 0) {
1078 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
1079 "ADOL-C function evaluation with error");
1080 }
1081 }
1082
1084 }

Member Data Documentation

◆ activeVariablesPtr

boost::shared_ptr< VectorDouble > EdgeSlidingConstrains::OpJacobian::activeVariablesPtr

Definition at line 923 of file SurfaceSlidingConstrains.hpp.

◆ aLpha

const double & EdgeSlidingConstrains::OpJacobian::aLpha

Definition at line 928 of file SurfaceSlidingConstrains.hpp.

◆ evaluateJacobian

bool EdgeSlidingConstrains::OpJacobian::evaluateJacobian

Definition at line 926 of file SurfaceSlidingConstrains.hpp.

◆ jacobianPtr

boost::shared_ptr< MatrixDouble > EdgeSlidingConstrains::OpJacobian::jacobianPtr

Definition at line 925 of file SurfaceSlidingConstrains.hpp.

◆ resultsPtr

boost::shared_ptr< VectorDouble > EdgeSlidingConstrains::OpJacobian::resultsPtr

Definition at line 924 of file SurfaceSlidingConstrains.hpp.

◆ tAg

const int EdgeSlidingConstrains::OpJacobian::tAg

Definition at line 922 of file SurfaceSlidingConstrains.hpp.


The documentation for this struct was generated from the following files: