![]() |
|
#include <sum_of_matrices.h>
Public Member Functions | |
AddedMainNumberingLookup () | |
Default constructor. More... | |
AddedMainNumberingLookup (const Mesh *mesh_pt, const unsigned &dof_index) | |
AddedMainNumberingLookup (const int *lookup_array, const unsigned &length) | |
~AddedMainNumberingLookup () | |
Destructor. More... | |
unsigned | main_to_added (const int &main) const |
int | unsafe_main_to_added (const int &main) const |
unsigned | added_to_main (const unsigned &added) const |
void | build (const Mesh *mesh_pt, const unsigned &dof_index) |
void | build (const int *lookup_array, const unsigned &length) |
void | build (const Vector< const Node * > &bem_lookup, const unsigned &dof_index) |
Construct lookup using node vector. More... | |
void | build_identity_map (const unsigned &n) |
Construct an identity map (mostly for testing). More... | |
const Vector< unsigned > * | added_to_main_mapping_pt () const |
Const access function for mapping. More... | |
const std::map< unsigned, unsigned > * | main_to_added_mapping_pt () const |
Const access function for mapping. More... | |
Private Member Functions | |
void | construct_added_to_main_mapping (const Mesh *mesh_pt, const unsigned &dof_index) |
Set up the lookup from added matrix row/col to main matrix. More... | |
void | construct_reverse_mapping () |
Set up the main to added mapping using the added to main mapping. More... | |
AddedMainNumberingLookup (const AddedMainNumberingLookup &dummy)=delete | |
Inaccessible copy constructor. More... | |
void | operator= (const AddedMainNumberingLookup &dummy)=delete |
Inaccessible assignment operator. More... | |
Private Attributes | |
Vector< unsigned > | Added_to_main_mapping |
std::map< unsigned, unsigned > | Main_to_added_mapping |
Class to store bi-directional lookup between added matrix row/col numbers to main matrix (SumOfMatrix) row/col numbers.
|
inline |
Real constructor: construct lookup from node numbers in mesh and global equation numbers. Useful for the case when the main matrix is a Jacobian and the added matrix is a contribution only on a certain mesh.
|
inline |
Construct lookup schemes from int array (HLib's format for this data).
|
privatedelete |
Inaccessible copy constructor.
Given a row/col number in the added matrix return the equivalent row/col number in the main matrix.
Const access function for mapping.
Referenced by oomph::SumOfMatrices::add_matrix().
|
inline |
Construct lookup schemes from int array (HLib's format for this data).
References j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::Global_string_for_annotation::string().
|
inline |
Construct the lookup schemes given a mesh and the degree of freedom to lookup main equation numbers for.
|
inline |
|
inline |
Construct an identity map (mostly for testing).
|
inlineprivate |
Set up the lookup from added matrix row/col to main matrix.
References oomph::Data::eqn_number(), oomph::Mesh::nnode(), and oomph::Mesh::node_pt().
|
inlineprivate |
Set up the main to added mapping using the added to main mapping.
References j, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
Given a main matrix row/col number get the equivalent row/col in the added matrix. Throw an error if not found.
References main(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Global_string_for_annotation::string(), and oomph::StringConversion::to_string().
|
inline |
Const access function for mapping.
Referenced by oomph::SumOfMatrices::add_matrix().
|
privatedelete |
Inaccessible assignment operator.
Given a main matrix row/col number get the equivalent row/col in the added matrix. Return -1 if not found.
References Eigen::placeholders::end, and main().
Mapping from added matrix row/col numbers to main matrix row/col numbers.
Mapping from main matrix row/col numbers to added matrix row/col numbers. Note that we cannot use a vector here because the main matrix rows/cols mapped onto are probably not contiguous. Access times are O(log N) so if you need to iterate over all elements then use the pointer access functions and use stl iterators properly.