Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Functions
061-RegularFragmentTopologyWithHigherTopology.cpp File Reference

[← Previous Example] [Next Example → 065-F5moveSkeleton.cpp ]. More...

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <fiber/field/RegularlyFragmentedField.hpp>
#include <fiber/field/UniformCartesianArray.hpp>
#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
#include <fiber/field/Cell.hpp>

Functions

int main ()
 

Detailed Description

[← Previous Example] [Next Example → 065-F5moveSkeleton.cpp ].

In FiberLib Tutorial

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <fiber/field/RegularlyFragmentedField.hpp>
#include <fiber/field/UniformCartesianArray.hpp>
#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
#include <fiber/field/Cell.hpp>
using namespace Fiber;
using namespace Eagle::PhysicalSpace;
int main()
{
// Initialize I/O layers (required for standalone programs)
Finit();
Grid&myGrid = BP[0.0]["DemoGrid"];
//BP->bindTo("061_RegularlyFragmentedFieldWithHigherTopo.f5");
SkeletonID VertexSkeletonID(3,0); // Dimension 1 and index depth 0
SkeletonID CellSkeletonID(3,1); // Dimension 2 and index depth 1
Skeleton&CellSkeleton = myGrid[CellSkeletonID];
//RefPtr<RegularlyFragmentedField<3> > VertexF = new RegularlyFragmentedField<3> ( Fragments );
VertexRep [FIBER_POSITIONS] = VertexF;
//RefPtr<Field> VertexF = VertexRep[FIBER_POSITIONS];
point start = {0,0,0};
point end = {2,1,0};
MultiIndex<3> dims = {3,2,1};
RefPtr<FragmentID> ID1 = VertexF->getFragmentID ({0,0,0});
VertexF->setPersistentData(VertexMem1,ID1);
start = {2,1,0};
end = {4,2,0};
dims = {3,2,1};
RefPtr<FragmentID> ID2 = VertexF->getFragmentID ({1,0,0});
VertexF->setPersistentData(VertexMem2,ID2);
#if 1
RepCellToVertex [FIBER_POSITIONS] = CellToVertexF;
//RefPtr<Field> CellToVertexF = RepCellToVertex["Temperature"];
(*CellMem1)[{0,0,0}] = 10.2;
(*CellMem1)[{1,0,0}] = 11.2;
RefPtr<FragmentID> IDa = CellToVertexF->getFragmentID ({0,0,0});
CellToVertexF->setPersistentData(CellMem1,IDa);
(*CellMem2)[{0,0,0}] = 20.2;
(*CellMem2)[{1,0,0}] = 21.2;
RefPtr<FragmentID> IDb = CellToVertexF->getFragmentID ({1,0,0});
CellToVertexF->setPersistentData(CellMem2,IDb);
#endif
BP->save("061_RegularlyFragmentedFieldWithHigherTopo.f5");
return 0;
}
constexpr auto end(_Container &__cont) -> decltype(__cont.end())
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
A generic Chart object that may be used to cast information of points within a manifold to numerical ...
Definition Chart.hpp:91
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
RefPtr< Chart > makeCartesianChart(const string &name={}, uint16_t epsg_code=0)
Create a cartesian chart here, if not existent yet.
Definition Grid.cpp:114
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
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
Convenience class for procedural linear arrays in cartesian coordinates.
Definition UniformCartesianArray.hpp:22
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
Definition grid/types/RegularlyFragmentedGrid.hpp:71