#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
#include <fiber/field/UniformCartesianArray.hpp>
#include <fiber/baseop/Resample.hpp>
int main()
{
Finit();
const int kB = 1024, MB = kB*kB;
BP->bindTo("070_RegularSample_LowRes.f5");
Verbose(0) <<
"Creating low-resolution Grid of dimension " <<
DemoGridSize
<< " bound to " << BP->boundUrl();
#if 1
for(
auto&value :
ScalarData->myChunk()->get_vector())
value = -1.0;
{
double x =
P.x(), y =
P.y(), z =
P.z();
(*ScalarData)[
I ] += x*x + y*y - z*z;
}
#endif
#if 1
Verbose(0) << "#################### CREATE OUTPUT GRID AND ASSOCIATE WITH FILE ###################";
{
OutputBP->bindTo(
"070_RegularSample_HighRes.f5");
Verbose(0) << "#################### RESAMPLE AND SAVE VIA DESTRUCTION ###################";
"scalardata",
{2.0, 2.0, 2.0} );
}
#endif
Verbose(0) << "Demo done.";
return true;
}
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
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
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2