v0.9.0
Public Member Functions | Public Attributes | List of all members
AnalyticalDirichletHelmholtzBC::ApproxField::OpHoCoord Struct Reference

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

Inherits UserDataOperator.

Public Member Functions

 OpHoCoord (const string field_name, MatrixDouble &ho_coords)
 
PetscErrorCode doWork (int side, EntityType type, DataForcesAndSurcesCore::EntData &data)
 

Public Attributes

MatrixDoublehoCoords
 

Detailed Description

Definition at line 52 of file AnalyticalDirichletHelmholtz.hpp.

Constructor & Destructor Documentation

◆ OpHoCoord()

AnalyticalDirichletHelmholtzBC::ApproxField::OpHoCoord::OpHoCoord ( const string  field_name,
MatrixDouble ho_coords 
)

Definition at line 30 of file AnalyticalDirichletHelmholtz.cpp.

30  :
31 FaceElementForcesAndSourcesCore::UserDataOperator(field_name,ForcesAndSurcesCore::UserDataOperator::OPROW),
32 hoCoords(ho_coords) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

PetscErrorCode AnalyticalDirichletHelmholtzBC::ApproxField::OpHoCoord::doWork ( int  side,
EntityType  type,
DataForcesAndSurcesCore::EntData data 
)

Definition at line 34 of file AnalyticalDirichletHelmholtz.cpp.

36  {
37  PetscFunctionBegin;
38 
39  try {
40 
41  if(data.getFieldData().size()==0) PetscFunctionReturn(0);
42 
43  hoCoords.resize(data.getN().size1(),3);
44  if(type == MBVERTEX) {
45  hoCoords.clear();
46  }
47 
48  int nb_dofs = data.getFieldData().size();
49  for(unsigned int gg = 0;gg<data.getN().size1();gg++) {
50  for(int dd = 0;dd<3;dd++) {
51  hoCoords(gg,dd) += cblas_ddot(nb_dofs/3,&data.getN(gg)[0],1,&data.getFieldData()[dd],3);
52  }
53  }
54 
55  } catch (const std::exception& ex) {
56  ostringstream ss;
57  ss << "throw in method: " << ex.what() << endl;
58  SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
59  }
60 
61  PetscFunctionReturn(0);
62 }
double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
Definition: cblas_ddot.c:12
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33

Member Data Documentation

◆ hoCoords

MatrixDouble& AnalyticalDirichletHelmholtzBC::ApproxField::OpHoCoord::hoCoords

Definition at line 54 of file AnalyticalDirichletHelmholtz.hpp.


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