v0.14.0
Public Member Functions | Public Attributes | List of all members
BCs_RVEVolume::OpVolumeCal Struct Reference

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

Inheritance diagram for BCs_RVEVolume::OpVolumeCal:
[legend]
Collaboration diagram for BCs_RVEVolume::OpVolumeCal:
[legend]

Public Member Functions

 OpVolumeCal (MoFEM::Interface &m_field, string field_name, Vec _RVE_volume_Vec, NonlinearElasticElement::BlockData &data)
 
PetscErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSurcesCore::EntData &row_data, DataForcesAndSurcesCore::EntData &col_data)
 

Public Attributes

Vec RVE_volume_Vec
 
NonlinearElasticElement::BlockDatadAta
 
MoFEM::InterfacemField
 

Detailed Description

\biref operator to calculate left hand side of heat conductivity terms \infroup mofem_thermal_elem

Definition at line 41 of file BCs_RVEVolume.hpp.

Constructor & Destructor Documentation

◆ OpVolumeCal()

BCs_RVEVolume::OpVolumeCal::OpVolumeCal ( MoFEM::Interface m_field,
string  field_name,
Vec  _RVE_volume_Vec,
NonlinearElasticElement::BlockData data 
)
inline

Definition at line 46 of file BCs_RVEVolume.hpp.

Member Function Documentation

◆ doWork()

PetscErrorCode BCs_RVEVolume::OpVolumeCal::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
DataForcesAndSurcesCore::EntData row_data,
DataForcesAndSurcesCore::EntData col_data 
)
inline

Definition at line 50 of file BCs_RVEVolume.hpp.

54  {
55  PetscFunctionBegin;
56  if(dAta.tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) == dAta.tEts.end()) {
57  PetscFunctionReturn(0);
58  }
59 
60  // cout<<"Hi from OpVolumeCal "<<endl;
61  if(row_type == MBVERTEX && col_type==MBVERTEX) {
62  // cout<<"Hi from MBVERTEX "<<endl;
63  ParallelComm* pcomm = ParallelComm::get_pcomm(&mField.get_moab(),MYPCOMM_INDEX);
64  int Indices[1]; Indices[0]=pcomm->rank();
65  double Vol_elm[1]; Vol_elm[0]=0;
66  for(unsigned int gg = 0;gg<row_data.getN().size1();gg++) {
67  if(getHoGaussPtsDetJac().size()>0) {
68  // cout<<"getHoGaussPtsDetJac()[gg] "<<getHoGaussPtsDetJac()[gg]<<endl;
69  // cout<<"High order geometry "<<endl;
70  Vol_elm[0]+=getVolume()*getGaussPts()(3,gg)*getHoGaussPtsDetJac()[gg];
71  }else{
72  // cout<<"Low order geometry "<<endl;
73  Vol_elm[0]+=getVolume()*getGaussPts()(3,gg);
74  }
75  }
76 
77  ierr = VecSetValues(RVE_volume_Vec,1,Indices,Vol_elm,ADD_VALUES); CHKERRQ(ierr);
78  // cout<<"Indices[0] "<<Indices[0] << endl;
79  // cout<<"Vol_elm[0] "<<Vol_elm[0] << endl;
80  }
81  PetscFunctionReturn(0);
82  }

Member Data Documentation

◆ dAta

NonlinearElasticElement::BlockData& BCs_RVEVolume::OpVolumeCal::dAta

Definition at line 43 of file BCs_RVEVolume.hpp.

◆ mField

MoFEM::Interface& BCs_RVEVolume::OpVolumeCal::mField

Definition at line 44 of file BCs_RVEVolume.hpp.

◆ RVE_volume_Vec

Vec BCs_RVEVolume::OpVolumeCal::RVE_volume_Vec

Definition at line 42 of file BCs_RVEVolume.hpp.


The documentation for this struct was generated from the following file:
MYPCOMM_INDEX
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:228
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROWCOL
@ OPROWCOL
operator doWork is executed on FE rows &columns
Definition: ForcesAndSourcesCore.hpp:569
MoFEM::VecSetValues
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Definition: EntitiesFieldData.hpp:1589
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
BCs_RVEVolume::OpVolumeCal::dAta
NonlinearElasticElement::BlockData & dAta
Definition: BCs_RVEVolume.hpp:43
BCs_RVEVolume::OpVolumeCal::mField
MoFEM::Interface & mField
Definition: BCs_RVEVolume.hpp:44
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
NonlinearElasticElement::BlockData::tEts
Range tEts
constrains elements in block set
Definition: HookeElement.hpp:36
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
BCs_RVEVolume::OpVolumeCal::RVE_volume_Vec
Vec RVE_volume_Vec
Definition: BCs_RVEVolume.hpp:42