|
| v0.14.0
|
Schur complement data storage.
More...
|
using | SchurElemStorage = multi_index_container< const SchurElemMats *, indexed_by< ordered_unique< tag< uid_mi_tag >, composite_key< SchurElemMats, member< SchurElemMats, const UId, &SchurElemMats::uidRow >, member< SchurElemMats, const UId, &SchurElemMats::uidCol > > >, ordered_non_unique< tag< col_mi_tag >, member< SchurElemMats, const UId, &SchurElemMats::uidCol > > > > |
|
Schur complement data storage.
Definition at line 147 of file Schur.cpp.
◆ SchurElemStorage
using MoFEM::SchurElemMats::SchurElemStorage = multi_index_container< const SchurElemMats *, indexed_by< ordered_unique< tag<uid_mi_tag>, composite_key< SchurElemMats, member<SchurElemMats, const UId, &SchurElemMats::uidRow>, member<SchurElemMats, const UId, &SchurElemMats::uidCol> > >, ordered_non_unique<tag<col_mi_tag>, member<SchurElemMats, const UId, &SchurElemMats::uidCol> > > > |
|
protected |
◆ SchurElemMats()
MoFEM::SchurElemMats::SchurElemMats |
( |
const size_t |
idx, |
|
|
const UId |
uid_row, |
|
|
const UId |
uid_col |
|
) |
| |
◆ ~SchurElemMats()
virtual MoFEM::SchurElemMats::~SchurElemMats |
( |
| ) |
|
|
virtualdefault |
◆ assembleStorage()
Definition at line 320 of file Schur.cpp.
331 auto get_row_indices = [&]() ->
const VectorInt & {
332 if (
auto e_ptr = row_data.getFieldEntities()[0]) {
333 if (
auto stored_data_ptr =
334 e_ptr->getSharedStoragePtr<EssentialBcStorage>()) {
335 return stored_data_ptr->entityIndices;
338 return row_data.getIndices();
341 const auto &row_ind = get_row_indices();
342 const auto &col_ind = col_data.getIndices();
344 const auto nb_rows = row_ind.size();
345 const auto nb_cols = col_ind.size();
348 if (mat.size1() != nb_rows) {
350 "Wrong mat size %d != %d", mat.size1(), nb_rows);
352 if (mat.size2() != nb_cols) {
354 "Wrong mat size %d != %d", mat.size2(), nb_cols);
359 auto get_uid = [](
auto &data) {
360 if (data.getFieldEntities().size() == 1) {
362 return data.getFieldEntities()[0]->getLocalUniqueId();
371 auto &uid0 = data.getFieldEntities()[0]->getLocalUniqueId();
377 for (
auto i = 1;
i < data.getFieldEntities().size(); ++
i) {
384 data.getFieldEntities()[
i]->getLocalUniqueId())
398 auto uid_row = get_uid(row_data);
399 auto uid_col = get_uid(col_data);
403 .find(boost::make_tuple(uid_row, uid_col));
435 auto asmb = [&](
auto &sm) {
436 sm.resize(nb_rows, nb_cols,
false);
440 asmb((*p.first)->getMat());
442 auto add_indices = [](
auto &storage,
auto &
ind) {
443 storage.resize(
ind.size(),
false);
444 noalias(storage) =
ind;
447 add_indices((*p.first)->getRowInd(), row_ind);
448 add_indices((*p.first)->getColInd(), col_ind);
453 auto asmb = [&](
auto &sm) {
457 if (sm.size1() != nb_rows) {
459 "Wrong mat or storage size %d != %d", sm.size1(), nb_rows);
461 if (sm.size2() != nb_cols) {
463 "Wrong mat or storage size %d != %d", sm.size2(), nb_cols);
476 "Assembly type not implemented");
481 CHKERR asmb((*it)->getMat());
◆ getColInd()
auto& MoFEM::SchurElemMats::getColInd |
( |
| ) |
const |
|
inline |
◆ getMat()
auto& MoFEM::SchurElemMats::getMat |
( |
| ) |
const |
|
inline |
◆ getRowInd()
auto& MoFEM::SchurElemMats::getRowInd |
( |
| ) |
const |
|
inline |
◆ MatSetValues()
◆ OpSchurAssembleBegin
◆ OpSchurAssembleEndImpl
template<typename OP_SCHUR_ASSEMBLE_BASE >
◆ colIndices
boost::ptr_vector< VectorInt > MoFEM::SchurElemMats::colIndices |
|
staticprotected |
◆ iDX
const size_t MoFEM::SchurElemMats::iDX |
◆ locMats
boost::ptr_vector< MatrixDouble > MoFEM::SchurElemMats::locMats |
|
staticprotected |
◆ maxIndexCounter
size_t MoFEM::SchurElemMats::maxIndexCounter = 0 |
|
staticprotected |
◆ rowIndices
boost::ptr_vector< VectorInt > MoFEM::SchurElemMats::rowIndices |
|
staticprotected |
◆ schurElemMats
boost::ptr_vector< SchurElemMats > MoFEM::SchurElemMats::schurElemMats |
|
staticprotected |
◆ schurL2Storage
◆ uidCol
UId MoFEM::SchurElemMats::uidCol |
◆ uidRow
UId MoFEM::SchurElemMats::uidRow |
The documentation for this struct was generated from the following file:
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
auto id_from_handle(const EntityHandle h)
static boost::ptr_vector< VectorInt > rowIndices
UBlasMatrix< double > MatrixDouble
static boost::ptr_vector< VectorInt > colIndices
static PetscLogEvent MOFEM_EVENT_schurMatSetValues
FTensor::Index< 'M', 3 > M
#define CHKERR
Inline error check.
SchurElemMats(const size_t idx, const UId uid_row, const UId uid_col)
static MoFEMErrorCode assembleStorage(const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
static auto getHandleFromUniqueId(const UId uid)
Get the Handle From Unique Id.
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
static SchurElemStorage schurL2Storage
static size_t maxIndexCounter
auto type_from_handle(const EntityHandle h)
get type from entity handle
static MatSetValuesPtr matSetValuesPtr
backend assembly function
FTensor::Index< 'i', SPACE_DIM > i
static boost::ptr_vector< SchurElemMats > schurElemMats
UBlasVector< int > VectorInt
@ MOFEM_DATA_INCONSISTENCY
static boost::ptr_vector< MatrixDouble > locMats
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
auto ent_form_type_and_id(const EntityType type, const EntityID id)
get entity handle from type and id
static auto getFieldBitNumberFromUniqueId(const UId uid)
Get the Field Bit Number From Unique Id.
#define MoFEMFunctionReturn(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 ...