v0.14.0
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/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, DataForcesAndSourcesCore::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 349 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 355 of file BCs_RVELagrange_Trac.hpp.

355  :
357  dAta(data),commonData(common_data),F(f) {
358  }

Member Function Documentation

◆ doWork()

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

Definition at line 363 of file BCs_RVELagrange_Trac.hpp.

363  {
364  PetscFunctionBegin;
365 
366  if(data.getIndices().size()==0) PetscFunctionReturn(0);
367 
369  applied_strain.resize(D_mat.size2(),false);
370 
371  for(int ii = 0;ii<F.size();ii++) {
372  applied_strain.clear();
373  applied_strain(ii) = 1.0;
374  f.resize(D_mat.size1(),false);
375  noalias(f) = prod(D_mat,applied_strain);
376  ierr = VecSetValues(F[ii],data.getIndices().size(),&data.getIndices()[0],&f[0],ADD_VALUES); CHKERRQ(ierr);
377  }
378 
379  PetscFunctionReturn(0);
380  }

Member Data Documentation

◆ applied_strain

VectorDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::applied_strain

Definition at line 361 of file BCs_RVELagrange_Trac.hpp.

◆ commonData

CommonData& BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::commonData

Definition at line 352 of file BCs_RVELagrange_Trac.hpp.

◆ dAta

RVEBC_Data& BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::dAta

Definition at line 351 of file BCs_RVELagrange_Trac.hpp.

◆ F

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

Definition at line 353 of file BCs_RVELagrange_Trac.hpp.

◆ f

VectorDouble BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::f

Definition at line 361 of file BCs_RVELagrange_Trac.hpp.


The documentation for this struct was generated from the following file:
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::VecSetValues
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Definition: EntitiesFieldData.hpp:1589
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::dAta
RVEBC_Data & dAta
Definition: BCs_RVELagrange_Trac.hpp:351
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::applied_strain
VectorDouble applied_strain
Definition: BCs_RVELagrange_Trac.hpp:361
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::F
vector< Vec > & F
Definition: BCs_RVELagrange_Trac.hpp:353
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::f
VectorDouble f
Definition: BCs_RVELagrange_Trac.hpp:361
BCs_RVELagrange_Trac::OpRVEBCsRhs_Assemble::commonData
CommonData & commonData
Definition: BCs_RVELagrange_Trac.hpp:352
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
BCs_RVELagrange_Trac::CommonData::D_mat
MatrixDouble D_mat
Definition: BCs_RVELagrange_Trac.hpp:27
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567