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

\biref operator to calculate the RHS for the calculation of the homgoensied stiffness matrix More...

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

Inheritance diagram for BCs_RVELagrange_Disp::OpRVEBCsRhsHomoC:
[legend]
Collaboration diagram for BCs_RVELagrange_Disp::OpRVEBCsRhsHomoC:
[legend]

Public Member Functions

 OpRVEBCsRhsHomoC (const string field_name, const string lagrang_field_name, vector< Vec > &f, RVEBC_Data &data, bool ho_geometry=false)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 
- Public Member Functions inherited from BCs_RVELagrange_Disp::OpDmatRhs
 OpDmatRhs (const string field_name, const string lagrang_field_name, RVEBC_Data &data, bool ho_geometry=false)
 
PetscErrorCode calculateDmat (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 

Public Attributes

vector< Vec > & F
 
- Public Attributes inherited from BCs_RVELagrange_Disp::OpDmatRhs
RVEBC_DatadAta
 
bool hoGeometry
 
VectorDouble f
 
VectorDouble applied_strain
 
MatrixDouble X_mat
 
MatrixDouble N_mat
 
MatrixDouble D_mat
 
int rank
 
int nb_row_dofs
 

Detailed Description

\biref operator to calculate the RHS for the calculation of the homgoensied stiffness matrix

Definition at line 353 of file BCs_RVELagrange_Disp.hpp.

Constructor & Destructor Documentation

◆ OpRVEBCsRhsHomoC()

BCs_RVELagrange_Disp::OpRVEBCsRhsHomoC::OpRVEBCsRhsHomoC ( const string  field_name,
const string  lagrang_field_name,
vector< Vec > &  f,
RVEBC_Data data,
bool  ho_geometry = false 
)
inline

Definition at line 357 of file BCs_RVELagrange_Disp.hpp.

360 :
361 OpDmatRhs(field_name,lagrang_field_name,data,ho_geometry),F(f) {
362 }
constexpr auto field_name
OpDmatRhs(const string field_name, const string lagrang_field_name, RVEBC_Data &data, bool ho_geometry=false)

Member Function Documentation

◆ doWork()

PetscErrorCode BCs_RVELagrange_Disp::OpRVEBCsRhsHomoC::doWork ( int  side,
EntityType  type,
DataForcesAndSurcesCore::EntData &  data 
)
inline

Definition at line 364 of file BCs_RVELagrange_Disp.hpp.

364 {
365 PetscFunctionBegin;
366
367 nb_row_dofs = data.getIndices().size();
368
369 if(nb_row_dofs ==0) PetscFunctionReturn(0);
370 if(dAta.tRis.find(getNumeredEntFiniteElementPtr()->getEnt())==dAta.tRis.end()) PetscFunctionReturn(0);
371
372
373 const FENumeredDofEntity *dof_ptr;
374 ierr = getNumeredEntFiniteElementPtr()->getRowDofsByPetscGlobalDofIdx(data.getIndices()[0],&dof_ptr); CHKERRQ(ierr);
375 rank = dof_ptr->getNbOfCoeffs();
376 nb_row_dofs /= rank;
377
378 ierr = calculateDmat(side,type,data); CHKERRQ(ierr);
379
380 applied_strain.resize(D_mat.size2(),false);
381 f.resize(D_mat.size1(),false);
382
383 int size = (rank == 3) ? 6 : 3;
384 for(int ii = 0;ii<size;ii++) {
385 applied_strain.clear();
386 applied_strain[ii] = 1.0;
387 noalias(f) = prod(D_mat, applied_strain);
389 F[ii],data.getIndices().size(),&data.getIndices()[0],&f[0],ADD_VALUES
390 ); CHKERRQ(ierr);
391 }
392
393 PetscFunctionReturn(0);
394
395 }
static PetscErrorCode ierr
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
PetscErrorCode calculateDmat(int side, EntityType type, DataForcesAndSurcesCore::EntData &data)

Member Data Documentation

◆ F

vector<Vec>& BCs_RVELagrange_Disp::OpRVEBCsRhsHomoC::F

Definition at line 355 of file BCs_RVELagrange_Disp.hpp.


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