v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble 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_Assemble:
[legend]
Collaboration diagram for BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble:
[legend]

Public Member Functions

 OpRVEBCsRhs_Assemble (const string lagrang_field_name, vector< Vec > &f, RVEBC_Data &data, CommonData &common_data)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 

Public Attributes

RVEBC_DatadAta
 
CommonDatacommonData
 
vector< Vec > & F
 
VectorDouble applied_strain
 
VectorDouble f
 

Detailed Description

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

Definition at line 337 of file BCs_RVELagrange_Trac.hpp.

Constructor & Destructor Documentation

◆ OpRVEBCsRhs_Assemble()

BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::OpRVEBCsRhs_Assemble ( const string  lagrang_field_name,
vector< Vec > &  f,
RVEBC_Data data,
CommonData common_data 
)
inline

Definition at line 343 of file BCs_RVELagrange_Trac.hpp.

343 :
344 FaceElementForcesAndSourcesCore::UserDataOperator(lagrang_field_name,UserDataOperator::OPROW),
345 dAta(data),commonData(common_data),F(f) {
346 }
@ OPROW
operator doWork function is executed on FE rows

Member Function Documentation

◆ doWork()

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

Definition at line 351 of file BCs_RVELagrange_Trac.hpp.

351 {
352 PetscFunctionBegin;
353
354 if(data.getIndices().size()==0) PetscFunctionReturn(0);
355
357 applied_strain.resize(D_mat.size2(),false);
358
359 for(int ii = 0;ii<F.size();ii++) {
360 applied_strain.clear();
361 applied_strain(ii) = 1.0;
362 f.resize(D_mat.size1(),false);
363 noalias(f) = prod(D_mat,applied_strain);
364 ierr = VecSetValues(F[ii],data.getIndices().size(),&data.getIndices()[0],&f[0],ADD_VALUES); CHKERRQ(ierr);
365 }
366
367 PetscFunctionReturn(0);
368 }
static PetscErrorCode ierr
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.

Member Data Documentation

◆ applied_strain

VectorDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::applied_strain

Definition at line 349 of file BCs_RVELagrange_Trac.hpp.

◆ commonData

CommonData& BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::commonData

Definition at line 340 of file BCs_RVELagrange_Trac.hpp.

◆ dAta

RVEBC_Data& BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::dAta

Definition at line 339 of file BCs_RVELagrange_Trac.hpp.

◆ F

vector<Vec>& BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::F

Definition at line 341 of file BCs_RVELagrange_Trac.hpp.

◆ f

VectorDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::f

Definition at line 349 of file BCs_RVELagrange_Trac.hpp.


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