24template <
typename EleOp>
33 const bool transpose) {
50 int *row_ind_ptr = &*row_data.
getIndices().begin();
51 int *col_ind_ptr = &*col_data.
getIndices().begin();
52 int row_nb_dofs = row_data.
getIndices().size();
53 int col_nb_dofs = col_data.
getIndices().size();
57 auto set_block = [&](
auto &row_name,
auto &col_name,
auto row_side,
58 auto col_side,
auto row_type,
auto col_type,
59 const auto &
m,
const auto &row_ind,
60 const auto &col_ind) {
61 auto it = bmc.get<0>().find(boost::make_tuple(
62 row_name, col_name, row_type, col_type, row_side, col_side));
63 if (it != bmc.get<0>().end()) {
65 it->setInd(row_ind, col_ind);
66 it->setSetAtElement();
68 bmc.insert(
BlockMatData(row_name, col_name, row_type, col_type,
69 row_side, col_side,
m, row_ind, col_ind));
72 if ( this->rowFieldName !=
"SIGMA" &&
73 this->colFieldName !=
"SIGMA") {
75 if (
auto stored_data_ptr =
78 set_block(this->rowFieldName, this->colFieldName, this->
rowSide,
80 stored_data_ptr->entityIndices, col_data.
getIndices());
82 set_block(this->colFieldName, this->rowFieldName, this->
colSide,
84 col_data.
getIndices(), stored_data_ptr->entityIndices);
87 set_block(this->rowFieldName, this->colFieldName, this->
rowSide,
92 set_block(this->colFieldName, this->rowFieldName, this->
colSide,
98 "No field entities for assembly");
105 this->getKSPB(), col_data, row_data,
112 this->getKSPB(), row_data, col_data, &*this->
locMat.data().begin(),
121 this->getKSPf(), data, &*this->
locF.data().begin(), ADD_VALUES);
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'm', SPACE_DIM > m
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
MoFEMErrorCode set_contact_dm(MoFEM::Interface &m_field, SmartPetscObj< DM > &dm, SmartPetscObj< DM > &dm_contact)
boost::weak_ptr< BlockMatContainer > block_mat_container_ptr
MoFEMErrorCode MatSetValues< EssentialBcStorage >(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Set values to matrix in operator.
MoFEMErrorCode set_plastic_tau_dm(MoFEM::Interface &m_field, SmartPetscObj< DM > &dm, SmartPetscObj< DM > &dm_plastic_tau)
MoFEMErrorCode set_plastic_ep_dm(MoFEM::Interface &m_field, SmartPetscObj< DM > &dm, SmartPetscObj< DM > &dm_plastic)
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
const VectorFieldEntities & getFieldEntities() const
get field entities
const VectorInt & getIndices() const
Get global indices of dofs on entity.
[Storage and set boundary conditions]
default operator for TRI element
MoFEMErrorCode aSsemble(EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data, const bool transpose)
MoFEMErrorCode aSsemble(EntitiesFieldData::EntData &data)
VectorDouble locF
local entity vector
MatrixDouble locMatTranspose
local entity block matrix
int rowSide
row side number
int colSide
column side number
EntityType colType
column type
MatrixDouble locMat
local entity block matrix
EntityType rowType
row type
intrusive_ptr for managing petsc objects
Volume finite element base.
default operator for TET element
Base volume element used to integrate on skeleton.