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 157 of file EshelbianTopologicalDerivativeOperators.cpp.

Member Function Documentation

◆ integrate()

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

Reimplemented from OpAssembleBasic< FaceUserDataOperator >.

Definition at line 576 of file EshelbianTopologicalDerivativeOperators.cpp.

576 {
578
579#ifndef NDEBUG
580 if (!topoData)
581 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
582 "Topological data pointer is null");
583#endif // NDEBUG
584
585 const int nb_dofs = data.getIndices().size();
586 if (!nb_dofs)
588
589 const int nb_integration_pts = data.getN().size1();
590
591#ifndef NDEBUG
592 const int disp_rows = topoData->objDDisplacementAtPts.size1();
593 const int disp_cols = topoData->objDDisplacementAtPts.size2();
594 if (disp_cols != nb_integration_pts)
595 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
596 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
597 disp_cols, nb_integration_pts);
598
599 if (disp_rows != SPACE_DIM) {
600 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
601 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
602 SPACE_DIM);
603 }
604#endif // NDEBUG
605
606 auto t_w = getFTensor0IntegrationWeight();
607 const int nb_base_functions = data.getN().size2();
608 auto t_row_base_fun = data.getFTensor0N();
609 auto t_obj_du_gamma =
610 getFTensor1FromMat<SPACE_DIM>(topoData->objDDisplacementAtPts);
611
613
614 auto get_ftensor1 = [](auto &v) {
616 &v[0], &v[1], &v[2]);
617 };
618
619 for (int gg = 0; gg != nb_integration_pts; ++gg) {
620 const double a = t_w * getMeasure();
621 auto t_nf = get_ftensor1(nF);
622
623 int bb = 0;
624 for (; bb != nb_dofs / SPACE_DIM; ++bb) {
625 t_nf(i) += a * t_row_base_fun * t_obj_du_gamma(i);
626 ++t_nf;
627 ++t_row_base_fun;
628 }
629 for (; bb != nb_base_functions; ++bb)
630 ++t_row_base_fun;
631
632 ++t_w;
633 ++t_obj_du_gamma;
634 }
635
637}
#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: