v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpTauStabilizationDispRhsBc Struct Reference

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

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

Public Types

using OP = OpBrokenBaseTimesBrokenDisp
 
- Public Types inherited from OpBrokenBaseTimesBrokenDisp
using OP = OpStabBrokenBaseImpl< OpBaseTimesVectorFace >
 
- Public Types inherited from OpStabBrokenBaseImpl< OpBaseTimesVectorFace >
using BASE = OpBrokenBaseImpl< OpBaseTimesVectorFace >
 

Public Member Functions

 OpTauStabilizationDispRhsBc (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcDispVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, ScalarFun tau_coeff, boost::shared_ptr< Range > ents_ptr=nullptr)
 
- Public Member Functions inherited from OpBrokenBaseTimesBrokenDisp
 OpBrokenBaseTimesBrokenDisp (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, ScalarFun beta_coeff=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
 
- Public Member Functions inherited from OpStabBrokenBaseImpl< OpBaseTimesVectorFace >
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &data)
 
- Protected Member Functions inherited from OpBrokenBaseTimesBrokenDisp
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 

Protected Attributes

boost::shared_ptr< BcDispVec > bcDispPtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 
- Protected Attributes inherited from OpStabBrokenBaseImpl< OpBaseTimesVectorFace >
boost::weak_ptr< MatrixDouble > fluxMatPtr
 

Detailed Description

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

Definition at line 1202 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

Definition at line 1204 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpTauStabilizationDispRhsBc()

OpTauStabilizationDispRhsBc::OpTauStabilizationDispRhsBc ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_base_side_data,
boost::shared_ptr< BcDispVec > &  bc_disp_ptr,
std::map< std::string, boost::shared_ptr< ScalingMethod > >  smv,
ScalarFun  tau_coeff,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 1206 of file EshelbianOperators.hpp.

1211 : OpBrokenBaseTimesBrokenDisp(broken_base_side_data, tau_coeff, ents_ptr),
1212 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< BcDispVec > bcDispPtr

Member Function Documentation

◆ iNtegrate()

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

Definition at line 1270 of file EshelbianOperators.cpp.

1270 {
1272 // get entity of face
1273 EntityHandle fe_ent = OP::getFEEntityHandle();
1274 // iterate over all boundary data
1275 for (auto &bc : (*bcDispPtr)) {
1276 // check if finite element entity is part of boundary condition
1277 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1278 int nb_dofs = data.getIndices().size();
1279
1280 int nb_integration_pts = OP::getGaussPts().size2();
1281 auto t_w = OP::getFTensor0IntegrationWeight();
1282 int nb_base_functions = data.getN().size2();
1283 auto t_row_base_fun = data.getFTensor0N();
1284#ifndef NDEBUG
1285 if (!this->sourceVec) {
1286 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1287 "Source vector for OpTauStabilizationDispRhsBc is not set");
1288 }
1289 if (data.getN().size1() != nb_integration_pts) {
1290 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1291 "Number of integration points in data should be %d but is %d",
1292 nb_integration_pts, (int)data.getN().size1());
1293 }
1294 if (nb_base_functions < nb_dofs / SPACE_DIM) {
1295 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1296 "Number of base functions in data should be %d but is %d",
1297 nb_base_functions, (int)data.getN().size2() / SPACE_DIM);
1298 }
1299
1300#endif
1301
1302 auto t_disp_val =
1304 *this->sourceVec, nb_integration_pts)();
1305
1308
1309 double scale = 1;
1310 if (scalingMethodsMap.find(bc.blockName) != scalingMethodsMap.end()) {
1312 scale *= scalingMethodsMap.at(bc.blockName)
1314 } else {
1315 scale *= scalingMethodsMap.at(bc.blockName)
1316 ->getScale(OP::getFEMethod()->ts_t);
1317 }
1318 } else {
1319 MOFEM_LOG("SELF", Sev::warning)
1320 << "No scaling method found for " << bc.blockName;
1321 }
1322
1323 // get bc data
1324 FTensor::Tensor1<double, 3> t_bc_disp(bc.vals[0], bc.vals[1], bc.vals[2]);
1325 t_bc_disp(i) *= scale;
1326
1327 auto area = getMeasure();
1328 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1329 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1330 auto tau_scale =
1331 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1332 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1333 int bb = 0;
1334 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1335 for (auto ii = 0; ii != SPACE_DIM; ++ii) {
1336 if (bc.flags[ii]) {
1337 t_nf(ii) += (tau_scale * t_row_base_fun) *
1338 (t_disp_val(ii) - t_bc_disp(ii));
1339 }
1340 }
1341 ++t_nf;
1342 ++t_row_base_fun;
1343 }
1344 for (; bb != nb_base_functions; ++bb)
1345 ++t_row_base_fun;
1346
1347 ++t_w;
1348 ++t_coords;
1349 ++t_disp_val;
1350 }
1351 }
1352 }
1353
1355}
#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()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
static PetscBool physicalTimeFlg
static double currentPhysicalTime
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 VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
double scale
Definition plastic.cpp:124

Member Data Documentation

◆ bcDispPtr

boost::shared_ptr<BcDispVec> OpTauStabilizationDispRhsBc::bcDispPtr
protected

Definition at line 1216 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

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

Definition at line 1217 of file EshelbianOperators.hpp.


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