GridFormat 0.2.1
I/O-Library for grid-like data structures
Loading...
Searching...
No Matches
GridFormat::Field Class Referenceabstract

Abstract interface for fields of values that is used by writers/readers to store fields. More...

#include <field.hpp>

Inheritance diagram for GridFormat::Field:
GridFormat::Dune::FunctionField< _Function, Grid, T >

Detailed Description

Allows you to obtain information on the layout of the field, the precision of its value type, and to retrieve its values in serialized form or to export them into containers.

Classes

struct  DisableResize
 Can be used as a flag to disable resizing upon export (e.g. to write to the beginning of larger range)
 

Public Member Functions

 Field (Field &&)=default
 
 Field (const Field &)=delete
 
Fieldoperator= (Field &&)=default
 
Fieldoperator= (const Field &)=delete
 
MDLayout layout () const
 Return the layout of this field.
 
DynamicPrecision precision () const
 Return the precision of the scalar field values.
 
std::size_t size_in_bytes () const
 Return the size of all field values in serialized form.
 
Serialization serialized () const
 Return the field values in serialized form.
 
template<typename Visitor >
decltype(auto) visit_field_values (Visitor &&visitor) const
 Visit the scalar values of the field in the form of an std::span.
 
template<std::ranges::range R>
requires (Concepts::Scalar<MDRangeValueType<R>>)
decltype(auto) export_to (R &&output_range) const
 Export the field values into the provided range, resize if necessary, and return it.
 
template<std::ranges::range R>
requires (Concepts::Scalar<MDRangeValueType<R>>)
decltype(auto) export_to (R &&output_range, DisableResize) const
 Export the field values into the provided range without resizing (given range must be large enough)
 
template<Concepts::Scalar S>
void export_to (S &out) const
 Export the field as a scalar (works only if the field is a scalar field)
 
template<Concepts::Scalar S>
export_to () const
 Export the field as a scalar (works only if the field is a scalar field)
 
template<Concepts::ResizableMDRange R>
requires (Concepts::StaticallySizedMDRange<std::ranges::range_value_t<R>> or Concepts::Scalar<std::ranges::range_value_t<R>>)
export_to () const
 Export the field into a resizable range (e.g. std::vector)
 

Static Public Attributes

static constexpr struct GridFormat::Field::DisableResize no_resize
 

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