Class LibMeshSystemVectors is a convenience class that manages access to libMesh vectors for the same system defined on multiple parts. This class only supports access to vectors ghosted with the Lagrangian partitioning (i.e., libMesh's computed partitioning). The subclass LibMeshSystemIBVectors provides access to the IB partitioning (i.e., the partitioning based on the distribution of SAMRAI data).
More...
#include <ibtk/LibMeshSystemVectors.h>
|
| void | maybeAdd (const std::string &vec_name) |
| | Check if a vector exists and, if not, add it. More...
|
| |
A libMesh::System stores vectors in two different ways: the solution and current_local_solution vectors are stored explicitly by the System object (see libMesh::System::solution and libMesh::System::current_local_solution). They are not accessible by libMesh::System::request_vector() and related functions. All other vectors (including the right-hand side) are stored inside a map and are accessible by request_vector(). IBTK::LibMeshSystemVectors::get(), for the sake of a uniform interface, is inconsistent with libMesh in this regard: the vector name "solution" refers to the solution vector (which is not stored in the map). The same is true for "current_local_solution". For convenience, this class also accepts "current" as an alias for "current_local_solution". All other vector names are stored in the libMesh::System vector map.
All vectors added to a libMesh::System by this class are ghosted (with ghost data computed by the System) and registered for projection (i.e., if the mesh changes, these vectors will be automatically updated).
- Note
- This class is intended for internal use in IBAMR. It is used in IBFEMethod and IBFESurfaceMethod.
◆ LibMeshSystemVectors() [1/2]
| IBTK::LibMeshSystemVectors::LibMeshSystemVectors |
( |
const std::vector< libMesh::EquationSystems * > & |
equation_systems, |
|
|
const std::vector< bool > & |
part_mask, |
|
|
std::string |
system_name |
|
) |
| |
Constructor.
- Parameters
-
| [in] | equation_systems | libMesh::EquationSystems objects for each part. |
| [in] | part_mask | A vector indicating on which parts the given system actually exists (for example, only some parts have fluid sources) |
| [in] | system_name | Name of the libMesh::System whose vectors we are accessing. |
◆ LibMeshSystemVectors() [2/2]
| IBTK::LibMeshSystemVectors::LibMeshSystemVectors |
( |
const std::vector< libMesh::EquationSystems * > & |
equation_systems, |
|
|
std::string |
system_name |
|
) |
| |
Constructor.
- Parameters
-
| [in] | equation_systems | libMesh::EquationSystems objects for each part. |
| [in] | system_name | Name of the libMesh::System whose vectors we are accessing. |
◆ ~LibMeshSystemVectors()
| virtual IBTK::LibMeshSystemVectors::~LibMeshSystemVectors |
( |
| ) |
|
|
virtualdefault |
Destructor. Made virtual to aid inheritance.
◆ get() [1/2]
Get a specific vector for a specific part. These vectors are managed by libMesh::System objects.
- Parameters
-
| [in] | vec_name | Name of the vector - see the note in the general class description for an explanation of the inconsistency of this term versus what libMesh expects. |
| [in] | part | Part number. |
◆ get() [2/2]
Get, for each part, the vector corresponding to the name vec_name. These vectors are managed by libMesh::System objects.
- Parameters
-
| [in] | vec_name | Name of the vector - see the note in the general class description for an explanation of the inconsistency of this term versus what libMesh expects. |
◆ reinit()
| virtual void IBTK::LibMeshSystemVectors::reinit |
( |
| ) |
|
|
virtual |
◆ copy()
| void IBTK::LibMeshSystemVectors::copy |
( |
const std::string & |
source, |
|
|
const std::vector< std::string > & |
dests |
|
) |
| |
Convenience function for copying libMesh vectors.
- Parameters
-
| [in] | source | Name of the input vectors. These should already be present in the libMesh::System. |
| [in] | dests | Names of the output vectors. |
◆ zero()
| void IBTK::LibMeshSystemVectors::zero |
( |
const std::string & |
vec_name | ) |
|
Zero vectors owned by a libMesh::System.
◆ vec_stored_in_map()
| static bool IBTK::LibMeshSystemVectors::vec_stored_in_map |
( |
const std::string & |
vec_name | ) |
|
|
inlinestaticprotected |
◆ maybeAdd()
| void IBTK::LibMeshSystemVectors::maybeAdd |
( |
const std::string & |
vec_name | ) |
|
|
protected |
◆ d_part_mask
| std::vector<bool> IBTK::LibMeshSystemVectors::d_part_mask |
|
protected |
◆ d_system_name
| const std::string IBTK::LibMeshSystemVectors::d_system_name |
|
protected |
◆ d_systems
| std::vector<libMesh::System*> IBTK::LibMeshSystemVectors::d_systems |
|
protected |
The documentation for this class was generated from the following file: