| FEAT 3
    Finite Element Analysis Toolbox | 
Adjacency Graph implementation. More...
#include <graph.hpp>
| Public Types | |
| typedef IndexVector::const_iterator | ImageIterator | 
| ImageIterator for Graph class.  More... | |
| using | IndexVector = std::vector< Index > | 
| index vector type  More... | |
| Public Member Functions | |
| Graph () | |
| Default constructor.  More... | |
| Graph (const Graph &other, const Permutation &domain_perm, const Permutation &image_perm) | |
| "Permutation" copy CTOR  More... | |
| Graph (const std::vector< char > &buffer) | |
| Deserialization CTOR.  More... | |
| Graph (Graph &&other) | |
| move CTOR  More... | |
| Graph (Index num_nodes_domain, Index num_nodes_image, Index num_indices_image) | |
| Allocation Constructor.  More... | |
| Graph (Index num_nodes_domain, Index num_nodes_image, Index num_indices_image, const Index *domain_ptr, const Index *image_idx) | |
| "Copy-Arrays" Constructor  More... | |
| Graph (Index num_nodes_image, const IndexVector &domain_ptr, const IndexVector &image_idx) | |
| "Copy-Vectors" Constructor  More... | |
| Graph (Index num_nodes_image, IndexVector &&domain_ptr, IndexVector &&image_idx) | |
| "Move-Vectors" Constructor  More... | |
| template<typename Adjactor1_ , typename Adjactor2_ > | |
| Graph (RenderType render_type, const Adjactor1_ &adjactor1, const Adjactor2_ &adjactor2) | |
| Composite-Render constructor.  More... | |
| template<typename Adjactor_ > | |
| Graph (RenderType render_type, const Adjactor_ &adjactor) | |
| Render constructor.  More... | |
| virtual | ~Graph () | 
| virtual destructor  More... | |
| void | clear () | 
| Clears the graph.  More... | |
| Graph | clone () const | 
| Clones this graph.  More... | |
| Index | degree () const | 
| Returns the degree of the graph.  More... | |
| Index | degree (Index domain_node) const | 
| Returns the degree of a domain node.  More... | |
| Index * | get_domain_ptr () | 
| Returns the domain pointer array.  More... | |
| const Index * | get_domain_ptr () const | 
| Returns the domain pointer array.   More... | |
| Index * | get_image_idx () | 
| Returns the image node index array.  More... | |
| const Index * | get_image_idx () const | 
| Returns the image node index array.   More... | |
| Index | get_num_indices () const | 
| Returns the total number indices.  More... | |
| Index | get_num_nodes_domain () const | 
| Index | get_num_nodes_image () const | 
| ImageIterator | image_begin (Index domain_node) const | 
| Returns an iterator for the first adjacent image node.   More... | |
| ImageIterator | image_end (Index domain_node) const | 
| Returns an iterator for the first position past the last adjacent image node.   More... | |
| Graph & | operator= (Graph &&other) | 
| move-assign operator  More... | |
| void | permute_indices (const Adjacency::Permutation &inv_perm) | 
| Permutes the image indices.  More... | |
| std::vector< char > | serialize () const | 
| Serializes the graph into a buffer.  More... | |
| void | sort_indices () | 
| Sorts the image indices to non-descending order.  More... | |
| Static Public Attributes | |
| static constexpr std::uint64_t | magic = 0x5052474A44413346ull | 
| magic number for Graph serialization  More... | |
| Protected Attributes | |
| IndexVector | _domain_ptr | 
| Domain pointer Vector.  More... | |
| IndexVector | _image_idx | 
| Image node index Vector.  More... | |
| Index | _num_nodes_image | 
| total number of image nodes  More... | |
| typedef IndexVector::const_iterator FEAT::Adjacency::Graph::ImageIterator | 
| using FEAT::Adjacency::Graph::IndexVector = std::vector<Index> | 
| FEAT::Adjacency::Graph::Graph | ( | ) | 
| 
 | explicit | 
Allocation Constructor.
This constructor creates a new graph and allocates the Graph's vectors to the corresponding lengths.
| [in] | num_nodes_domain | The total number of domain nodes for the graph. | 
| [in] | num_nodes_image | The total number of image nodes for the graph. | 
| [in] | num_indices_image | The total number of image node indices for the graph. | 
| 
 | explicit | 
"Copy-Arrays" Constructor
This constructor creates a new graph using copies of the arrays passed to this function.
| [in] | num_nodes_domain | The total number of domain nodes for the graph. | 
| [in] | num_nodes_image | The total number of image nodes for the graph. | 
| [in] | num_indices_image | The total number of image node indices for the graph. | 
| [in] | domain_ptr | The transient domain pointer array for the graph. Must not be nullptr. | 
| [in] | image_idx | The transient image node index array for the graph. Must not be nullptr. | 
Definition at line 34 of file graph.cpp.
References _domain_ptr, and _image_idx.
| 
 | explicit | 
"Copy-Vectors" Constructor
This constructor creates a new graph using copies of the vectors passed to this function.
| 
 | explicit | 
"Move-Vectors" Constructor
This constructor creates a new graph using copies of the vectors passed to this function.
| 
 | inlineexplicit | 
Render constructor.
This constructor renders an object implementing the Adjactor interface into a graph.
| [in] | render_type | The render type. See RenderType for details. | 
| [in] | adjactor | A reference to the adjactor that is to be rendered. | 
Definition at line 175 of file graph.hpp.
References FEAT::Adjacency::as_is, FEAT::Adjacency::as_is_sorted, FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Adjacency::injectify_transpose, FEAT::Adjacency::injectify_transpose_sorted, sort_indices(), FEAT::Adjacency::transpose, FEAT::Adjacency::transpose_sorted, and XABORTM.
| 
 | inlineexplicit | 
Composite-Render constructor.
This constructor renders a composition of two objects implementing the Adjactor interface into a graph.
| [in] | render_type | The render type. See RenderType for details. | 
| [in] | adjactor1 | A transient reference to the first adjactor in the composition that is to be rendered. | 
| [in] | adjactor2 | A transient reference to the second adjactor in the composition that is to be rendered. | 
Definition at line 228 of file graph.hpp.
References FEAT::Adjacency::as_is, FEAT::Adjacency::as_is_sorted, FEAT::Adjacency::injectify, FEAT::Adjacency::injectify_sorted, FEAT::Adjacency::injectify_transpose, FEAT::Adjacency::injectify_transpose_sorted, sort_indices(), FEAT::Adjacency::transpose, FEAT::Adjacency::transpose_sorted, and XABORTM.
| 
 | explicit | 
"Permutation" copy CTOR
This constructor creates a new graph by permuting the domain and image set of the graph that is passed to this function.
| [in] | other | The transient graph that has to be permuted. | 
| [in] | domain_perm | The transient permutation of the domain set. | 
| [in] | image_perm | The transient permutation of the image set. | 
Definition at line 108 of file graph.cpp.
References _domain_ptr, _image_idx, and FEAT::Adjacency::Permutation::get_perm_pos().
| 
 | explicit | 
Deserialization CTOR.
This constructor creates the graph from a buffer that has been created by using the serialize function.
| [in] | buffer | The transient serialization buffer to create the graph from. | 
Definition at line 142 of file graph.cpp.
References _domain_ptr, _image_idx, _num_nodes_image, magic, and XASSERTM.
| 
 | virtual | 
| void FEAT::Adjacency::Graph::clear | ( | ) | 
Clears the graph.
Definition at line 188 of file graph.cpp.
References _domain_ptr, _image_idx, and _num_nodes_image.
Referenced by FEAT::Assembly::DomainAssembler< Trafo_ >::clear().
| 
 | inline | 
Clones this graph.
Definition at line 311 of file graph.hpp.
References Graph(), _domain_ptr, _image_idx, and _num_nodes_image.
Referenced by FEAT::Control::Domain::PartiDomainControl< DomainLevel_ >::_check_parti_extern().
| Index FEAT::Adjacency::Graph::degree | ( | ) | const | 
Returns the degree of the graph.
This function returns the degree of the graph, i.e. the maximum of the degrees of all domain nodes.
Definition at line 195 of file graph.cpp.
References _domain_ptr.
Returns the degree of a domain node.
This function returns the degree of a domain node, i.e. the number of image nodes which are adjacent to the specified domain node.
| [in] | domain_node | The domain node index whose degree is to be returned. | 
Definition at line 333 of file graph.hpp.
References _domain_ptr, and ASSERTM.
Referenced by FEAT::Adjacency::Coloring::Coloring(), FEAT::Geometry::PatchMeshPartFactory< MeshType_ >::PatchMeshPartFactory(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_colors(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_layers(), FEAT::Assembly::TraceAssembler< Trafo_ >::compile_all_facets(), FEAT::Adjacency::CuthillMcKee::compute(), and FEAT::Geometry::MeshFileWriter::write_partition().
| 
 | inline | 
Returns the domain pointer array.
Definition at line 359 of file graph.hpp.
References _domain_ptr.
Referenced by FEAT::Adjacency::Coloring::Coloring(), FEAT::LAFEM::MatrixMirrorBuffer< DT_, IT_ >::MatrixMirrorBuffer(), FEAT::LAFEM::SparseMatrixBanded< DT_, IT_ >::SparseMatrixBanded(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::SparseMatrixBCSR(), FEAT::LAFEM::SparseMatrixCSCR< DT_, IT_ >::SparseMatrixCSCR(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::SparseMatrixCSR(), FEAT::Control::Domain::PartiDomainControlBase< DomainLevel_ >::_apply_parti_naive(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_data_mirror(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_neighbor_schur_matrix(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_reduced_b(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_colors(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_graphs(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_layers(), FEAT::Assembly::SymbolicAssembler::assemble_graph_diag(), FEAT::Geometry::Parti2Lvl< ConformalMesh< Shape_, num_coords_, Coord_ > >::build_elems_at_rank(), FEAT::Geometry::PartiIterative< ConformalMesh< Shape_, num_coords_, Coord_ > >::build_elems_at_rank(), FEAT::Adjacency::CuthillMcKee::compute(), FEAT::Geometry::MeshPermutation< Shape_ >::create_colored(), FEAT::Adjacency::Coloring::create_partition_graph(), and FEAT::Geometry::MeshExtruder< ConformalMesh< Shape::Hypercube< 2 >, 2, Coord_ > >::extrude_partition().
| 
 | inline | 
Returns the domain pointer array.
Definition at line 365 of file graph.hpp.
References _domain_ptr.
| 
 | inline | 
Returns the image node index array.
Definition at line 374 of file graph.hpp.
References _image_idx.
Referenced by FEAT::Adjacency::Coloring::Coloring(), FEAT::LAFEM::MatrixMirrorBuffer< DT_, IT_ >::MatrixMirrorBuffer(), FEAT::LAFEM::SparseMatrixBanded< DT_, IT_ >::SparseMatrixBanded(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::SparseMatrixBCSR(), FEAT::LAFEM::SparseMatrixCSCR< DT_, IT_ >::SparseMatrixCSCR(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::SparseMatrixCSR(), FEAT::Control::Domain::PartiDomainControlBase< DomainLevel_ >::_apply_parti_naive(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_data_mirror(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_neighbor_schur_matrix(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_reduced_b(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_colors(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_graphs(), FEAT::Assembly::DomainAssembler< Trafo_ >::_build_layers(), FEAT::Assembly::SymbolicAssembler::assemble_graph_diag(), FEAT::Geometry::Parti2Lvl< ConformalMesh< Shape_, num_coords_, Coord_ > >::build_elems_at_rank(), FEAT::Geometry::PartiIterative< ConformalMesh< Shape_, num_coords_, Coord_ > >::build_elems_at_rank(), FEAT::Adjacency::CuthillMcKee::compute(), FEAT::Geometry::MeshPermutation< Shape_ >::create_colored(), FEAT::Adjacency::Coloring::create_partition_graph(), and FEAT::Geometry::MeshExtruder< ConformalMesh< Shape::Hypercube< 2 >, 2, Coord_ > >::extrude_partition().
| 
 | inline | 
Returns the image node index array.
Definition at line 380 of file graph.hpp.
References _image_idx.
| 
 | inline | 
Returns the total number indices.
Definition at line 390 of file graph.hpp.
References _image_idx.
Referenced by FEAT::LAFEM::MatrixMirrorBuffer< DT_, IT_ >::MatrixMirrorBuffer(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::SparseMatrixBCSR(), FEAT::LAFEM::SparseMatrixCSCR< DT_, IT_ >::SparseMatrixCSCR(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::SparseMatrixCSR(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_data_mirror(), FEAT::Geometry::MeshPermutation< Shape_ >::create_colored(), FEAT::Geometry::MeshExtruder< ConformalMesh< Shape::Hypercube< 2 >, 2, Coord_ > >::extrude_partition(), and FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic().
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
Returns an iterator for the first adjacent image node.
| [in] | domain_node | The index of the domain node whose image node iterator is to be returned. | 
domain_node, or image_end(domain_node) if no adjacent image nodes exist.  Definition at line 958 of file graph.hpp.
References _domain_ptr, _image_idx, and ASSERTM.
Referenced by FEAT::Geometry::PatchMeshPartFactory< MeshType_ >::PatchMeshPartFactory(), FEAT::Geometry::MeshPermutation< Shape_ >::_pick_gcmk_root(), FEAT::Assembly::TraceAssembler< Trafo_ >::compile(), FEAT::Assembly::TraceAssembler< Trafo_ >::compile_all_facets(), FEAT::Geometry::MeshPermutation< Shape_ >::create_gcmk(), FEAT::Geometry::RootMeshNode< RootMesh_ >::extract_patch(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::validate_element_coloring(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_coloring(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::validate_element_layering(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_layering(), and FEAT::Geometry::MeshFileWriter::write_partition().
| 
 | inline | 
Returns an iterator for the first position past the last adjacent image node.
| [in] | domain_node | The index of the domain node whose image node iterator is to be returned. | 
domain_node.  Definition at line 966 of file graph.hpp.
References _domain_ptr, _image_idx, and ASSERTM.
Referenced by FEAT::Geometry::PatchMeshPartFactory< MeshType_ >::PatchMeshPartFactory(), FEAT::Geometry::MeshPermutation< Shape_ >::_pick_gcmk_root(), FEAT::Assembly::TraceAssembler< Trafo_ >::compile(), FEAT::Assembly::TraceAssembler< Trafo_ >::compile_all_facets(), FEAT::Geometry::MeshPermutation< Shape_ >::create_gcmk(), FEAT::Geometry::RootMeshNode< RootMesh_ >::extract_patch(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::validate_element_coloring(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_coloring(), FEAT::Geometry::AdaptiveMeshLayer< AdaptiveMeshType_ >::validate_element_layering(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::validate_element_layering(), and FEAT::Geometry::MeshFileWriter::write_partition().
move-assign operator
move assignment
Definition at line 90 of file graph.cpp.
References _domain_ptr, _image_idx, and _num_nodes_image.
| void FEAT::Adjacency::Graph::permute_indices | ( | const Adjacency::Permutation & | inv_perm | ) | 
Permutes the image indices.
| [in] | inv_perm | The transient inverse image indices permutation. | 
Definition at line 221 of file graph.cpp.
References _image_idx, FEAT::Adjacency::Permutation::size(), XASSERT, and XASSERTM.
Referenced by FEAT::Assembly::SymbolicAssembler::assemble_graph_intermesh(), and FEAT::Geometry::Partition::permute().
| std::vector< char > FEAT::Adjacency::Graph::serialize | ( | ) | const | 
Serializes the graph into a buffer.
Definition at line 234 of file graph.cpp.
References _domain_ptr, _image_idx, _num_nodes_image, magic, and XASSERT.
| void FEAT::Adjacency::Graph::sort_indices | ( | ) | 
Sorts the image indices to non-descending order.
Definition at line 206 of file graph.cpp.
References _domain_ptr, _image_idx, and XASSERTM.
Referenced by Graph(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_asm_reduced_b(), and FEAT::Assembly::DomainAssembler< Trafo_ >::_build_graphs().
| 
 | protected | 
Domain pointer Vector.
Dimension: #_num_nodes_domain+1
Definition at line 59 of file graph.hpp.
Referenced by Graph(), clear(), clone(), degree(), get_domain_ptr(), image_begin(), image_end(), operator=(), serialize(), and sort_indices().
| 
 | protected | 
Image node index Vector.
Dimension: #_num_indices_image
Definition at line 66 of file graph.hpp.
Referenced by Graph(), clear(), clone(), get_image_idx(), get_num_indices(), image_begin(), image_end(), operator=(), permute_indices(), serialize(), and sort_indices().
| 
 | protected | 
total number of image nodes
Definition at line 52 of file graph.hpp.
Referenced by Graph(), clear(), clone(), operator=(), and serialize().
| 
 | staticconstexpr | 
magic number for Graph serialization
Definition at line 48 of file graph.hpp.
Referenced by Graph(), and serialize().