v0.14.0
Public Member Functions | Public Attributes | List of all members
BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble Struct Reference

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

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

Public Member Functions

 OpRVEHomoStress_Assemble (const string lagrang_field_name, Vec stress_homo, RVEBC_Data &data, CommonData &common_data)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Public Attributes

RVEBC_DatadAta
 
CommonDatacommonData
 
Vec stressHomo
 
VectorDouble stressVector
 

Detailed Description

Definition at line 408 of file BCs_RVELagrange_Trac.hpp.

Constructor & Destructor Documentation

◆ OpRVEHomoStress_Assemble()

BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::OpRVEHomoStress_Assemble ( const string  lagrang_field_name,
Vec  stress_homo,
RVEBC_Data data,
CommonData common_data 
)
inline

Definition at line 414 of file BCs_RVELagrange_Trac.hpp.

416  :
418  dAta(data),commonData(common_data),stressHomo(stress_homo) {
419  }

Member Function Documentation

◆ doWork()

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

Definition at line 424 of file BCs_RVELagrange_Trac.hpp.

424  {
425  PetscFunctionBegin;
426  if(data.getIndices().size()==0) PetscFunctionReturn(0);
427  if(dAta.tRis.find(getNumeredEntFiniteElementPtr()->getEnt())==dAta.tRis.end()) PetscFunctionReturn(0);
428  stressVector.resize(commonData.D_mat.size2());
429  //Lamda=data.getFieldData() is reaction force (so multiply for -1 to get the force)
430  noalias(stressVector) = prod(trans(commonData.D_mat),-data.getFieldData());
431  const int indices_6[6] = {0, 1, 2, 3, 4, 5};
432  const int indices_3[3] = {0, 1, 2};
433  switch(stressVector.size()) {
434  case 6:
435  ierr = VecSetValues(stressHomo,6,indices_6,&stressVector[0],ADD_VALUES); CHKERRQ(ierr);
436  break;
437  case 3:
438  ierr = VecSetValues(stressHomo,3,indices_3,&stressVector[0],ADD_VALUES); CHKERRQ(ierr);
439  break;
440  default:
441  SETERRQ(PETSC_COMM_SELF,MOFEM_NOT_IMPLEMENTED,"not implemented");
442  }
443  PetscFunctionReturn(0);
444  }

Member Data Documentation

◆ commonData

CommonData& BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::commonData

Definition at line 411 of file BCs_RVELagrange_Trac.hpp.

◆ dAta

RVEBC_Data& BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::dAta

Definition at line 410 of file BCs_RVELagrange_Trac.hpp.

◆ stressHomo

Vec BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::stressHomo

Definition at line 412 of file BCs_RVELagrange_Trac.hpp.

◆ stressVector

VectorDouble BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::stressVector

Definition at line 422 of file BCs_RVELagrange_Trac.hpp.


The documentation for this struct was generated from the following file:
BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::dAta
RVEBC_Data & dAta
Definition: BCs_RVELagrange_Trac.hpp:410
BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::commonData
CommonData & commonData
Definition: BCs_RVELagrange_Trac.hpp:411
BCs_RVELagrange_Trac::OpRVEHomoStress_Assemble::stressVector
VectorDouble stressVector
Definition: BCs_RVELagrange_Trac.hpp:422
BCs_RVELagrange_Disp::RVEBC_Data::tRis
Range tRis
Definition: BCs_RVELagrange_Disp.hpp:54
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::OpRVEHomoStress_Assemble::stressHomo
Vec stressHomo
Definition: BCs_RVELagrange_Trac.hpp:412
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
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