![]() |
NLMech
0.1.0
|
A class to store neighbor list and provide access to the list. More...
#include <neighbor.h>

Public Member Functions | |
| size_t | getNeighbor (const size_t &i, const size_t &j) const |
| Get global id of neighboring node given its local id in the neighbor list. More... | |
| const std::vector< size_t > & | getNeighbors (const size_t &i) |
| Get neighbor list of node i (element i in case of weak_finite_element) More... | |
| std::vector< std::vector< size_t > > & | getNeighborsList () |
| Get the pointer to full neighbor list. More... | |
| const std::vector< std::vector< size_t > > & | getNeighborsList () const |
| Get the pointer to full neighbor list. More... | |
| std::vector< std::vector< size_t > > * | getNeighborsListP () |
| Get the pointer to full neighbor list. More... | |
| const std::vector< std::vector< size_t > > * | getNeighborsListP () const |
| Get the pointer to full neighbor list. More... | |
| Neighbor (const double &horizon, inp::NeighborDeck *deck, const std::vector< util::Point3 > *nodes) | |
| Constructor. More... | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the instance of the object. More... | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing information about the instance of the object. More... | |
Private Attributes | |
| inp::NeighborDeck * | d_neighborDeck_p |
| Interior flags deck. | |
| std::vector< std::vector< size_t > > | d_neighbors |
| Vector of list of neighbors for each node. | |
A class to store neighbor list and provide access to the list.
Currently, nested vector is used for list. However, this is not memory efficient, as the vectors have small memory overhead and the total overhead is N times the overhead of vector, where N is the number of nodes. When N is large, the total overhead becomes very large.
| geometry::Neighbor::Neighbor | ( | const double & | horizon, |
| inp::NeighborDeck * | deck, | ||
| const std::vector< util::Point3 > * | nodes | ||
| ) |
Constructor.
| horizon | Horizon |
| deck | Input deck which contains user-specified information |
| nodes | Pointer to nodal positions |
| size_t geometry::Neighbor::getNeighbor | ( | const size_t & | i, |
| const size_t & | j | ||
| ) | const |
Get global id of neighboring node given its local id in the neighbor list.
| i | Id of node |
| j | Local id of node |
| const std::vector< size_t > & geometry::Neighbor::getNeighbors | ( | const size_t & | i | ) |
Get neighbor list of node i (element i in case of weak_finite_element)
| i | Id of node |
Referenced by model::Output::Output().

| std::vector< std::vector< size_t > > & geometry::Neighbor::getNeighborsList | ( | ) |
Get the pointer to full neighbor list.
| const std::vector< std::vector< size_t > > & geometry::Neighbor::getNeighborsList | ( | ) | const |
Get the pointer to full neighbor list.
| std::vector< std::vector< size_t > > * geometry::Neighbor::getNeighborsListP | ( | ) |
Get the pointer to full neighbor list.
| const std::vector< std::vector< size_t > > * geometry::Neighbor::getNeighborsListP | ( | ) | const |
Get the pointer to full neighbor list.
|
inline |
Prints the information about the instance of the object.
| nt | Number of tabs to append before each line of string |
| lvl | Level of information sought (higher level means more information) |

| std::string geometry::Neighbor::printStr | ( | int | nt = 0, |
| int | lvl = 0 |
||
| ) | const |
Returns the string containing information about the instance of the object.
| nt | Number of tabs to append before each line of string |
| lvl | Level of information sought (higher level means more information) |
Referenced by print().

