v0.14.0
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, EntitiesFieldData::EntData &data)
 Operator for linear form, usually to calculate values on right hand side. More...
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side. More...
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
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
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure. More...
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity. More...
 
booldoVertices
 \deprectaed If false skip vertices More...
 
booldoEdges
 \deprectaed If false skip edges More...
 
booldoQuads
 \deprectaed More...
 
booldoTris
 \deprectaed More...
 
booldoTets
 \deprectaed More...
 
booldoPrisms
 \deprectaed More...
 

Additional Inherited Members

- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)>
 
using DoWorkRhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int side, EntityType type, EntitiesFieldData::EntData &data)>
 

Detailed Description

Calculate tangent vector on edge form HO geometry approximation.

Definition at line 483 of file DataOperators.hpp.

Constructor & Destructor Documentation

◆ OpGetHOTangentOnEdge()

MoFEM::OpGetHOTangentOnEdge::OpGetHOTangentOnEdge ( MatrixDouble tangent)
inline

Definition at line 487 of file DataOperators.hpp.

487 : tAngent(tangent) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode MoFEM::OpGetHOTangentOnEdge::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
virtual

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

Reimplemented from MoFEM::DataOperator.

Definition at line 687 of file DataOperators.cpp.

688  {
690 
691  int nb_dofs = data.getFieldData().size();
692  if (nb_dofs == 0)
694 
695  int nb_gauss_pts = data.getN().size1();
696  tAngent.resize(nb_gauss_pts, 3, false);
697 
698  int nb_approx_fun = data.getN().size2();
699  double *diff = &*data.getDiffN().data().begin();
700  double *dofs[] = {&data.getFieldData()[0], &data.getFieldData()[1],
701  &data.getFieldData()[2]};
702 
703  tAngent.resize(nb_gauss_pts, 3, false);
704 
705  switch (type) {
706  case MBVERTEX:
707  for (int dd = 0; dd != 3; dd++) {
708  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
709  tAngent(gg, dd) = cblas_ddot(2, diff, 1, dofs[dd], 3);
710  }
711  }
712  break;
713  case MBEDGE:
714  if (nb_dofs % 3) {
715  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
716  "Approximated field should be rank 3, i.e. vector in 3d space");
717  }
718  for (int dd = 0; dd != 3; dd++) {
719  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
720  tAngent(gg, dd) +=
721  cblas_ddot(nb_dofs / 3, &diff[gg * nb_approx_fun], 1, dofs[dd], 3);
722  }
723  }
724  break;
725  default:
726  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
727  "This operator can calculate tangent vector only on edge");
728  }
729 
731 }

Member Data Documentation

◆ tAngent

MatrixDouble& MoFEM::OpGetHOTangentOnEdge::tAngent

Definition at line 485 of file DataOperators.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
MOFEM_IMPOSSIBLE_CASE
@ MOFEM_IMPOSSIBLE_CASE
Definition: definitions.h:35
convert.type
type
Definition: convert.py:64
FTensor::dd
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
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEM::OpGetHOTangentOnEdge::tAngent
MatrixDouble & tAngent
Definition: DataOperators.hpp:485
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346