walberla::gui::FieldDisplayAdaptor< field_t > Class Template Reference

Detailed Description

template<typename field_t>
class walberla::gui::FieldDisplayAdaptor< field_t >

Abstract class, for displaying fields.

Handles common functionality like fetching the field, generating slices etc.

field_t has to implement the concept of a GhostLayerField

#include <FieldDisplayAdaptor.h>

+ Inheritance diagram for walberla::gui::FieldDisplayAdaptor< field_t >:

Public Member Functions

 FieldDisplayAdaptor (ConstBlockDataID fieldId)
 
void configure (const IBlock *block, int sliceDim, cell_idx_t sliceValue, Vector3< uint_t > &innerSize, cell_idx_t &ghostLayers)
 Configures the DisplayAdaptor by passing in a block and slice information. More...
 
- Public Member Functions inherited from walberla::gui::DisplayAdaptor
virtual void draw (QVector< QVector< CellView * > > &grid, int nrOfGhostLayers)=0
 Draws data structure represented by this Adaptor to a grid of cells Block has to be set first! More...
 
virtual void addConfigurationItem (QTreeWidgetItem *)
 Optionally adds a QTreeWidgetItem to a tree, containing configuration options. More...
 

Protected Member Functions

Cell permuteCoordAccordingToSlice (Cell input, int sliceCoord)
 
void getFieldSizeInfo (CellInterval &ciOut, cell_idx_t &ghostLayerOut)
 

Protected Attributes

const field_t * field_
 
CellInterval sliceInterval_
 
cell_idx_t sliceDim_
 
ConstBlockDataID blockDataId_
 

Additional Inherited Members

- Signals inherited from walberla::gui::DisplayAdaptor
void requestRedraw ()
 This signal requests a redraw, for example after a configuration change. More...
 

Constructor & Destructor Documentation

◆ FieldDisplayAdaptor()

template<typename field_t >
walberla::gui::FieldDisplayAdaptor< field_t >::FieldDisplayAdaptor ( ConstBlockDataID  fieldId)
inline

Member Function Documentation

◆ configure()

template<typename field_t >
void walberla::gui::FieldDisplayAdaptor< field_t >::configure ( const IBlock block,
int  sliceDim,
cell_idx_t  sliceValue,
Vector3< uint_t > &  innerSize,
cell_idx_t ghostLayers 
)
virtual

Configures the DisplayAdaptor by passing in a block and slice information.

Parameters
[in]blockthe block that should be displayed
[in]sliceDimThe coordinate value of this dimension is kept constant. Defines the slice direction 0 means x, 1 means y, 2 means z
[in]sliceValueThe fixed value of the sliceDim coordinate. If the value is not in the allowed range nothing is displayed
[out]innerSizesize of the field, without ghost layer. innerSize[0] is the horizontal extent and will be the first coordinate in the grid array of draw() innerSize[1] is the vertical extend and will be the second coordinate in the grid array innerSize[2] is used for limiting the allowed sliceValues
[out]ghostLayersnumber of ghost layers for all three dimensions of innerSize

Implements walberla::gui::DisplayAdaptor.

Reimplemented in walberla::gui::ScalarField3DisplayAdaptor< field_t >, walberla::gui::VectorFieldDisplayAdaptor< field_t >, walberla::lbm::PdfFieldDisplayAdaptor< field_t, stencil_t >, walberla::gui::FlagFieldDisplayAdaptor< field_t >, and walberla::gui::ScalarFieldDisplayAdaptor< field_t >.

◆ getFieldSizeInfo()

template<typename field_t >
void walberla::gui::FieldDisplayAdaptor< field_t >::getFieldSizeInfo ( CellInterval ciOut,
cell_idx_t ghostLayerOut 
)
protected

◆ permuteCoordAccordingToSlice()

template<typename field_t >
Cell walberla::gui::FieldDisplayAdaptor< field_t >::permuteCoordAccordingToSlice ( Cell  input,
int  sliceCoord 
)
protected

Member Data Documentation

◆ blockDataId_

template<typename field_t >
ConstBlockDataID walberla::gui::FieldDisplayAdaptor< field_t >::blockDataId_
protected

◆ field_

template<typename field_t >
const field_t* walberla::gui::FieldDisplayAdaptor< field_t >::field_
protected

◆ sliceDim_

template<typename field_t >
cell_idx_t walberla::gui::FieldDisplayAdaptor< field_t >::sliceDim_
protected

◆ sliceInterval_

template<typename field_t >
CellInterval walberla::gui::FieldDisplayAdaptor< field_t >::sliceInterval_
protected

The documentation for this class was generated from the following file: