v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
OpBrokenAnalyticalTractionBc Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianOperators.hpp"

Inheritance diagram for OpBrokenAnalyticalTractionBc:
[legend]
Collaboration diagram for OpBrokenAnalyticalTractionBc:
[legend]

Public Member Functions

 OpBrokenAnalyticalTractionBc (const std::string row_field, boost::shared_ptr< AnalyticalTractionBcVec > bc_data, boost::shared_ptr< double > piola_scale_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
 
MoFEMErrorCode iNtegrate (EntData &data)
 

Protected Attributes

boost::shared_ptr< AnalyticalTractionBcVec > bcData
 
boost::shared_ptr< double > piolaScalePtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 

Detailed Description

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

Definition at line 545 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpBrokenAnalyticalTractionBc()

OpBrokenAnalyticalTractionBc::OpBrokenAnalyticalTractionBc ( const std::string  row_field,
boost::shared_ptr< AnalyticalTractionBcVec >  bc_data,
boost::shared_ptr< double >  piola_scale_ptr,
std::map< std::string, boost::shared_ptr< ScalingMethod > >  smv 
)
inline

Definition at line 547 of file EshelbianOperators.hpp.

552 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::OpBase(
553 row_field, row_field, FaceUserDataOperator::OPROW),
554 bcData(bc_data), piolaScalePtr(piola_scale_ptr),
555 scalingMethodsMap(smv) {}
boost::shared_ptr< AnalyticalTractionBcVec > bcData
boost::shared_ptr< double > piolaScalePtr
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpBrokenAnalyticalTractionBc::iNtegrate ( EntData &  data)
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 2984 of file EshelbianOperators.cpp.

2984 {
2986
2987 FTENSOR_INDEX(3, i);
2988
2989 int nb_dofs = data.getFieldData().size();
2990 int nb_integration_pts = getGaussPts().size2();
2991 int nb_base_functions = data.getN().size2();
2992
2993 double time = getFEMethod()->ts_t;
2996 }
2997
2998#ifndef NDEBUG
2999 if (this->locF.size() != nb_dofs)
3000 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
3001 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
3002#endif // NDEBUG
3003
3004 // get entity of face
3005 EntityHandle fe_ent = getFEEntityHandle();
3006 for (auto &bc : *(bcData)) {
3007 if (bc.faces.find(fe_ent) != bc.faces.end()) {
3008
3010 // placeholder to pass boundary block id to python
3011 auto [block_name, v_analytical_expr] =
3012 getAnalyticalExpr(this, analytical_expr, bc.blockName);
3013 auto t_val = getFTensor1FromMat<3, -1, DL>(v_analytical_expr);
3014 auto t_row_base = data.getFTensor0N();
3015 auto t_w = getFTensor0IntegrationWeight();
3016 auto t_coords = getFTensor1CoordsAtGaussPts();
3017
3018 double scale = (piolaScalePtr) ? 1. / (*piolaScalePtr) : 1.0;
3019
3020 for (int gg = 0; gg != nb_integration_pts; ++gg) {
3021
3022 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
3023 int rr = 0;
3024 for (; rr != nb_dofs / SPACE_DIM; ++rr) {
3025 t_f(i) -= t_w * t_row_base * (t_val(i) * scale);
3026 ++t_row_base;
3027 ++t_f;
3028 }
3029
3030 for (; rr != nb_base_functions; ++rr)
3031 ++t_row_base;
3032 ++t_w;
3033 ++t_coords;
3034 ++t_val;
3035 }
3036 this->locF *= getMeasure();
3037 }
3038 }
3040}
boost::shared_ptr< DataAtIntegrationPts > data
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
std::tuple< std::string, MatrixDouble > getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr, const std::string block_name)
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
static PetscBool physicalTimeFlg
static double currentPhysicalTime
double scale
Definition plastic.cpp:124

Member Data Documentation

◆ bcData

boost::shared_ptr<AnalyticalTractionBcVec> OpBrokenAnalyticalTractionBc::bcData
protected

Definition at line 560 of file EshelbianOperators.hpp.

◆ piolaScalePtr

boost::shared_ptr<double> OpBrokenAnalyticalTractionBc::piolaScalePtr
protected

Definition at line 561 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

std::map<std::string, boost::shared_ptr<ScalingMethod> > OpBrokenAnalyticalTractionBc::scalingMethodsMap
protected

Definition at line 562 of file EshelbianOperators.hpp.


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