walberla::field Namespace Reference

Namespaces

 communication
 
 internal
 
 kernelweights
 
 refinement
 

Classes

class  AccuracyEvaluation
 Class for evaluating the accuracy of a simulation. More...
 
class  AccuracyEvaluationLinePlot
 Class for plotting simulation (and solution) values along a line through the domain. More...
 
class  AccuracyEvaluationLinePlotter
 Class for plotting simulation (and solution) values along a line through the domain. More...
 
class  AdaptorHandling
 
class  AdaptorIterator
 Iterator class for Adaptors. More...
 
class  AllocateAligned
 Aligned Allocation strategy for Fields. More...
 
class  AlwaysInitializeBlockDataHandling
 
class  BinarizationFieldWriter
 
class  BlockDataHandling
 
class  CellCounter
 Class/functor for counting cells of a specific type that are stored in parallel on all processes in a structured block storage. More...
 
class  CloneBlockDataHandling
 
class  ComponentExtractionAdaptor
 
class  ComponentExtractionFunction
 
struct  Creator
 BlockDataCreator for fields. More...
 
struct  Creator< FlagField< T > >
 
struct  Creator< GhostLayerField_T, typename std::enable_if< std::is_integral< typename GhostLayerField_T::value_type >::value||std::is_floating_point< typename GhostLayerField_T::value_type >::value >::type >
 
class  DefaultBlockDataHandling
 
class  DefaultEvaluationFilter
 
class  DistributorHandling
 DistributorCreators. More...
 
class  Field
 A four dimensional field/lattice. More...
 
class  FieldAllocator
 Allocation Strategy base class for fields. More...
 
class  FieldClone
 Helper class for the common scenario where a 'scratch field' is needed. More...
 
class  FieldIterator
 Iterator over a 4D array, stored linearized in memory. More...
 
class  FieldNeighborPointer
 Class representing one Field coordinate with access only to neighbor values. More...
 
class  FieldPointer
 Class representing on Field coordinate. More...
 
class  FlagField
 GhostLayerField that stores bit masks. More...
 
class  FlagFieldCellFilter
 
class  FlagFieldEvaluationFilter
 
class  FlagFieldMapping
 
class  ForwardFieldIterator
 
class  GhostLayerField
 Extends the Field with ghost-layer information. More...
 
class  GhostLayerFieldAdaptor
 Adaptor for walberla::field::GhostLayerField. More...
 
class  GradientRefinement
 
class  InterpolatorHandling
 FieldInterpolatorCreators. More...
 
class  KernelDistributor
 Distributor for walberla::field::GhostLayerField with kernel strategy. More...
 
class  KernelFieldInterpolator
 Interpolator for walberla::field::GhostLayerField with kernel strategy. More...
 
class  MassEvaluation
 Class for evaluating the evolution of the mass of a simulation. More...
 
class  NearestNeighborDistributor
 Distributor for walberla::field::Field with nearest neighbor strategy. More...
 
class  NearestNeighborFieldInterpolator
 Interpolator for walberla::field::Field with nearest neighbor strategy. More...
 
class  NearestNeighborInterpolator
 Nearest Neighbor interpolation for GhostLayerFields. More...
 
class  ReverseFieldIterator
 
class  StabilityChecker
 Class/functor for checking a running simulation for non-finite values in a specific field. More...
 
class  StdFieldAlloc
 Allocator without alignment using new and delete[]. More...
 
struct  SwapableCompare
 A comparison functor based on field size / field layout. More...
 
struct  ToField
 
struct  ToFieldList
 
struct  ToGhostLayerField
 
struct  ToGhostLayerFieldList
 
class  TrilinearFieldInterpolator
 Interpolator for walberla::field::GhostLayerField with trilinear strategy. More...
 
class  TrilinearInterpolator
 Trilinear interpolation for GhostLayerFields. More...
 
struct  VectorFieldAccessor
 Provides an abstraction between Field<real_t,3> and Field<Vector3<real_t>, 1 > More...
 
struct  VectorFieldAccessor< VectorField_T, typename std::enable_if< std::is_same< typename VectorField_T::value_type, Vector3< real_t > >::value >::type >
 
class  VolumetricFlowRateEvaluation
 Class for evaluating the volumetric flow rate of a simulation. More...
 
class  VTKWriter
 

Enumerations

enum  Layout { fzyx = 0, zyxf = 1 }
 Layout for field (. More...
 

Functions

template<typename Field_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > makeAccuracyEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const uint_t plotFrequency, const uint_t logFrequency, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > makeAccuracyEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const uint_t plotFrequency, const uint_t logFrequency, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > > makeAccuracyEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const uint_t plotFrequency, const uint_t logFrequency, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > makeAccuracyEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const std::string &configBlockName=internal::accuracyEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > makeAccuracyEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const std::string &configBlockName=internal::accuracyEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > > makeAccuracyEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const std::string &configBlockName=internal::accuracyEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > makeAccuracyEvaluationLinePlot (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const bool yAxis=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const std::string &configBlockName=internal::accuracyEvaluationLinePlotConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter< FlagField_T > > > makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const SolutionFunction_T &solution, const std::string &configBlockName=internal::accuracyEvaluationLinePlotConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > makeAccuracyEvaluationLinePlot (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const SolutionFunction_T &solution, const Filter_T &filter, const std::string &configBlockName=internal::accuracyEvaluationLinePlotConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename AccuracyEvaluationLinePlot_T >
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > makeAccuracyEvaluationLinePlotter (const shared_ptr< AccuracyEvaluationLinePlot_T > &plot, const uint_t evaluationFrequency, const std::string &filename=internal::accuracyEvaluationLinePlotterFilename, const std::string &fileExtension=internal::accuracyEvaluationLinePlotterExtension)
 
template<typename Config_T , typename AccuracyEvaluationLinePlot_T >
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > makeAccuracyEvaluationLinePlotter (const Config_T &config, const shared_ptr< AccuracyEvaluationLinePlot_T > &plot, const std::string &configBlockName=internal::accuracyEvaluationLinePlotterConfigBlock)
 
template<typename Adaptor_T , typename BlockStorage_T >
BlockDataID addFieldAdaptor (const shared_ptr< BlockStorage_T > &blocks, const ConstBlockDataID &adaptedFieldId, const std::string &identifier=std::string(), const typename Adaptor_T::functor_t &function=typename Adaptor_T::functor_t(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Adaptor_T , typename BlockStorage_T >
BlockDataID addFieldAdaptor (const shared_ptr< BlockStorage_T > &blocks, const ConstBlockDataID &adaptedFieldId, const std::string &identifier, const Set< SUID > &requiredSelectors, const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename FlagField_T , typename BlockStorage_T >
BlockDataID addFlagFieldToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const uint_t nrOfGhostLayers=uint_t(1), const bool alwaysInitialize=false, const std::function< void(FlagField_T *field, IBlock *const block) > &initFunction=std::function< void(FlagField_T *field, IBlock *const block) >(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename FlagField_T , typename BlockStorage_T >
BlockDataID addFlagFieldToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const uint_t nrOfGhostLayers, const bool alwaysInitialize, const Set< SUID > &requiredSelectors, const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID addToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const typename GhostLayerField_T::value_type &initValue=typename GhostLayerField_T::value_type(), const Layout layout=zyxf, const uint_t nrOfGhostLayers=uint_t(1), const bool alwaysInitialize=false, const std::function< void(GhostLayerField_T *field, IBlock *const block) > &initFunction=std::function< void(GhostLayerField_T *field, IBlock *const block) >(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID addToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const typename GhostLayerField_T::value_type &initValue, const Layout layout, const uint_t nrOfGhostLayers, const bool alwaysInitialize, const Set< SUID > &requiredSelectors, const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID addToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const std::function< Vector3< uint_t >(const shared_ptr< StructuredBlockStorage > &, IBlock *const ) > calculateSize, const typename GhostLayerField_T::value_type &initValue=typename GhostLayerField_T::value_type(), const Layout layout=zyxf, const uint_t nrOfGhostLayers=uint_t(1), const bool alwaysInitialize=false, const std::function< void(GhostLayerField_T *field, IBlock *const block) > &initFunction=std::function< void(GhostLayerField_T *field, IBlock *const block) >(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID addToStorage (const shared_ptr< BlockStorage_T > &blocks, const std::string &identifier, const std::function< Vector3< uint_t >(const shared_ptr< StructuredBlockStorage > &, IBlock *const ) > calculateSize, const typename GhostLayerField_T::value_type &initValue, const Layout layout, const uint_t nrOfGhostLayers, const bool alwaysInitialize, const Set< SUID > &requiredSelectors, const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename BlockStorage_T >
BlockDataID addCloneToStorage (const shared_ptr< BlockStorage_T > &blocks, ConstBlockDataID fieldToClone, const std::string &identifier, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 Adds a copy of an existing field to BlockStorage. More...
 
void * aligned_malloc (uint_t size, uint_t alignment)
 Allocates memory starting at an aligned location. More...
 
void * aligned_malloc_with_offset (uint_t size, uint_t alignment, uint_t offset)
 Allocates memory such that (ptr+offset) is aligned. More...
 
void aligned_free (void *ptr)
 Analogous to free for memory allocated with aligned_malloc. More...
 
template<typename Distributor_T , typename FlagField_T >
BlockDataID addDistributor (const shared_ptr< StructuredBlockStorage > &blocks, const BlockDataID &distributionDestinationFieldID, const ConstBlockDataID &flagFieldID, const Set< FlagUID > &cellsToEvaluate, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename FieldT >
void writeToFile (const std::string &filename, const BlockStorage &blockStorage, const BlockDataID &fieldID, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 Writes a field from a BlockStorage to file. More...
 
template<typename FieldT >
void readFromFile (const std::string &filename, BlockStorage &blockStorage, const BlockDataID &fieldID, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 Reads a field from a file. More...
 
template<typename T , typename FieldPtrOrIterator >
void addMask (const FieldPtrOrIterator &it, T mask)
 
template<typename T , typename FieldPtrOrIterator >
void addFlag (const FieldPtrOrIterator &it, T flag)
 
template<class T , typename FieldPtrOrIterator >
void removeMask (const FieldPtrOrIterator &it, T mask)
 
template<class T , typename FieldPtrOrIterator >
void removeFlag (const FieldPtrOrIterator &it, T flag)
 
template<class T , typename FieldPtrOrIterator >
bool isMaskSet (const FieldPtrOrIterator &it, T mask)
 
template<class T , typename FieldPtrOrIterator >
bool isFlagSet (const FieldPtrOrIterator &it, T flag)
 
template<class T , typename FieldPtrOrIterator >
bool isPartOfMaskSet (const FieldPtrOrIterator &it, T mask)
 
template<class Sten , typename FieldPtrOrIterator >
bool isFlagInNeighborhood (const FieldPtrOrIterator &i, typename FieldPtrOrIterator::value_type mask)
 Ores the neighborhood of the specified stencil and checks whether the bits of mask are set. More...
 
template<class Sten , typename FieldPtrOrIterator >
std::remove_const< typename FieldPtrOrIterator::value_type >::type getOredNeighborhood (const FieldPtrOrIterator &i)
 Ores the neighborhood of the specified stencil and returns mask. More...
 
template<typename Field_T , typename ResultField_T >
void gather (ResultField_T &gatheredField, const shared_ptr< StructuredBlockStorage > &blocks, ConstBlockDataID fieldID, CellInterval boundingBox=CellInterval(), int targetRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 Gathers (part of) a field on a single process. More...
 
template<typename Field_T , typename ResultField_T >
void gatherSlice (ResultField_T &gatheredField, const shared_ptr< StructuredBlockStorage > &blocks, ConstBlockDataID fieldID, int sliceDim, cell_idx_t sliceValue, int targetRank=0, MPI_Comm comm=MPI_COMM_WORLD)
 
template<typename GhostLayerField_T >
CellInterval getGhostRegion (const GhostLayerField_T &f, stencil::Direction d, cell_idx_t thickness, bool fullSlice)
 Constructs CellInterval containing the ghost region in the specified direction. More...
 
template<typename GhostLayerField_T >
CellInterval getSliceBeforeGhostLayer (const GhostLayerField_T &f, stencil::Direction d, cell_idx_t thickness, bool fullSlice)
 Constructs CellInterval containing the last slice before the ghost layer begins for a given direction. More...
 
template<typename Interpolator_T , typename FlagField_T >
BlockDataID addFieldInterpolator (const shared_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &interpolatedFieldID, const ConstBlockDataID &flagFieldID, const Set< FlagUID > &cellsToEvaluate, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T , uint_t fs>
std::ostream & operator<< (std::ostream &os, const FieldIterator< T, fs > &it)
 
template<typename DensityField_T >
shared_ptr< MassEvaluation< DensityField_T > > makeMassEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const uint_t plotFrequency, const uint_t logFrequency, const std::string &filename=internal::massEvaluationFilename, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename DensityField_T , typename FlagField_T >
shared_ptr< MassEvaluation< DensityField_T, FlagFieldEvaluationFilter< FlagField_T > > > makeMassEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const uint_t plotFrequency, const uint_t logFrequency, const std::string &filename=internal::massEvaluationFilename, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename DensityField_T , typename Filter_T >
shared_ptr< MassEvaluation< DensityField_T, Filter_T > > makeMassEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const Filter_T &filter, const uint_t plotFrequency, const uint_t logFrequency, const std::string &filename=internal::massEvaluationFilename, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename DensityField_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T > > makeMassEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const std::string &configBlockName=internal::massEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename DensityField_T , typename FlagField_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T, FlagFieldEvaluationFilter< FlagField_T > > > makeMassEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const std::string &configBlockName=internal::massEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename DensityField_T , typename Filter_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T, Filter_T > > makeMassEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const Filter_T &filter, const std::string &configBlockName=internal::massEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T , uint_t fs>
std::ostream & printSlice (std::ostream &os, const Field< T, fs > &field, int sliceCoord, cell_idx_t sliceValue, cell_idx_t f=0)
 Prints a slice along a coordinate axis. More...
 
template<typename T , uint_t fs>
std::ostream & printSlice (std::ostream &os, const GhostLayerField< T, fs > &field, int sliceCoord, cell_idx_t sliceValue, cell_idx_t f=0)
 Overload of printSlice for GhostLayerFields. More...
 
template<typename T >
std::ostream & printSlice (std::ostream &os, const FlagField< T > &field, int sliceCoord, cell_idx_t sliceValue, cell_idx_t f=0)
 Overload of printSlice for FlagFields. More...
 
template<typename FieldTypes >
void exportFields ()
 
template<typename AdaptorTypes >
void exportGhostLayerFieldAdaptors ()
 
template<typename AdaptorType >
void exportGhostLayerFieldAdaptor ()
 
template<typename FieldTypes >
void exportGatherFunctions ()
 
template<typename Field_T >
shared_ptr< StabilityChecker< Field_T > > makeStabilityChecker (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const uint_t checkFrequency, const bool outputToStream=true, const bool outputVTK=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T >
shared_ptr< StabilityChecker< Field_T, FlagFieldEvaluationFilter< FlagField_T > > > makeStabilityChecker (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const uint_t checkFrequency, const bool outputToStream=true, const bool outputVTK=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T >
shared_ptr< StabilityChecker< Field_T, Filter_T > > makeStabilityChecker (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const Filter_T &filter, const uint_t checkFrequency, const bool outputToStream=true, const bool outputVTK=true, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T > > makeStabilityChecker (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const std::string &configBlockName=internal::stabilityCheckerConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename FlagField_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T, FlagFieldEvaluationFilter< FlagField_T > > > makeStabilityChecker (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const std::string &configBlockName=internal::stabilityCheckerConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename Filter_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T, Filter_T > > makeStabilityChecker (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &fieldId, const Filter_T &filter, const std::string &configBlockName=internal::stabilityCheckerConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T >
bool isSymmetric (const Field_T *field, uint_t dimension, uint_t fCoord=0, Cell *differingCell=NULL)
 Test for axis symmetry in a single field. More...
 
template<typename VelocityField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename FlagField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter< FlagField_T > > > makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename Filter_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const Filter_T &filter, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename FlagField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter< FlagField_T > > > makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename Filter_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const Filter_T &filter, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename Field_T , typename OutputType >
vtk::VTKOutput::Write createVTKOutput (const ConstBlockDataID &fieldId, const StructuredBlockStorage &blocks, const std::string &identifier, const uint_t writeFrequency=1, const uint_t ghostLayers=0, const bool forcePVTU=false, const std::string &baseFolder=std::string("vtk_out"), const std::string &executionFolder=std::string("simulation_step"), const bool continuousNumbering=false, const bool binary=true, const bool littleEndian=true, const int simultaneousIOOperations=0, const Set< SUID > &requiredStates=Set< SUID >::emptySet(), const Set< SUID > &incompatibleStates=Set< SUID >::emptySet(), bool useMPIIO=true, const uint_t initialExecutionCount=0)
 Write out a field in VTK representation (for Paraview ) More...
 
template<typename Field_T >
vtk::VTKOutput::Write createVTKOutput (const ConstBlockDataID &fieldId, const StructuredBlockStorage &blocks, const std::string &identifier, const uint_t writeFrequency=1, const uint_t ghostLayers=0, const bool forcePVTU=false, const std::string &baseFolder=std::string("vtk_out"), const std::string &executionFolder=std::string("simulation_step"), const bool continuousNumbering=false, const bool binary=true, const bool littleEndian=true, const int simultaneousIOOperations=0, const Set< SUID > &requiredStates=Set< SUID >::emptySet(), const Set< SUID > &incompatibleStates=Set< SUID >::emptySet(), bool useMPIIO=true, const uint_t initialExecutionCount=0)
 
template<typename Field_T , typename OutputType >
vtk::VTKOutput::Write createScalingVTKOutput (const ConstBlockDataID &fieldId, const StructuredBlockStorage &blocks, const std::string &identifier, const uint_t writeFrequency, const typename VectorTrait< typename Field_T::value_type >::OutputType factor, const uint_t ghostLayers=0, const bool forcePVTU=false, const std::string &baseFolder=std::string("vtk_out"), const std::string &executionFolder=std::string("simulation_step"), const bool continuousNumbering=false, const bool binary=true, const bool littleEndian=true, const int simultaneousIOOperations=0, const Set< SUID > &requiredStates=Set< SUID >::emptySet(), const Set< SUID > &incompatibleStates=Set< SUID >::emptySet(), bool useMPIIO=true, const uint_t initialExecutionCount=0)
 
template<typename Field_T >
vtk::VTKOutput::Write createScalingVTKOutput (const ConstBlockDataID &fieldId, const StructuredBlockStorage &blocks, const std::string &identifier, const uint_t writeFrequency, const typename VectorTrait< typename Field_T::value_type >::OutputType factor, const uint_t ghostLayers=0, const bool forcePVTU=false, const std::string &baseFolder=std::string("vtk_out"), const std::string &executionFolder=std::string("simulation_step"), const bool continuousNumbering=false, const bool binary=true, const bool littleEndian=true, const int simultaneousIOOperations=0, const Set< SUID > &requiredStates=Set< SUID >::emptySet(), const Set< SUID > &incompatibleStates=Set< SUID >::emptySet(), bool useMPIIO=true, const uint_t initialExecutionCount=0)
 
Operations on bit-masks
template<class T >
void addMask (T &val, T mask)
 
template<class T >
void removeMask (T &val, T mask)
 
template<class T >
bool isMaskSet (const T &val, T mask)
 
template<class T >
bool isPartOfMaskSet (const T &val, T mask)
 
Operations on bit-masks using flags

Flag is defined as a mask, where exactly one bit is set.

This restriction is enforced in debug mode using asserts. In release mode the following functions are equivalent to their Mask variants.

template<class T >
bool isFlag (T f)
 
template<class T >
void addFlag (T &v, T f)
 
template<class T >
void removeFlag (T &v, T f)
 
template<class T >
bool isFlagSet (const T &v, T f)
 

Enumeration Type Documentation

Layout for field (.

Enumerator
fzyx 

Value-sorted data layout (f should be outermost loop)

zyxf 

Cell-sorted data layout, (f should be innermost loop)

Function Documentation

template<typename Field_T , typename BlockStorage_T >
BlockDataID walberla::field::addCloneToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
ConstBlockDataID  fieldToClone,
const std::string &  identifier,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)

Adds a copy of an existing field to BlockStorage.

Template parameters: Field_T the type of the field that should be cloned ( and the type that is created ) BlockStorage_T the type of the BlockStorage ( will be deduced automatically )

Parameters:

Parameters
blocksBlockStorage where the original field is stored and the new one is created
fieldToCloneBlockDataID of the Field that is cloned
identifiername for new the field ( displayed in GUI and debugging functions )
template<typename Distributor_T , typename FlagField_T >
BlockDataID walberla::field::addDistributor ( const shared_ptr< StructuredBlockStorage > &  blocks,
const BlockDataID &  distributionDestinationFieldID,
const ConstBlockDataID &  flagFieldID,
const Set< FlagUID > &  cellsToEvaluate,
const std::string &  identifier = std::string(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline
template<typename Adaptor_T , typename BlockStorage_T >
BlockDataID walberla::field::addFieldAdaptor ( const shared_ptr< BlockStorage_T > &  blocks,
const ConstBlockDataID &  adaptedFieldId,
const std::string &  identifier = std::string(),
const typename Adaptor_T::functor_t &  function = typename Adaptor_T::functor_t(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline
template<typename Adaptor_T , typename BlockStorage_T >
BlockDataID walberla::field::addFieldAdaptor ( const shared_ptr< BlockStorage_T > &  blocks,
const ConstBlockDataID &  adaptedFieldId,
const std::string &  identifier,
const Set< SUID > &  requiredSelectors,
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline
template<typename Interpolator_T , typename FlagField_T >
BlockDataID walberla::field::addFieldInterpolator ( const shared_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  interpolatedFieldID,
const ConstBlockDataID &  flagFieldID,
const Set< FlagUID > &  cellsToEvaluate,
const std::string &  identifier = std::string(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline
template<class T >
void walberla::field::addFlag ( T &  v,
f 
)
inline
template<typename T , typename FieldPtrOrIterator >
void walberla::field::addFlag ( const FieldPtrOrIterator &  it,
flag 
)
inline
template<typename FlagField_T , typename BlockStorage_T >
BlockDataID walberla::field::addFlagFieldToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const uint_t  nrOfGhostLayers = uint_t(1),
const bool  alwaysInitialize = false,
const std::function< void(FlagField_T *field, IBlock *const block) > &  initFunction = std::function< void ( FlagField_T * field, IBlock * const block ) >(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename FlagField_T , typename BlockStorage_T >
BlockDataID walberla::field::addFlagFieldToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const uint_t  nrOfGhostLayers,
const bool  alwaysInitialize,
const Set< SUID > &  requiredSelectors,
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<class T >
void walberla::field::addMask ( T &  val,
mask 
)
inline
template<typename T , typename FieldPtrOrIterator >
void walberla::field::addMask ( const FieldPtrOrIterator &  it,
mask 
)
inline
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID walberla::field::addToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const typename GhostLayerField_T::value_type &  initValue = typename GhostLayerField_T::value_type(),
const Layout  layout = zyxf,
const uint_t  nrOfGhostLayers = uint_t(1),
const bool  alwaysInitialize = false,
const std::function< void(GhostLayerField_T *field, IBlock *const block) > &  initFunction = std::function< void ( GhostLayerField_T * field, IBlock * const block ) >(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID walberla::field::addToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const typename GhostLayerField_T::value_type &  initValue,
const Layout  layout,
const uint_t  nrOfGhostLayers,
const bool  alwaysInitialize,
const Set< SUID > &  requiredSelectors,
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID walberla::field::addToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const std::function< Vector3< uint_t >(const shared_ptr< StructuredBlockStorage > &, IBlock *const ) >  calculateSize,
const typename GhostLayerField_T::value_type &  initValue = typename GhostLayerField_T::value_type(),
const Layout  layout = zyxf,
const uint_t  nrOfGhostLayers = uint_t(1),
const bool  alwaysInitialize = false,
const std::function< void(GhostLayerField_T *field, IBlock *const block) > &  initFunction = std::function< void ( GhostLayerField_T * field, IBlock * const block ) >(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename GhostLayerField_T , typename BlockStorage_T >
BlockDataID walberla::field::addToStorage ( const shared_ptr< BlockStorage_T > &  blocks,
const std::string &  identifier,
const std::function< Vector3< uint_t >(const shared_ptr< StructuredBlockStorage > &, IBlock *const ) >  calculateSize,
const typename GhostLayerField_T::value_type &  initValue,
const Layout  layout,
const uint_t  nrOfGhostLayers,
const bool  alwaysInitialize,
const Set< SUID > &  requiredSelectors,
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
void walberla::field::aligned_free ( void *  ptr)

Analogous to free for memory allocated with aligned_malloc.

Parameters
ptrThe pointer returned by aligned_malloc
void * walberla::field::aligned_malloc ( uint_t  size,
uint_t  alignment 
)

Allocates memory starting at an aligned location.

Uses standard malloc, allocates slightly more memory than needed to ensure alignment. Memory allocated with aligned_malloc can only be freed with aligned_free()

Parameters
sizesize of allocated memory, total allocation will be greater by 'alignment' + sizeof(void*) bytes
alignmentthe alignment boundary , has to be a power of 2!
void * walberla::field::aligned_malloc_with_offset ( uint_t  size,
uint_t  alignment,
uint_t  offset 
)

Allocates memory such that (ptr+offset) is aligned.

This function is useful when allocating aligned memory for data with ghost layers: x(-1) , x(0), x(1), x(2), x(3), .... and x(0) should be aligned. In this case offset should be chosen as nrOfGhostLayers*sizeof( elementType )

Parameters
sizesee aligned_malloc()
alignmentsee aligned_malloc()
offsetoffset in bytes such that (resulting pointer + offset) is aligned
template<typename Field_T , typename OutputType >
vtk::VTKOutput::Write walberla::field::createScalingVTKOutput ( const ConstBlockDataID &  fieldId,
const StructuredBlockStorage &  blocks,
const std::string &  identifier,
const uint_t  writeFrequency,
const typename VectorTrait< typename Field_T::value_type >::OutputType  factor,
const uint_t  ghostLayers = 0,
const bool  forcePVTU = false,
const std::string &  baseFolder = std::string( "vtk_out" ),
const std::string &  executionFolder = std::string( "simulation_step" ),
const bool  continuousNumbering = false,
const bool  binary = true,
const bool  littleEndian = true,
const int  simultaneousIOOperations = 0,
const Set< SUID > &  requiredStates = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleStates = Set<SUID>::emptySet(),
bool  useMPIIO = true,
const uint_t  initialExecutionCount = 0 
)
inline
template<typename Field_T >
vtk::VTKOutput::Write walberla::field::createScalingVTKOutput ( const ConstBlockDataID &  fieldId,
const StructuredBlockStorage &  blocks,
const std::string &  identifier,
const uint_t  writeFrequency,
const typename VectorTrait< typename Field_T::value_type >::OutputType  factor,
const uint_t  ghostLayers = 0,
const bool  forcePVTU = false,
const std::string &  baseFolder = std::string("vtk_out"),
const std::string &  executionFolder = std::string("simulation_step"),
const bool  continuousNumbering = false,
const bool  binary = true,
const bool  littleEndian = true,
const int  simultaneousIOOperations = 0,
const Set< SUID > &  requiredStates = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleStates = Set<SUID>::emptySet(),
bool  useMPIIO = true,
const uint_t  initialExecutionCount = 0 
)
inline
template<typename Field_T , typename OutputType >
vtk::VTKOutput::Write walberla::field::createVTKOutput ( const ConstBlockDataID &  fieldId,
const StructuredBlockStorage &  blocks,
const std::string &  identifier,
const uint_t  writeFrequency = 1,
const uint_t  ghostLayers = 0,
const bool  forcePVTU = false,
const std::string &  baseFolder = std::string("vtk_out"),
const std::string &  executionFolder = std::string("simulation_step"),
const bool  continuousNumbering = false,
const bool  binary = true,
const bool  littleEndian = true,
const int  simultaneousIOOperations = 0,
const Set< SUID > &  requiredStates = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleStates = Set<SUID>::emptySet(),
bool  useMPIIO = true,
const uint_t  initialExecutionCount = 0 
)
inline

Write out a field in VTK representation (for Paraview )

Template parameters: Field_T: - can be a Field, GhostLayerField or FieldAdaptor (or anything that implements this concept )

  • Field_T::value_type has to be a native datatype, or a Vector3<NativeDataType> OutputType: - Before writing out the data, it is converted to this type
  • Typical use case: instead of writing double fields, write out float, so the output files are smaller
  • This type defaults to Field_T::value_type or in case of vector fields, the type of the Vector3 (i.e. Field_T::value_type::value_type )
  • Examples: Field_T = GhostLayerField<double,3> -> By default OutputType would be double, however can be set to float to get smaller output Field_T = GhostLayerField<Vector3<double>,1> -> Default would be double, not Vector3<double>!
Parameters
fieldIdBlockDataID for the field that should be written out
blocksStructuredBlockStorage where the field is stored
identifiername of the field in the paraview output (has to be unique for all outputs)
writeFrequencywrite output only every writeFrequency'th timestep (call of returned functor)
ghostLayersnumber of ghost layers to include in the output
forcePVTUforce unstructured output ( currently required if not all blocks have the field allocated )
baseFoldername of the base folder
executionFoldername for the folder that stores all files corresponding to one step
continuousNumberingimportant when writeFrequency > 1, if true the simulation steps are numbered continuously otherwise they are numbered after the timestep
binaryswitch for binary output
litteEndianbyte order
simultaneousIOOpsnumber of simultaneous IO operations, 0 means all processes write concurrently limiting the number of simultaneous IO operations makes sense for huge number of processes in order to not overload the file system
requiredStatessee selectable concept
incompatibleStatessee selectable concept
Returns
Returns a functor. Every writeFrequency'th call of this functor, the field is written out. This functor usually is added to timeloop.
template<typename Field_T >
vtk::VTKOutput::Write walberla::field::createVTKOutput ( const ConstBlockDataID &  fieldId,
const StructuredBlockStorage &  blocks,
const std::string &  identifier,
const uint_t  writeFrequency = 1,
const uint_t  ghostLayers = 0,
const bool  forcePVTU = false,
const std::string &  baseFolder = std::string("vtk_out"),
const std::string &  executionFolder = std::string("simulation_step"),
const bool  continuousNumbering = false,
const bool  binary = true,
const bool  littleEndian = true,
const int  simultaneousIOOperations = 0,
const Set< SUID > &  requiredStates = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleStates = Set<SUID>::emptySet(),
bool  useMPIIO = true,
const uint_t  initialExecutionCount = 0 
)
inline
template<typename FieldTypes >
void walberla::field::exportFields ( )
template<typename FieldTypes >
void walberla::field::exportGatherFunctions ( )
template<typename AdaptorType >
void walberla::field::exportGhostLayerFieldAdaptor ( )
template<typename AdaptorTypes >
void walberla::field::exportGhostLayerFieldAdaptors ( )
template<typename Field_T , typename ResultField_T >
void walberla::field::gather ( ResultField_T &  gatheredField,
const shared_ptr< StructuredBlockStorage > &  blocks,
ConstBlockDataID  fieldID,
CellInterval  boundingBox = CellInterval(),
int  targetRank = 0,
MPI_Comm  comm = MPI_COMM_WORLD 
)

Gathers (part of) a field on a single process.

Parameters
gatheredFieldoutput parameter, on targetRank this field is resized and overwritten with the gathered data. On other processes this field is left unchanged
blocksthe block storage where the field is stored
fieldIDthe block data id of the field
boundingBoxcell bounding box in global coordinates of the interval which is gathered
targetRankrank of the process where field is gathered, if negative rank is passed, field is gathered on all processes
commMPI communicator
Template Parameters
Field_Tthe type of field which is stored in the given fieldID
ResultField_Tthe type of the given result field, can be different to Field_T ( for example Field_T may be an adaptor class, ResultField_T a normal Field
template<typename Field_T , typename ResultField_T >
void walberla::field::gatherSlice ( ResultField_T &  gatheredField,
const shared_ptr< StructuredBlockStorage > &  blocks,
ConstBlockDataID  fieldID,
int  sliceDim,
cell_idx_t  sliceValue,
int  targetRank = 0,
MPI_Comm  comm = MPI_COMM_WORLD 
)
template<typename GhostLayerField_T >
CellInterval walberla::field::getGhostRegion ( const GhostLayerField_T &  f,
stencil::Direction  d,
cell_idx_t  thickness,
bool  fullSlice 
)

Constructs CellInterval containing the ghost region in the specified direction.

Parameters
ddirection of the ghost layer For W,E,N,S,T,B a slice is returned for NW, NE, .. an edge is returned for TBE, TNW, ... a corner ( single cell ) is returned
thicknesshow many ghost layer to return, if thickness < nrOfGhostLayers() the ghostlayers nearest to the domain are returned
fullSliceif true also the ghost cells in directions orthogonal to d are contained in the returned cell interval. Example (d=W ): if fullSlice then also the ghost cells in N-S and T-B are included.
Returns
CellInterval describing the ghost layer
template<class Sten , typename FieldPtrOrIterator >
std::remove_const<typename FieldPtrOrIterator::value_type>::type walberla::field::getOredNeighborhood ( const FieldPtrOrIterator &  i)
inline

Ores the neighborhood of the specified stencil and returns mask.

template<typename GhostLayerField_T >
CellInterval walberla::field::getSliceBeforeGhostLayer ( const GhostLayerField_T &  f,
stencil::Direction  d,
cell_idx_t  thickness,
bool  fullSlice 
)

Constructs CellInterval containing the last slice before the ghost layer begins for a given direction.

Parameters
ddirection of the border . For W,E,N,S,T,B a slice is returned for NW, NE, .. an edge is returned for TBE, TNW, ... a corner ( single cell ) is returned
thicknesshow many slices to return
fullSliceif true also the ghost cells in directions orthogonal to d are contained in the \ returned cell interval. Example (d=W ): if fullSlice then also the ghost layer in N-S and T-B are included, otherwise only inner cells are returned
Returns
CellInterval describing the slice before ghost layer
template<class T >
bool walberla::field::isFlag ( f)
inline
template<class Sten , typename FieldPtrOrIterator >
bool walberla::field::isFlagInNeighborhood ( const FieldPtrOrIterator &  i,
typename FieldPtrOrIterator::value_type  mask 
)
inline

Ores the neighborhood of the specified stencil and checks whether the bits of mask are set.

Parameters
mask[in] bit mask. Test if a cell is added: (content & mask) == true
template<class T >
bool walberla::field::isFlagSet ( const T &  v,
f 
)
inline
template<class T , typename FieldPtrOrIterator >
bool walberla::field::isFlagSet ( const FieldPtrOrIterator &  it,
flag 
)
inline
template<class T >
bool walberla::field::isMaskSet ( const T &  val,
mask 
)
inline
template<class T , typename FieldPtrOrIterator >
bool walberla::field::isMaskSet ( const FieldPtrOrIterator &  it,
mask 
)
inline
template<class T >
bool walberla::field::isPartOfMaskSet ( const T &  val,
mask 
)
inline
template<class T , typename FieldPtrOrIterator >
bool walberla::field::isPartOfMaskSet ( const FieldPtrOrIterator &  it,
mask 
)
inline
template<typename Field_T >
bool walberla::field::isSymmetric ( const Field_T *  field,
uint_t  dimension,
uint_t  fCoord = 0,
Cell *  differingCell = NULL 
)

Test for axis symmetry in a single field.

Parameters
fieldthe field to check
dimension0 for symmetry check on x axis, 1 on y axis, 2 on z axis
fCoordwhich component to check
differingCellif pointer not null and field is not symmetric, this acts as a output parameter for the first asymmetric cell found
template<typename Field_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeAccuracyEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const SolutionFunction_T &  solution,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const Filter_T &  filter,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const std::string &  configBlockName = internal::accuracyEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeAccuracyEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const SolutionFunction_T &  solution,
const std::string &  configBlockName = internal::accuracyEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluation< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const Filter_T &  filter,
const std::string &  configBlockName = internal::accuracyEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluationLinePlot ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const bool  yAxis = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeAccuracyEvaluationLinePlot ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const SolutionFunction_T &  solution,
const bool  yAxis = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T , typename SolutionFunction_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluationLinePlot ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const Filter_T &  filter,
const bool  yAxis = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T > > walberla::field::makeAccuracyEvaluationLinePlot ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const std::string &  configBlockName = internal::accuracyEvaluationLinePlotConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeAccuracyEvaluationLinePlot ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const SolutionFunction_T &  solution,
const std::string &  configBlockName = internal::accuracyEvaluationLinePlotConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T , typename SolutionFunction_T , typename Config_T >
shared_ptr< AccuracyEvaluationLinePlot< Field_T, SolutionFunction_T, Filter_T > > walberla::field::makeAccuracyEvaluationLinePlot ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const SolutionFunction_T &  solution,
const Filter_T &  filter,
const std::string &  configBlockName = internal::accuracyEvaluationLinePlotConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename AccuracyEvaluationLinePlot_T >
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > walberla::field::makeAccuracyEvaluationLinePlotter ( const shared_ptr< AccuracyEvaluationLinePlot_T > &  plot,
const uint_t  evaluationFrequency,
const std::string &  filename = internal::accuracyEvaluationLinePlotterFilename,
const std::string &  fileExtension = internal::accuracyEvaluationLinePlotterExtension 
)
template<typename Config_T , typename AccuracyEvaluationLinePlot_T >
shared_ptr< AccuracyEvaluationLinePlotter< AccuracyEvaluationLinePlot_T > > walberla::field::makeAccuracyEvaluationLinePlotter ( const Config_T &  config,
const shared_ptr< AccuracyEvaluationLinePlot_T > &  plot,
const std::string &  configBlockName = internal::accuracyEvaluationLinePlotterConfigBlock 
)
template<typename DensityField_T >
shared_ptr< MassEvaluation< DensityField_T > > walberla::field::makeMassEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const std::string &  filename = internal::massEvaluationFilename,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename DensityField_T , typename FlagField_T >
shared_ptr< MassEvaluation< DensityField_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeMassEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const std::string &  filename = internal::massEvaluationFilename,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename DensityField_T , typename Filter_T >
shared_ptr< MassEvaluation< DensityField_T, Filter_T > > walberla::field::makeMassEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const Filter_T &  filter,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const std::string &  filename = internal::massEvaluationFilename,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename DensityField_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T > > walberla::field::makeMassEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const std::string &  configBlockName = internal::massEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename DensityField_T , typename FlagField_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeMassEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const std::string &  configBlockName = internal::massEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename DensityField_T , typename Filter_T , typename Config_T >
shared_ptr< MassEvaluation< DensityField_T, Filter_T > > walberla::field::makeMassEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const Filter_T &  filter,
const std::string &  configBlockName = internal::massEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T >
shared_ptr< StabilityChecker< Field_T > > walberla::field::makeStabilityChecker ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const uint_t  checkFrequency,
const bool  outputToStream = true,
const bool  outputVTK = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T >
shared_ptr< StabilityChecker< Field_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeStabilityChecker ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const uint_t  checkFrequency,
const bool  outputToStream = true,
const bool  outputVTK = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T >
shared_ptr< StabilityChecker< Field_T, Filter_T > > walberla::field::makeStabilityChecker ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const Filter_T &  filter,
const uint_t  checkFrequency,
const bool  outputToStream = true,
const bool  outputVTK = true,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T > > walberla::field::makeStabilityChecker ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const std::string &  configBlockName = internal::stabilityCheckerConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename FlagField_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeStabilityChecker ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const std::string &  configBlockName = internal::stabilityCheckerConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename Field_T , typename Filter_T , typename Config_T >
shared_ptr< StabilityChecker< Field_T, Filter_T > > walberla::field::makeStabilityChecker ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  fieldId,
const Filter_T &  filter,
const std::string &  configBlockName = internal::stabilityCheckerConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > walberla::field::makeVolumetricFlowRateEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T , typename FlagField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeVolumetricFlowRateEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T , typename Filter_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > walberla::field::makeVolumetricFlowRateEvaluation ( const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const Filter_T &  filter,
const uint_t  plotFrequency,
const uint_t  logFrequency,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > walberla::field::makeVolumetricFlowRateEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const std::string &  configBlockName = internal::volumetricFlowRateEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T , typename FlagField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter<FlagField_T> > > walberla::field::makeVolumetricFlowRateEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const ConstBlockDataID &  flagFieldId,
const Set< FlagUID > &  cellsToEvaluate,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const std::string &  configBlockName = internal::volumetricFlowRateEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename VelocityField_T , typename Filter_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > walberla::field::makeVolumetricFlowRateEvaluation ( const Config_T &  config,
const weak_ptr< StructuredBlockStorage > &  blocks,
const ConstBlockDataID &  velocityFieldId,
const Filter_T &  filter,
const internal::FlowRateSolution_T solution = internal::FlowRateSolution_T(),
const internal::FlowRateVelocitySolution_T velocitySolution = internal::FlowRateVelocitySolution_T(),
const std::string &  configBlockName = internal::volumetricFlowRateEvaluationConfigBlock,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
template<typename T , uint_t fs>
std::ostream& walberla::field::operator<< ( std::ostream &  os,
const FieldIterator< T, fs > &  it 
)
template<typename T , uint_t fs>
std::ostream & walberla::field::printSlice ( std::ostream &  os,
const Field< T, fs > &  field,
int  sliceCoord,
cell_idx_t  sliceValue,
cell_idx_t  f = 0 
)

Prints a slice along a coordinate axis.

Parameters
osoutput stream
fieldthe field to print
sliceCoorddimension to slice through, 0=x, 1=y, 2=z
sliceValuefixed value of the sliceCoordinate
ffixed f value
template<typename T , uint_t fs>
std::ostream & walberla::field::printSlice ( std::ostream &  os,
const GhostLayerField< T, fs > &  field,
int  sliceCoord,
cell_idx_t  sliceValue,
cell_idx_t  f = 0 
)

Overload of printSlice for GhostLayerFields.

template<typename T >
std::ostream & walberla::field::printSlice ( std::ostream &  os,
const FlagField< T > &  field,
int  sliceCoord,
cell_idx_t  sliceValue,
cell_idx_t  f = 0 
)

Overload of printSlice for FlagFields.

template<typename FieldT >
void walberla::field::readFromFile ( const std::string &  filename,
BlockStorage &  blockStorage,
const BlockDataID &  fieldID,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)

Reads a field from a file.

Only the inner cells of a Field are read from file, ghost layer cells are ignored.

The file is binary with no regard to endianness, so it is only save to read it on the same computer architecture as it was written on.

Blocks are processed in the order they appear in the given BlockStorage. This requires that the BlockStorage is structured the same way as when the file was written. It is advised that you save the SetupBlockForest that was used to create the BlockStorage during writing and use it to create the BlockStorage when reading the file, since load balancers may employ randomness for their decisions.

This is a collective function, it has to be called by all MPI processes simultaneously.

Parameters
filenameThe name of the file to be read
blockStorageThe BlockStorage the field is registered at
fieldIDThe ID of the field as returned by the BlockStorage at its registration
template<class T >
void walberla::field::removeFlag ( T &  v,
f 
)
inline
template<class T , typename FieldPtrOrIterator >
void walberla::field::removeFlag ( const FieldPtrOrIterator &  it,
flag 
)
inline
template<class T >
void walberla::field::removeMask ( T &  val,
mask 
)
inline
template<class T , typename FieldPtrOrIterator >
void walberla::field::removeMask ( const FieldPtrOrIterator &  it,
mask 
)
inline
template<typename FieldT >
void walberla::field::writeToFile ( const std::string &  filename,
const BlockStorage &  blockStorage,
const BlockDataID &  fieldID,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)

Writes a field from a BlockStorage to file.

Only the inner cells of a Field are written to file, ghost layer cells are ignored.

The generated file is binary with no regard to endianness, so it is only save to read it on the same computer architecture.

Blocks are processed in the order they appear in the given BlockStorage. This requires that the BlockStorage is structured the same way when the file is read again. It is advised that you save the SetupBlockForest that was used to create the BlockStorage during writing and use it to create the BlockStorage when reading the file, since load balancers may employ randomness for their decisions.

If the file specified by filename already exists it is overwritten.

This is a collective function, it has to be called by all MPI processes simultaneously.

Parameters
filenameThe name of the file to be created
blockStorageThe BlockStorage the field is registered at
fieldIDThe ID of the field as returned by the BlockStorage at its registration