v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpSpatialPhysical Struct Reference

#include <users_modules/eshelbian_plasticty/src/EshelbianPlasticity.hpp>

Inheritance diagram for EshelbianPlasticity::OpSpatialPhysical:
[legend]
Collaboration diagram for EshelbianPlasticity::OpSpatialPhysical:
[legend]

Public Member Functions

 OpSpatialPhysical (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const double alpha_u)
 
MoFEMErrorCode integrate (EntData &data)
 
MoFEMErrorCode integratePiola (EntData &data)
 
MoFEMErrorCode integrateHencky (EntData &data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleVolume
 OpAssembleVolume (const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleVolume (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 

Private Attributes

const double alphaU
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
using ScaleOff = boost::function< double()>
 
- Public Attributes inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts More...
 
VectorDouble nF
 local right hand side vector More...
 
MatrixDouble K
 local tangent matrix More...
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 

Detailed Description

Definition at line 497 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPhysical()

EshelbianPlasticity::OpSpatialPhysical::OpSpatialPhysical ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
const double  alpha_u 
)
inline

Definition at line 499 of file EshelbianPlasticity.hpp.

502 : OpAssembleVolume(field_name, data_ptr, OPROW), alphaU(alpha_u) {}
constexpr auto field_name
OpAssembleVolume(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPhysical::integrate ( EntData data)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >.

Examples
EshelbianOperators.cpp.

Definition at line 550 of file EshelbianOperators.cpp.

550 {
552
553 if (dataAtPts->physicsPtr->dependentVariablesPiola.size()) {
555 } else {
557 }
558
560}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MoFEMErrorCode integratePiola(EntData &data)
MoFEMErrorCode integrateHencky(EntData &data)

◆ integrateHencky()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPhysical::integrateHencky ( EntData data)
Examples
EshelbianOperators.cpp.

Definition at line 562 of file EshelbianOperators.cpp.

562 {
564
566 auto t_L = symm_L_tensor();
567
568 int nb_dofs = data.getIndices().size();
569 int nb_integration_pts = data.getN().size1();
570 auto v = getVolume();
571 auto t_w = getFTensor0IntegrationWeight();
572 auto t_approx_P_adjont_log_du =
573 getFTensor1FromMat<size_symm>(dataAtPts->adjontPdUAtPts);
574 auto t_log_streach_h1 =
575 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchTotalTensorAtPts);
576 auto t_dot_log_u =
577 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
578
579 auto t_D = getFTensor4DdgFromMat<3, 3, 0>(dataAtPts->matD);
580
585 auto get_ftensor2 = [](auto &v) {
587 &v[0], &v[1], &v[2], &v[3], &v[4], &v[5]);
588 };
589
590 int nb_base_functions = data.getN().size2();
591 auto t_row_base_fun = data.getFTensor0N();
592 for (int gg = 0; gg != nb_integration_pts; ++gg) {
593 double a = v * t_w;
594 auto t_nf = get_ftensor2(nF);
595
597 t_T(i, j) =
598 t_D(i, j, k, l) * (t_log_streach_h1(k, l) + alphaU * t_dot_log_u(k, l));
600 t_residual(L) = a * (t_approx_P_adjont_log_du(L) - t_L(i, j, L) * t_T(i, j));
601
602 int bb = 0;
603 for (; bb != nb_dofs / 6; ++bb) {
604 t_nf(L) += t_row_base_fun * t_residual(L);
605 ++t_nf;
606 ++t_row_base_fun;
607 }
608 for (; bb != nb_base_functions; ++bb)
609 ++t_row_base_fun;
610
611 ++t_w;
612 ++t_approx_P_adjont_log_du;
613 ++t_dot_log_u;
614 ++t_log_streach_h1;
615 }
617}
constexpr double a
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
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 dofs on entity.

◆ integratePiola()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPhysical::integratePiola ( EntData data)
Examples
EshelbianOperators.cpp.

Definition at line 619 of file EshelbianOperators.cpp.

619 {
621
623 auto t_L = symm_L_tensor();
624
625 int nb_dofs = data.getIndices().size();
626 int nb_integration_pts = data.getN().size1();
627 auto v = getVolume();
628 auto t_w = getFTensor0IntegrationWeight();
629 auto t_approx_P_adjont_log_du =
630 getFTensor1FromMat<size_symm>(dataAtPts->adjontPdUAtPts);
631 auto t_P = getFTensor2FromMat<3, 3>(dataAtPts->PAtPts);
632 auto t_dot_log_u =
633 getFTensor2SymmetricFromMat<3>(dataAtPts->logStretchDotTensorAtPts);
634 auto t_diff_u =
635 getFTensor4DdgFromMat<3, 3, 1>(dataAtPts->diffStretchTensorAtPts);
636
641 auto get_ftensor2 = [](auto &v) {
643 &v[0], &v[1], &v[2], &v[3], &v[4], &v[5]);
644 };
645
646 int nb_base_functions = data.getN().size2();
647 auto t_row_base_fun = data.getFTensor0N();
648 for (int gg = 0; gg != nb_integration_pts; ++gg) {
649 double a = v * t_w;
650 auto t_nf = get_ftensor2(nF);
651
653 t_Ldiff_u(i, j, L) = t_diff_u(i, j, k, l) * t_L(k, l, L);
654
656 t_viscous_P(i, j) =
657 alphaU *
658 t_dot_log_u(i,
659 j); // That is chit, should be split on axiator and deviator
660
662 t_residual(L) =
663 a * (t_approx_P_adjont_log_du(L) - t_Ldiff_u(i, j, L) * t_P(i, j) -
664 t_L(i, j, L) * t_viscous_P(i, j));
665
666 int bb = 0;
667 for (; bb != nb_dofs / 6; ++bb) {
668 t_nf(L) += t_row_base_fun * t_residual(L);
669 ++t_nf;
670 ++t_row_base_fun;
671 }
672 for (; bb != nb_base_functions; ++bb)
673 ++t_row_base_fun;
674
675 ++t_w;
676 ++t_approx_P_adjont_log_du;
677 ++t_P;
678 ++t_dot_log_u;
679 ++t_diff_u;
680 }
682}

Member Data Documentation

◆ alphaU

const double EshelbianPlasticity::OpSpatialPhysical::alphaU
private
Examples
EshelbianOperators.cpp.

Definition at line 510 of file EshelbianPlasticity.hpp.


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