v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
OpFacesFluxes Struct Reference
Inheritance diagram for OpFacesFluxes:
[legend]
Collaboration diagram for OpFacesFluxes:
[legend]

Public Member Functions

 OpFacesFluxes (double &div)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Public Attributes

doubledIv
 

Detailed Description

Examples
mofem/atom_tests/hdiv_divergence_operator.cpp.

Definition at line 31 of file hdiv_divergence_operator.cpp.

Constructor & Destructor Documentation

◆ OpFacesFluxes()

OpFacesFluxes::OpFacesFluxes ( double div)
inline

Definition at line 35 of file hdiv_divergence_operator.cpp.

36 : FaceElementForcesAndSourcesCore::UserDataOperator(
38 dIv(div) {}
@ OPROW
operator doWork function is executed on FE rows

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpFacesFluxes::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
Examples
mofem/atom_tests/hdiv_divergence_operator.cpp.

Definition at line 200 of file hdiv_divergence_operator.cpp.

201 {
203
204 if (CN::Dimension(type) != 2)
206
207 int nb_gauss_pts = data.getN().size1();
208 int nb_dofs = data.getFieldData().size();
209
210 for (int gg = 0; gg < nb_gauss_pts; gg++) {
211 for (int dd = 0; dd < nb_dofs; dd++) {
212
213 double w = getGaussPts()(2, gg);
214 const double n0 = getNormalsAtGaussPts(gg)[0];
215 const double n1 = getNormalsAtGaussPts(gg)[1];
216 const double n2 = getNormalsAtGaussPts(gg)[2];
217 if (getFEType() == MBTRI) {
218 w *= 0.5;
219 }
220
221 dIv += (n0 * data.getVectorN<3>(gg)(dd, 0) +
222 n1 * data.getVectorN<3>(gg)(dd, 1) +
223 n2 * data.getVectorN<3>(gg)(dd, 2)) *
224 w;
225 }
226 }
227
229}
std::string type
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
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
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
Get DOF values on entity.
const MatrixAdaptor getVectorN(const FieldApproximationBase base, const int gg)
get Hdiv of base functions at Gauss pts

Member Data Documentation

◆ dIv

double& OpFacesFluxes::dIv

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