KASKADE 7 development version
Public Types | Public Member Functions | Public Attributes | List of all members
Kaskade::IoOptions Struct Reference

options for VTK/AMIRA output More...

#include <iobase.hh>

Detailed Description

options for VTK/AMIRA output

IoOptions are used to specify details for output,e.g., ascii or binary format. For ascii format, output precision (i.e. number of significant digits to be written) can be specified; if not set explicitly, six digits will be used.

writeVTK(variableSet,"temperaturefile",IoOptions().setOutputType(IoOptions::ascii).setPrecision(10));
void writeVTK(Function const &f, std::string const &filename, IoOptions options, std::string fname)
Writes a single finite element function to a VTK file.
Definition: vtk.hh:56
IoOptions()=default
Default constructor.
IoOptions & setOutputType(OutputType out)
Sets the output type to either ascii or binary.
Definition: iobase.hh:137
IoOptions & setPrecision(int pre)
Sets the number of decimal digits to be written for floating point numbers.
Definition: iobase.hh:142

Definition at line 76 of file iobase.hh.

Public Types

enum  OutputType { ascii , binary }
 Determines text or binary output format. Currently this is only used by VTK output. More...
 
enum  DataMode { conforming , nonconforming , inferred }
 The data mode determines the continuity structure of the output. More...
 
enum  Info { none , summary , detail }
 

Public Member Functions

 IoOptions ()=default
 Default constructor. More...
 
IoOptionssetOrder (int ord)
 Sets the polynomial order of output. More...
 
IoOptionssetOutputType (OutputType out)
 Sets the output type to either ascii or binary. More...
 
IoOptionssetPrecision (int pre)
 Sets the number of decimal digits to be written for floating point numbers. More...
 
IoOptionssetDataMode (DataMode mode)
 Sets the data mode (conforming or nonconforming). More...
 

Public Attributes

OutputType outputType = ascii
 
DataMode dataMode = inferred
 
Info info = none
 
int precision = 6
 
int order = 1
 

Member Enumeration Documentation

◆ DataMode

The data mode determines the continuity structure of the output.

Enumerator
conforming 

Cells share a node at a common vertex. This means that point data (written for linear and quadratic FE) is necessarily continuous.

nonconforming 

Joint vertices are duplicated, i.e. each cell has an independent set of nodes (in effect, the grid is just a bunch of disconnected cells). Thus, also point data can be discontinuous. The drawback is that the cell connectivity is lost and the file size increased.

inferred 

Tells the file writer to choose the most appropriate version automatically based on the functions' continuity.

Definition at line 93 of file iobase.hh.

◆ Info

Enumerator
none 
summary 
detail 

Definition at line 113 of file iobase.hh.

◆ OutputType

Determines text or binary output format. Currently this is only used by VTK output.

Enumerator
ascii 

Output data arrays in ascii.

binary 

Output data arrays in base64 encoded binary.

Definition at line 82 of file iobase.hh.

Constructor & Destructor Documentation

◆ IoOptions()

Kaskade::IoOptions::IoOptions ( )
default

Default constructor.

Member Function Documentation

◆ setDataMode()

IoOptions & Kaskade::IoOptions::setDataMode ( DataMode  mode)
inline

Sets the data mode (conforming or nonconforming).

Definition at line 147 of file iobase.hh.

◆ setOrder()

IoOptions & Kaskade::IoOptions::setOrder ( int  ord)
inline

Sets the polynomial order of output.

VTK file formats currently support order 0 (discontinuous piecewise constant), 1 (linear continuous or discontinuous), and 2 (quadratic continuous or discontinuous). Other orders are not supported (and will be silently clamped to {0,1,2}).

Definition at line 129 of file iobase.hh.

◆ setOutputType()

IoOptions & Kaskade::IoOptions::setOutputType ( OutputType  out)
inline

Sets the output type to either ascii or binary.

In VTK files, both define XML file types. The coefficient data is either written as ASCII floating point values or as base64 encoded binary data.

Definition at line 137 of file iobase.hh.

◆ setPrecision()

IoOptions & Kaskade::IoOptions::setPrecision ( int  pre)
inline

Sets the number of decimal digits to be written for floating point numbers.

Definition at line 142 of file iobase.hh.

Member Data Documentation

◆ dataMode

DataMode Kaskade::IoOptions::dataMode = inferred

Definition at line 150 of file iobase.hh.

Referenced by setDataMode(), and Kaskade::writeVTK().

◆ info

Info Kaskade::IoOptions::info = none

Definition at line 151 of file iobase.hh.

◆ order

int Kaskade::IoOptions::order = 1

Definition at line 153 of file iobase.hh.

Referenced by setOrder(), and Kaskade::writeVTK().

◆ outputType

OutputType Kaskade::IoOptions::outputType = ascii

◆ precision

int Kaskade::IoOptions::precision = 6

Definition at line 152 of file iobase.hh.

Referenced by setPrecision(), and Kaskade::writeVTK().


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