v0.16.3
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 568 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

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

Definition at line 571 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 574 of file EshelbianOperators.hpp.

578 : OP(row_field, row_field, OP::OPROW), hybridDispPtr(hybrid_disp_ptr),
579 brokenBaseSideDataPtr(broken_side_data_ptr), bcSpringPtr(bc_spring_ptr) {
580 }
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 2405 of file EshelbianOperators.cpp.

2405 {
2407
2408 // get entity of face
2409 EntityHandle fe_ent = OP::getFEEntityHandle();
2410 // iterate over all boundary data
2411 for (auto &bc : (*bcSpringPtr)) {
2412 // check if finite element entity is part of boundary condition
2413 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2414
2415 for (auto &bd : (*brokenBaseSideDataPtr)) {
2416
2417 auto t_approx_P = getFTensor2FromMat<3, 3, -1, DL>(bd.getFlux());
2418 auto t_u = getFTensor1FromMat<3, -1, DL>(*hybridDispPtr);
2419 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2420 auto t_w = OP::getFTensor0IntegrationWeight();
2421
2424
2426
2427 int nb_dofs = data.getIndices().size();
2428 int nb_integration_pts = OP::getGaussPts().size2();
2429 int nb_base_functions = data.getN().size2();
2430 auto t_row_base = data.getFTensor0N();
2431 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2432
2434 t_N(i) = t_normal(i);
2435 t_N.normalize();
2436
2438 t_P(i, j) = t_N(i) * t_N(j);
2440 t_Q(i, j) = t_kd(i, j) - t_P(i, j);
2441
2442 FTensor::Tensor1<double, 3> t_traction;
2443 t_traction(i) = t_approx_P(i, j) * t_N(j);
2444
2446 t_res(i) = 0.5 *(t_traction(i)) - bc.normalStiffness * t_P(i, j) * t_u(j) -
2447 bc.tangentialStiffness * t_Q(i, j) * t_u(j);
2448
2449 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
2450 int bb = 0;
2451 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
2452 t_nf(i) += (t_w * t_row_base * OP::getMeasure()) * t_res(i);
2453 ++t_nf;
2454 ++t_row_base;
2455 }
2456 for (; bb != nb_base_functions; ++bb)
2457 ++t_row_base;
2458
2459 ++t_w;
2460 ++t_normal;
2461 ++t_u;
2462 ++t_approx_P;
2463 }
2464 }
2465 }
2466 }
2468}
#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 587 of file EshelbianOperators.hpp.

◆ brokenBaseSideDataPtr

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

Definition at line 586 of file EshelbianOperators.hpp.

◆ hybridDispPtr

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

Definition at line 585 of file EshelbianOperators.hpp.


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