GridFormat 0.4.0
I/O-Library for grid-like data structures
Loading...
Searching...
No Matches
GridFormat::Dune::FunctionField< _Function, Grid, T > Class Template Reference

Implements the field interface for a Dune::Function defined on a (wrapped) Dune::GridView. More...

#include <dune.hpp>

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

Detailed Description

template<typename _Function, typename Grid, GridFormat::Concepts::Scalar T>
requires (Concepts::Function<_Function, typename Dune::Traits::GridView<Grid>::type>)
class GridFormat::Dune::FunctionField< _Function, Grid, T >
Note
Takes ownership of the given function if constructed with an rvalue reference, otherwise it stores a reference.

Public Member Functions

template<typename F >
requires (std::is_same_v<std::remove_cvref_t<F>, Function>)
 FunctionField (F &&function, const Grid &grid, const Precision< T > &={}, bool cellwise_constant=false)
 
- Public Member Functions inherited from GridFormat::Field
 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)
 

Additional Inherited Members

- Static Public Attributes inherited from GridFormat::Field
static constexpr struct GridFormat::Field::DisableResize no_resize
 

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