FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FragmentTopology.hpp
1#ifndef __FIBER_GRID_TYPES_FRAGMENTTOPOLOGY_HPP
2#define __FIBER_GRID_TYPES_FRAGMENTTOPOLOGY_HPP
3
4#include "fish/fiber/field/RegularlyFragmentedField.hpp"
5#include "fish/fiber/grid/SkeletonID.hpp"
6#include "fish/fiber/grid/Skeleton.hpp"
7
8#include "TypedGrid.hpp"
9
10namespace Fiber
11{
12
13extern gridtypes_API SkeletonID FragmentSkeletonID(const SkeletonID&S, int NewDimension);
14
16{
18
23
25
26 RefPtr<FragmentArray_t> FragmentArray;
27
28
29
35static bool isAPossibleFragmentSkeletonID(const SkeletonID&Candidate, const SkeletonID&BaseSkeletonID);
36
37
42
43 bool assign(const RefPtr<Grid>&theGrid, const SkeletonID&S,int FragmentTopologyDimension);
44
46 {
47 assign( theGrid, S,FragmentTopologyDimension);
48 }
49
51
52static void create( Grid&theGrid, const SkeletonID&S, const RefPtr<FragmentArray_t>&theFragmentArray, int FragmentTopologyDimension);
53
54 using FragmentSkeletonSearch_t = std::tuple<string, RefPtr<Fiber::Skeleton>>;
55
58static FragmentSkeletonSearch_t
59 findHighestDimensionalSkeleton(const SkeletonID&WhichOne, const NamedSkeleton_t&AvailableGridSkeletons);
60
65 findHighestDimensionalSkeleton(const SkeletonID&WhichOne, const SkeletonMap&AvailableGridSkeletons);
66
72 findHighestDimensionalRepresentation(
73 const SkeletonID&WhichOne, const SkeletonMap&AvailableGridSkeletons);
74
75static RefPtr<Field>
76 findHighestDimensionalFragmentationField(
77 const SkeletonID&WhichOne, const SkeletonMap&AvailableGridSkeletons);
78
79
80static FragmentSkeletonSearch_t
81 findMatchingSkeleton(const SkeletonID&WhichOne, const NamedSkeleton_t&AvailableGridSkeletons);
82
83static FragmentSkeletonSearch_t
84 findSkeletonWithRelativeRepresentation(const SkeletonID&WhichOne, int DimensionOfFragmentSkeleton,
85 const NamedSkeleton_t&AvailableGridSkeletons);
86
87};
88
89using FragmentSkeleton = FragmentTopology;
90
91
92template <int Dims>
94{
96
98 RegularFragmentArray() const
99 {
100 return this->FragmentArray;
101 }
102
103 bool assign(const RefPtr<Grid>&theGrid, const SkeletonID&S)
104 {
105 if (!FragmentTopology::assign( theGrid, S,Dims)) return false;
106
107 if (!RegularFragmentArray() ) return false;
108
109 return true;
110 }
111
112 RegularFragmentTopology(const RefPtr<Grid>&theGrid, const SkeletonID&S)
113 {
114 if (!assign( theGrid, S))
116 }
117
118static void create( Grid&theGrid, const SkeletonID&S, const RefPtr<FragmentArray_t>&theFragmentArray)
119 {
120 FragmentSkeleton::create( theGrid,S,theFragmentArray,Dims);
121 }
122
123};
124
125
126} // namespace Fiber
127
128
129#endif // __FIBER_GRID_TYPES_FRAGMENTTOPOLOGY_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
A Skeleton Map is a unique map from SkeletonID's to Skeletons.
Definition SkeletonMap.hpp:74
An intermediate class that allows to operate on the pure type information of some memory array.
Definition TypedArray.hpp:58
StrongPtr & operator=(const DynPtr_t &other)
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
Fragment Skeleton: Each fragment of a field is assigned some value in the form of a field defined on ...
Definition FragmentSkeleton.hpp:20
Definition FragmentTopology.hpp:16
RefPtr< Representation > FragmentsAsBaseElements
Fields per fragment providing coordinate-independent information.
Definition FragmentTopology.hpp:22
Definition FragmentTopology.hpp:94
Base class for grid types.
Definition TypedGrid.hpp:47