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

[← Previous Example] [Next Example → 012-UniformGridScalarField.cpp ]. More...

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>

Functions

int main (int argc, char **argv)
 How to read an .f5 file into a Bundle and iterate over its contents.
 

Detailed Description

[← Previous Example] [Next Example → 012-UniformGridScalarField.cpp ].

In FiberLib Tutorial

#include <fiber/bundle/Bundle.hpp>
#include <fiber/finit/FinitAPI.h>
using namespace Fiber;
/*!
* How to read an .f5 file into a Bundle and iterate over its contents.
* A simple starting point on reading files and to get all contained
* Grid objects at T=0.0 . More iterators exist to also retrieve times
* and to iterate over the properties of a Grid object. Check the
* respective documentation for the Bundle and Grid objects for
* details.
*/
int main(int argc, char** argv)
{
// IO Layer
Finit();
for(int a=1; a<argc; a++)
{
bool success;
BundlePtr BP = Bundle::load( success, argv[a] );
if (!success) continue;
for(const auto&GID : BP->getGridIdentifiers() )
{
if (RefPtr<Grid> G = (*BP)(0.0, GID) )
{
// ...
}
}
}
return 0;
}
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
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

How to read an .f5 file into a Bundle and iterate over its contents.

A simple starting point on reading files and to get all contained Grid objects at T=0.0 . More iterators exist to also retrieve times and to iterate over the properties of a Grid object. Check the respective documentation for the Bundle and Grid objects for details.

References Fiber::Bundle::load().