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

[← Previous Example] [Next Example → 066-StorageTransformationWithPositions.cpp ]. More...

#include <algorithm>
#include <fiber/bundle/Bundle.hpp>
#include <fiber/bundle/StorageTransformations.hpp>
#include <fiber/finit/FinitAPI.h>
#include <memcore/Console.hpp>

Functions

int main (int argc, const char **argv)
 

Detailed Description

[← Previous Example] [Next Example → 066-StorageTransformationWithPositions.cpp ].

In FiberLib Tutorial

#include <algorithm>
#include <fiber/bundle/Bundle.hpp>
#include <fiber/bundle/StorageTransformations.hpp>
#include <fiber/finit/FinitAPI.h>
#include <memcore/Console.hpp>
using namespace Fiber;
using namespace Eagle::PhysicalSpace;
int main(int argc, const char**argv)
{
Finit();
string InFile = "065_F5moveSkeleton_InputFile.f5";
if (argc>1)
{
BundlePtr BP = new Bundle() ;
BP->bindTo(InFile);
return 0;
}
{
Grid&myGrid = BPIn[0.0]["TestGrid"];
RefPtr<Field> PositionsF = myGrid[FIBER_POSITIONS];
std::fill(Mem->myChunk()->get_vector().begin(),
Mem->myChunk()->get_vector().end(),
point{1.,0.,2.} );
Console() << "Mem size: " << Mem->nElements();
PositionsF->setPersistentData(Mem);
{
std::fill(Mem->myChunk()->get_vector().begin(),
Mem->myChunk()->get_vector().end(), 42.0);
myGrid["Values"]->setPersistentData(Mem);
}
BPIn->save(InFile);
Console() << "Save file " << InFile;
}
string OutFile = "065_F5moveSkeleton_OutFile.f5";
{
BundlePtr BP = new Bundle() ;
BP->bindToNew(OutFile);
bool success;
BP = Bundle::load(success, ld , BP );
BP->sync();
RefPtr<Grid> myGrid = BP[0.0]("TestGrid");
if (!myGrid)
{
Console() <<"No Grid" ;
return 1;
}
const int PointSkeletonDims = 3;
/* change root skeleton-id (e.g point) to refinement
skeleton (that is: index depth, dims AND REFINEMENTLEVEL!) */
{
Console() << "Cannot find root (finest) skeleton" ;
return false;
}
mySkeletonFine->setIsotropicRefinement(10);
/* note: use index depth 2 for fragments instead of
index depth 0 which correspond incorrectly to point*/
}
return 0;
}
constexpr void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp &__value)
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
The main entity holding all information.
Definition Bundle.hpp:173
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
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2