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

#include <users_modules/helmholtz/src/AnalyticalDirihlet_obsolete.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

MatrixDouble & hoCoords
 

Detailed Description

Definition at line 52 of file AnalyticalDirihlet_obsolete.hpp.

Constructor & Destructor Documentation

◆ OpHoCoord()

AnalyticalDirihletBC::ApproxField::OpHoCoord::OpHoCoord ( const string  field_name,
MatrixDouble &  ho_coords 
)

Definition at line 55 of file AnalyticalDirihlet_obsolete.hpp.

55  :
57  hoCoords(ho_coords) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

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

Definition at line 59 of file AnalyticalDirihlet_obsolete.hpp.

60  {
61  PetscFunctionBegin;
62 
63  try {
64 
65  if(data.getFieldData().size()==0) PetscFunctionReturn(0);
66 
67  hoCoords.resize(data.getN().size1(),3);
68  if(type == MBVERTEX) {
69  hoCoords.clear();
70  }
71 
72  int nb_dofs = data.getFieldData().size();
73  for(unsigned int gg = 0;gg<data.getN().size1();gg++) {
74  for(int dd = 0;dd<3;dd++) {
75  hoCoords(gg,dd) += cblas_ddot(nb_dofs/3,&data.getN(gg)[0],1,&data.getFieldData()[dd],3);
76  }
77  }
78 
79  } catch (const std::exception& ex) {
80  ostringstream ss;
81  ss << "throw in method: " << ex.what() << endl;
82  SETERRQ(PETSC_COMM_SELF,1,ss.str().c_str());
83  }
84 
85  PetscFunctionReturn(0);
86  }
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& AnalyticalDirihletBC::ApproxField::OpHoCoord::hoCoords

Definition at line 54 of file AnalyticalDirihlet_obsolete.hpp.


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