hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::physics::GridField< Dim > Class Template Reference

#include <grid_field.hpp>

Public Member Functions

 GridField (std::array< std::vector< Real >, static_cast< std::size_t >(Dim)> axes, std::vector< Real > values)
 
Real operator() (const Point< Dim > &x) const
 
const std::array< std::vector< Real >, static_cast< std::size_t >(Dim)> & axes () const noexcept
 

Constructor & Destructor Documentation

◆ GridField()

template<int Dim>
hpfem::physics::GridField< Dim >::GridField ( std::array< std::vector< Real >, static_cast< std::size_t >(Dim)>  axes,
std::vector< Real >  values 
)

axes[k] strictly increasing (or a single value), values in C order over the axes (the last axis fastest: index (i0 · n1 + i1) · n2 + i2), as a NumPy array values[i0, i1, i2] is laid out.

Exceptions
InvalidArgumentfor an empty or non-increasing axis, non-finite data, or a value count that does not match the axes.

Member Function Documentation

◆ axes()

template<int Dim>
const std::array< std::vector< Real >, static_cast< std::size_t >(Dim)> & hpfem::physics::GridField< Dim >::axes ( ) const
inlinenoexcept

◆ operator()()

template<int Dim>
Real hpfem::physics::GridField< Dim >::operator() ( const Point< Dim > &  x) const

The interpolated value at x.

Exceptions
InvalidArgumentif x lies outside the grid (beyond 1e-9 of an axis extent) along an axis with more than one value.

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