v0.9.0
Public Member Functions | Public Attributes | List of all members
MoFEM::HelmholtzElement::OpGetGradImAtGaussPts 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::OpGetGradImAtGaussPts:
[legend]

Public Member Functions

 OpGetGradImAtGaussPts (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 217 of file HelmholtzElementObsolete.hpp.

Constructor & Destructor Documentation

◆ OpGetGradImAtGaussPts()

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

Definition at line 220 of file HelmholtzElementObsolete.hpp.

220  :
222  commonData(common_data) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

PetscErrorCode MoFEM::HelmholtzElement::OpGetGradImAtGaussPts::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 228 of file HelmholtzElementObsolete.hpp.

229  {
230  PetscFunctionBegin;
231  try {
232 
233  if(data.getIndices().size()==0) PetscFunctionReturn(0);
234  int nb_dofs = data.getFieldData().size();
235  int nb_gauss_pts = data.getN().size1();
236 
237  //initialize
238  commonData.gradImAtGaussPts.resize(nb_gauss_pts,3);
239  if(type == MBVERTEX) {
240  fill(commonData.gradImAtGaussPts.data().begin(),commonData.gradImAtGaussPts.data().end(),0);
241  }
242 
243  for(int gg = 0;gg<nb_gauss_pts;gg++) {
244  ublas::noalias(commonData.getGradImAtGaussPts(gg)) += prod( trans(data.getDiffN(gg,nb_dofs)), data.getFieldData() );
245  }
246 
247  } catch (const std::exception& ex) {
248  ostringstream ss;
249  ss << "throw in method: " << ex.what() << endl;
250  SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
251  }
252 
253  PetscFunctionReturn(0);
254  }
ublas::matrix_row< MatrixDouble > getGradImAtGaussPts(const int gg)

Member Data Documentation

◆ commonData

CommonData& MoFEM::HelmholtzElement::OpGetGradImAtGaussPts::commonData

Definition at line 219 of file HelmholtzElementObsolete.hpp.


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