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 1302 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

Definition at line 1304 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 1306 of file EshelbianOperators.hpp.

1311 : OpBrokenBaseTimesBrokenDisp(broken_base_side_data, tau_coeff, ents_ptr),
1312 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 1534 of file EshelbianOperators.cpp.

1534 {
1536 // get entity of face
1537 EntityHandle fe_ent = OP::getFEEntityHandle();
1538 // iterate over all boundary data
1539 for (auto &bc : (*bcDispPtr)) {
1540 // check if finite element entity is part of boundary condition
1541 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1542 int nb_dofs = data.getIndices().size();
1543
1544 int nb_integration_pts = OP::getGaussPts().size2();
1545 auto t_w = OP::getFTensor0IntegrationWeight();
1546 int nb_base_functions = data.getN().size2();
1547 auto t_row_base_fun = data.getFTensor0N();
1548#ifndef NDEBUG
1549 if (!this->sourceVec) {
1550 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1551 "Source vector for OpTauStabilizationDispRhsBc is not set");
1552 }
1553 if (data.getN().size1() != nb_integration_pts) {
1554 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1555 "Number of integration points in data should be %d but is %d",
1556 nb_integration_pts, (int)data.getN().size1());
1557 }
1558 if (nb_base_functions < nb_dofs / SPACE_DIM) {
1559 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1560 "Number of base functions in data should be %d but is %d",
1561 nb_base_functions, (int)data.getN().size2() / SPACE_DIM);
1562 }
1563
1564#endif
1565
1566 auto t_disp_val =
1568 *this->sourceVec, nb_integration_pts)();
1569
1572
1573 double scale = 1;
1574 if (scalingMethodsMap.find(bc.blockName) != scalingMethodsMap.end()) {
1576 scale *= scalingMethodsMap.at(bc.blockName)
1578 } else {
1579 scale *= scalingMethodsMap.at(bc.blockName)
1580 ->getScale(OP::getFEMethod()->ts_t);
1581 }
1582 } else {
1583 MOFEM_LOG("SELF", Sev::warning)
1584 << "No scaling method found for " << bc.blockName;
1585 }
1586
1587 // get bc data
1588 FTensor::Tensor1<double, 3> t_bc_disp(bc.vals[0], bc.vals[1], bc.vals[2]);
1589 t_bc_disp(i) *= scale;
1590
1591 auto area = getMeasure();
1592 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1593 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1594 auto tau_scale =
1595 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1597 for (int ii = 0; ii != SPACE_DIM; ++ii)
1598 t_bc_residual(ii) =
1599 bc.flags[ii] ? t_disp_val(ii) - t_bc_disp(ii) : 0.;
1600 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1601 int bb = 0;
1602 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1603 t_nf(i) +=
1604 (tau_scale * t_row_base_fun) * t_bc_residual(i);
1605 ++t_nf;
1606 ++t_row_base_fun;
1607 }
1608 for (; bb != nb_base_functions; ++bb)
1609 ++t_row_base_fun;
1610
1611 ++t_w;
1612 ++t_coords;
1613 ++t_disp_val;
1614 }
1615 }
1616 }
1617
1619}
#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 1316 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

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

Definition at line 1317 of file EshelbianOperators.hpp.


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