Public Member Functions | Public Attributes | List of all members
MoFEM::OpSetHoCovariantPiolaTransform Struct Reference

Apply covariant (Piola) transfer to Hcurl space for HO geometry. More...

#include <src/finite_elements/DataOperators.hpp>

Inheritance diagram for MoFEM::OpSetHoCovariantPiolaTransform:
Collaboration diagram for MoFEM::OpSetHoCovariantPiolaTransform:

Public Member Functions

 OpSetHoCovariantPiolaTransform (MatrixDouble &inv_jac)
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::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, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side. More...
virtual MoFEMErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data)
virtual MoFEMErrorCode opRhs (DataForcesAndSourcesCore &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

FTensor::Index< 'i', 3 > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
MatrixDouble piolaN
MatrixDouble piolaDiffN
- Public Attributes inherited from MoFEM::DataOperator
bool sYmm
 If true assume that matrix is symmetric structure. More...
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity. More...
 \deprectaed If false skip vertices More...
 \deprectaed If false skip edges More...
 \deprectaed More...
 \deprectaed More...
 \deprectaed More...
 \deprectaed More...

Detailed Description

Apply covariant (Piola) transfer to Hcurl space for HO geometry.

Definition at line 257 of file DataOperators.hpp.

Constructor & Destructor Documentation

◆ OpSetHoCovariantPiolaTransform()

MoFEM::OpSetHoCovariantPiolaTransform::OpSetHoCovariantPiolaTransform ( MatrixDouble inv_jac)

Definition at line 264 of file DataOperators.hpp.

264 : hoInvJac(inv_jac) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode MoFEM::OpSetHoCovariantPiolaTransform::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 

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

Reimplemented from MoFEM::DataOperator.

Definition at line 618 of file DataOperators.cpp.

619  {
622  if (type != MBEDGE && type != MBTRI && type != MBTET)
625  for (int b = AINSWORTH_LEGENDRE_BASE; b != LASTBASE; b++) {
627  FieldApproximationBase base = static_cast<FieldApproximationBase>(b);
629  unsigned int nb_gauss_pts = data.getN(base).size1();
630  unsigned int nb_base_functions = data.getN(base).size2() / 3;
631  piolaN.resize(nb_gauss_pts, data.getN(base).size2(), false);
632  piolaDiffN.resize(nb_gauss_pts, data.getDiffN(base).size2(), false);
634  auto t_n = data.getFTensor1N<3>(base);
635  double *t_transformed_n_ptr = &*piolaN.data().begin();
637  t_transformed_n_ptr, // HVEC0
638  &t_transformed_n_ptr[HVEC1], &t_transformed_n_ptr[HVEC2]);
639  auto t_diff_n = data.getFTensor2DiffN<3, 3>(base);
640  double *t_transformed_diff_n_ptr = &*piolaDiffN.data().begin();
641  FTensor::Tensor2<FTensor::PackPtr<double *, 9>, 3, 3> t_transformed_diff_n(
642  t_transformed_diff_n_ptr, &t_transformed_diff_n_ptr[HVEC0_1],
643  &t_transformed_diff_n_ptr[HVEC0_2], &t_transformed_diff_n_ptr[HVEC1_0],
644  &t_transformed_diff_n_ptr[HVEC1_1], &t_transformed_diff_n_ptr[HVEC1_2],
645  &t_transformed_diff_n_ptr[HVEC2_0], &t_transformed_diff_n_ptr[HVEC2_1],
646  &t_transformed_diff_n_ptr[HVEC2_2]);
648  double *t_inv_jac_ptr = &*hoInvJac.data().begin();
650  t_inv_jac_ptr, &t_inv_jac_ptr[1], &t_inv_jac_ptr[2], &t_inv_jac_ptr[3],
651  &t_inv_jac_ptr[4], &t_inv_jac_ptr[5], &t_inv_jac_ptr[6],
652  &t_inv_jac_ptr[7], &t_inv_jac_ptr[8], 9);
654  for (unsigned int gg = 0; gg != nb_gauss_pts; ++gg) {
655  for (unsigned int bb = 0; bb != nb_base_functions; ++bb) {
656  t_transformed_n(i) = t_inv_jac(k, i) * t_n(k);
657  t_transformed_diff_n(i, k) = t_inv_jac(j, i) * t_diff_n(j, k);
658  ++t_n;
659  ++t_transformed_n;
660  ++t_diff_n;
661  ++t_transformed_diff_n;
662  }
663  ++t_inv_jac;
664  }
666  data.getN(base).data().swap(piolaN.data());
667  data.getDiffN(base).data().swap(piolaDiffN.data());
668  }
671 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
approximation base
Definition: definitions.h:150
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

Member Data Documentation

◆ hoInvJac

MatrixDouble& MoFEM::OpSetHoCovariantPiolaTransform::hoInvJac

Definition at line 259 of file DataOperators.hpp.

◆ i

FTensor::Index<'i', 3> MoFEM::OpSetHoCovariantPiolaTransform::i

Definition at line 260 of file DataOperators.hpp.

◆ j

FTensor::Index<'j', 3> MoFEM::OpSetHoCovariantPiolaTransform::j

Definition at line 261 of file DataOperators.hpp.

◆ k

FTensor::Index<'k', 3> MoFEM::OpSetHoCovariantPiolaTransform::k

Definition at line 262 of file DataOperators.hpp.

◆ piolaDiffN

MatrixDouble MoFEM::OpSetHoCovariantPiolaTransform::piolaDiffN

Definition at line 267 of file DataOperators.hpp.

◆ piolaN

MatrixDouble MoFEM::OpSetHoCovariantPiolaTransform::piolaN

Definition at line 266 of file DataOperators.hpp.

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