v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpBrokenAnalyticalTractionBc Struct Reference

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

Inheritance diagram for EshelbianPlasticity::OpBrokenAnalyticalTractionBc:
[legend]
Collaboration diagram for EshelbianPlasticity::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< AnalyticalTractionBcVecbcData
 
boost::shared_ptr< doublepiolaScalePtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 

Detailed Description

Definition at line 559 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpBrokenAnalyticalTractionBc()

EshelbianPlasticity::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 561 of file EshelbianPlasticity.hpp.

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpBrokenAnalyticalTractionBc::iNtegrate ( EntData & data)
Examples
EshelbianOperators.cpp.

Definition at line 2205 of file EshelbianOperators.cpp.

2205 {
2207
2208 FTENSOR_INDEX(3, i);
2209
2210 int nb_dofs = data.getFieldData().size();
2211 int nb_integration_pts = getGaussPts().size2();
2212 int nb_base_functions = data.getN().size2();
2213
2214 double time = getFEMethod()->ts_t;
2217 }
2218
2219#ifndef NDEBUG
2220 if (this->locF.size() != nb_dofs)
2221 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
2222 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
2223#endif // NDEBUG
2224
2225 // get entity of face
2226 EntityHandle fe_ent = getFEEntityHandle();
2227 for (auto &bc : *(bcData)) {
2228 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2229
2230 MatrixDouble analytical_expr;
2231 // placeholder to pass boundary block id to python
2232 auto [block_name, v_analytical_expr] =
2233 getAnalyticalExpr(this, analytical_expr, bc.blockName);
2234 auto t_val =
2235 getFTensor1FromMat<3>(v_analytical_expr);
2236 auto t_row_base = data.getFTensor0N();
2237 auto t_w = getFTensor0IntegrationWeight();
2238 auto t_coords = getFTensor1CoordsAtGaussPts();
2239
2240 double scale = (piolaScalePtr) ? 1. / (*piolaScalePtr) : 1.0;
2241
2242 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2243
2244 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
2245 int rr = 0;
2246 for (; rr != nb_dofs / SPACE_DIM; ++rr) {
2247 t_f(i) -= t_w * t_row_base * (t_val(i) * scale);
2248 ++t_row_base;
2249 ++t_f;
2250 }
2251
2252 for (; rr != nb_base_functions; ++rr)
2253 ++t_row_base;
2254 ++t_w;
2255 ++t_coords;
2256 ++t_val;
2257 }
2258 this->locF *= getMeasure();
2259 }
2260 }
2262}
#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
auto getAnalyticalExpr(OP_PTR op_ptr, MatrixDouble &analytical_expr, const std::string block_name)
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
double scale
Definition plastic.cpp:123
boost::shared_ptr< AnalyticalTractionBcVec > bcData
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 dofs values

Member Data Documentation

◆ bcData

boost::shared_ptr<AnalyticalTractionBcVec> EshelbianPlasticity::OpBrokenAnalyticalTractionBc::bcData
protected
Examples
EshelbianOperators.cpp.

Definition at line 572 of file EshelbianPlasticity.hpp.

◆ piolaScalePtr

boost::shared_ptr<double> EshelbianPlasticity::OpBrokenAnalyticalTractionBc::piolaScalePtr
protected
Examples
EshelbianOperators.cpp.

Definition at line 573 of file EshelbianPlasticity.hpp.

◆ scalingMethodsMap

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

Definition at line 574 of file EshelbianPlasticity.hpp.


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