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

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

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

Public Types

using OP
 

Public Member Functions

 OpBrokenPressureBcLhsImpl_dU (std::string row_field, boost::shared_ptr< PressureBcVec > bc_data, boost::shared_ptr< MatrixDouble > hybrid_grad_disp, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 

Protected Attributes

boost::shared_ptr< PressureBcVecbcData
 
boost::shared_ptr< MatrixDouble > hybridGradDispPtr
 
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
 

Detailed Description

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

Definition at line 531 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ OP

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

Definition at line 534 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpBrokenPressureBcLhsImpl_dU()

template<AssemblyType A>
EshelbianPlasticity::OpBrokenPressureBcLhsImpl_dU< A, GAUSS >::OpBrokenPressureBcLhsImpl_dU ( std::string row_field,
boost::shared_ptr< PressureBcVec > bc_data,
boost::shared_ptr< MatrixDouble > hybrid_grad_disp,
std::map< std::string, boost::shared_ptr< ScalingMethod > > smv )
inline

Definition at line 537 of file EshelbianPlasticity.hpp.

540 {
541 ExternalStrain(std::string name, std::vector<double> attr, Range ents);
542 std::string blockName;

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A>
MoFEMErrorCode OpBrokenPressureBcLhsImpl_dU< A, GAUSS >::iNtegrate ( EntData & row_data,
EntData & col_data )
protected
Examples
EshelbianOperators.cpp.

Definition at line 2091 of file EshelbianOperators.cpp.

2092 {
2094
2098 }
2099
2100 double time = OP::getFEMethod()->ts_t;
2103 }
2104
2105 int nb_base_functions = row_data.getN().size2();
2106 int row_nb_dofs = row_data.getIndices().size();
2107 int col_nb_dofs = col_data.getIndices().size();
2108 int nb_integration_pts = OP::getGaussPts().size2();
2109 auto &locMat = OP::locMat;
2110 locMat.resize(row_nb_dofs, col_nb_dofs, false);
2111 locMat.clear();
2112
2113auto integrate_lhs = [&](auto &bc, auto calc_tau, double time_scale) {
2115
2116 auto val = bc.val;
2117 auto t_row_base = row_data.getFTensor0N();
2118 auto t_w = OP::getFTensor0IntegrationWeight();
2119 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
2120 auto t_tangent1 = OP::getFTensor1Tangent1AtGaussPts();
2121 auto t_tangent2 = OP::getFTensor1Tangent2AtGaussPts();
2122
2123 auto t_grad_gamma_u = getFTensor2FromMat<3, 2>(*hybridGradDispPtr);
2125
2126 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2127
2132
2135
2136 auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
2137 auto t_val = time_scale * t_w * tau * val;
2138
2139 int rr = 0;
2140 for (; rr != row_nb_dofs / SPACE_DIM; ++rr) {
2142 locMat, SPACE_DIM * rr);
2143 auto t_diff_col_base = col_data.getFTensor1DiffN<2>(gg, 0);
2144 for (auto cc = 0; cc != col_nb_dofs / SPACE_DIM; ++cc) {
2146 t_normal_du(i, l) = (FTensor::levi_civita<double>(i, j, k) *
2147 (t_tangent2(k) + t_grad_gamma_u(k, N1))) *
2148 t_kd(j, l) * t_diff_col_base(N0)
2149
2150 +
2151
2153 (t_tangent1(j) + t_grad_gamma_u(j, N0))) *
2154 t_kd(k, l) * t_diff_col_base(N1);
2155
2156 t_mat(i, j) += (t_w * t_row_base) * t_val * t_normal_du(i, j);
2157 ++t_mat;
2158 ++t_diff_col_base;
2159 }
2160 ++t_row_base;
2161 }
2162
2163 for (; rr != nb_base_functions; ++rr)
2164 ++t_row_base;
2165 ++t_w;
2166 ++t_coords;
2167 ++t_tangent1;
2168 ++t_tangent2;
2169 ++t_grad_gamma_u;
2170 }
2171
2172 OP::locMat /= 2.;
2173
2175 };
2176
2177 // get entity of face
2178 EntityHandle fe_ent = OP::getFEEntityHandle();
2179 for (auto &bc : *(bcData)) {
2180 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2181
2182 double time_scale = 1;
2183 if (scalingMethodsMap.find(bc.blockName) != scalingMethodsMap.end()) {
2184 time_scale *= scalingMethodsMap.at(bc.blockName)->getScale(time);
2185 }
2186
2187 int nb_dofs = row_data.getFieldData().size();
2188 if (nb_dofs) {
2189 CHKERR integrate_lhs(
2190 bc, [](double, double, double) { return 1; }, time_scale);
2191 }
2192 }
2193 }
2194
2196
2197}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Kronecker Delta class.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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()
#define CHKERR
Inline error check.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
FTensor::Tensor2< FTensor::PackPtr< double *, S >, DIM1, DIM2 > getFTensor2FromArray(MatrixDouble &data, const size_t rr, const size_t cc=0)
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
static enum StretchSelector stretchSelector
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
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 VectorDouble & getFieldData() const
get dofs values
const VectorInt & getIndices() const
Get global indices of dofs on entity.

Member Data Documentation

◆ bcData

template<AssemblyType A>
boost::shared_ptr<PressureBcVec> EshelbianPlasticity::OpBrokenPressureBcLhsImpl_dU< A, GAUSS >::bcData
protected

Definition at line 546 of file EshelbianPlasticity.hpp.

◆ hybridGradDispPtr

template<AssemblyType A>
boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpBrokenPressureBcLhsImpl_dU< A, GAUSS >::hybridGradDispPtr
protected

Definition at line 547 of file EshelbianPlasticity.hpp.

◆ scalingMethodsMap

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

Definition at line 548 of file EshelbianPlasticity.hpp.


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