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

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

Inheritance diagram for OpTauStabilizationOpAnalyticalDispBc:
[legend]
Collaboration diagram for OpTauStabilizationOpAnalyticalDispBc:
[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

 OpTauStabilizationOpAnalyticalDispBc (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< AnalyticalDisplacementBcVec > &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< AnalyticalDisplacementBcVec > 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 1280 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

Definition at line 1283 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpTauStabilizationOpAnalyticalDispBc()

OpTauStabilizationOpAnalyticalDispBc::OpTauStabilizationOpAnalyticalDispBc ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_base_side_data,
boost::shared_ptr< AnalyticalDisplacementBcVec > &  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 1285 of file EshelbianOperators.hpp.

1290 : OpBrokenBaseTimesBrokenDisp(broken_base_side_data, tau_coeff, ents_ptr),
1291 bcDispPtr(bc_disp_ptr), scalingMethodsMap(smv) {}
boost::shared_ptr< AnalyticalDisplacementBcVec > bcDispPtr
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpTauStabilizationOpAnalyticalDispBc::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 1760 of file EshelbianOperators.cpp.

1760 {
1762
1763 EntityHandle fe_ent = OP::getFEEntityHandle();
1764 for (auto &bc : (*bcDispPtr)) {
1765 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1767 auto analytical_data = getAnalyticalExpr(this, analytical_expr, bc.blockName);
1768 auto &v_analytical_expr = std::get<1>(analytical_data);
1769
1770 int nb_dofs = data.getIndices().size();
1771 int nb_integration_pts = OP::getGaussPts().size2();
1772 auto t_w = OP::getFTensor0IntegrationWeight();
1773 int nb_base_functions = data.getN().size2();
1774 auto t_row_base_fun = data.getFTensor0N();
1775
1776#ifndef NDEBUG
1777 if (!this->sourceVec) {
1778 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1779 "Source vector for OpTauStabilizationOpAnalyticalDispBc is not "
1780 "set");
1781 }
1782 if (data.getN().size1() != nb_integration_pts) {
1783 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1784 "Number of integration points in data should be %d but is %d",
1785 nb_integration_pts, (int)data.getN().size1());
1786 }
1787 if (nb_base_functions < nb_dofs / SPACE_DIM) {
1788 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1789 "Number of base functions in data should be at least %d but is "
1790 "%d",
1791 nb_dofs / SPACE_DIM, nb_base_functions);
1792 }
1793#endif
1794
1795 auto t_disp_val =
1797 *this->sourceVec, nb_integration_pts)();
1798 auto t_bc_disp = getFTensor1FromMat<3, -1, DL>(v_analytical_expr);
1799
1801
1802 auto area = getMeasure();
1803 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1804 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1805 auto tau_scale =
1806 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1808 for (int ii = 0; ii != SPACE_DIM; ++ii)
1809 t_bc_residual(ii) =
1810 bc.flags[ii] ? t_disp_val(ii) - t_bc_disp(ii) : 0.;
1811 auto t_nf = getFTensor1FromPtr<3, 3>(OP::locF.data().data());
1812 int bb = 0;
1813 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1814 t_nf(i) +=
1815 (tau_scale * t_row_base_fun) * t_bc_residual(i);
1816 ++t_nf;
1817 ++t_row_base_fun;
1818 }
1819 for (; bb != nb_base_functions; ++bb)
1820 ++t_row_base_fun;
1821
1822 ++t_w;
1823 ++t_coords;
1824 ++t_disp_val;
1825 ++t_bc_disp;
1826 }
1827 }
1828 }
1829
1831}
#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.
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
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.

Member Data Documentation

◆ bcDispPtr

boost::shared_ptr<AnalyticalDisplacementBcVec> OpTauStabilizationOpAnalyticalDispBc::bcDispPtr
protected

Definition at line 1295 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

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

Definition at line 1296 of file EshelbianOperators.hpp.


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