1#ifndef __FIBER_GRID_TYPES_CELLCLUSTER_HPP
2#define __FIBER_GRID_TYPES_CELLCLUSTER_HPP
4#include "gridtypesDllApi.h"
5#include <grid/Grid.hpp>
6#include <eagle/PhysicalSpace.hpp>
32template <
int CellDims,
int ClusterDepth = 2>
93 ClustersAsCartesianVertices,
98 ClusterAsVertexIndices,
130 Vertices = G->findVertices();
134 CartesianVertices = G->getCartesianRepresentation(*Vertices );
136 if (CartesianVertices)
137 Coords = CartesianVertices->Positions();
139 ClustersAsCartesianVertices = (*Clusters)(Vertices);
140 if (ClustersAsCartesianVertices)
141 ClusterAsVertexIndices = ClustersAsCartesianVertices->Positions();
146 ClustersAsCells = (*Clusters)(Cells);
184 return !
operator bool();
A set of cells stored on a Grid.
Definition CellCluster.hpp:34
CellCluster(const WeakPtr< Grid > &G=NullPtr())
Retrieve a CellCluster from a Grid object.
Definition CellCluster.hpp:116
static SkeletonID CellSkeletonID()
The Skeleton ID of the objects that are going to be clustered here.
Definition CellCluster.hpp:75
~CellCluster()
Destructor, cleans up references.
static SkeletonID ID()
A Skeleton ID that is supposed to be typical for this Grid Type.
Definition CellCluster.hpp:83
RefPtr< Field > ClusterAsCellIndices
Which cells constitute a cluster.
Definition CellCluster.hpp:103
std::vector< CellIndex_t > CellIndices_t
A vector of cell indices.
Definition CellCluster.hpp:51
static SkeletonID ClusterSkeletonID()
A Skeleton ID for clusters of cells.
Definition CellCluster.hpp:66
CellCluster & operator=(const CellCluster &LS)
Assigning from existing LineSet - faster than assigning from Grid pointer since it is just copying po...
uint32_t CellIndex_t
The index type used for line set indices.
Definition CellCluster.hpp:46
bool operator!() const
Inverse operator of the line indices check.
Definition CellCluster.hpp:182
bool operator=(const WeakPtr< Grid > &G)
Assign from Grid pointer, will overwrite all members.
MemArray< 1, CellIndices_t > CellClusterArray_t
An array of line indices.
Definition CellCluster.hpp:58
RefPtr< Field > CellsAsCluster
Which clusters are at each cell.
Definition CellCluster.hpp:109
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2