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

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

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

Public Types

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

Public Member Functions

 OpSpringLhsBc_dU (std::string row_field, boost::shared_ptr< SpringBcVec > bc_spring_ptr)
 
MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 

Protected Attributes

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 OpSpringLhsBc_dU::OP = typename FormsIntegrators<FaceUserDataOperator>::Assembly<A>::OpBase

Definition at line 593 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpSpringLhsBc_dU()

OpSpringLhsBc_dU::OpSpringLhsBc_dU ( std::string  row_field,
boost::shared_ptr< SpringBcVec >  bc_spring_ptr 
)
inline

Definition at line 595 of file EshelbianOperators.hpp.

597 : OP(row_field, row_field, OP::OPROWCOL), bcSpringPtr(bc_spring_ptr) {}
typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBase OP
boost::shared_ptr< SpringBcVec > bcSpringPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpSpringLhsBc_dU::iNtegrate ( EntData &  row_data,
EntData &  col_data 
)
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 2470 of file EshelbianOperators.cpp.

2471 {
2473
2474 int row_nb_dofs = row_data.getIndices().size();
2475 int col_nb_dofs = col_data.getIndices().size();
2476 auto &locMat = OP::locMat;
2477 locMat.resize(row_nb_dofs, col_nb_dofs, false);
2478 locMat.clear();
2479
2480 // get entity of face
2481 EntityHandle fe_ent = OP::getFEEntityHandle();
2482 // iterate over all boundary data
2483 for (auto &bc : (*bcSpringPtr)) {
2484 // check if finite element entity is part of boundary condition
2485 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2486
2487 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2488 auto t_w = OP::getFTensor0IntegrationWeight();
2489
2492
2493 int nb_integration_pts = OP::getGaussPts().size2();
2494 int nb_base_functions = row_data.getN().size2();
2495 auto t_row_base = row_data.getFTensor0N();
2496
2498
2499 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2500
2502 t_N(i) = t_normal(i);
2503 t_N.normalize();
2504
2506 t_P(i, j) = t_N(i) * t_N(j);
2508 t_Q(i, j) = t_kd(i, j) - t_P(i, j);
2509
2511 t_d_res(i, j) = -(bc.normalStiffness * t_P(i, j) +
2512 bc.tangentialStiffness * t_Q(i, j));
2513
2514 int rr = 0;
2515 for (; rr != row_nb_dofs / SPACE_DIM; ++rr) {
2516 auto t_mat = getFTensor2FromArray<SPACE_DIM, SPACE_DIM, SPACE_DIM>(
2517 locMat, SPACE_DIM * rr);
2518 auto t_col_base = col_data.getFTensor0N(gg, 0);
2519 for (auto cc = 0; cc != col_nb_dofs / SPACE_DIM; ++cc) {
2520 t_mat(i, j) += (t_w * t_row_base * t_col_base) * t_d_res(i, j);
2521 ++t_mat;
2522 ++t_col_base;
2523 }
2524 ++t_row_base;
2525 }
2526
2527 for (; rr != nb_base_functions; ++rr)
2528 ++t_row_base;
2529
2530 ++t_w;
2531 ++t_normal;
2532 }
2533
2534 locMat *= OP::getMeasure();
2535 }
2536 }
2538}
#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
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> OpSpringLhsBc_dU::bcSpringPtr
protected

Definition at line 602 of file EshelbianOperators.hpp.


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