19#ifndef __BCS_RVELAGRANGE_TRAC_RIGID_ROT_HPP
20#define __BCS_RVELAGRANGE_TRAC_RIGID_ROT_HPP
27 struct OpRVEBCsLhs:
public FaceElementForcesAndSourcesCore::UserDataOperator {
48 int row_side,
int col_side,
50 DataForcesAndSourcesCore::EntData &row_data,
51 DataForcesAndSourcesCore::EntData &col_data
56 if(row_data.getIndices().size()==0) PetscFunctionReturn(0);
57 if(col_data.getIndices().size()==0) PetscFunctionReturn(0);
58 if(col_type==MBVERTEX){
68 double coords_face[9];
69 EntityHandle face_tri = getNumeredEntFiniteElementPtr()->getEnt();
75 for(
int nn=0; nn<3; nn++){
76 Mat_face(0,3*nn+1)=-coords_face[3*nn+2];
Mat_face(0,3*nn+2)= coords_face[3*nn+1];
77 Mat_face(1,3*nn+0)= coords_face[3*nn+2];
Mat_face(1,3*nn+2)=-coords_face[3*nn+0];
78 Mat_face(2,3*nn+0)=-coords_face[3*nn+1];
Mat_face(2,3*nn+1)= coords_face[3*nn+0];
82 int nb_rows=row_data.getIndices().size();
83 int nb_cols=col_data.getIndices().size();
85 Aij,nb_rows,&row_data.getIndices()[0],nb_cols,&col_data.getIndices()[0],&
Mat_face(0,0),ADD_VALUES
91 Aij,nb_cols,&col_data.getIndices()[0],nb_rows,&row_data.getIndices()[0],&
Mat_face_Tran(0,0),ADD_VALUES
96 }
catch (
const std::exception& ex) {
98 ss <<
"throw in method: " << ex.what() << endl;
99 SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
101 PetscFunctionReturn(0);
109 map<int,RVEBC_Data>::iterator sit =
setOfRVEBC.begin();
116 PetscFunctionReturn(0);
ForcesAndSourcesCore::UserDataOperator UserDataOperator
static PetscErrorCode ierr
#define CHKERRQ_MOAB(a)
check error code of MoAB function
constexpr auto field_name
map< int, RVEBC_Data > setOfRVEBC
maps side set id with appropriate FluxData
MoFEM::Interface & mField
\biref operator to calculate the LHS for the RVE boundary conditions
MatrixDouble Mat_face_Tran
OpRVEBCsLhs(MoFEM::Interface &_mField, const string field_name, const string lagrang_field_name, Mat aij, RVEBC_Data &data)
PetscErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
MoFEM::Interface & mField
PetscErrorCode setRVEBCsRigidBodyRotOperators(string field_name, string lagrang_field_name, Mat aij, map< int, RVEBC_Data > setOfRVEBC)
BCs_RVELagrange_Trac_Rigid_Rot(MoFEM::Interface &m_field)
virtual moab::Interface & get_moab()=0
Deprecated interface functions.