v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal Struct Reference

\biref operator to calculate the RHS of the constrain for the RVE boundary conditions More...

#include "users_modules/mofem_um_homogenisation/src/BCs_RVELagrange_Trac.hpp"

Inheritance diagram for BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal:
[legend]
Collaboration diagram for BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal:
[legend]

Public Member Functions

 OpRVEBCsRhs_Cal (const string field_name, RVEBC_Data &data, CommonData &common_data, CommonFunctions &common_functions, bool ho_geometry=false)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 

Public Attributes

RVEBC_DatadAta
 
bool hoGeometry
 
CommonDatacommonData
 
CommonFunctionscommonFunctions
 
MatrixDouble X_mat
 
MatrixDouble N_mat
 
MatrixDouble NTX
 
MatrixDouble H_mat
 

Detailed Description

\biref operator to calculate the RHS of the constrain for the RVE boundary conditions

Definition at line 257 of file BCs_RVELagrange_Trac.hpp.

Constructor & Destructor Documentation

◆ OpRVEBCsRhs_Cal()

BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::OpRVEBCsRhs_Cal ( const string  field_name,
RVEBC_Data data,
CommonData common_data,
CommonFunctions common_functions,
bool  ho_geometry = false 
)
inline

Definition at line 264 of file BCs_RVELagrange_Trac.hpp.

266 :
267 FaceElementForcesAndSourcesCore::UserDataOperator(field_name, UserDataOperator::OPCOL),
268 dAta(data),
269 hoGeometry(ho_geometry),
270 commonData(common_data),
272 }
constexpr auto field_name
@ OPCOL
operator doWork function is executed on FE columns

Member Function Documentation

◆ doWork()

PetscErrorCode BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::doWork ( int  side,
EntityType  type,
DataForcesAndSurcesCore::EntData &  data 
)
inline

Definition at line 276 of file BCs_RVELagrange_Trac.hpp.

276 {
277 PetscFunctionBegin;
278
279 if(type!=MBVERTEX) PetscFunctionReturn(0);
280 if(data.getIndices().size()==0) PetscFunctionReturn(0);
281
282
283 const FENumeredDofEntity *dof_ptr;
284 ierr = getNumeredEntFiniteElementPtr()->getColDofsByPetscGlobalDofIdx(data.getIndices()[0],&dof_ptr); CHKERRQ(ierr);
285 int rank = dof_ptr->getNbOfCoeffs();
286
287 double x,y,z;
288 for(unsigned int gg = 0;gg<data.getN().size1();gg++) {
289 double area;
290 if(hoGeometry) {
291 area = norm_2(getNormalsAtGaussPt(gg))*0.5;
292 } else {
293 area = getArea();
294 }
295 double val = getGaussPts()(2,gg)*area;
296
297 x = getHoCoordsAtGaussPts()(gg,0);
298 y = getHoCoordsAtGaussPts()(gg,1);
299 z = getHoCoordsAtGaussPts()(gg,2);
300
301 switch(rank) {
302 case 3: //mech problem
303 X_mat.resize(rank,6,false);
304 X_mat.clear();
305 X_mat(0,0) = 2.0*x; X_mat(0,3) = y; X_mat(0,5) = z;
306 X_mat(1,1) = 2.0*y; X_mat(1,3) = x; X_mat(1,4) = z;
307 X_mat(2,2) = 2.0*z; X_mat(2,4) = y; X_mat(2,5) = x;
308 X_mat=0.5*X_mat;
309 break;
310 case 1: //moisture transport or thermal problem
311 X_mat.resize(rank,3,false);
312 X_mat.clear();
313 X_mat(0,0) = x;
314 X_mat(0,1) = y;
315 X_mat(0,2) = z;
316 break;
317 default:
318 SETERRQ(PETSC_COMM_SELF,MOFEM_NOT_IMPLEMENTED,"not implemented");
319 }
320 ierr = commonFunctions.shapeMat(rank, gg, data, N_mat); CHKERRQ(ierr);
321 ierr = commonFunctions.hMat(getNormalsAtGaussPt(gg), rank, N_mat, H_mat); CHKERRQ(ierr);
322
323 if(gg==0) {
324 NTX = val*prod(trans(N_mat),X_mat);
325 commonData.D_mat = prod(H_mat, NTX);
326 } else {
327 noalias(NTX) = val*prod(trans(N_mat),X_mat);
328 commonData.D_mat += prod(H_mat, NTX);
329 }
330 }
331
332 PetscFunctionReturn(0);
333 }
static PetscErrorCode ierr
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
PetscErrorCode shapeMat(int rank, unsigned int gg, DataForcesAndSurcesCore::EntData &col_data, MatrixDouble &n)
PetscErrorCode hMat(VectorDouble face_normal, int rank, MatrixDouble &n_mat, MatrixDouble &h_mat)

Member Data Documentation

◆ commonData

CommonData& BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::commonData

Definition at line 261 of file BCs_RVELagrange_Trac.hpp.

◆ commonFunctions

CommonFunctions& BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::commonFunctions

Definition at line 262 of file BCs_RVELagrange_Trac.hpp.

◆ dAta

RVEBC_Data& BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::dAta

Definition at line 259 of file BCs_RVELagrange_Trac.hpp.

◆ H_mat

MatrixDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::H_mat

Definition at line 274 of file BCs_RVELagrange_Trac.hpp.

◆ hoGeometry

bool BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::hoGeometry

Definition at line 260 of file BCs_RVELagrange_Trac.hpp.

◆ N_mat

MatrixDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::N_mat

Definition at line 274 of file BCs_RVELagrange_Trac.hpp.

◆ NTX

MatrixDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::NTX

Definition at line 274 of file BCs_RVELagrange_Trac.hpp.

◆ X_mat

MatrixDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Cal::X_mat

Definition at line 274 of file BCs_RVELagrange_Trac.hpp.


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