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

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

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

 OpTauStabilizationRotationRhsBc (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< BcRotVec > &bc_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< BcRotVec > bcRotPtr
 
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 1271 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

Definition at line 1273 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpTauStabilizationRotationRhsBc()

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

Definition at line 1275 of file EshelbianOperators.hpp.

1280 : OpBrokenBaseTimesBrokenDisp(broken_base_side_data, tau_coeff, ents_ptr),
1281 bcRotPtr(bc_ptr), scalingMethodsMap(smv) {}
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< BcRotVec > bcRotPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpTauStabilizationRotationRhsBc::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 1644 of file EshelbianOperators.cpp.

1644 {
1646
1647 FTENSOR_INDEX(3, i);
1648 FTENSOR_INDEX(3, j);
1649
1650 double time = OP::getFEMethod()->ts_t;
1653 }
1654
1655 // get entity of face
1656 EntityHandle fe_ent = OP::getFEEntityHandle();
1657 // iterate over all boundary data
1658 for (auto &bc : (*bcRotPtr)) {
1659 // check if finite element entity is part of boundary condition
1660 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1661 int nb_dofs = data.getIndices().size();
1662 int nb_integration_pts = OP::getGaussPts().size2();
1663 auto t_w = OP::getFTensor0IntegrationWeight();
1664
1665 int nb_base_functions = data.getN().size2();
1666 auto t_row_base_fun = data.getFTensor0N();
1667
1668 auto get_ftensor1 = [](auto &v) {
1670 &v[2]);
1671 };
1672
1673 // Note: First three values of bc.vals are the center of rotation
1674 // 4th is rotation angle in radians, and remaining values are axis of
1675 // rotation. Also, if rotation axis is not provided, it defaults to the
1676 // normal vector of the face.
1677
1678 // get bc data
1679 FTensor::Tensor1<double, 3> t_center(bc.vals[0], bc.vals[1], bc.vals[2]);
1680
1681 auto get_rotation_angle = [&]() {
1682 double theta = bc.theta;
1683 if (scalingMethodsMap.find(bc.blockName) != scalingMethodsMap.end()) {
1684 theta *= scalingMethodsMap.at(bc.blockName)->getScale(time);
1685 }
1686 return theta;
1687 };
1688
1689 auto get_rotation = [&](auto theta) {
1691 if (bc.vals.size() == 7) {
1692 t_omega(0) = bc.vals[4];
1693 t_omega(1) = bc.vals[5];
1694 t_omega(2) = bc.vals[6];
1695 } else {
1696 // Use gemetric face normal as rotation axis
1697 t_omega(i) = OP::getFTensor1Normal()(i);
1698 }
1699 if (t_omega.l2() > std::numeric_limits<double>::epsilon()) {
1700 t_omega.normalize();
1701 }
1702 t_omega(i) *= theta;
1704 RotSelector::SMALL_ROT
1705 ? 0.
1706 : t_omega.l2());
1707 };
1708
1709 auto area = getMeasure();
1710 auto t_R = get_rotation(get_rotation_angle());
1711 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1712 auto t_disp_val =
1714 *this->sourceVec, nb_integration_pts)();
1715
1716 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1717 auto tau_scale =
1718 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
1719
1721 t_delta(i) = t_center(i) - t_coords(i);
1723 t_bc_disp(i) = t_delta(i) - t_R(i, j) * t_delta(j);
1724
1725 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
1726 int bb = 0;
1727 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1728 t_nf(i) +=
1729 (tau_scale * t_row_base_fun) * (t_disp_val(i) - t_bc_disp(i));
1730 ++t_nf;
1731 ++t_row_base_fun;
1732 }
1733 for (; bb != nb_base_functions; ++bb)
1734 ++t_row_base_fun;
1735
1736 ++t_w;
1737 ++t_coords;
1738 ++t_disp_val;
1739 }
1740 }
1741 }
1742
1744}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
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 enum RotSelector rotSelector
static PetscBool physicalTimeFlg
static double currentPhysicalTime
static auto exp(A &&t_w_vee, B &&theta)
Definition Lie.hpp:69
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

◆ bcRotPtr

boost::shared_ptr<BcRotVec> OpTauStabilizationRotationRhsBc::bcRotPtr
protected

Definition at line 1285 of file EshelbianOperators.hpp.

◆ scalingMethodsMap

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

Definition at line 1286 of file EshelbianOperators.hpp.


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