v0.13.2
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/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, DataForcesAndSourcesCore::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, DataForcesAndSourcesCore::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 365 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 369 of file BCs_RVELagrange_Disp.hpp.

372 :
373 OpDmatRhs(field_name,lagrang_field_name,data,ho_geometry),F(f) {
374 }
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,
DataForcesAndSourcesCore::EntData &  data 
)
inline

Definition at line 376 of file BCs_RVELagrange_Disp.hpp.

376 {
377 PetscFunctionBegin;
378
379 nb_row_dofs = data.getIndices().size();
380
381 if(nb_row_dofs ==0) PetscFunctionReturn(0);
382 if(dAta.tRis.find(getNumeredEntFiniteElementPtr()->getEnt())==dAta.tRis.end()) PetscFunctionReturn(0);
383
384 auto weak_ptr_dof =
385 getNumeredEntFiniteElementPtr()->getRowDofsByPetscGlobalDofIdx(
386 data.getIndices()[0]);
387 const FENumeredDofEntity *dof_ptr;
388 if (auto ptr = weak_ptr_dof.lock())
389 dof_ptr = ptr.get();
390 else
391 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Dof not found");
392
393 rank = dof_ptr->getNbOfCoeffs();
394 nb_row_dofs /= rank;
395
396 ierr = calculateDmat(side,type,data); CHKERRQ(ierr);
397
398 applied_strain.resize(D_mat.size2(),false);
399 f.resize(D_mat.size1(),false);
400
401 int size = (rank == 3) ? 6 : 3;
402 for(int ii = 0;ii<size;ii++) {
403 applied_strain.clear();
404 applied_strain[ii] = 1.0;
405 noalias(f) = prod(D_mat, applied_strain);
407 F[ii],data.getIndices().size(),&data.getIndices()[0],&f[0],ADD_VALUES
408 ); CHKERRQ(ierr);
409 }
410
411 PetscFunctionReturn(0);
412
413 }
static PetscErrorCode ierr
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
PetscErrorCode calculateDmat(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)

Member Data Documentation

◆ F

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

Definition at line 367 of file BCs_RVELagrange_Disp.hpp.


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