v0.13.0
Classes | Public Member Functions | Public Attributes | List of all members
BCs_RVELagrange_Periodic Struct Reference

#include <users_modules/homogenisation/src/BCs_RVELagrange_Periodic.hpp>

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

Classes

struct  CommonDataPeriodic
 
struct  CommonFunctionsPeriodic
 
struct  MyPrismFE
 
struct  OpDmatRhs
 \biref operator to calculate the RHS of the constrain for the RVE boundary conditions More...
 
struct  OpRVEBCsPeriodicCalAssemCmat
 \biref operator to calculate and assemble Cmat More...
 
struct  OpRVEBCsPeriodicCalCTLam
 
struct  OpRVEBCsPeriodicCalCU
 
struct  OpRVEBCsPeriodicCalDispAtGaussPts
 
struct  OpRVEBCsPeriodicCalLagMulAtGaussPts
 
struct  OpRVEBCsPeriodicColInd
 
struct  OpRVEBCsPeriodicRhs
 
struct  OpRVEBCsPeriodicRhs_givenStrain
 
struct  OpRVEBCsPeriodicRowInd
 
struct  OpRVEHomoStress
 \biref operator to calculate the RVE homogenised stress More...
 
struct  RVEBC_Data_Periodic
 

Public Member Functions

MyPrismFEgetLoopFeRVEBCLhs ()
 
MyPrismFEgetLoopFeRVEBCRhs ()
 
MyPrismFEgetLoopFeRVEBCRhsResidual ()
 
MyPrismFEgetLoopFeRVEBCStress ()
 
 BCs_RVELagrange_Periodic (MoFEM::Interface &m_field)
 
PetscErrorCode addLagrangiangElement (const string element_name, const string field_name, const string lagrang_field_name, const string mesh_nodals_positions, Range &periodic_prisms)
 
PetscErrorCode setRVEBCsOperatorsNonlinear (string field_name, string lagrang_field_name, string mesh_nodals_positions, Mat aij, vector< Vec > &fvec, Vec f, VectorDouble given_strain)
 
PetscErrorCode setRVEBCsOperators (string field_name, string lagrang_field_name, string mesh_nodals_positions, Mat aij, vector< Vec > &f)
 
PetscErrorCode setRVEBCsHomoStressOperators (string field_name, string lagrang_field_name, string mesh_nodals_positions, Vec stress_homo)
 
- Public Member Functions inherited from BCs_RVELagrange_Disp
MyTriFEgetLoopFeRVEBCLhs ()
 
MyTriFEgetLoopFeRVEBCRhs ()
 
MyTriFEgetLoopFeRVEBCRhsResidual ()
 
MyTriFEgetLoopFeRVEBCStress ()
 
MyTriFEgetLoopFeRVEBCRhsHomoC ()
 
 BCs_RVELagrange_Disp (MoFEM::Interface &m_field)
 
PetscErrorCode addLagrangiangElement (const string element_name, const string field_name, const string lagrang_field_name, const string mesh_nodals_positions)
 
PetscErrorCode setRVEBCsOperatorsNonlinear (string field_name, string lagrang_field_name, string mesh_nodals_positions, Mat aij, vector< Vec > &fvec, Vec f, VectorDouble given_strain)
 
PetscErrorCode setRVEBCsOperators (string field_name, string lagrang_field_name, string mesh_nodals_positions, Mat aij, vector< Vec > &fvec)
 
PetscErrorCode setRVEBCsHomoStressOperators (string field_name, string lagrang_field_name, string mesh_nodals_positions, Vec Stress_Homo)
 

Public Attributes

boost::ptr_vector< MethodForForceScalingmethodsOp
 
map< int, RVEBC_Data_PeriodicsetOfRVEBCPrisms
 maps side set id with appropriate FluxData More...
 
MyPrismFE feRVEBCRhs
 
MyPrismFE feRVEBCLhs
 
MyPrismFE feRVEBCStress
 
MyPrismFE feRVEBCRhsResidual
 
CommonFunctionsPeriodic commonFunctionsPeriodic
 
CommonDataPeriodic commonDataPeriodic
 
- Public Attributes inherited from BCs_RVELagrange_Disp
boost::ptr_vector< MethodForForceScalingmethodsOp
 
MoFEM::InterfacemField
 
MyTriFE feRVEBCRhs
 
MyTriFE feRVEBCLhs
 
MyTriFE feRVEBCStress
 
MyTriFE feRVEBCRhsResidual
 
MyTriFE feRVEBCRhsHomoC
 
map< int, RVEBC_DatasetOfRVEBC
 maps side set id with appropriate FluxData More...
 
CommonFunctions common_functions
 

Detailed Description

Definition at line 19 of file BCs_RVELagrange_Periodic.hpp.

Constructor & Destructor Documentation

◆ BCs_RVELagrange_Periodic()

BCs_RVELagrange_Periodic::BCs_RVELagrange_Periodic ( MoFEM::Interface m_field)

Definition at line 44 of file BCs_RVELagrange_Periodic.hpp.

44  :
45  BCs_RVELagrange_Disp(m_field),
46  feRVEBCRhs(m_field),
47  feRVEBCLhs(m_field),
48  feRVEBCRhsResidual(m_field),
49  feRVEBCStress(m_field) {
50  }
BCs_RVELagrange_Disp(MoFEM::Interface &m_field)

Member Function Documentation

◆ addLagrangiangElement()

PetscErrorCode BCs_RVELagrange_Periodic::addLagrangiangElement ( const string  element_name,
const string  field_name,
const string  lagrang_field_name,
const string  mesh_nodals_positions,
Range &  periodic_prisms 
)

Definition at line 52 of file BCs_RVELagrange_Periodic.hpp.

58  {
59  PetscFunctionBegin;
60 
61  ierr = mField.add_finite_element(element_name,MF_ZERO); CHKERRQ(ierr);
62  //============================================================================================================
63  //C row as Lagrange_mul_disp and col as DISPLACEMENT
64  ierr = mField.modify_finite_element_add_field_row(element_name,lagrang_field_name); CHKERRQ(ierr);
65  ierr = mField.modify_finite_element_add_field_col(element_name,field_name); CHKERRQ(ierr);
66  //CT col as Lagrange_mul_disp and row as DISPLACEMENT
67  ierr = mField.modify_finite_element_add_field_col(element_name,lagrang_field_name); CHKERRQ(ierr);
68  ierr = mField.modify_finite_element_add_field_row(element_name,field_name); CHKERRQ(ierr);
69  //data
70  ierr = mField.modify_finite_element_add_field_data(element_name,lagrang_field_name); CHKERRQ(ierr);
71  ierr = mField.modify_finite_element_add_field_data(element_name,field_name); CHKERRQ(ierr);
72  //============================================================================================================
73 
74  if(mField.check_field(mesh_nodals_positions)) { //for high order geometry
75  ierr = mField.modify_finite_element_add_field_data(element_name,mesh_nodals_positions); CHKERRQ(ierr);
76  }
77 
78  //Adding Prisims to Element Lagrange_elem (to loop over these prisims)
79  setOfRVEBCPrisms[1].pRisms = periodic_prisms;
80  ierr = mField.add_ents_to_finite_element_by_type(periodic_prisms,MBPRISM,element_name); CHKERRQ(ierr);
81 
82 
83  Range tris;
84  rval = mField.get_moab().get_adjacencies(periodic_prisms,2,false,tris,moab::Interface::UNION); CHKERRQ_MOAB(rval);
85  setOfRVEBC[1].tRis = tris.subset_by_type(MBTRI);
86 
87  PetscFunctionReturn(0);
88  }
@ MF_ZERO
Definition: definitions.h:111
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:467
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string &name_row)=0
set field row which finite element use
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string &name_row)=0
set field col which finite element use
virtual bool check_field(const std::string &name) const =0
check if field is in database
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:85
map< int, RVEBC_Data > setOfRVEBC
maps side set id with appropriate FluxData
MoFEM::Interface & mField
map< int, RVEBC_Data_Periodic > setOfRVEBCPrisms
maps side set id with appropriate FluxData
virtual moab::Interface & get_moab()=0

◆ getLoopFeRVEBCLhs()

MyPrismFE& BCs_RVELagrange_Periodic::getLoopFeRVEBCLhs ( )

Definition at line 38 of file BCs_RVELagrange_Periodic.hpp.

38 { return feRVEBCLhs; }

◆ getLoopFeRVEBCRhs()

MyPrismFE& BCs_RVELagrange_Periodic::getLoopFeRVEBCRhs ( )

Definition at line 39 of file BCs_RVELagrange_Periodic.hpp.

39 { return feRVEBCRhs; }

◆ getLoopFeRVEBCRhsResidual()

MyPrismFE& BCs_RVELagrange_Periodic::getLoopFeRVEBCRhsResidual ( )

Definition at line 41 of file BCs_RVELagrange_Periodic.hpp.

41 { return feRVEBCRhsResidual; }

◆ getLoopFeRVEBCStress()

MyPrismFE& BCs_RVELagrange_Periodic::getLoopFeRVEBCStress ( )

Definition at line 42 of file BCs_RVELagrange_Periodic.hpp.

42 { return feRVEBCStress; }

◆ setRVEBCsHomoStressOperators()

PetscErrorCode BCs_RVELagrange_Periodic::setRVEBCsHomoStressOperators ( string  field_name,
string  lagrang_field_name,
string  mesh_nodals_positions,
Vec  stress_homo 
)

Definition at line 1312 of file BCs_RVELagrange_Periodic.hpp.

1317  {
1318  PetscFunctionBegin;
1319  bool ho_geometry = false;
1320  if(mField.check_field(mesh_nodals_positions)) {
1321  ho_geometry = true;
1322  }
1323  map<int,RVEBC_Data_Periodic>::iterator sit = setOfRVEBCPrisms.begin();
1324  for(;sit!=setOfRVEBCPrisms.end();sit++) {
1325  feRVEBCStress.getOpPtrVector().push_back(
1326  new OpRVEHomoStress(
1327  field_name,lagrang_field_name,stress_homo,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1328  )
1329  );
1330  }
1331  PetscFunctionReturn(0);
1332  }
CommonFunctionsPeriodic commonFunctionsPeriodic

◆ setRVEBCsOperators()

PetscErrorCode BCs_RVELagrange_Periodic::setRVEBCsOperators ( string  field_name,
string  lagrang_field_name,
string  mesh_nodals_positions,
Mat  aij,
vector< Vec > &  f 
)

Definition at line 1176 of file BCs_RVELagrange_Periodic.hpp.

1178  {
1179  PetscFunctionBegin;
1180 
1181  bool ho_geometry = false;
1182  if(mField.check_field(mesh_nodals_positions)) {
1183  ho_geometry = true;
1184  }
1185  // cout<<"Hi 1 from setRVEBCsOperators periodic "<<endl;
1186  map<int,RVEBC_Data_Periodic>::iterator sit = setOfRVEBCPrisms.begin();
1187  for(;sit!=setOfRVEBCPrisms.end();sit++) {
1188 
1189  // LHS
1190  //Col indices and Col N
1191  feRVEBCLhs.getOpPtrVector().push_back(
1192  new OpRVEBCsPeriodicColInd(
1193  field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1194  )
1195  );
1196 
1197 
1198  //Row indices and Row N
1199  feRVEBCLhs.getOpPtrVector().push_back(
1200  new OpRVEBCsPeriodicRowInd(
1201  lagrang_field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1202  )
1203  );
1204 
1205  //Calculate and assemble Cmat
1206  feRVEBCLhs.getOpPtrVector().push_back(
1207  new OpRVEBCsPeriodicCalAssemCmat(
1208  field_name,lagrang_field_name,aij,sit->second,commonFunctionsPeriodic, commonDataPeriodic,ho_geometry
1209  )
1210  );
1211 
1212 
1213 
1214  //RHS
1215  feRVEBCRhs.getOpPtrVector().push_back(
1216  new OpRVEBCsPeriodicRhs(
1217  field_name,lagrang_field_name,f,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1218  )
1219  );
1220 
1221  }
1222  PetscFunctionReturn(0);
1223  }

◆ setRVEBCsOperatorsNonlinear()

PetscErrorCode BCs_RVELagrange_Periodic::setRVEBCsOperatorsNonlinear ( string  field_name,
string  lagrang_field_name,
string  mesh_nodals_positions,
Mat  aij,
vector< Vec > &  fvec,
Vec  f,
VectorDouble  given_strain 
)

Definition at line 1091 of file BCs_RVELagrange_Periodic.hpp.

1096  {
1097  PetscFunctionBegin;
1098 
1099  bool ho_geometry = false;
1100  if(mField.check_field(mesh_nodals_positions)) {
1101  ho_geometry = true;
1102  }
1103 
1104  map<int,RVEBC_Data_Periodic>::iterator sit = setOfRVEBCPrisms.begin();
1105  for(;sit!=setOfRVEBCPrisms.end();sit++) {
1106 
1107  //Col indices and Col N
1108  feRVEBCLhs.getOpPtrVector().push_back(
1109  new OpRVEBCsPeriodicColInd(
1110  field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1111  )
1112  );
1113 
1114 
1115  //Row indices and Row N
1116  feRVEBCLhs.getOpPtrVector().push_back(
1117  new OpRVEBCsPeriodicRowInd(
1118  lagrang_field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1119  )
1120  );
1121 
1122  //Calculate and assemble Cmat
1123  feRVEBCLhs.getOpPtrVector().push_back(
1124  new OpRVEBCsPeriodicCalAssemCmat(
1125  field_name,lagrang_field_name,aij,sit->second,commonFunctionsPeriodic, commonDataPeriodic,ho_geometry
1126  )
1127  );
1128 
1129  //RHS
1130  feRVEBCRhs.getOpPtrVector().push_back(
1131  new OpRVEBCsPeriodicRhs_givenStrain(
1132  field_name,lagrang_field_name,f,given_strain, methodsOp, sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1133  )
1134  );
1135 
1136 
1137  //Calculate displacement at gauss point
1138  feRVEBCRhsResidual.getOpPtrVector().push_back(
1139  new OpRVEBCsPeriodicCalDispAtGaussPts(
1140  field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1141  )
1142  );
1143 
1144  //Calculate and assemble CU = NT * u
1145  feRVEBCRhsResidual.getOpPtrVector().push_back(
1146  new OpRVEBCsPeriodicCalCU(
1147  lagrang_field_name,sit->second,f,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1148  )
1149  );
1150 
1151 
1152  //Calculate lagrange multipliers at gauss point
1153  feRVEBCRhsResidual.getOpPtrVector().push_back(
1154  new OpRVEBCsPeriodicCalLagMulAtGaussPts(
1155  lagrang_field_name,sit->second,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1156  )
1157  );
1158 
1159  //Calculate and assemble CT Lam = NT * Lam
1160  feRVEBCRhsResidual.getOpPtrVector().push_back(
1161  new OpRVEBCsPeriodicCalCTLam(
1162  field_name,sit->second,f,commonDataPeriodic,commonFunctionsPeriodic,ho_geometry
1163  )
1164  );
1165 
1166 // cout<<"Hi 1 from setRVEBCsOperators periodic "<<endl;
1167 // string aaa;
1168 // cin>>aaa;
1169  }
1170  PetscFunctionReturn(0);
1171  }
boost::ptr_vector< MethodForForceScaling > methodsOp

Member Data Documentation

◆ commonDataPeriodic

CommonDataPeriodic BCs_RVELagrange_Periodic::commonDataPeriodic

Definition at line 155 of file BCs_RVELagrange_Periodic.hpp.

◆ commonFunctionsPeriodic

CommonFunctionsPeriodic BCs_RVELagrange_Periodic::commonFunctionsPeriodic

Definition at line 136 of file BCs_RVELagrange_Periodic.hpp.

◆ feRVEBCLhs

MyPrismFE BCs_RVELagrange_Periodic::feRVEBCLhs

Definition at line 34 of file BCs_RVELagrange_Periodic.hpp.

◆ feRVEBCRhs

MyPrismFE BCs_RVELagrange_Periodic::feRVEBCRhs

Definition at line 33 of file BCs_RVELagrange_Periodic.hpp.

◆ feRVEBCRhsResidual

MyPrismFE BCs_RVELagrange_Periodic::feRVEBCRhsResidual

Definition at line 36 of file BCs_RVELagrange_Periodic.hpp.

◆ feRVEBCStress

MyPrismFE BCs_RVELagrange_Periodic::feRVEBCStress

Definition at line 35 of file BCs_RVELagrange_Periodic.hpp.

◆ methodsOp

boost::ptr_vector<MethodForForceScaling> BCs_RVELagrange_Periodic::methodsOp

Definition at line 21 of file BCs_RVELagrange_Periodic.hpp.

◆ setOfRVEBCPrisms

map<int,RVEBC_Data_Periodic> BCs_RVELagrange_Periodic::setOfRVEBCPrisms

maps side set id with appropriate FluxData

Definition at line 26 of file BCs_RVELagrange_Periodic.hpp.


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