diff --git a/_agglomerator_8h.html b/_agglomerator_8h.html index 5e533fe..47eeee2 100644 --- a/_agglomerator_8h.html +++ b/_agglomerator_8h.html @@ -5,7 +5,7 @@ -
#include <set>
#include <stdexcept>
#include <vector>
#include "Coarse_Cell_Container.h"
#include "Dual_Graph.h"
#include "Neighbourhood.h"
#include "Util.h"
#include "CoMMA/Coarse_Cell_Container.h"
#include "CoMMA/Dual_Graph.h"
#include "CoMMA/Neighbourhood.h"
#include "CoMMA/Util.h"
Go to the source code of this file.
Classes | |
class | Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class responsible to do the interface between the different kinds of agglomerator. More... | |
class | comma::Agglomerator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class responsible to do the interface between the different kinds of agglomerator. More... | |
class | Agglomerator_Anisotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Agglomerator_Anisotropic class is a child class of the Agglomerator class that specializes the implementation to the case of Anisotropic agglomeration. More... | |
class | comma::Agglomerator_Anisotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Agglomerator_Anisotropic class is a child class of the Agglomerator class that specializes the implementation to the case of Anisotropic agglomeration. More... | |
class | Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Agglomerator_Isotropic class is a child class of the Agglomerator class that specializes the implementation to the case of Isotropic agglomeration. More... | |
class | comma::Agglomerator_Isotropic< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Agglomerator_Isotropic class is a child class of the Agglomerator class that specializes the implementation to the case of Isotropic agglomeration. More... | |
class | Agglomerator_Biconnected< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Child class of Agglomerator_Isotropic where is implemented a specific biconnected algorithm for the agglomeration. We call it biconnected case, but it is the greedy algorithm in reality. More... | |
class | comma::Agglomerator_Biconnected< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Child class of Agglomerator_Isotropic where is implemented a specific biconnected algorithm for the agglomeration. We call it biconnected case, but it is the greedy algorithm in reality. More... | |
class | Agglomerator_Iterative< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Child class of Agglomerator_Isotropic which implements a specialized iterative algorithm for the search of fine cells. More... | |
class | comma::Agglomerator_Iterative< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Child class of Agglomerator_Isotropic which implements a specialized iterative algorithm for the search of fine cells. More... | |
+Namespaces | |
namespace | comma |
Classes | |
class | Bimap< A, B > |
An easy and straight forward implementation of a Bimap. More... | |
class | comma::Bimap< A, B > |
An easy and straight forward implementation of a Bimap. More... | |
+Namespaces | |
namespace | comma |
- |
- CoMMA 1.3.1
-
- A geometric agglomerator for unstructured meshes
- |
-
#include "CoMMA.h"
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <type_traits>
#include "CoMMATypes.h"
-Typedefs | |
using | CoMMASignedIndexT = make_signed< CoMMAIndexT >::type |
-Functions | |
PYBIND11_MODULE (CoMMA, module_handle) | |
using CoMMASignedIndexT = make_signed<CoMMAIndexT>::type | -
PYBIND11_MODULE | -( | -CoMMA | -, | -
- | - | module_handle | -- |
- | ) | -- |
#include <string>
#include <unordered_set>
#include <vector>
#include "Agglomerator.h"
#include "CoMMATypes.h"
#include "Coarse_Cell_Container.h"
#include "Dual_Graph.h"
#include "Seeds_Pool.h"
#include "CoMMA/Agglomerator.h"
#include "CoMMA/CoMMADefs.h"
#include "CoMMA/Coarse_Cell_Container.h"
#include "CoMMA/Dual_Graph.h"
#include "CoMMA/Seeds_Pool.h"
Go to the source code of this file.
+Namespaces | |
namespace | comma |
Functions | |
template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType > | |
void | agglomerate_one_level (const vector< CoMMAIndexType > &adjMatrix_row_ptr, const vector< CoMMAIndexType > &adjMatrix_col_ind, const vector< CoMMAWeightType > &adjMatrix_areaValues, const vector< CoMMAWeightType > &volumes, const vector< vector< CoMMAWeightType > > ¢ers, const vector< CoMMAWeightType > &priority_weights, const vector< CoMMAIndexType > &anisotropicCompliantCells, const vector< CoMMAIntType > &n_bnd_faces, bool build_anisotropic_lines, bool is_anisotropic, bool odd_line_length, CoMMAWeightType threshold_anisotropy, const CoMMAIntType seed_ordering_type, vector< CoMMAIndexType > &fc_to_cc, vector< CoMMAIndexType > &agglomerationLines_Idx, vector< CoMMAIndexType > &agglomerationLines, bool correction, CoMMAIntType dimension, CoMMAIntType goal_card, CoMMAIntType min_card, CoMMAIntType max_card, CoMMAIntType singular_card_thresh=1, CoMMAIntType fc_choice_iter=1, const CoMMAIntType neighbourhood_type=CoMMANeighbourhoodT::EXTENDED) |
Main function of the agglomerator, it is used as an interface to build up all the agglomeration process. The result will be the definition of the agglomerated cells fc_to_cc . More... | |
template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType > | |
void | comma::agglomerate_one_level (const std::vector< CoMMAIndexType > &adjMatrix_row_ptr, const std::vector< CoMMAIndexType > &adjMatrix_col_ind, const std::vector< CoMMAWeightType > &adjMatrix_areaValues, const std::vector< CoMMAWeightType > &volumes, const std::vector< std::vector< CoMMAWeightType > > ¢ers, const std::vector< CoMMAWeightType > &priority_weights, const std::vector< CoMMAIndexType > &anisotropicCompliantCells, const std::vector< CoMMAIntType > &n_bnd_faces, bool build_anisotropic_lines, bool is_anisotropic, bool odd_line_length, CoMMAWeightType threshold_anisotropy, const CoMMAIntType seed_ordering_type, std::vector< CoMMAIndexType > &fc_to_cc, std::vector< CoMMAIndexType > &agglomerationLines_Idx, std::vector< CoMMAIndexType > &agglomerationLines, bool correction, CoMMAIntType dimension, CoMMAIntType goal_card, CoMMAIntType min_card, CoMMAIntType max_card, CoMMAIntType singular_card_thresh=1, CoMMAIntType fc_choice_iter=1, const CoMMAIntType neighbourhood_type=CoMMANeighbourhoodT::EXTENDED) |
Main function of the agglomerator, it is used as an interface to build up all the agglomeration process. The result will be the definition of the agglomerated cells fc_to_cc . More... | |
Variables | |
constexpr unsigned short | max_iter = 4 |
Maximum allowed iterations for the iterative algorithm, see Agglomerator_Iterative. More... | |
constexpr CoMMAIntT | comma::iter_agglo_max_iter = 4 |
Maximum allowed iterations for the iterative algorithm, see Agglomerator_Iterative. More... | |
void agglomerate_one_level | -( | -const vector< CoMMAIndexType > & | -adjMatrix_row_ptr, | -
- | - | const vector< CoMMAIndexType > & | -adjMatrix_col_ind, | -
- | - | const vector< CoMMAWeightType > & | -adjMatrix_areaValues, | -
- | - | const vector< CoMMAWeightType > & | -volumes, | -
- | - | const vector< vector< CoMMAWeightType > > & | -centers, | -
- | - | const vector< CoMMAWeightType > & | -priority_weights, | -
- | - | const vector< CoMMAIndexType > & | -anisotropicCompliantCells, | -
- | - | const vector< CoMMAIntType > & | -n_bnd_faces, | -
- | - | bool | -build_anisotropic_lines, | -
- | - | bool | -is_anisotropic, | -
- | - | bool | -odd_line_length, | -
- | - | CoMMAWeightType | -threshold_anisotropy, | -
- | - | const CoMMAIntType | -seed_ordering_type, | -
- | - | vector< CoMMAIndexType > & | -fc_to_cc, | -
- | - | vector< CoMMAIndexType > & | -agglomerationLines_Idx, | -
- | - | vector< CoMMAIndexType > & | -agglomerationLines, | -
- | - | bool | -correction, | -
- | - | CoMMAIntType | -dimension, | -
- | - | CoMMAIntType | -goal_card, | -
- | - | CoMMAIntType | -min_card, | -
- | - | CoMMAIntType | -max_card, | -
- | - | CoMMAIntType | -singular_card_thresh = 1 , |
-
- | - | CoMMAIntType | -fc_choice_iter = 1 , |
-
- | - | const CoMMAIntType | -neighbourhood_type = CoMMANeighbourhoodT::EXTENDED |
-
- | ) | -- |
Main function of the agglomerator, it is used as an interface to build up all the agglomeration process. The result will be the definition of the agglomerated cells fc_to_cc
.
CoMMAIndexType | the CoMMA index type for the global index of the mesh |
CoMMAWeightType | the CoMMA weight type for the weights (volume or area) of the nodes or edges of the Mesh |
CoMMAIntType | the CoMMA type for integers |
[in] | adjMatrix_row_ptr | the row pointer of the CRS representation |
[in] | adjMatrix_col_ind | the column index of the CRS representation |
[in] | adjMatrix_areaValues | the weight of the CRS representation (in CoMMA case will be the area of the faces that in the graph representation are the edges between two nodes represented by the cell centers. |
[in] | volumes | The volumes of the cells |
[in] | centers | Cell centers |
[in] | priority_weights | Weights used to set the order telling where to start agglomerating. The higher the weight, the higher the priority |
[in] | anisotropicCompliantCells | List of cells which have to be looked for anisotropy |
[in] | n_bnd_faces | Vector telling how many boundary faces each cell has |
[in] | build_anisotropic_lines | Whether lines joining the anisotropic cells should be built, otherwise, if the anisotropic agglomeration is activated, the lines should be provided, see agglomerationLines_Idx and agglomerationLines |
[in] | is_anisotropic | Whether to consider an anisotropic agglomeration |
[in] | odd_line_length | Whether anisotropic lines with odd length are allowed |
[in] | threshold_anisotropy | Value of the aspect-ratio above which a cell is considered as anisotropic. If negative, all compliant cells are considered as anisotropic |
[in] | seed_ordering_type | Type of ordering for the seeds of the coarse cells. Possible values (see CoMMASeedsPoolT):
|
[out] | fc_to_cc | Vector telling the ID of the coarse cell to which a fine cell belongs after agglomeration |
[in,out] | agglomerationLines_Idx | Connectivity for the agglomeration lines: each element points to a particular element in the vector agglomerationLines |
[in,out] | agglomerationLines | Vector storing all the elements of the anisotropic lines |
[in] | correction | Whether to apply correction step (avoid isolated cells) after agglomeration |
[in] | dimension | Dimensionality of the problem, 2- or 3D |
[in] | goal_card | Expected cardinality of the coarse cells (might not be ensured) |
[in] | min_card | Minimum cardinality accepted for the coarse cells |
[in] | max_card | Maximum cardinality accepted for the coarse cells |
[in] | singular_card_thresh | (optional, default=1) Cardinality below which a coarse is considered as singular, hence, compliant for correction |
[in] | fc_choice_iter | (optional, default=1) Number of iterations allowed for the algorithm choosing which fine cell to add next. The cost grows exponentially, hence use small values. |
[in] | neighbourhood_type | (optional, default=Extended) Type of neighbourhood to use when growing a coarse cell. See CoMMANeighbourhoodT for more details. Two alternatives:
|
invalid_argument | whenever dimension is not 2 nor 3, cardinalities are smaller than 1 or not in order, line building is disabled but lines are not provided, or number of iterations is negative or greater than max_iter. |
-
|
- -constexpr | -
Maximum allowed iterations for the iterative algorithm, see Agglomerator_Iterative.
- -+ |
+ CoMMA 1.3.1
+
+ A geometric agglomerator for unstructured meshes
+ |
+
#include "CoMMA/CoMMAConfig.h"
Go to the source code of this file.
++Namespaces | |
namespace | comma |
+Enumerations | |
enum | comma::CoMMACellT : CoMMAIntT { + comma::INTERIOR = 0 +, comma::VALLEY = 1 +, comma::RIDGE = 2 +, comma::CORNER = 3 +, + comma::EXTREME = 4 +, comma::N_CELL_TYPES = 4 + + } |
Type of an element according to its boundary faces / edges The terms come from the NIA paper: Nishikawa, Diskin, Thomas... More... | |
enum | comma::CoMMANeighbourhoodT : CoMMAIntT { comma::EXTENDED = 0 +, comma::PURE_FRONT = 1 + } |
Type of neighbourhood (of a coarse cell) considered when agglomerating. More... | |
enum | comma::CoMMASeedsPoolT : CoMMAIntT { comma::BOUNDARY_PRIORITY = 0 +, comma::NEIGHBOURHOOD_PRIORITY = 1 +, comma::BOUNDARY_PRIORITY_ONE_POINT_INIT = 10 +, comma::NEIGHBOURHOOD_PRIORITY_ONE_POINT_INIT = 11 + } |
Type of seeds pool ordering. More... | |
+ |
+ CoMMA 1.3.1
+
+ A geometric agglomerator for unstructured meshes
+ |
+
- |
- CoMMA 1.3.1
-
- A geometric agglomerator for unstructured meshes
- |
-
Go to the source code of this file.
--Typedefs | |
using | CoMMAIndexT = unsigned long |
Type of an index (used by agglomerator CoMMA for edges and nodes). More... | |
using | CoMMAWeightT = double |
using | CoMMAIntT = int |
-Enumerations | |
enum | CoMMACellT : CoMMAIntT { - INTERIOR = 0 -, VALLEY = 1 -, RIDGE = 2 -, CORNER = 3 -, - EXTREME = 4 -, N_CELL_TYPES = 4 - - } |
Type of an element according to its boundary faces / edges The terms come from the NIA paper: Nishikawa, Diskin, Thomas... More... | |
enum | CoMMANeighbourhoodT : CoMMAIntT { EXTENDED = 0 -, PURE_FRONT = 1 - } |
Type of neighbourhood (of a coarse cell) considered when agglomerating. More... | |
enum | CoMMASeedsPoolT : CoMMAIntT { BOUNDARY_PRIORITY = 0 -, NEIGHBOURHOOD_PRIORITY = 1 -, BOUNDARY_PRIORITY_ONE_POINT_INIT = 10 -, NEIGHBOURHOOD_PRIORITY_ONE_POINT_INIT = 11 - } |
Type of seeds pool ordering. More... | |
using CoMMAIndexT = unsigned long | -
Type of an index (used by agglomerator CoMMA for edges and nodes).
- -using CoMMAIntT = int | -
Type of integer for cardinality of coarse cells, dimension, distances, orders...
- -using CoMMAWeightT = double | -
Type of floating-point values (used by agglomerator CoMMA for this edge weights).
- -enum CoMMACellT : CoMMAIntT | -
Type of an element according to its boundary faces / edges The terms come from the NIA paper: Nishikawa, Diskin, Thomas...
-enum CoMMANeighbourhoodT : CoMMAIntT | -
enum CoMMASeedsPoolT : CoMMAIntT | -
Type of seeds pool ordering.
-- |
- CoMMA 1.3.1
-
- A geometric agglomerator for unstructured meshes
- |
-
#include <unordered_set>
#include <utility>
#include <vector>
#include "Dual_Graph.h"
#include "CoMMA/Dual_Graph.h"
Go to the source code of this file.
Classes | |
class | Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class describing a coarse cell. More... | |
class | comma::Coarse_Cell< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class describing a coarse cell. More... | |
class | Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class describing a coarse cell with a full description, that is, it also holds a subgraph describing how the fine cells are connected inside the coarse one. More... | |
class | comma::Coarse_Cell_Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class describing a coarse cell with a full description, that is, it also holds a subgraph describing how the fine cells are connected inside the coarse one. More... | |
+Namespaces | |
namespace | comma |
#include <memory>
#include <optional>
#include <vector>
#include "Coarse_Cell.h"
#include "Dual_Graph.h"
#include "CoMMA/Coarse_Cell.h"
#include "CoMMA/Dual_Graph.h"
Go to the source code of this file.
Classes | |
class | Coarse_Cell_Container< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class implementing a custom container where the coarse cells are stored. More... | |
class | comma::Coarse_Cell_Container< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class implementing a custom container where the coarse cells are stored. More... | |
+Namespaces | |
namespace | comma |
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "Seeds_Pool.h"
#include "CoMMA/Seeds_Pool.h"
Go to the source code of this file.
Classes | |
class | Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
An interface class responsible of storing the cell centered dual graph and of acting on it (it is an interface for the global Dual_Graph and the Subgraph) More... | |
class | comma::Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
An interface class responsible of storing the cell centered dual graph and of acting on it (it is an interface for the global Dual_Graph and the Subgraph) More... | |
class | Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class implementing the CRS subgraph representation. It is used in the framework of CoMMA for the implementation of the CSR representation of the coarse cells. More... | |
class | comma::Subgraph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class implementing the CRS subgraph representation. It is used in the framework of CoMMA for the implementation of the CSR representation of the coarse cells. More... | |
class | Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class implementing the CRS global graph representation of the global mesh. More... | |
class | comma::Dual_Graph< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
A class implementing the CRS global graph representation of the global mesh. More... | |
+Namespaces | |
namespace | comma |
#include <set>
#include <unordered_set>
#include <vector>
#include "Util.h"
#include "CoMMA/Util.h"
Go to the source code of this file.
Classes | |
class | Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. Mind that no information about the element being already agglomerated or not is known here. More... | |
class | comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. Mind that no information about the element being already agglomerated or not is known here. More... | |
class | Neighbourhood_Extended< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. In this derived class the neighbourhood is extended, meaning that all the neighbours seen so far are candidates. More... | |
class | comma::Neighbourhood_Extended< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. In this derived class the neighbourhood is extended, meaning that all the neighbours seen so far are candidates. More... | |
class | Neighbourhood_Pure_Front< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. In this derived class, the neighbourhood is 'pure front-advancing', meaning that the next candidates are only the direct neighbours of the last added cell. More... | |
class | comma::Neighbourhood_Pure_Front< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the neighbourhood of a given cell in the graph. In this derived class, the neighbourhood is 'pure front-advancing', meaning that the next candidates are only the direct neighbours of the last added cell. More... | |
class | NeighbourhoodCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Pure abstract class for a creator of Neighbourhood objects. It can create from scratch or by copy. More... | |
class | comma::NeighbourhoodCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Pure abstract class for a creator of Neighbourhood objects. It can create from scratch or by copy. More... | |
class | NeighbourhoodExtendedCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Creator of Neighbourhood_Extended objects. It can create from scratch or by copy. More... | |
class | comma::NeighbourhoodExtendedCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Creator of Neighbourhood_Extended objects. It can create from scratch or by copy. More... | |
class | NeighbourhoodPureFrontCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Creator of Neighbourhood_Extended objects. It can create from scratch or by copy. More... | |
class | comma::NeighbourhoodPureFrontCreator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Creator of Neighbourhood_Extended objects. It can create from scratch or by copy. More... | |
+Namespaces | |
namespace | comma |
Classes | |
class | Priority_Pair< A, B > |
Wrapper around the STL pair with custom 'less than' operator: as in the standard case, first we compare the first elements, then the second ones; however it relies on the 'greater than' on the first elements, e.g., (4,X) < (3,Y), whereas standard rules apply to second elements, e.g., (4,3) < (4,4). More... | |
class | comma::Priority_Pair< A, B > |
Wrapper around the STL pair with custom 'less than' operator: as in the standard case, first we compare the first elements, then the second ones; however it relies on the 'greater than' on the first elements, e.g., (4,X) < (3,Y), whereas standard rules apply to second elements, e.g., (4,3) < (4,4). More... | |
+Namespaces | |
namespace | comma |
Classes | |
class | Queue< T > |
A template class implementing a custom queue data structure. More... | |
class | comma::Queue< T > |
A template class implementing a custom queue data structure. More... | |
+Namespaces | |
namespace | comma |
#include <algorithm>
#include <cassert>
#include <deque>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <utility>
#include <vector>
#include "CoMMATypes.h"
#include "Util.h"
#include "CoMMA/CoMMADefs.h"
#include "CoMMA/Util.h"
Go to the source code of this file.
Classes | |
struct | SPInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the initialization of a seeds pool. More... | |
struct | comma::SPInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the initialization of a seeds pool. More... | |
struct | SPFullInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the full initialization of a seeds pool. More... | |
struct | comma::SPFullInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the full initialization of a seeds pool. More... | |
struct | SPOnePointInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the one-point initialization of a seeds pool. More... | |
struct | comma::SPOnePointInitializator< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Functor performing the one-point initialization of a seeds pool. More... | |
class | Seeds_Pool< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. More... | |
class | comma::Seeds_Pool< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. More... | |
class | Seeds_Pool_Boundary_Priority< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are on the border. More... | |
class | comma::Seeds_Pool_Boundary_Priority< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are on the border. More... | |
class | Seeds_Pool_Neighbourhood_Priority< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are neighbours of already existing coarse cells. More... | |
class | comma::Seeds_Pool_Neighbourhood_Priority< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Class representing the pool of all the seeds for creating a coarse cell. This derived class gives higher priority to cells that are neighbours of already existing coarse cells. More... | |
+Namespaces | |
namespace | comma |
Classes | |
class | Node< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Node data structure that represent a node of the tree. More... | |
class | comma::Node< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Node data structure that represent a node of the tree. More... | |
class | Tree< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Tree structure that represent a coarse cell, the fine cell and the neighbours to them. More... | |
class | comma::Tree< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Tree structure that represent a coarse cell, the fine cell and the neighbours to them. More... | |
+Namespaces | |
namespace | comma |
Classes | |
struct | CustomPairLessFunctor< PairT > |
Functor for pairs implementing a custom 'less than'. It relies on the 'less than' operator for the second elements and 'greater than' for the first ones. More... | |
struct | comma::CustomPairLessFunctor< PairT > |
Functor for pairs implementing a custom 'less than'. It relies on the 'less than' operator for the second elements and 'greater than' for the first ones. More... | |
struct | CustomPairGreaterFunctor< PairT > |
Functor for pairs implementing a custom 'greater than'. It relies on the 'greater than' operator for the second elements and 'less than' for the first ones. More... | |
struct | comma::CustomPairGreaterFunctor< PairT > |
Functor for pairs implementing a custom 'greater than'. It relies on the 'greater than' operator for the second elements and 'less than' for the first ones. More... | |
struct | PairSecondBasedLessFunctor< PairT > |
Functor for pairs implementing a less operator based only on the second element of the pair. More... | |
struct | comma::PairSecondBasedLessFunctor< PairT > |
Functor for pairs implementing a less operator based only on the second element of the pair. More... | |
class | PairFindFirstBasedFunctor< PairT > |
Functor implementing an operator telling if a given value if the first one of pair. More... | |
class | comma::PairFindFirstBasedFunctor< PairT > |
Functor implementing an operator telling if a given value if the first one of pair. More... | |
+Namespaces | |
namespace | comma |
@@ -136,43 +142,43 @@ |
Functions | |
template<typename T > | |
bool | dot_deviate (const T dot) |
Tell whether the dot product given as input comes from two parallel vectors. Compared against deviate_thresh. More... | |
template<typename T > | |
T | dot_product (const vector< T > &a, const vector< T > &b) |
Compute the dot product between two vectors. No check on size is performed. More... | |
template<typename T > | |
T | get_direction (const vector< T > &a, const vector< T > &b, vector< T > &dir) |
Compute the direction from point a to point b and store it as unit vector in dir . More... | |
template<typename T > | |
T | squared_euclidean_distance (const vector< T > &a, const vector< T > &b) |
Compute the squared Euclidean distance between two points seen as vectors. We use vectors because we can have both 2- and 3D points (also we can have 3D points even if the dimension given to CoMMA is 2D, e.g., with CODA pseudo-2D meshes). The dimension used as reference is the one of the first point. More... | |
template<typename CoMMAContainerPairType > | |
vector< typename CoMMAContainerPairType::value_type::first_type > | vector_of_first_elements (const CoMMAContainerPairType &c) |
Given a container of pairs, return a vector with first elements only. More... | |
template<typename KeyT , typename ValueT > | |
unordered_set< KeyT > | d_keys_to_set (const unordered_map< KeyT, ValueT > &dict) |
Utility function for creating a set out of the keys of a map. More... | |
template<typename IndexT , typename DistT > | |
void | compute_neighbourhood_based_wall_distance (const vector< IndexT > &neigh_idxs, const vector< IndexT > &neighs, const vector< IndexT > &wall, vector< DistT > &dist) |
Compute a neighbourhood-base wall-distance, that is, the distance of a given cell from a wall is the number of cells though which the minimum path starting from the cell and ending at the wall. For example, in a Cartesian grids this is equivalent to the minimum of the Manhattan distance. + | |
template<typename T > | |
bool | comma::dot_deviate (const T dot) |
Tell whether the dot product given as input comes from two parallel vectors. Compared against deviate_thresh. More... | |
template<typename T > | |
T | comma::dot_product (const std::vector< T > &a, const std::vector< T > &b) |
Compute the dot product between two vectors. No check on size is performed. More... | |
template<typename T > | |
T | comma::get_direction (const std::vector< T > &a, const std::vector< T > &b, std::vector< T > &dir) |
Compute the direction from point a to point b and store it as unit vector in dir . More... | |
template<typename T > | |
T | comma::squared_euclidean_distance (const std::vector< T > &a, const std::vector< T > &b) |
Compute the squared Euclidean distance between two points seen as vectors. We use vectors because we can have both 2- and 3D points (also we can have 3D points even if the dimension given to CoMMA is 2D, e.g., with CODA pseudo-2D meshes). The dimension used as reference is the one of the first point. More... | |
template<typename CoMMAContainerPairType > | |
std::vector< typename CoMMAContainerPairType::value_type::first_type > | comma::vector_of_first_elements (const CoMMAContainerPairType &cont) |
Given a container of pairs, return a vector with first elements only. More... | |
template<typename KeyT , typename ValueT > | |
std::unordered_set< KeyT > | comma::d_keys_to_set (const std::unordered_map< KeyT, ValueT > &dict) |
Utility function for creating a set out of the keys of a map. More... | |
template<typename IndexT , typename DistT > | |
void | comma::compute_neighbourhood_based_wall_distance (const std::vector< IndexT > &neigh_idxs, const std::vector< IndexT > &neighs, const std::vector< IndexT > &wall, std::vector< DistT > &dist) |
Compute a neighbourhood-base wall-distance, that is, the distance of a given cell from a wall is the number of cells though which the minimum path starting from the cell and ending at the wall. For example, in a Cartesian grids this is equivalent to the minimum of the Manhattan distance. If the vector defining the wall is empty, return negative values. If a cell is unconnected to the domain with the wall, its distance will be negative. - It takes a compressed version of the connectivity of the mesh. It uses a BFS algorithm to visit all the cells. More... | |
Variables | |
constexpr double | deviate_thresh = 0.9396926207859084 |
Threshold used in combination with a dot product to tell whether two vector deviate. It is set to . More... | |
constexpr double | comma::deviate_thresh = 0.9396926207859084 |
Threshold used in combination with a dot product to tell whether two vector deviate. It is set to . More... | |
void compute_neighbourhood_based_wall_distance | -( | -const vector< IndexT > & | -neigh_idxs, | -
- | - | const vector< IndexT > & | -neighs, | -
- | - | const vector< IndexT > & | -wall, | -
- | - | vector< DistT > & | -dist | -
- | ) | -- |
Compute a neighbourhood-base wall-distance, that is, the distance of a given cell from a wall is the number of cells though which the minimum path starting from the cell and ending at the wall. For example, in a Cartesian grids this is equivalent to the minimum of the Manhattan distance.
- If the vector defining the wall is empty, return negative values.
- If a cell is unconnected to the domain with the wall, its distance will be negative.
- It takes a compressed version of the connectivity of the mesh. It uses a BFS algorithm to visit all the cells.
IndexT | Type for cell indices |
DistT | Type for distance (should be signed) |
[in] | neigh_idxs | Indices used to recover the neighbours of each cells provided in neighs . The length is |
[in] | neighs | Neighbours of the cells |
[in] | wall | Cells composing the wall from which the distance is computed |
[out] | dist | Distance from the wall. This vector is resized inside the function to hold all the cells |
-
|
- -inline | -
Utility function for creating a set out of the keys of a map.
-KeyT | Type of the keys of the map |
ValueT | Type of the values of the map |
[in] | dict | A map |
-
|
- -inline | -
Tell whether the dot product given as input comes from two parallel vectors. Compared against deviate_thresh.
-T | Input type |
[in] | dot | Dot product |
-
|
- -inline | -
Compute the dot product between two vectors. No check on size is performed.
-T | Input type |
[in] | a | First vector |
[in] | b | Second vector |
-
|
- -inline | -
Compute the direction from point a
to point b
and store it as unit vector in dir
.
T | Input type |
[in] | a | Starting point |
[in] | b | End point |
[out] | dir | Unit vector of the direction |
-
|
- -inline | -
Compute the squared Euclidean distance between two points seen as vectors. We use vectors because we can have both 2- and 3D points (also we can have 3D points even if the dimension given to CoMMA is 2D, e.g., with CODA pseudo-2D meshes). The dimension used as reference is the one of the first point.
-T | Type for real numbers |
[in] | a | First point |
[in] | b | Second point |
-
|
- -inline | -
Given a container of pairs, return a vector with first elements only.
-CoMMAContainerPairType | Type of the input container |
[in] | c | A container of pairs from which the first elements will be extracted |
-
|
- -constexpr | -
Threshold used in combination with a dot product to tell whether two vector deviate. It is set to .
-