Reference documentation for deal.II version Git 1aa49a030b 2021-12-07 05:12:24 -0500
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DataOutBase::VtkFlags Struct Reference

#include <deal.II/base/data_out_base.h>

Inheritance diagram for DataOutBase::VtkFlags:
[legend]

Public Types

enum  ZlibCompressionLevel { no_compression, best_speed, best_compression, default_compression }
 

Public Member Functions

 VtkFlags (const double time=std::numeric_limits< double >::min(), const unsigned int cycle=std::numeric_limits< unsigned int >::min(), const bool print_date_and_time=true, const ZlibCompressionLevel compression_level=best_compression, const bool write_higher_order_cells=false, const std::map< std::string, std::string > &physical_units={})
 
void parse_parameters (const ParameterHandler &prm)
 
std::size_t memory_consumption () const
 

Static Public Member Functions

static void declare_parameters (ParameterHandler &prm)
 

Public Attributes

double time
 
unsigned int cycle
 
bool print_date_and_time
 
ZlibCompressionLevel compression_level
 
bool write_higher_order_cells
 
std::map< std::string, std::string > physical_units
 

Detailed Description

Flags controlling the details of output in VTK format.

Definition at line 1090 of file data_out_base.h.

Member Enumeration Documentation

◆ ZlibCompressionLevel

A data type providing the different possible zlib compression levels. These map directly to constants defined by zlib.

Enumerator
no_compression 

Do not use any compression.

best_speed 

Use the fastest available compression algorithm.

best_compression 

Use the algorithm which results in the smallest compressed files. This is the default flag.

default_compression 

Use the default compression algorithm. This is a compromise between speed and file size.

Definition at line 1128 of file data_out_base.h.

Constructor & Destructor Documentation

◆ VtkFlags()

DataOutBase::VtkFlags::VtkFlags ( const double  time = std::numeric_limits<double>::min(),
const unsigned int  cycle = std::numeric_limits<unsigned int>::min(),
const bool  print_date_and_time = true,
const ZlibCompressionLevel  compression_level = best_compression,
const bool  write_higher_order_cells = false,
const std::map< std::string, std::string > &  physical_units = {} 
)

Constructor. Initializes the member variables with names corresponding to the argument names of this function.

Definition at line 2655 of file data_out_base.cc.

Member Function Documentation

◆ declare_parameters()

void DataOutBase::OutputFlagsBase< VtkFlags >::declare_parameters ( ParameterHandler prm)
staticinherited

Declare all flags with name and type as offered by this class, for use in input files.

This method does nothing, but child classes may override this method to add fields to prm.

Definition at line 580 of file data_out_base.h.

◆ parse_parameters()

void DataOutBase::OutputFlagsBase< VtkFlags >::parse_parameters ( const ParameterHandler prm)
inherited

Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.

This method does nothing, but child classes may override this method to add fields to prm.

Definition at line 586 of file data_out_base.h.

◆ memory_consumption()

std::size_t DataOutBase::OutputFlagsBase< VtkFlags >::memory_consumption ( ) const
inherited

Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map) is difficult.

Definition at line 592 of file data_out_base.h.

Member Data Documentation

◆ time

double DataOutBase::VtkFlags::time

The time of the time step if this file is part of a time dependent simulation.

The value of this variable is written into the output file according to the instructions provided in http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files unless it is at its default value of

std::numeric_limits<unsigned int>::min() 

.

Definition at line 1102 of file data_out_base.h.

◆ cycle

unsigned int DataOutBase::VtkFlags::cycle

The number of the time step if this file is part of a time dependent simulation, or the cycle within a nonlinear or other iteration.

The value of this variable is written into the output file according to the instructions provided in http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files unless it is at its default value of

std::numeric_limits<unsigned int>::min() 

.

Definition at line 1114 of file data_out_base.h.

◆ print_date_and_time

bool DataOutBase::VtkFlags::print_date_and_time

Flag to determine whether the current date and time shall be printed as a comment in the file's second line.

Default is true.

Definition at line 1122 of file data_out_base.h.

◆ compression_level

ZlibCompressionLevel DataOutBase::VtkFlags::compression_level

Flag determining the compression level at which zlib, if available, is run. The default is best_compression.

Definition at line 1154 of file data_out_base.h.

◆ write_higher_order_cells

bool DataOutBase::VtkFlags::write_higher_order_cells

Flag determining whether to write patches as linear cells or as a high-order Lagrange cell.

Default is false.

Note
The ability to write data that corresponds to higher order polynomials rather than simply linear or bilinear is a feature that was only introduced in VTK 8.1.0 in December 2017. You will need at least Paraview version 5.5.0 released in April 2018 or a similarly recent version of VisIt for this feature to work (for example, VisIt 3.1.1, released in February 2020, does not yet support this feature). Older versions of these programs are likely going to result in errors when trying to read files generated with this flag set to true. Experience with these programs shows that these error messages are likely going to be rather less descriptive and more obscure.

Definition at line 1173 of file data_out_base.h.

◆ physical_units

std::map<std::string, std::string> DataOutBase::VtkFlags::physical_units

A map that describes for (some or all) of the output quantities what the physical units are. This field is ignored for VTK file format, but used for VTU format where it is attached to the individual scalar, vector, or tensor fields for use by visualization or other postprocessing tools. The default is to not attach any physical units to fields at all, i.e., an empty map.

If the map does not contain an entry for a specific output variable, then no unit will be written into the output file. In other words, it is not an error to provide units for only some variables.

step-19, step-44 and step-69 all demonstrate how to use this variable.

Note
While the functions that make use of this information do not care about how physical units are specified, downstream postprocessing tools should and do. As a consequence, these units should be specified in a format that is understandable to these postprocessing tools. As an example, the unyt project describes a standard for describing and converting units.

Definition at line 1196 of file data_out_base.h.


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