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

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

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

Public Types

using OP = FormsIntegrators< VolUserDataOperator >::Assembly< PETSC >::OpBase
 

Public Member Functions

 OpSpatialRotationPrec (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_omega_prec)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data) override
 
MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool) override
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPts > dataAtPts
 
const double alphaOmegaPrec
 

Detailed Description

Add an intermediate-configuration rotation-gradient block to Schur PC storage.

Definition at line 869 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

using OpSpatialRotationPrec::OP = FormsIntegrators<VolUserDataOperator>::Assembly<PETSC>::OpBase

Definition at line 871 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpSpatialRotationPrec()

OpSpatialRotationPrec::OpSpatialRotationPrec ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts >  data_ptr,
const double  alpha_omega_prec 
)
inline

Definition at line 873 of file EshelbianOperators.hpp.

876 : OP(field_name, field_name, OPROWCOL), dataAtPts(data_ptr),
877 alphaOmegaPrec(alpha_omega_prec) {
878 sYmm = false;
879 }
constexpr auto field_name
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
FormsIntegrators< VolUserDataOperator >::Assembly< PETSC >::OpBase OP

Member Function Documentation

◆ aSsemble()

MoFEMErrorCode OpSpatialRotationPrec::aSsemble ( EntData &  row_data,
EntData &  col_data,
const bool   
)
overrideprotected
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 3635 of file EshelbianOperators.cpp.

3636 {
3638 // A borrowed pipeline may assemble an exact PETSc tangent for diagnostics.
3639 PetscBool is_shell = PETSC_FALSE;
3640 CHKERR PetscObjectTypeCompare(getPetscObject(getTSB()), MATSHELL, &is_shell);
3641 if (!is_shell)
3643 // The form base owns local assembly; only its destination differs.
3645 getTSB(), row_data, col_data, locMat, ADD_VALUES);
3647}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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()
#define CHKERR
Inline error check.
PetscObject getPetscObject(T obj)
static MatSetValuesPtr matSetValuesPreconditionedBlockPtr
Definition Schur.hpp:300

◆ iNtegrate()

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

Definition at line 3593 of file EshelbianOperators.cpp.

3594 {
3596 FTensor::Index<'i', 3> i;
3597 FTensor::Index<'j', 3> j;
3598 FTensor::Index<'k', 3> k;
3599 FTensor::Index<'l', 3> l;
3600 const auto t_delta = FTensor::Kronecker_Delta<double>();
3601 const double volume = getVolume();
3602 auto t_weight = getFTensor0IntegrationWeight();
3603 auto t_plastic_f = dataAtPts->getFTensorPlasticF(nbIntegrationPts);
3604 auto t_inv_plastic_f = dataAtPts->getFTensorInvPlasticF(nbIntegrationPts);
3605 auto t_row_grad = row_data.getFTensor1DiffN<3>();
3606
3607 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
3608 const double a =
3609 volume * t_weight * determinantTensor3by3(t_plastic_f) * alphaOmegaPrec;
3610 int rr = 0;
3611 for (; rr != nbRows / 3; ++rr) {
3612 auto t_mat = getLocMat<3>(3 * rr);
3613 FTensor::Tensor1<double, 3> t_row_intermediate;
3614 t_row_intermediate(j) = t_row_grad(i) * t_inv_plastic_f(i, j);
3615 auto t_col_grad = col_data.getFTensor1DiffN<3>(gg, 0);
3616 for (int cc = 0; cc != nbCols / 3; ++cc) {
3617 FTensor::Tensor1<double, 3> t_col_intermediate;
3618 t_col_intermediate(j) = t_col_grad(i) * t_inv_plastic_f(i, j);
3619 t_mat(k, l) += t_delta(k, l) *
3620 (a * (t_row_intermediate(j) * t_col_intermediate(j)));
3621 ++t_mat;
3622 ++t_col_grad;
3623 }
3624 ++t_row_grad;
3625 }
3626 for (; rr != nbRowBaseFunctions; ++rr)
3627 ++t_row_grad;
3628 ++t_weight;
3629 ++t_plastic_f;
3630 ++t_inv_plastic_f;
3631 }
3633}
constexpr double a
Kronecker Delta class.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
auto getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.

Member Data Documentation

◆ alphaOmegaPrec

const double OpSpatialRotationPrec::alphaOmegaPrec
private

Definition at line 888 of file EshelbianOperators.hpp.

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> OpSpatialRotationPrec::dataAtPts
private

Definition at line 887 of file EshelbianOperators.hpp.


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