v0.10.0
Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::OpAssembleBasic< T > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpAssembleBasic< T >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpAssembleBasic< T >:
[legend]

Public Member Functions

 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)
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_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)
 

Public Attributes

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
 

Detailed Description

template<typename T>
struct EshelbianPlasticity::OpAssembleBasic< T >

Definition at line 633 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpAssembleBasic() [1/2]

template<typename T>
EshelbianPlasticity::OpAssembleBasic< T >::OpAssembleBasic ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const char  type 
)

Definition at line 640 of file EshelbianPlasticity.hpp.

643  : T(field_name, type), dataAtPts(data_ptr), assembleSymmetry(false) {}
const double T
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

◆ OpAssembleBasic() [2/2]

template<typename T>
EshelbianPlasticity::OpAssembleBasic< T >::OpAssembleBasic ( const std::string &  row_field,
const std::string &  col_field,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const char  type,
const bool  assemble_symmetry 
)

Definition at line 645 of file EshelbianPlasticity.hpp.

648  : T(row_field, col_field, type, false), dataAtPts(data_ptr),
649  assembleSymmetry(assemble_symmetry) {}
const double T
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

Member Function Documentation

◆ assemble() [1/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( EntData data)
virtual

Definition at line 668 of file EshelbianPlasticity.hpp.

668  {
670  double *vec_ptr = &*nF.begin();
671  int nb_dofs = data.getIndices().size();
672  int *ind_ptr = &*data.getIndices().begin();
673  CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
675  }
VectorDouble nF
local right hand side vector
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
const VectorInt & getIndices() const
Get global indices of dofs on entity.
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ assemble() [2/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( int  row_side,
EntityType  row_type,
EntData data 
)
virtual

Reimplemented in EshelbianPlasticity::OpSpatialSchurEnd, EshelbianPlasticity::OpSpatialPreconditionMass, and EshelbianPlasticity::OpSpatialSchurBegin.

Definition at line 677 of file EshelbianPlasticity.hpp.

678  {
680  CHKERR assemble(data);
682  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
virtual MoFEMErrorCode assemble(EntData &data)
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ assemble() [3/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)
virtual

Definition at line 690 of file EshelbianPlasticity.hpp.

692  {
694 
695  auto &bmc = dataAtPts->blockMatContainor;
696  int *row_ind_ptr = &*row_data.getIndices().begin();
697  int *col_ind_ptr = &*col_data.getIndices().begin();
698  int row_nb_dofs = row_data.getIndices().size();
699  int col_nb_dofs = col_data.getIndices().size();
700 
701  auto add_block = [&](auto &row_name, auto &col_name, auto row_side,
702  auto col_side, auto row_type, auto col_type,
703  const auto &m, const auto &row_ind,
704  const auto &col_ind) {
705  auto it = bmc.get<0>().find(boost::make_tuple(
706  row_name, col_name, row_type, col_type, row_side, col_side));
707  if (it != bmc.get<0>().end()) {
708  it->setMat(m);
709  it->setInd(row_ind, col_ind);
710  it->setSetAtElement();
711  } else
712  bmc.insert(DataAtIntegrationPts::BlockMatData(
713  row_name, col_name, row_type, col_type, row_side, col_side, m,
714  row_ind, col_ind));
715  };
716 
717  add_block(this->rowFieldName, this->colFieldName, row_side, col_side,
718  row_type, col_type, K, row_data.getIndices(),
719  col_data.getIndices());
720  if (assembleSymmetry) {
721  transposeK.resize(col_nb_dofs, row_nb_dofs, false);
722  noalias(transposeK) = trans(K);
723  add_block(this->colFieldName, this->rowFieldName, col_side, row_side,
724  col_type, row_type, transposeK, col_data.getIndices(),
725  row_data.getIndices());
726  }
727 
728  double *mat_ptr = &*K.data().begin();
729  CHKERR MatSetValues(this->getTSB(), row_nb_dofs, row_ind_ptr, col_nb_dofs,
730  col_ind_ptr, mat_ptr, ADD_VALUES);
731  if (assembleSymmetry) {
732  double *mat_ptr = &*transposeK.data().begin();
733  CHKERR MatSetValues(this->getTSB(), col_nb_dofs, col_ind_ptr,
734  row_nb_dofs, row_ind_ptr, mat_ptr, ADD_VALUES);
735  }
736 
738  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
const VectorInt & getIndices() const
Get global indices of dofs on entity.
static Index< 'm', 3 > m
MatrixDouble K
local tangent matrix
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ doWork() [1/2]

template<typename T>
MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::doWork ( int  side,
EntityType  type,
EntData data 
)

Definition at line 740 of file EshelbianPlasticity.hpp.

740  {
742  if (data.getIndices().empty())
744  nF.resize(data.getIndices().size(), false);
745  nF.clear();
746  CHKERR integrate(side, type, data);
747  CHKERR assemble(side, type, data);
749  }
VectorDouble nF
local right hand side vector
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
virtual MoFEMErrorCode assemble(EntData &data)
const VectorInt & getIndices() const
Get global indices of dofs on entity.
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
virtual MoFEMErrorCode integrate(EntData &data)

◆ doWork() [2/2]

template<typename T>
MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)

Definition at line 751 of file EshelbianPlasticity.hpp.

753  {
755  if (row_data.getIndices().empty())
757  if (col_data.getIndices().empty())
759  K.resize(row_data.getIndices().size(), col_data.getIndices().size(), false);
760  K.clear();
761  CHKERR integrate(row_data, col_data);
762  CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
764  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
virtual MoFEMErrorCode assemble(EntData &data)
const VectorInt & getIndices() const
Get global indices of dofs on entity.
MatrixDouble K
local tangent matrix
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
virtual MoFEMErrorCode integrate(EntData &data)

◆ integrate() [1/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( EntData data)
virtual

Reimplemented in EshelbianPlasticity::OpSpatialSchurEnd, EshelbianPlasticity::OpSpatialPreconditionMass, EshelbianPlasticity::OpSpatialSchurBegin, EshelbianPlasticity::OpSpatialPrj, EshelbianPlasticity::OpRotationBc, EshelbianPlasticity::OpDispBc, EshelbianPlasticity::OpSpatialConsistencyDivTerm, EshelbianPlasticity::OpSpatialConsistencyBubble, EshelbianPlasticity::OpSpatialConsistencyP, EshelbianPlasticity::OpSpatialPhysical, EshelbianPlasticity::OpSpatialRotation, and EshelbianPlasticity::OpSpatialEquilibrium.

Definition at line 655 of file EshelbianPlasticity.hpp.

655  {
657  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Not yet implemented");
659  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ integrate() [2/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( int  row_side,
EntityType  row_type,
EntData data 
)
virtual

Definition at line 661 of file EshelbianPlasticity.hpp.

662  {
664  CHKERR integrate(data);
666  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
virtual MoFEMErrorCode integrate(EntData &data)

◆ integrate() [3/3]

template<typename T>
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( EntData row_data,
EntData col_data 
)
virtual

Member Data Documentation

◆ assembleSymmetry

template<typename T>
const bool EshelbianPlasticity::OpAssembleBasic< T >::assembleSymmetry

Definition at line 635 of file EshelbianPlasticity.hpp.

◆ dataAtPts

template<typename T>
boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpAssembleBasic< T >::dataAtPts

data at integration pts

Definition at line 638 of file EshelbianPlasticity.hpp.

◆ K

template<typename T>
MatrixDouble EshelbianPlasticity::OpAssembleBasic< T >::K

local tangent matrix

Definition at line 652 of file EshelbianPlasticity.hpp.

◆ nF

template<typename T>
VectorDouble EshelbianPlasticity::OpAssembleBasic< T >::nF

local right hand side vector

Definition at line 651 of file EshelbianPlasticity.hpp.

◆ transposeK

template<typename T>
MatrixDouble EshelbianPlasticity::OpAssembleBasic< T >::transposeK

Definition at line 653 of file EshelbianPlasticity.hpp.


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