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

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

Inheritance diagram for OpSpringRhsBc:
[legend]
Collaboration diagram for OpSpringRhsBc:
[legend]

Public Types

using OP = typename FormsIntegrators< FaceUserDataOperator >::Assembly< PETSC >::OpBase
 

Public Member Functions

 OpSpringRhsBc (std::string row_field, boost::shared_ptr< MatrixDouble > hybrid_disp_ptr, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_side_data_ptr, boost::shared_ptr< SpringBcVec > bc_spring_ptr)
 
MoFEMErrorCode iNtegrate (EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDouble > hybridDispPtr
 
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideDataPtr
 
boost::shared_ptr< SpringBcVec > bcSpringPtr
 

Detailed Description

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

Definition at line 590 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

using OpSpringRhsBc::OP = typename FormsIntegrators<FaceUserDataOperator>::Assembly<PETSC>::OpBase

Definition at line 593 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpSpringRhsBc()

OpSpringRhsBc::OpSpringRhsBc ( std::string  row_field,
boost::shared_ptr< MatrixDouble >  hybrid_disp_ptr,
boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_side_data_ptr,
boost::shared_ptr< SpringBcVec >  bc_spring_ptr 
)
inline

Definition at line 596 of file EshelbianOperators.hpp.

600 : OP(row_field, row_field, OP::OPROW), hybridDispPtr(hybrid_disp_ptr),
601 brokenBaseSideDataPtr(broken_side_data_ptr), bcSpringPtr(bc_spring_ptr) {
602 }
boost::shared_ptr< MatrixDouble > hybridDispPtr
boost::shared_ptr< SpringBcVec > bcSpringPtr
typename FormsIntegrators< FaceUserDataOperator >::Assembly< PETSC >::OpBase OP
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideDataPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpSpringRhsBc::iNtegrate ( EntData data)
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 2338 of file EshelbianOperators.cpp.

2338 {
2340
2341 // get entity of face
2342 EntityHandle fe_ent = OP::getFEEntityHandle();
2343 // iterate over all boundary data
2344 for (auto &bc : (*bcSpringPtr)) {
2345 // check if finite element entity is part of boundary condition
2346 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2347
2348 for (auto &bd : (*brokenBaseSideDataPtr)) {
2349
2350 auto t_approx_P = getFTensor2FromMat<3, 3, -1, DL>(bd.getFlux());
2351 auto t_u = getFTensor1FromMat<3, -1, DL>(*hybridDispPtr);
2352 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2353 auto t_w = OP::getFTensor0IntegrationWeight();
2354
2357
2359
2360 int nb_dofs = data.getIndices().size();
2361 int nb_integration_pts = OP::getGaussPts().size2();
2362 int nb_base_functions = data.getN().size2();
2363 auto t_row_base = data.getFTensor0N();
2364 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2365
2367 t_N(i) = t_normal(i);
2368 t_N.normalize();
2369
2371 t_P(i, j) = t_N(i) * t_N(j);
2373 t_Q(i, j) = t_kd(i, j) - t_P(i, j);
2374
2375 FTensor::Tensor1<double, 3> t_traction;
2376 t_traction(i) = t_approx_P(i, j) * t_N(j);
2377
2379 t_res(i) = 0.5 *(t_traction(i)) - bc.normalStiffness * t_P(i, j) * t_u(j) -
2380 bc.tangentialStiffness * t_Q(i, j) * t_u(j);
2381
2382 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
2383 int bb = 0;
2384 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
2385 t_nf(i) += (t_w * t_row_base * OP::getMeasure()) * t_res(i);
2386 ++t_nf;
2387 ++t_row_base;
2388 }
2389 for (; bb != nb_base_functions; ++bb)
2390 ++t_row_base;
2391
2392 ++t_w;
2393 ++t_normal;
2394 ++t_u;
2395 ++t_approx_P;
2396 }
2397 }
2398 }
2399 }
2401}
#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
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
auto getFTensor2FromMat(M &data)
Get tensor rank 2 (matrix) form data matrix.
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.
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

◆ bcSpringPtr

boost::shared_ptr<SpringBcVec> OpSpringRhsBc::bcSpringPtr
protected

Definition at line 609 of file EshelbianOperators.hpp.

◆ brokenBaseSideDataPtr

boost::shared_ptr<std::vector<BrokenBaseSideData> > OpSpringRhsBc::brokenBaseSideDataPtr
protected

Definition at line 608 of file EshelbianOperators.hpp.

◆ hybridDispPtr

boost::shared_ptr<MatrixDouble> OpSpringRhsBc::hybridDispPtr
protected

Definition at line 607 of file EshelbianOperators.hpp.


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