v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >:
[legend]

Public Types

using OP
 

Public Member Functions

 OpNormalDispBcRhsImpl (std::string row_field, boost::shared_ptr< MatrixDouble > hybrid_disp_ptr, boost::shared_ptr< MatrixDouble > piola_stress_ptr, boost::shared_ptr< NormalDisplacementBcVec > &bc_disp_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDouble > hybridDispPtr
 
boost::shared_ptr< MatrixDouble > piolaStressPtr
 
boost::shared_ptr< NormalDisplacementBcVecbcDispPtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 

Detailed Description

template<AssemblyType A>
struct EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >

Definition at line 582 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ OP

template<AssemblyType A>
using EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::OP
Initial value:
typename FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::OpBase

Definition at line 585 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpNormalDispBcRhsImpl()

template<AssemblyType A>
EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::OpNormalDispBcRhsImpl ( std::string row_field,
boost::shared_ptr< MatrixDouble > hybrid_disp_ptr,
boost::shared_ptr< MatrixDouble > piola_stress_ptr,
boost::shared_ptr< NormalDisplacementBcVec > & bc_disp_ptr,
std::map< std::string, boost::shared_ptr< ScalingMethod > > smv,
boost::shared_ptr< Range > ents_ptr = nullptr )
inline

Definition at line 588 of file EshelbianPlasticity.hpp.

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A>
MoFEMErrorCode OpNormalDispBcRhsImpl< A, GAUSS >::iNtegrate ( EntData & data)
protected

Definition at line 1583 of file EshelbianOperators.cpp.

1583 {
1585
1586 double time = OP::getFEMethod()->ts_t;
1589 }
1590
1591 // get entity of face
1592 EntityHandle fe_ent = OP::getFEEntityHandle();
1593 // iterate over all boundary data
1594 for (auto &bc : (*bcDispPtr)) {
1595 // check if finite element entity is part of boundary condition
1596 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1597
1598 auto t_approx_P = getFTensor2FromMat<3, 3>(*piolaStressPtr);
1600 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1601 auto t_w = OP::getFTensor0IntegrationWeight();
1602
1605
1607
1608 double scale = 1;
1609 if (scalingMethodsMap.find(bc.blockName) != scalingMethodsMap.end()) {
1610 scale *= scalingMethodsMap.at(bc.blockName)->getScale(time);
1611 } else {
1612 MOFEM_LOG("SELF", Sev::warning)
1613 << "No scaling method found for " << bc.blockName;
1614 }
1615
1616 // get bc data
1617 double val = scale * bc.val;
1618
1619 int nb_dofs = data.getIndices().size();
1620 int nb_integration_pts = OP::getGaussPts().size2();
1621 int nb_base_functions = data.getN().size2();
1622 auto t_row_base = data.getFTensor0N();
1623 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1624
1626 t_N(i) = t_normal(i);
1627 t_N.normalize();
1628
1630 t_P(i, j) = t_N(i) * t_N(j);
1632 t_Q(i, j) = t_kd(i, j) - t_P(i, j);
1633
1635 t_tracton(i) = t_approx_P(i, j) * t_N(j);
1636
1638 t_res(i) = t_Q(i, j) * t_tracton(j) + t_P(i, j) * 2* t_u(j) - t_N(i) * val;
1639
1640 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
1641 int bb = 0;
1642 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
1643 t_nf(i) += (t_w * t_row_base) * t_res(i);
1644 ++t_nf;
1645 ++t_row_base;
1646 }
1647 for (; bb != nb_base_functions; ++bb)
1648 ++t_row_base;
1649
1650 ++t_w;
1651 ++t_normal;
1652 ++t_u;
1653 ++t_approx_P;
1654 }
1655
1656 OP::locF *= OP::getMeasure();
1657 }
1658 }
1660}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Kronecker Delta class.
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()
constexpr auto t_kd
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
double scale
Definition plastic.cpp:123
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< NormalDisplacementBcVec > bcDispPtr
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 dofs on entity.

Member Data Documentation

◆ bcDispPtr

template<AssemblyType A>
boost::shared_ptr<NormalDisplacementBcVec> EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::bcDispPtr
protected

Definition at line 603 of file EshelbianPlasticity.hpp.

◆ hybridDispPtr

template<AssemblyType A>
boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::hybridDispPtr
protected

Definition at line 601 of file EshelbianPlasticity.hpp.

◆ piolaStressPtr

template<AssemblyType A>
boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::piolaStressPtr
protected

Definition at line 602 of file EshelbianPlasticity.hpp.

◆ scalingMethodsMap

template<AssemblyType A>
std::map<std::string, boost::shared_ptr<ScalingMethod> > EshelbianPlasticity::OpNormalDispBcRhsImpl< A, GAUSS >::scalingMethodsMap
protected

Definition at line 604 of file EshelbianPlasticity.hpp.


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