#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/ArrayRef.hpp>
#include <eagle/PhysicalSpace.hpp>
#include <fiber/bundle/StorageTransformations.hpp>
#define array_size 2
{
const uint32_t FragNr = 0;
for (uint32_t i = 0; i <DataPtr->nElements(); i++)
DataPtr[i] = {dist(e2),dist(e2),dist(e2)} ;
RefPtr<FragmentID> FragID =F->makeFragmentID("Frag" + to_string(FragNr) );
F->setPersistentData(DataPtr,FragID);
}
{
bool success;
return BP;
}
{
Finit();
for (uint32_t Nr = 0; Nr < 10000; Nr++)
{
createData(G);
createData(G1);
BP->
save(
"F" + to_string(Nr) +
".f5" );
AppVerbose("wd",0) << "Nr " << Nr;
}
for (uint32_t Nr = 0; Nr < 10000; Nr++)
{
BundlePtr BP = myLoad(
"F" + to_string(Nr) +
".f5" );
createData(G2);
BP->
save(
"F2_" + to_string(Nr) +
".f5" );
AppVerbose("wd",0) << "Nr2 " << Nr;
}
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
mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL > mt19937
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
static RefPtr< Bundle > load(bool &success, const RefPtr< LoaderParameters > &ld, const RefPtr< Bundle > &B=nullptr)
Load a Bundle object or append new data to an existing Bundle.
Definition Bundle.cpp:139
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
StrongPtr< Object, ObjectBase > RefPtr
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2