![]() |
v0.15.0 |
Vector manager is used to create vectors \mofem_vectors. More...
#include "src/interfaces/VecManager.hpp"
Public Member Functions | |
| MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
| VecManager (const MoFEM::Core &core) | |
| ~VecManager ()=default | |
| MoFEMErrorCode | vecCreateSeq (const std::string name, RowColData rc, Vec *V) const |
| create local vector for problem | |
| MoFEMErrorCode | vecCreateGhost (const std::string name, RowColData rc, Vec *V) const |
| create ghost vector for problem (collective) | |
| MoFEMErrorCode | vecCreateGhost (const std::string name, RowColData rc, SmartPetscObj< Vec > &v_ptr) const |
| create ghost vector for problem (collective) | |
| MoFEMErrorCode | vecScatterCreate (Vec xin, const std::string x_problem, const std::string x_field_name, RowColData x_rc, Vec yin, const std::string y_problem, const std::string y_field_name, RowColData y_rc, VecScatter *newctx) const |
| create scatter for vectors from one to another problem (collective) | |
| MoFEMErrorCode | vecScatterCreate (Vec xin, const std::string x_problem, const std::string x_field_name, RowColData x_rc, Vec yin, const std::string y_problem, const std::string y_field_name, RowColData y_rc, SmartPetscObj< VecScatter > &smart_newctx) const |
| create scatter for vectors from one to another problem (collective) | |
| MoFEMErrorCode | vecScatterCreate (Vec xin, const std::string x_problem, RowColData x_rc, Vec yin, const std::string y_problem, RowColData y_rc, VecScatter *newctx) const |
| create scatter for vectors from one to another problem (collective) | |
| MoFEMErrorCode | vecScatterCreate (Vec xin, const std::string x_problem, RowColData x_rc, Vec yin, const std::string y_problem, RowColData y_rc, SmartPetscObj< VecScatter > &smart_newctx) const |
| create scatter for vectors from one to another problem (collective) | |
| MoFEMErrorCode | setLocalGhostVector (const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| set values of vector from/to mesh database | |
| MoFEMErrorCode | setLocalGhostVector (const std::string name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| set values of vector from/to mesh database | |
| MoFEMErrorCode | setGlobalGhostVector (const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| MoFEMErrorCode | setGlobalGhostVector (const std::string name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| MoFEMErrorCode | setOtherLocalGhostVector (const Problem *problem_ptr, const std::string field_name, const std::string cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| Copy vector to field which is not part of the problem. | |
| MoFEMErrorCode | setOtherLocalGhostVector (const std::string name, const std::string field_name, const std::string cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| Copy vector to field which is not part of the problem. | |
| MoFEMErrorCode | setOtherGlobalGhostVector (const Problem *problem_ptr, const std::string field_name, const std::string cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| Copy vector to field which is not part of the problem (collective) | |
| MoFEMErrorCode | setOtherGlobalGhostVector (const std::string name, const std::string field_name, const std::string cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const |
| Copy vector to field which is not part of the problem (collective) | |
Public Member Functions inherited from MoFEM::UnknownInterface | |
| template<class IFACE > | |
| MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
| Register interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE *&iface) const |
| Get interface reference to pointer of interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE **const iface) const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get reference to interface. | |
| template<class IFACE > | |
| IFACE * | getInterface () const |
| Function returning pointer to interface. | |
| virtual | ~UnknownInterface ()=default |
Public Attributes | |
| const MoFEM::Interface & | cOre |
| bool | dEbug |
Additional Inherited Members | |
Static Public Member Functions inherited from MoFEM::UnknownInterface | |
| static MoFEMErrorCode | getLibVersion (Version &version) |
| Get library version. | |
| static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
| Get database major version. | |
| static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
| Get database major version. | |
| static MoFEMErrorCode | getInterfaceVersion (Version &version) |
| Get database major version. | |
Vector manager is used to create vectors \mofem_vectors.
Managing Vectors, creation, scatter, etc.
Definition at line 23 of file VecManager.hpp.
| MoFEM::VecManager::VecManager | ( | const MoFEM::Core & | core | ) |
Definition at line 14 of file VecManager.cpp.
|
default |
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 8 of file VecManager.cpp.
| MoFEMErrorCode MoFEM::VecManager::setGlobalGhostVector | ( | const Problem * | problem_ptr, |
| RowColData | rc, | ||
| Vec | V, | ||
| InsertMode | mode, | ||
| ScatterMode | scatter_mode | ||
| ) | const |
\brief set values of vector from/to mesh database (collective) \ingroup mofem_vectors
collective - need to be run on all processors in communicator
| pointer | to problem structure |
| RowColData | for row or column (ROW or COL) |
| V | vector |
| mode | see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES) |
| scatter_mode | see petsc manual for ScatterMode (The available modes are: SCATTER_FORWARD or SCATTER_REVERSE) |
SCATTER_REVERSE set data to field entities from V vector.
Definition at line 301 of file VecManager.cpp.
| MoFEMErrorCode MoFEM::VecManager::setGlobalGhostVector | ( | const std::string | name, |
| RowColData | rc, | ||
| Vec | V, | ||
| InsertMode | mode, | ||
| ScatterMode | scatter_mode | ||
| ) | const |
\brief set values of vector from/to mesh database (collective) \ingroup mofem_vectors
collective - need to be run on all processors in communicator
\param name of the problem
| RowColData | for row or column (ROW or COL) |
| V | vector |
| mode | see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES) |
| scatter_mode | see petsc manual for ScatterMode (The available modes are: SCATTER_FORWARD or SCATTER_REVERSE) |
SCATTER_REVERSE set data to field entities from V vector.
Definition at line 368 of file VecManager.cpp.
| MoFEMErrorCode MoFEM::VecManager::vecCreateGhost | ( | const std::string | name, |
| RowColData | rc, | ||
| SmartPetscObj< Vec > & | v_ptr | ||
| ) | const |
create ghost vector for problem (collective)
collective - need to be run on all processors in communicator
| name | problem name |
| RowColData | specify what data is taken from Row, Col or Data |
| Vec | the vector where data is stored |
Definition at line 122 of file VecManager.cpp.
| MoFEMErrorCode MoFEM::VecManager::vecScatterCreate | ( | Vec | xin, |
| const std::string | x_problem, | ||
| const std::string | x_field_name, | ||
| RowColData | x_rc, | ||
| Vec | yin, | ||
| const std::string | y_problem, | ||
| const std::string | y_field_name, | ||
| RowColData | y_rc, | ||
| SmartPetscObj< VecScatter > & | smart_newctx | ||
| ) | const |
create scatter for vectors from one to another problem (collective)
User specify what name of field on one problem is scattered to another.
| xin | vector |
| x_problem | problem name |
| x_field | name |
| yin | vector |
| y_problem | problem name |
| y_field_name |
| newctx | scatter |
Definition at line 177 of file VecManager.cpp.
| MoFEMErrorCode MoFEM::VecManager::vecScatterCreate | ( | Vec | xin, |
| const std::string | x_problem, | ||
| RowColData | x_rc, | ||
| Vec | yin, | ||
| const std::string | y_problem, | ||
| RowColData | y_rc, | ||
| SmartPetscObj< VecScatter > & | smart_newctx | ||
| ) | const |
create scatter for vectors from one to another problem (collective)
User specify what name of field on one problem is scattered to another.
| xin | vector |
| x_problem | problem name |
| x_field | name |
| yin | vector |
| y_problem | problem name |
| y_field_name |
| newctx | scatter |
Definition at line 191 of file VecManager.cpp.
| const MoFEM::Interface& MoFEM::VecManager::cOre |
Definition at line 28 of file VecManager.hpp.
| bool MoFEM::VecManager::dEbug |
Definition at line 29 of file VecManager.hpp.