v0.16.0
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 612 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

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

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

619 : 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 2403 of file EshelbianOperators.cpp.

2404 {
2406
2407 int row_nb_dofs = row_data.getIndices().size();
2408 int col_nb_dofs = col_data.getIndices().size();
2409 auto &locMat = OP::locMat;
2410 locMat.resize(row_nb_dofs, col_nb_dofs, false);
2411 locMat.clear();
2412
2413 // get entity of face
2414 EntityHandle fe_ent = OP::getFEEntityHandle();
2415 // iterate over all boundary data
2416 for (auto &bc : (*bcSpringPtr)) {
2417 // check if finite element entity is part of boundary condition
2418 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2419
2420 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
2421 auto t_w = OP::getFTensor0IntegrationWeight();
2422
2425
2426 int nb_integration_pts = OP::getGaussPts().size2();
2427 int nb_base_functions = row_data.getN().size2();
2428 auto t_row_base = row_data.getFTensor0N();
2429
2431
2432 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2433
2435 t_N(i) = t_normal(i);
2436 t_N.normalize();
2437
2439 t_P(i, j) = t_N(i) * t_N(j);
2441 t_Q(i, j) = t_kd(i, j) - t_P(i, j);
2442
2444 t_d_res(i, j) = -(bc.normalStiffness * t_P(i, j) +
2445 bc.tangentialStiffness * t_Q(i, j));
2446
2447 int rr = 0;
2448 for (; rr != row_nb_dofs / SPACE_DIM; ++rr) {
2449 auto t_mat = getFTensor2FromArray<SPACE_DIM, SPACE_DIM, SPACE_DIM>(
2450 locMat, SPACE_DIM * rr);
2451 auto t_col_base = col_data.getFTensor0N(gg, 0);
2452 for (auto cc = 0; cc != col_nb_dofs / SPACE_DIM; ++cc) {
2453 t_mat(i, j) += (t_w * t_row_base * t_col_base) * t_d_res(i, j);
2454 ++t_mat;
2455 ++t_col_base;
2456 }
2457 ++t_row_base;
2458 }
2459
2460 for (; rr != nb_base_functions; ++rr)
2461 ++t_row_base;
2462
2463 ++t_w;
2464 ++t_normal;
2465 }
2466
2467 locMat *= OP::getMeasure();
2468 }
2469 }
2471}
#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 624 of file EshelbianOperators.hpp.


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