HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
|
The DirectedGraph class as well as classes that make it up and the NodeArray class. More...
Classes | |
class | DirectedEdge |
class | DirectedCell |
class | NodeArray |
class | DirectedGraph |
Typedefs | |
typedef std::vector< std::vector< std::size_t > > | Array |
Type definition for a matrix of unsigned ints. | |
Functions | |
DirectedEdge::DirectedEdge () | |
Null constructor. | |
DirectedEdge::~DirectedEdge () | |
Destructor. | |
DirectedEdge::DirectedEdge (size_t, size_t) | |
Class Constructor: Initialises the edge with the two nodes that form the edge. | |
DirectedEdge | DirectedEdge::anti_edge () |
Returns the edge consisting of the same nodes, pointing in the opposite direction. | |
bool | operator== (const DirectedEdge &, const DirectedEdge &) |
Boolean operation to test if two edges are equal. | |
DirectedCell::DirectedCell () | |
Null Constructor. | |
DirectedCell::DirectedCell (std::size_t) | |
Constructor. | |
DirectedCell::~DirectedCell () | |
Destructor. | |
DirectedCell::DirectedCell (std::vector< DirectedEdge > &, std::size_t) | |
Class Constructor: Initialises the cell with a vector of edges and the cell ID. | |
void | DirectedCell::add_edge (DirectedEdge &) |
Method to append an edge to the end of the cell. | |
void | DirectedCell::remove_edge (std::size_t) |
Remove edge at a given position. | |
void | DirectedCell::append_cell (DirectedCell &) |
bool | DirectedCell::check_nodes () |
Checks for repeated or lone nodes. | |
bool | DirectedCell::is_ordered () |
Tests if the edges of the cell are ordered. | |
void | DirectedCell::remove_duplicate_edges () |
Method to remove all edge - antiedge pairs. | |
std::vector< DirectedEdge > | DirectedCell::order_edges () |
Orders the cell edges - returns vector of edges to be removed. | |
bool | DirectedCell::has_edge (DirectedEdge) |
Tests if cell has an edge. | |
void | DirectedCell::print () |
Prints all the edges of the cell. | |
NodeArray::NodeArray () | |
Null constructor. | |
NodeArray::~NodeArray () | |
Default constructor. | |
NodeArray::NodeArray (Array &) | |
Class Constructor: Initialises the NodeArray with the cell-node array. | |
bool | NodeArray::node_exists (std::size_t) |
Test if a given node exists in the cell-node array. | |
void | NodeArray::renum_nodes (std::size_t) |
Subtracts one from all nodes greater than a given node. | |
void | NodeArray::print (std::ofstream *, std::size_t width=6) |
Prints the cell node array to an out file stream. | |
DirectedGraph::DirectedGraph () | |
Null constructor. | |
DirectedGraph::~DirectedGraph () | |
Default constructor. | |
DirectedGraph::DirectedGraph (std::vector< DirectedCell > &) | |
Class Constructor: Initialises the DirectedGraph with the cells. | |
void | DirectedGraph::add_cell (DirectedCell &) |
Appends a cell to the end of the graph. | |
void | DirectedGraph::remove_cell (std::size_t) |
Removes cell from a given position. | |
bool | DirectedGraph::test_graph () |
Test if graph has duplicate edges or unordered cells. | |
void | DirectedGraph::randomise () |
Randomise order of cells in graph. | |
void | DirectedGraph::order () |
Order cells in graph by the number of edges in each cell. | |
void | DirectedGraph::coarsen () |
Coarsen the graph by merging cells. | |
NodeArray | DirectedGraph::graph_to_array () |
Returns the cell-node array the graph corresponds to. | |
std::string | DirectedGraph::get_partition () |
Returns list of fine cells that each coarse cell consists of. | |
void | DirectedGraph::plotfile (std::ofstream *, std::vector< Eigen::VectorXd > &) |
Outputs to a .dat file for gnuplot to read. | |
int | main (int argc, char *argv[]) |
Usage: mesh-coarsen <input file> <output file> <number of coarsening levels> | |
Variables | |
std::size_t | DirectedEdge::a |
Node number of the edge tail. | |
std::size_t | DirectedEdge::b |
Node number of the edge head. | |
std::vector< DirectedEdge > | DirectedCell::T |
The edges the cell consists of. | |
std::vector< std::size_t > | DirectedCell::part |
The cell ID's of the cell's that have formed this cell. | |
Array | NodeArray::A |
The cell-node array. | |
std::vector< DirectedCell > | DirectedGraph::G |
Vector of cells that form the graph. | |
The DirectedGraph class as well as classes that make it up and the NodeArray class.
typedef std::vector<std::vector<std::size_t> > Array |
Type definition for a matrix of unsigned ints.
void DirectedGraph::add_cell | ( | DirectedCell & | T | ) |
Appends a cell to the end of the graph.
T | Cell to be added |
void DirectedCell::add_edge | ( | DirectedEdge & | e | ) |
Method to append an edge to the end of the cell.
e | Edge to be added |
DirectedEdge DirectedEdge::anti_edge | ( | ) |
Returns the edge consisting of the same nodes, pointing in the opposite direction.
void DirectedCell::append_cell | ( | DirectedCell & | K | ) |
Appends the vector of edges and partition vector of a cell to the edges and partition of this cell
K | Cell to be added |
bool DirectedCell::check_nodes | ( | ) |
Checks for repeated or lone nodes.
void DirectedGraph::coarsen | ( | ) |
Coarsen the graph by merging cells.
DirectedCell::DirectedCell | ( | ) |
Null Constructor.
DirectedCell::DirectedCell | ( | std::size_t | cell_num | ) |
Constructor.
DirectedCell::DirectedCell | ( | std::vector< DirectedEdge > & | _T, |
std::size_t | cell_num | ||
) |
Class Constructor: Initialises the cell with a vector of edges and the cell ID.
_T | A reference to the edges that the cell consists of |
cell_num | Initial cell ID |
DirectedEdge::DirectedEdge | ( | ) |
Null constructor.
DirectedEdge::DirectedEdge | ( | size_t | , |
size_t | |||
) |
Class Constructor: Initialises the edge with the two nodes that form the edge.
DirectedGraph::DirectedGraph | ( | ) |
Null constructor.
DirectedGraph::DirectedGraph | ( | std::vector< DirectedCell > & | _G | ) |
Class Constructor: Initialises the DirectedGraph with the cells.
_G | Initial cells |
std::string DirectedGraph::get_partition | ( | ) |
Returns list of fine cells that each coarse cell consists of.
NodeArray DirectedGraph::graph_to_array | ( | ) |
Returns the cell-node array the graph corresponds to.
bool DirectedCell::has_edge | ( | DirectedEdge | e | ) |
Tests if cell has an edge.
e | Edge to check for |
bool DirectedCell::is_ordered | ( | ) |
Tests if the edges of the cell are ordered.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Usage: mesh-coarsen <input file> <output file> <number of coarsening levels>
bool NodeArray::node_exists | ( | std::size_t | node | ) |
Test if a given node exists in the cell-node array.
node | Node to test for |
NodeArray::NodeArray | ( | ) |
Null constructor.
NodeArray::NodeArray | ( | Array & | _A | ) |
Class Constructor: Initialises the NodeArray with the cell-node array.
_A | The cell-node array |
bool operator== | ( | const DirectedEdge & | lhs, |
const DirectedEdge & | rhs | ||
) |
Boolean operation to test if two edges are equal.
void DirectedGraph::order | ( | ) |
Order cells in graph by the number of edges in each cell.
std::vector< DirectedEdge > DirectedCell::order_edges | ( | ) |
Orders the cell edges - returns vector of edges to be removed.
void DirectedGraph::plotfile | ( | std::ofstream * | out, |
std::vector< Eigen::VectorXd > & | vertices | ||
) |
Outputs to a .dat file for gnuplot to read.
out | Pointer to the file stream to print to |
vertices | Vertices |
void DirectedCell::print | ( | ) |
Prints all the edges of the cell.
void NodeArray::print | ( | std::ofstream * | out, |
std::size_t | width = 6 |
||
) |
Prints the cell node array to an out file stream.
out | Pointer to the file stream to print to |
width | Optional parameter to format output |
void DirectedGraph::randomise | ( | ) |
Randomise order of cells in graph.
void DirectedGraph::remove_cell | ( | std::size_t | pos | ) |
Removes cell from a given position.
pos | Cell to be removed |
void DirectedCell::remove_duplicate_edges | ( | ) |
Method to remove all edge - antiedge pairs.
void DirectedCell::remove_edge | ( | std::size_t | pos | ) |
Remove edge at a given position.
pos | Position of edge to be removed |
void NodeArray::renum_nodes | ( | std::size_t | node | ) |
Subtracts one from all nodes greater than a given node.
node | Node given |
bool DirectedGraph::test_graph | ( | ) |
Test if graph has duplicate edges or unordered cells.
DirectedCell::~DirectedCell | ( | ) |
Destructor.
DirectedEdge::~DirectedEdge | ( | ) |
Destructor.
DirectedGraph::~DirectedGraph | ( | ) |
Default constructor.
NodeArray::~NodeArray | ( | ) |
Default constructor.
std::size_t DirectedEdge::a |
Node number of the edge tail.
Array NodeArray::A |
The cell-node array.
std::size_t DirectedEdge::b |
Node number of the edge head.
std::vector<DirectedCell> DirectedGraph::G |
Vector of cells that form the graph.
std::vector<std::size_t> DirectedCell::part |
The cell ID's of the cell's that have formed this cell.
std::vector<DirectedEdge> DirectedCell::T |
The edges the cell consists of.