v0.13.1
Classes | Public Member Functions | Public Attributes | List of all members
EdgeSlidingConstrains Struct Reference

#include <users_modules/basic_finite_elements/src/SurfaceSlidingConstrains.hpp>

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

Classes

struct  CalculateEdgeBase
 
struct  MyEdgeFE
 
struct  OpJacobian
 

Public Member Functions

MyEdgeFEgetLoopFeRhs ()
 
MyEdgeFEgetLoopFeLhs ()
 
MoFEMErrorCode getOptions ()
 
 EdgeSlidingConstrains (MoFEM::Interface &m_field)
 
MoFEMErrorCode setOperators (int tag, Range edges, Range faces, const std::string lagrange_multipliers_field_name, const std::string material_field_name)
 
MoFEMErrorCode setOperators (int tag, const std::string lagrange_multipliers_field_name, const std::string material_field_name, const double *alpha=nullptr)
 
MoFEMErrorCode setOperatorsConstrainOnly (int tag, Range edges, Range faces, const std::string lagrange_multipliers_field_name, const std::string material_field_name)
 
MoFEMErrorCode setOperatorsConstrainOnly (int tag, const std::string lagrange_multipliers_field_name, const std::string material_field_name)
 
- Public Member Functions inherited from GenericSliding
 GenericSliding ()=default
 
virtual ~GenericSliding ()=default
 

Public Attributes

MoFEM::InterfacemField
 
boost::shared_ptr< MyEdgeFEfeRhsPtr
 
boost::shared_ptr< MyEdgeFEfeLhsPtr
 
MyEdgeFEfeRhs
 
MyEdgeFEfeLhs
 
double aLpha
 

Detailed Description

Examples
mesh_smoothing.cpp.

Definition at line 639 of file SurfaceSlidingConstrains.hpp.

Constructor & Destructor Documentation

◆ EdgeSlidingConstrains()

EdgeSlidingConstrains::EdgeSlidingConstrains ( MoFEM::Interface m_field)

Definition at line 925 of file SurfaceSlidingConstrains.hpp.

926 : mField(m_field), feRhsPtr(new MyEdgeFE(m_field)),
927 feLhsPtr(new MyEdgeFE(m_field)), feRhs(*feRhsPtr), feLhs(*feLhsPtr),
928 aLpha(1) {
929 ierr = getOptions();
930 CHKERRABORT(PETSC_COMM_WORLD, ierr);
931 }
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
boost::shared_ptr< MyEdgeFE > feRhsPtr
boost::shared_ptr< MyEdgeFE > feLhsPtr

Member Function Documentation

◆ getLoopFeLhs()

MyEdgeFE & EdgeSlidingConstrains::getLoopFeLhs ( )

Definition at line 908 of file SurfaceSlidingConstrains.hpp.

908{ return feLhs; }

◆ getLoopFeRhs()

MyEdgeFE & EdgeSlidingConstrains::getLoopFeRhs ( )

Definition at line 906 of file SurfaceSlidingConstrains.hpp.

906{ return feRhs; }

◆ getOptions()

MoFEMErrorCode EdgeSlidingConstrains::getOptions ( )

Definition at line 912 of file SurfaceSlidingConstrains.hpp.

912 {
914 ierr = PetscOptionsBegin(PETSC_COMM_WORLD, "",
915 "Get edge sliding constrains element scaling",
916 "none");
917 CHKERRQ(ierr);
918 CHKERR PetscOptionsScalar("-edge_sliding_alpha", "scaling parameter", "",
919 aLpha, &aLpha, PETSC_NULL);
920 ierr = PetscOptionsEnd();
921 CHKERRQ(ierr);
923 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535

◆ setOperators() [1/2]

MoFEMErrorCode EdgeSlidingConstrains::setOperators ( int  tag,
const std::string  lagrange_multipliers_field_name,
const std::string  material_field_name,
const double alpha = nullptr 
)

Definition at line 1103 of file SurfaceSlidingConstrains.hpp.

1106 {
1108
1109 if (alpha) {
1110 aLpha = *alpha;
1111 }
1112
1113 boost::shared_ptr<VectorDouble> active_variables_ptr(
1114 new VectorDouble(4 + 6));
1115 boost::shared_ptr<VectorDouble> results_ptr(new VectorDouble(4 + 6));
1116 boost::shared_ptr<MatrixDouble> jacobian_ptr(
1117 new MatrixDouble(4 + 6, 4 + 6));
1118
1119 feRhs.getOpPtrVector().clear();
1120 feRhs.getOpPtrVector().push_back(new OpGetActiveDofsLambda(
1121 lagrange_multipliers_field_name, active_variables_ptr));
1122 feRhs.getOpPtrVector().push_back(new OpGetActiveDofsPositions<4>(
1123 material_field_name, active_variables_ptr));
1124 feRhs.getOpPtrVector().push_back(new OpJacobian(
1125 tag, lagrange_multipliers_field_name, active_variables_ptr, results_ptr,
1126 jacobian_ptr, false, aLpha));
1127 feRhs.getOpPtrVector().push_back(
1128 new OpAssembleRhs<4, 6>(lagrange_multipliers_field_name, results_ptr));
1129 feRhs.getOpPtrVector().push_back(
1130 new OpAssembleRhs<4, 6>(material_field_name, results_ptr));
1131
1132 // Adding operators to calculate the left hand side
1133 feLhs.getOpPtrVector().clear();
1134 feLhs.getOpPtrVector().push_back(new OpGetActiveDofsLambda(
1135 lagrange_multipliers_field_name, active_variables_ptr));
1136 feLhs.getOpPtrVector().push_back(new OpGetActiveDofsPositions<4>(
1137 material_field_name, active_variables_ptr));
1138 feLhs.getOpPtrVector().push_back(new OpJacobian(
1139 tag, lagrange_multipliers_field_name, active_variables_ptr, results_ptr,
1140 jacobian_ptr, true, aLpha));
1141 feLhs.getOpPtrVector().push_back(new OpAssembleLhs<4, 6>(
1142 lagrange_multipliers_field_name, material_field_name, jacobian_ptr));
1143 feLhs.getOpPtrVector().push_back(new OpAssembleLhs<4, 6>(
1144 material_field_name, lagrange_multipliers_field_name, jacobian_ptr));
1145 feLhs.getOpPtrVector().push_back(new OpAssembleLhs<4, 6>(
1146 material_field_name, material_field_name, jacobian_ptr));
1147
1149 }
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
boost::ptr_vector< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.

◆ setOperators() [2/2]

MoFEMErrorCode EdgeSlidingConstrains::setOperators ( int  tag,
Range  edges,
Range  faces,
const std::string  lagrange_multipliers_field_name,
const std::string  material_field_name 
)

Definition at line 1092 of file SurfaceSlidingConstrains.hpp.

1094 {
1097 edges, faces);
1098 CHKERR setOperators(tag, lagrange_multipliers_field_name,
1099 material_field_name);
1101 }
static MoFEMErrorCode setTags(moab::Interface &moab, Range edges, Range tris, bool number_pathes=true, boost::shared_ptr< SurfaceSlidingConstrains::DriverElementOrientation > surface_orientation=nullptr, MoFEM::Interface *m_field_ptr=nullptr)
MoFEMErrorCode setOperators(int tag, Range edges, Range faces, const std::string lagrange_multipliers_field_name, const std::string material_field_name)
virtual moab::Interface & get_moab()=0

◆ setOperatorsConstrainOnly() [1/2]

MoFEMErrorCode EdgeSlidingConstrains::setOperatorsConstrainOnly ( int  tag,
const std::string  lagrange_multipliers_field_name,
const std::string  material_field_name 
)

Definition at line 1165 of file SurfaceSlidingConstrains.hpp.

1167 {
1169
1170 boost::shared_ptr<VectorDouble> active_variables_ptr(
1171 new VectorDouble(4 + 6));
1172 boost::shared_ptr<VectorDouble> results_ptr(new VectorDouble(4 + 6));
1173 boost::shared_ptr<MatrixDouble> jacobian_ptr(
1174 new MatrixDouble(4 + 6, 4 + 6));
1175
1176 // Adding operators to calculate the left hand side
1177 feLhs.getOpPtrVector().clear();
1178 feLhs.getOpPtrVector().push_back(new OpGetActiveDofsLambda(
1179 lagrange_multipliers_field_name, active_variables_ptr));
1180 feLhs.getOpPtrVector().push_back(new OpGetActiveDofsPositions<4>(
1181 material_field_name, active_variables_ptr));
1182 feLhs.getOpPtrVector().push_back(new OpJacobian(
1183 tag, lagrange_multipliers_field_name, active_variables_ptr, results_ptr,
1184 jacobian_ptr, true, aLpha));
1185 feLhs.getOpPtrVector().push_back(new OpAssembleLhs<4, 6>(
1186 lagrange_multipliers_field_name, material_field_name, jacobian_ptr));
1187
1189 }

◆ setOperatorsConstrainOnly() [2/2]

MoFEMErrorCode EdgeSlidingConstrains::setOperatorsConstrainOnly ( int  tag,
Range  edges,
Range  faces,
const std::string  lagrange_multipliers_field_name,
const std::string  material_field_name 
)

Definition at line 1152 of file SurfaceSlidingConstrains.hpp.

1154 {
1156
1158 edges, faces);
1159 CHKERR setOperatorsConstrainOnly(tag, lagrange_multipliers_field_name,
1160 material_field_name);
1162 }
MoFEMErrorCode setOperatorsConstrainOnly(int tag, Range edges, Range faces, const std::string lagrange_multipliers_field_name, const std::string material_field_name)

Member Data Documentation

◆ aLpha

double EdgeSlidingConstrains::aLpha

Definition at line 910 of file SurfaceSlidingConstrains.hpp.

◆ feLhs

MyEdgeFE& EdgeSlidingConstrains::feLhs

Definition at line 907 of file SurfaceSlidingConstrains.hpp.

◆ feLhsPtr

boost::shared_ptr<MyEdgeFE> EdgeSlidingConstrains::feLhsPtr

Definition at line 903 of file SurfaceSlidingConstrains.hpp.

◆ feRhs

MyEdgeFE& EdgeSlidingConstrains::feRhs

Definition at line 905 of file SurfaceSlidingConstrains.hpp.

◆ feRhsPtr

boost::shared_ptr<MyEdgeFE> EdgeSlidingConstrains::feRhsPtr

Definition at line 903 of file SurfaceSlidingConstrains.hpp.

◆ mField

MoFEM::Interface& EdgeSlidingConstrains::mField

Definition at line 874 of file SurfaceSlidingConstrains.hpp.


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