v0.8.4
Public Member Functions | Public Attributes | List of all members
MoFEM::OpGetHoTangentOnEdge Struct Reference

Calculate tangent vector on edge form HO geometry approximation. More...

#include <src/finite_elements/DataOperators.hpp>

Inheritance diagram for MoFEM::OpGetHoTangentOnEdge:
[legend]
Collaboration diagram for MoFEM::OpGetHoTangentOnEdge:
[legend]

Public Member Functions

 OpGetHoTangentOnEdge (MatrixDouble &tangent)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Operator for linear form, usually to calculate values on left hand side. More...
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true, const bool do_vertices=true, const bool do_edges=true, const bool do_quads=true, const bool do_tris=true, const bool do_tets=true, const bool do_prisms=true)
 
virtual ~DataOperator ()
 
virtual MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on right hand side. More...
 
virtual MoFEMErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data, bool symm=true)
 
virtual MoFEMErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data)
 
virtual MoFEMErrorCode opRhs (DataForcesAndSourcesCore &data, const bool do_vertices, const bool do_edges, const bool do_quads, const bool do_tris, const bool do_tets, const bool do_prisms, const bool error_if_no_base=true)
 
virtual MoFEMErrorCode opRhs (DataForcesAndSourcesCore &data, const bool error_if_no_base=true)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not. More...
 
void setSymm ()
 set if operator is executed taking in account symmetry More...
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem More...
 

Public Attributes

MatrixDoubletAngent
 
- Public Attributes inherited from MoFEM::DataOperator
bool sYmm
 If true assume that matrix is symmetric structure. More...
 
bool doVertices
 If false skip vertices. More...
 
bool doEdges
 If false skip edges. More...
 
bool doQuads
 
bool doTris
 
bool doTets
 
bool doPrisms
 

Detailed Description

Calculate tangent vector on edge form HO geometry approximation.

Definition at line 753 of file DataOperators.hpp.

Constructor & Destructor Documentation

◆ OpGetHoTangentOnEdge()

MoFEM::OpGetHoTangentOnEdge::OpGetHoTangentOnEdge ( MatrixDouble tangent)

Definition at line 757 of file DataOperators.hpp.

757  :
758  tAngent(tangent) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode MoFEM::OpGetHoTangentOnEdge::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)
virtual

Operator for linear form, usually to calculate values on left hand side.

Reimplemented from MoFEM::DataOperator.

Definition at line 1536 of file DataOperators.cpp.

1537  {
1539 
1540  int nb_dofs = data.getFieldData().size();
1541  if (nb_dofs == 0)
1543 
1544  int nb_gauss_pts = data.getN().size1();
1545  tAngent.resize(nb_gauss_pts, 3, false);
1546 
1547  int nb_approx_fun = data.getN().size2();
1548  double *diff = &*data.getDiffN().data().begin();
1549  double *dofs[] = {&data.getFieldData()[0], &data.getFieldData()[1],
1550  &data.getFieldData()[2]};
1551 
1552  tAngent.resize(nb_gauss_pts, 3, false);
1553 
1554  switch (type) {
1555  case MBVERTEX:
1556  for (int dd = 0; dd != 3; dd++) {
1557  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
1558  tAngent(gg, dd) = cblas_ddot(2, diff, 1, dofs[dd], 3);
1559  }
1560  }
1561  break;
1562  case MBEDGE:
1563  if (nb_dofs % 3) {
1564  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
1565  "Approximated field should be rank 3, i.e. vector in 3d space");
1566  }
1567  for (int dd = 0; dd != 3; dd++) {
1568  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
1569  tAngent(gg, dd) +=
1570  cblas_ddot(nb_dofs / 3, &diff[gg * nb_approx_fun], 1, dofs[dd], 3);
1571  }
1572  }
1573  break;
1574  default:
1575  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSIBLE_CASE,
1576  "This operator can calculate tangent vector only on edge");
1577  }
1578 
1580 }
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
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:498
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528
double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
Definition: cblas_ddot.c:12
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:443

Member Data Documentation

◆ tAngent

MatrixDouble& MoFEM::OpGetHoTangentOnEdge::tAngent

Definition at line 755 of file DataOperators.hpp.


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