v0.10.0
Public Member Functions | Public Attributes | List of all members
OpFacesRot Struct Reference

Inherits UserDataOperator.

Collaboration diagram for OpFacesRot:
[legend]

Public Member Functions

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

Public Attributes

FTensor::Tensor1< double, 3 > & tCurl
 

Detailed Description

Examples
hcurl_curl_operator.cpp.

Definition at line 45 of file hcurl_curl_operator.cpp.

Constructor & Destructor Documentation

◆ OpFacesRot()

OpFacesRot::OpFacesRot ( FTensor::Tensor1< double, 3 > &  t_curl)

Definition at line 48 of file hcurl_curl_operator.cpp.

50  "HCURL", UserDataOperator::OPROW),
51  tCurl(t_curl) {}
FTensor::Tensor1< double, 3 > & tCurl
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpFacesRot::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)
Examples
hcurl_curl_operator.cpp.

Definition at line 196 of file hcurl_curl_operator.cpp.

197  {
199 
200  int nb_dofs = data.getFieldData().size();
201  if (nb_dofs == 0)
203  int nb_gauss_pts = data.getN().size1();
204 
205  auto t_curl_base = data.getFTensor1N<3>();
206  // double area = getArea();
207  double n0 = getNormal()[0] * 0.5;
208  double n1 = getNormal()[1] * 0.5;
209  double n2 = getNormal()[2] * 0.5;
210 
213 
214  for (int gg = 0; gg < nb_gauss_pts; gg++) {
215  for (int dd = 0; dd < nb_dofs; dd++) {
216  double w = getGaussPts()(2, gg);
217  if (getNormalsAtGaussPts().size1() == (unsigned int)nb_gauss_pts) {
218  n0 = getNormalsAtGaussPts(gg)[0] * 0.5;
219  n1 = getNormalsAtGaussPts(gg)[1] * 0.5;
220  n2 = getNormalsAtGaussPts(gg)[2] * 0.5;
221  }
222 
223  tCurl(0) += (n1 * t_curl_base(2) - n2 * t_curl_base(1)) * w;
224  tCurl(1) += (n2 * t_curl_base(0) - n0 * t_curl_base(2)) * w;
225  tCurl(2) += (n0 * t_curl_base(1) - n1 * t_curl_base(0)) * w;
226 
227  ++t_curl_base;
228  }
229  }
230 
232 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
FTensor::Tensor1< double, 3 > & tCurl
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
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
static Index< 'i', 3 > i
static Index< 'j', 3 > j
#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....
const VectorDouble & getFieldData() const
get dofs values
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
double w(const double g, const double t)
Definition: ContactOps.hpp:169

Member Data Documentation

◆ tCurl

FTensor::Tensor1<double, 3>& OpFacesRot::tCurl

Definition at line 47 of file hcurl_curl_operator.cpp.


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