v0.9.0
Public Member Functions | Public Attributes | List of all members
MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP > Struct Template Reference

opearator to caulate pressure and rate of pressure at Gauss points \infroup mofem_helmholtz_elem More...

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

Inherits UserDataOperator.

Public Member Functions

 OpGetFieldAtGaussPts (const string field_name, VectorDouble &field_at_gauss_pts)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 operator calculating pressure and rate of pressure More...
 

Public Attributes

VectorDoublefieldAtGaussPts
 

Detailed Description

template<typename OP>
struct MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP >

opearator to caulate pressure and rate of pressure at Gauss points \infroup mofem_helmholtz_elem

Definition at line 262 of file HelmholtzElementObsolete.hpp.

Constructor & Destructor Documentation

◆ OpGetFieldAtGaussPts()

template<typename OP>
MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP >::OpGetFieldAtGaussPts ( const string  field_name,
VectorDouble field_at_gauss_pts 
)

Definition at line 265 of file HelmholtzElementObsolete.hpp.

265  :
266  OP::UserDataOperator(field_name),
267  fieldAtGaussPts(field_at_gauss_pts) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

template<typename OP>
PetscErrorCode MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP >::doWork ( int  side,
EntityType  type,
DataForcesAndSurcesCore::EntData data 
)

operator calculating pressure and rate of pressure

pressure pressure or rate of pressure is calculated multiplyingshape functions by degrees of freedom

Definition at line 272 of file HelmholtzElementObsolete.hpp.

273  {
274  PetscFunctionBegin;
275  try {
276 
277  if(data.getFieldData().size()==0) PetscFunctionReturn(0);
278  int nb_dofs = data.getFieldData().size();
279  int nb_gauss_pts = data.getN().size1();
280 
281  //initialize
282  fieldAtGaussPts.resize(nb_gauss_pts);
283  if(type == MBVERTEX) {
284  //loop over shape functions on entities allways start from
285  //vertices, so if nodal shape functions are processed, vector of
286  //field values is zeroad at initialization
287  fill(fieldAtGaussPts.begin(),fieldAtGaussPts.end(),0);
288  }
289 
290  for(int gg = 0;gg<nb_gauss_pts;gg++) {
291  fieldAtGaussPts[gg] += inner_prod(data.getN(gg,nb_dofs),data.getFieldData());
292 
293  }
294 
295  } catch (const std::exception& ex) {
296  ostringstream ss;
297  ss << "throw in method: " << ex.what() << endl;
298  SETERRQ(PETSC_COMM_SELF,MOFEM_STD_EXCEPTION_THROW,ss.str().c_str());
299  }
300 
301  PetscFunctionReturn(0);
302  }

Member Data Documentation

◆ fieldAtGaussPts

template<typename OP>
VectorDouble& MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP >::fieldAtGaussPts

Definition at line 264 of file HelmholtzElementObsolete.hpp.


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