v0.9.0
Public Member Functions | Public Attributes | List of all members
MoFEM::HelmholtzElement::OpGetGradReAtGaussPts Struct Reference

operator to calculate pressure gradient at Gauss points More...

#include <users_modules/helmholtz/src/HelmholtzElementObsolete.hpp>

Inherits UserDataOperator.

Collaboration diagram for MoFEM::HelmholtzElement::OpGetGradReAtGaussPts:
[legend]

Public Member Functions

 OpGetGradReAtGaussPts (const string field_name, CommonData &common_data)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 operator calculating pressure gradients More...
 

Public Attributes

CommonDatacommonData
 

Detailed Description

operator to calculate pressure gradient at Gauss points

Definition at line 175 of file HelmholtzElementObsolete.hpp.

Constructor & Destructor Documentation

◆ OpGetGradReAtGaussPts()

MoFEM::HelmholtzElement::OpGetGradReAtGaussPts::OpGetGradReAtGaussPts ( const string  field_name,
CommonData common_data 
)

Definition at line 178 of file HelmholtzElementObsolete.hpp.

178  :
180  commonData(common_data) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

PetscErrorCode MoFEM::HelmholtzElement::OpGetGradReAtGaussPts::doWork ( int  side,
EntityType  type,
DataForcesAndSurcesCore::EntData data 
)

operator calculating pressure gradients

pressure gradient is calculated multiplying derivatives of shape functions by degrees of freedom.

Definition at line 186 of file HelmholtzElementObsolete.hpp.

187  {
188  PetscFunctionBegin;
189  try {
190 
191  if(data.getIndices().size()==0) PetscFunctionReturn(0);
192  int nb_dofs = data.getFieldData().size();
193  int nb_gauss_pts = data.getN().size1();
194 
195  //initialize
196  commonData.gradReAtGaussPts.resize(nb_gauss_pts,3);
197  if(type == MBVERTEX) {
198  fill(commonData.gradReAtGaussPts.data().begin(),commonData.gradReAtGaussPts.data().end(),0);
199  }
200 
201  for(int gg = 0;gg<nb_gauss_pts;gg++) {
202  ublas::noalias(commonData.getGradReAtGaussPts(gg)) += prod( trans(data.getDiffN(gg,nb_dofs)), data.getFieldData() );
203  }
204 
205  } catch (const std::exception& ex) {
206  ostringstream ss;
207  ss << "throw in method: " << ex.what() << endl;
208  SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
209  }
210 
211  PetscFunctionReturn(0);
212  }
ublas::matrix_row< MatrixDouble > getGradReAtGaussPts(const int gg)

Member Data Documentation

◆ commonData

CommonData& MoFEM::HelmholtzElement::OpGetGradReAtGaussPts::commonData

Definition at line 177 of file HelmholtzElementObsolete.hpp.


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