dune-vtk 2.12
Loading...
Searching...
No Matches
rangeproxy.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3#pragma once
4
5#include <cstddef>
6
7namespace Dune::Vtk::Impl {
8
10template <class Function, class Domain>
11struct RangeProxy
12{
13 using size_type = std::size_t;
14 using value_type = double;
15 using field_type = double;
16
18 size_type size () const
19 {
20 return f_->numComponents();
21 }
22
25 value_type operator[] (size_type i) const
26 {
27 return f_->evaluate(i, x_);
28 }
29
30 Function const* f_;
31 Domain x_;
32};
33
34} // end namespace Dune::Vtk::Impl
BCRSMatrix< FieldMatrix< T, n, m >, A >::size_type size_type