#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <eagle/PhysicalSpace.hpp>
#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
{
Finit();
Grid&GridOfUnsortedPoints = mySlice[
"UnsortedPoints"];
for(auto P : *Coordinates )
{
P->x() = 0.001 * i;
P->y() = 0.002 * i;
P->z() = 0.003 * i;
}
RefPtr<Skeleton> VertexSkeletonOfUnsortedPoints = GridOfUnsortedPoints.
findVertices();
Assert(VertexSkeletonOfUnsortedPoints);
Grid&GridOfSortedPoints = mySlice[
"SortedPoints"];
Skeleton&VertexSkeletonOfSortedPoints = GridOfSortedPoints[
SkeletonID(3,0) ];
Representation&RepresentSortedAsUnsorted = VertexSkeletonOfSortedPoints[ VertexSkeletonOfUnsortedPoints ];
bool Unfragmented = true;
if (Unfragmented)
{
for(auto I : *Indices)
{
I = I.getIndex();
}
}
else
{
for(auto&F :FieldPositionsOfSortedAsUnsorted->getNumberOfFragments() )
{
}
RepresentSortedAsUnsorted.
setPositions(FieldPositionsOfSortedAsUnsorted);
}
BP.
save(
"132_RepresentSortedAsUnsortedCartesianChart.f5");
Verbose(0) << BP->xml();
return 0;
}
int main()
Demonstrates minimal usage of the FiberLib Create Bundle, insert a time slice, and safe it to a file.
Definition 010-SimpleSave.cpp:13
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
int save(const string &url, const RefPtr< LoaderProgress > &SaveProgress=nullptr, const RefPtrStorageTransformations &ST=nullptr)
Definition Bundle.cpp:1142
The main entity holding all information.
Definition Bundle.hpp:173
A helper class that keeps objects in memory all time.
Definition CreativeArray.hpp:25
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Representation & makeCartesianRepresentation(int Dims, const string &name={}, uint16_t epsg_code=0)
Provide a representation in an n-dimensional skeleton of the vertices.
Definition Grid.cpp:124
Class for N-dimensional MultiArrays with MemCore memory management.
Definition MemArray.hpp:34
A convenience class for optimized handling of fields that are fragmented in a regular manner (n-dimen...
Definition RegularlyFragmentedField.hpp:27
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
bool setPositions(const RefPtr< Field > &P)
Set the positional component of this Representation object.
Definition Representation.cpp:519
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
RefPtr< Skeleton > findVertices(int TotalRefinement=-1) const
Find the Skeleton describing the Vertices on this Grid.
Definition SkeletonMap.cpp:285
Information per time slice, mainly a set of Grid objects that are accessed via GridID objects.
Definition Slice.hpp:36
static RefPtr< Cache, CacheBase > & MemCache()
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
IndexTypeConfig< sizeof(void *)>::index_t index_t
Define the index type as according to the size of a pointer, i.e.
Definition Index.hpp:22