v0.9.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EshelbianPlasticity::CGGUserPolynomialBase Struct Reference
Inheritance diagram for EshelbianPlasticity::CGGUserPolynomialBase:
[legend]
Collaboration diagram for EshelbianPlasticity::CGGUserPolynomialBase:
[legend]

Public Member Functions

 CGGUserPolynomialBase ()
 
 ~CGGUserPolynomialBase ()
 
MoFEMErrorCode query_interface (const MOFEMuuid &uuid, BaseFunctionUnknownInterface **iface) const
 
MoFEMErrorCode getValue (MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
- Public Member Functions inherited from MoFEM::BaseFunction
 BaseFunction ()
 
virtual MoFEMErrorCode getValue (MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
virtual MoFEMErrorCode getValue (MatrixDouble &pts_x, MatrixDouble &pts_t, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)
 
- Public Member Functions inherited from MoFEM::BaseFunctionUnknownInterface
virtual ~BaseFunctionUnknownInterface ()=default
 

Private Member Functions

MoFEMErrorCode getValueHdivForCGGBubble (MatrixDouble &pts)
 

Private Attributes

EntPolynomialBaseCtxcTx
 
MatrixDouble shapeFun
 

Detailed Description

Definition at line 600 of file EshelbianPlasticity.cpp.

Constructor & Destructor Documentation

◆ CGGUserPolynomialBase()

EshelbianPlasticity::CGGUserPolynomialBase::CGGUserPolynomialBase ( )

Definition at line 602 of file EshelbianPlasticity.cpp.

602 {}

◆ ~CGGUserPolynomialBase()

EshelbianPlasticity::CGGUserPolynomialBase::~CGGUserPolynomialBase ( )

Definition at line 603 of file EshelbianPlasticity.cpp.

603 {}

Member Function Documentation

◆ getValue()

MoFEMErrorCode EshelbianPlasticity::CGGUserPolynomialBase::getValue ( MatrixDouble &  pts,
boost::shared_ptr< BaseFunctionCtx ctx_ptr 
)

Definition at line 619 of file EshelbianPlasticity.cpp.

620  {
622 
624  CHKERR ctx_ptr->query_interface(IDD_TET_BASE_FUNCTION, &iface);
625  cTx = reinterpret_cast<EntPolynomialBaseCtx *>(iface);
626 
627  int nb_gauss_pts = pts.size2();
628  if (!nb_gauss_pts) {
630  }
631 
632  if (pts.size1() < 3) {
633  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
634  "Wrong dimension of pts, should be at least 3 rows with "
635  "coordinates");
636  }
637 
638  switch (cTx->sPace) {
639  case HDIV:
641  break;
642  default:
643  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Not yet implemented");
644  }
645 
647  }
field with continuous normal traction
Definition: definitions.h:173
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
MoFEMErrorCode getValueHdivForCGGBubble(MatrixDouble &pts)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static const MOFEMuuid IDD_TET_BASE_FUNCTION
#define CHKERR
Inline error check.
Definition: definitions.h:596

◆ getValueHdivForCGGBubble()

MoFEMErrorCode EshelbianPlasticity::CGGUserPolynomialBase::getValueHdivForCGGBubble ( MatrixDouble &  pts)
private

Definition at line 654 of file EshelbianPlasticity.cpp.

654  {
656 
657  // This should be used only in case USER_BASE is selected
658  if (cTx->bAse != USER_BASE) {
659  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
660  "Wrong base, should be USER_BASE");
661  }
662  // get access to data structures on element
664  // Get approximation order on element. Note that bubble functions are only
665  // on tetrahedron.
666  const int order = data.dataOnEntities[MBTET][0].getDataOrder();
667  /// number of integration points
668  const int nb_gauss_pts = pts.size2();
669  // number of base functions
670 
671  // calculate shape functions, i.e. barycentric coordinates
672  shapeFun.resize(nb_gauss_pts, 4, false);
673  CHKERR ShapeMBTET(&*shapeFun.data().begin(), &pts(0, 0), &pts(1, 0),
674  &pts(2, 0), nb_gauss_pts);
675  // direvatives of shape functions
676  double diff_shape_fun[12];
677  CHKERR ShapeDiffMBTET(diff_shape_fun);
678 
679  const int nb_base_functions = NBVOLUMETET_CCG_BUBBLE(order);
680  // get base functions and set size
681  MatrixDouble &phi = data.dataOnEntities[MBTET][0].getN(USER_BASE);
682  phi.resize(nb_gauss_pts, 9 * nb_base_functions, false);
683  // finally calculate base functions
685  &phi(0, 0), &phi(0, 1), &phi(0, 2),
686 
687  &phi(0, 3), &phi(0, 4), &phi(0, 5),
688 
689  &phi(0, 6), &phi(0, 7), &phi(0, 8));
690  CHKERR CGG_BubbleBase_MBTET(order, &shapeFun(0, 0), diff_shape_fun, t_phi,
691  nb_gauss_pts);
692 
694  }
user implemented approximation base
Definition: definitions.h:154
data structure for finite element entityIt keeps that about indices of degrees of freedom,...
PetscErrorCode ShapeMBTET(double *N, const double *G_X, const double *G_Y, const double *G_Z, int DIM)
calculate shape functions
Definition: fem_tools.c:318
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:74
const FieldApproximationBase bAse
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
PetscErrorCode ShapeDiffMBTET(double *diffN)
calculate derivatives of shape functions
Definition: fem_tools.c:331
DataForcesAndSourcesCore & dAta
MoFEMErrorCode CGG_BubbleBase_MBTET(const int p, const double *N, const double *diffN, FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > &phi, const int gdim)
Calculate CGGT tonsorial bubble base.
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define NBVOLUMETET_CCG_BUBBLE(P)
Bubble function for CGG H div space.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ query_interface()

MoFEMErrorCode EshelbianPlasticity::CGGUserPolynomialBase::query_interface ( const MOFEMuuid uuid,
BaseFunctionUnknownInterface **  iface 
) const
virtual

Reimplemented from MoFEM::BaseFunction.

Definition at line 605 of file EshelbianPlasticity.cpp.

606  {
608  *iface = NULL;
609  if (uuid == IDD_TET_BASE_FUNCTION) {
610  *iface = const_cast<CGGUserPolynomialBase *>(this);
612  } else {
613  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
614  }
615  CHKERR BaseFunction::query_interface(uuid, iface);
617  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static const MOFEMuuid IDD_TET_BASE_FUNCTION
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ cTx

EntPolynomialBaseCtx* EshelbianPlasticity::CGGUserPolynomialBase::cTx
private

Definition at line 650 of file EshelbianPlasticity.cpp.

◆ shapeFun

MatrixDouble EshelbianPlasticity::CGGUserPolynomialBase::shapeFun
private

Definition at line 652 of file EshelbianPlasticity.cpp.


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