v0.15.0
Loading...
Searching...
No Matches
OpVolCurl Struct Reference
Inheritance diagram for OpVolCurl:
[legend]
Collaboration diagram for OpVolCurl:
[legend]

Public Member Functions

 OpVolCurl (FTensor::Tensor1< double, 3 > &t_curl)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Public Attributes

FTensor::Tensor1< double, 3 > & tCurl
 

Detailed Description

Examples
hcurl_curl_operator.cpp.

Definition at line 21 of file hcurl_curl_operator.cpp.

Constructor & Destructor Documentation

◆ OpVolCurl()

OpVolCurl::OpVolCurl ( FTensor::Tensor1< double, 3 > & t_curl)
inline
Examples
hcurl_curl_operator.cpp.

Definition at line 24 of file hcurl_curl_operator.cpp.

25 : VolumeElementForcesAndSourcesCore::UserDataOperator(
26 "HCURL", UserDataOperator::OPROW),
27 tCurl(t_curl) {}
FTensor::Tensor1< double, 3 > & tCurl

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpVolCurl::doWork ( int side,
EntityType type,
EntitiesFieldData::EntData & data )
Examples
hcurl_curl_operator.cpp.

Definition at line 189 of file hcurl_curl_operator.cpp.

190 {
192
193 if (data.getFieldData().size() == 0)
195
196 const unsigned int nb_gauss_pts = data.getDiffN().size1();
197 const unsigned int nb_dofs = data.getFieldData().size();
198
199 MatrixDouble curl_mat;
200 FTensor::Index<'i', 3> i;
201 FTensor::Index<'j', 3> j;
202 FTensor::Index<'k', 3> k;
203
204 auto t_curl_base = data.getFTensor2DiffN<3, 3>();
205
206 unsigned int gg = 0;
207 for (; gg < nb_gauss_pts; gg++) {
208 double w = getGaussPts()(3, gg) * getVolume();
210 for (unsigned int dd = 0; dd != nb_dofs; dd++) {
211 t_curl(i) = levi_civita(j, i, k) * t_curl_base(j, k);
212 tCurl(i) += w * t_curl(i);
213 ++t_curl_base;
214 }
215 }
216
218}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
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
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN(FieldApproximationBase base)
Get derivatives of base functions for Hdiv space.
MatrixDouble & getDiffN(const FieldApproximationBase base)
get derivatives of base functions
const VectorDouble & getFieldData() const
get dofs values

Member Data Documentation

◆ tCurl

FTensor::Tensor1<double, 3>& OpVolCurl::tCurl
Examples
hcurl_curl_operator.cpp.

Definition at line 23 of file hcurl_curl_operator.cpp.


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