v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | List of all members
EshelbianPlasticity::dJ_duGammaImpl Struct Reference
Inheritance diagram for EshelbianPlasticity::dJ_duGammaImpl:
[legend]
Collaboration diagram for EshelbianPlasticity::dJ_duGammaImpl:
[legend]

Public Member Functions

MoFEMErrorCode integrate (EntData &data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleTopologicalObjectiveDerivativeImplBase< OpAssembleFace >
 OpAssembleTopologicalObjectiveDerivativeImplBase (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< TopologicalData > topo_ptr, boost::shared_ptr< double > J_ptr, SmartPetscObj< Vec > assemble_vec, Tag topo_tag)
 
MoFEMErrorCode assemble (EntData &data) override
 
- Public Member Functions inherited from OpAssembleBasic< FaceUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
 OpAssembleBasic (const FieldSpace space)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_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)
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::OpAssembleTopologicalObjectiveDerivativeImplBase< OpAssembleFace >
using OP = OpAssembleFace
 
- Public Types inherited from OpAssembleBasic< FaceUserDataOperator >
using ScaleOff = boost::function< double()>
 
- Public Attributes inherited from OpAssembleBasic< FaceUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts
 
VectorDouble nF
 local right hand side vector
 
MatrixDouble K
 local tangent matrix
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 
- Protected Attributes inherited from EshelbianPlasticity::OpAssembleTopologicalObjectiveDerivativeImplBase< OpAssembleFace >
double locJ
 
boost::shared_ptr< doubleJPtr
 
SmartPetscObj< Vec > assembleVec
 
Tag topoTag
 
boost::shared_ptr< TopologicalDatatopoData
 

Detailed Description

Definition at line 170 of file EshelbianTopologicalDerivativeOperators.cpp.

Member Function Documentation

◆ integrate()

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

Reimplemented from OpAssembleBasic< FaceUserDataOperator >.

Definition at line 589 of file EshelbianTopologicalDerivativeOperators.cpp.

589 {
591
592#ifndef NDEBUG
593 if (!topoData)
594 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
595 "Topological data pointer is null");
596#endif // NDEBUG
597
598 const int nb_dofs = data.getIndices().size();
599 if (!nb_dofs)
601
602 const int nb_integration_pts = data.getN().size1();
603
604#ifndef NDEBUG
605 const int disp_rows = topoData->objDDisplacementAtPts.size1();
606 const int disp_cols = topoData->objDDisplacementAtPts.size2();
607 if (disp_cols != nb_integration_pts)
608 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
609 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
610 disp_cols, nb_integration_pts);
611
612 if (disp_rows != SPACE_DIM) {
613 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
614 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
615 SPACE_DIM);
616 }
617#endif // NDEBUG
618
619 auto t_w = getFTensor0IntegrationWeight();
620 const int nb_base_functions = data.getN().size2();
621 auto t_row_base_fun = data.getFTensor0N();
622 auto t_obj_du_gamma =
623 getFTensor1FromMat<SPACE_DIM>(topoData->objDDisplacementAtPts);
624
626
627 auto get_ftensor1 = [](auto &v) {
629 &v[0], &v[1], &v[2]);
630 };
631
632 for (int gg = 0; gg != nb_integration_pts; ++gg) {
633 const double a = t_w * getMeasure();
634 auto t_nf = get_ftensor1(nF);
635
636 int bb = 0;
637 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
638 t_nf(i) += a * t_row_base_fun * t_obj_du_gamma(i);
639 ++t_nf;
640 ++t_row_base_fun;
641 }
642 for (; bb != nb_base_functions; ++bb)
643 ++t_row_base_fun;
644
645 ++t_w;
646 ++t_obj_du_gamma;
647 }
648
650}
#define FTENSOR_INDEX(DIM, I)
constexpr double a
constexpr int SPACE_DIM
#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 ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
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.
VectorDouble nF
local right hand side vector

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