v0.10.0
Public Member Functions | Public Attributes | List of all members
OpFlux Struct Reference
Inheritance diagram for OpFlux:
[legend]
Collaboration diagram for OpFlux:
[legend]

Public Member Functions

 OpFlux (double &flux)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Public Attributes

doublefLux
 
FTensor::Index< 'i', 3 > i
 

Detailed Description

Examples
hcurl_divergence_operator_2d.cpp.

Definition at line 65 of file hcurl_divergence_operator_2d.cpp.

Constructor & Destructor Documentation

◆ OpFlux()

OpFlux::OpFlux ( double flux)

Definition at line 68 of file hcurl_divergence_operator_2d.cpp.

68 : EdgeEleOp("FIELD1", OPROW), fLux(flux) {}
EdgeEle::UserDataOperator EdgeEleOp

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpFlux::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)

Definition at line 72 of file hcurl_divergence_operator_2d.cpp.

73  {
75  const int nb_dofs = data.getIndices().size();
76  if (nb_dofs == 0)
78  const int nb_gauss_pts = data.getN().size1();
79  FTensor::Tensor1<double, 3> t_normal(-getDirection()[1], getDirection()[0],
80  0.);
81 
82  auto t_base_fun = data.getFTensor1N<3>();
84  for (int gg = 0; gg != nb_gauss_pts; gg++) {
85  const double val = getGaussPts()(1, gg);
86  for (int bb = 0; bb != nb_dofs; bb++) {
87  fLux += val * t_normal(i) * t_base_fun(i);
88  ++t_base_fun;
89  }
90  }
91 
93  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
FTensor::Index< 'i', 3 > i
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
const VectorInt & getIndices() const
Get global indices of dofs on entity.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.

Member Data Documentation

◆ fLux

double& OpFlux::fLux

Definition at line 67 of file hcurl_divergence_operator_2d.cpp.

◆ i

FTensor::Index<'i', 3> OpFlux::i

Definition at line 70 of file hcurl_divergence_operator_2d.cpp.


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