v0.15.4
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< doublepiolaScalePtr
 
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 553 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 555 of file EshelbianOperators.hpp.

560 : FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::OpBase(
561 row_field, row_field, FaceUserDataOperator::OPROW),
562 bcData(bc_data), piolaScalePtr(), 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
mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 2183 of file EshelbianOperators.cpp.

2183 {
2185
2186 FTENSOR_INDEX(3, i);
2187
2188 int nb_dofs = data.getFieldData().size();
2189 int nb_integration_pts = getGaussPts().size2();
2190 int nb_base_functions = data.getN().size2();
2191
2192 double time = getFEMethod()->ts_t;
2195 }
2196
2197#ifndef NDEBUG
2198 if (this->locF.size() != nb_dofs)
2199 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
2200 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
2201#endif // NDEBUG
2202
2203 // get entity of face
2204 EntityHandle fe_ent = getFEEntityHandle();
2205 for (auto &bc : *(bcData)) {
2206 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2207
2208 MatrixDouble analytical_expr;
2209 // placeholder to pass boundary block id to python
2210 auto [block_name, v_analytical_expr] =
2211 getAnalyticalExpr(this, analytical_expr, bc.blockName);
2212 auto t_val =
2213 getFTensor1FromMat<3>(v_analytical_expr);
2214 auto t_row_base = data.getFTensor0N();
2215 auto t_w = getFTensor0IntegrationWeight();
2216 auto t_coords = getFTensor1CoordsAtGaussPts();
2217
2218 double scale = (piolaScalePtr) ? 1. / (*piolaScalePtr) : 1.0;
2219
2220 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2221
2222 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
2223 int rr = 0;
2224 for (; rr != nb_dofs / SPACE_DIM; ++rr) {
2225 t_f(i) -= t_w * t_row_base * (t_val(i) * scale);
2226 ++t_row_base;
2227 ++t_f;
2228 }
2229
2230 for (; rr != nb_base_functions; ++rr)
2231 ++t_row_base;
2232 ++t_w;
2233 ++t_coords;
2234 ++t_val;
2235 }
2236 this->locF *= getMeasure();
2237 }
2238 }
2240}
#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)
static double dynamicTime
static PetscBool dynamicRelaxation
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
Get DOF values on entity.
double scale
Definition plastic.cpp:123

Member Data Documentation

◆ bcData

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

Definition at line 567 of file EshelbianOperators.hpp.

◆ piolaScalePtr

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

Definition at line 568 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

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

Definition at line 569 of file EshelbianOperators.hpp.


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