17 boost::shared_ptr<std::vector<unsigned char>> boundary_marker)
20 yesSet(yes_set), boundaryMarker(boundary_marker) {}
30 for (
int r = 0; r != data.
getIndices().size(); ++r) {
45 boost::make_shared<EssentialBcStorage>(indices));
46 e_ptr->getWeakStoragePtr() =
78 const double *ptr, InsertMode iora) {
83 "Pointer to PETSc vector is null");
85 CHKERR VecSetOption(V, VEC_IGNORE_NEGATIVE_INDICES, PETSC_TRUE);
88 if (
auto stored_data_ptr =
90 return ::VecSetValues(V, stored_data_ptr->entityIndices.size(),
91 &*stored_data_ptr->entityIndices.begin(), ptr,
96 return ::VecSetValues(V, data.
getIndices().size(),
119 "Pointer to PETSc matrix is null");
123 if (
auto stored_data_ptr =
125 return ::MatSetValues(
M, stored_data_ptr->entityIndices.size(),
126 &*stored_data_ptr->entityIndices.begin(),
132 return ::MatSetValues(
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#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.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
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.
constexpr auto field_name
Data on single entity (This is passed as argument to DataOperator::doWork)
const VectorFieldEntities & getFieldEntities() const
get field entities
const VectorInt & getLocalIndices() const
get local indices of dofs on entity
const VectorInt & getIndices() const
Get global indices of dofs on entity.
[Storage and set boundary conditions]
static HashVectorStorage feStorage
[Storage and set boundary conditions]
map< std::string, std::vector< boost::shared_ptr< EssentialBcStorage > > > HashVectorStorage
Store modifed indices by field.
structure to get information form mofem into EntitiesFieldData
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
OpSetBc(std::string field_name, bool yes_set, boost::shared_ptr< std::vector< unsigned char > > boundary_marker)
boost::shared_ptr< std::vector< unsigned char > > boundaryMarker
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
OpUnSetBc(std::string field_name)