ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
FieldCoupling::Fields::Interpolated< T, codim > Class Template Reference

A vector or scalar field interpolated from a regular grid. More...

#include <Interpolated.hpp>

Public Types

using value_type = typename Utils::decay_to_scalar< Utils::Vector< T, codim > >::type
 Type of the values, usually Utils::Vector<T, 3> for vector fields and T for scalar fields.
 
using jacobian_type = detail::jacobian_type< T, codim >
 
using storage_type = boost::multi_array< value_type, 3 >
 

Public Member Functions

 Interpolated (const boost::const_multi_array_ref< value_type, 3 > &global_field, const Utils::Vector3d &grid_spacing, const Utils::Vector3d &origin)
 
 Interpolated (const Interpolated &rhs)
 
Interpolatedoperator= (const Interpolated &rhs)
 
Utils::Vector3d grid_spacing () const
 
storage_type const & field_data () const
 
Utils::Vector3d origin () const
 
Utils::Vector3i shape () const
 
std::vector< T > field_data_flat () const
 Serialize field.
 
value_type operator() (const Utils::Vector3d &pos, double={}) const
 
jacobian_type jacobian (const Utils::Vector3d &pos, double={}) const
 
bool fits_in_box (const Utils::Vector3d &box) const
 

Detailed Description

template<typename T, std::size_t codim>
class FieldCoupling::Fields::Interpolated< T, codim >

A vector or scalar field interpolated from a regular grid.

This is an interpolation wrapper around a boost::multi_array, which can be evaluated on any point in space by spline interpolation.

Template Parameters
TUnderlying type of the field values, see value_type
codimDimension of the field: 3 for a vector field, 1 for a scalar field.

Definition at line 65 of file Interpolated.hpp.

Member Typedef Documentation

◆ jacobian_type

template<typename T , std::size_t codim>
using FieldCoupling::Fields::Interpolated< T, codim >::jacobian_type = detail::jacobian_type<T, codim>

Definition at line 72 of file Interpolated.hpp.

◆ storage_type

template<typename T , std::size_t codim>
using FieldCoupling::Fields::Interpolated< T, codim >::storage_type = boost::multi_array<value_type, 3>

Definition at line 73 of file Interpolated.hpp.

◆ value_type

template<typename T , std::size_t codim>
using FieldCoupling::Fields::Interpolated< T, codim >::value_type = typename Utils::decay_to_scalar<Utils::Vector<T, codim> >::type

Type of the values, usually Utils::Vector<T, 3> for vector fields and T for scalar fields.

Definition at line 70 of file Interpolated.hpp.

Constructor & Destructor Documentation

◆ Interpolated() [1/2]

template<typename T , std::size_t codim>
FieldCoupling::Fields::Interpolated< T, codim >::Interpolated ( const boost::const_multi_array_ref< value_type, 3 > &  global_field,
const Utils::Vector3d grid_spacing,
const Utils::Vector3d origin 
)
inline

Definition at line 81 of file Interpolated.hpp.

◆ Interpolated() [2/2]

template<typename T , std::size_t codim>
FieldCoupling::Fields::Interpolated< T, codim >::Interpolated ( const Interpolated< T, codim > &  rhs)
inline

Definition at line 96 of file Interpolated.hpp.

Member Function Documentation

◆ field_data()

template<typename T , std::size_t codim>
storage_type const & FieldCoupling::Fields::Interpolated< T, codim >::field_data ( ) const
inline

Definition at line 103 of file Interpolated.hpp.

◆ field_data_flat()

template<typename T , std::size_t codim>
std::vector< T > FieldCoupling::Fields::Interpolated< T, codim >::field_data_flat ( ) const
inline

Serialize field.

Definition at line 110 of file Interpolated.hpp.

◆ fits_in_box()

template<typename T , std::size_t codim>
bool FieldCoupling::Fields::Interpolated< T, codim >::fits_in_box ( const Utils::Vector3d box) const
inline

◆ grid_spacing()

template<typename T , std::size_t codim>
Utils::Vector3d FieldCoupling::Fields::Interpolated< T, codim >::grid_spacing ( ) const
inline

Definition at line 102 of file Interpolated.hpp.

◆ jacobian()

template<typename T , std::size_t codim>
jacobian_type FieldCoupling::Fields::Interpolated< T, codim >::jacobian ( const Utils::Vector3d pos,
double  = {} 
) const
inline

Definition at line 129 of file Interpolated.hpp.

◆ operator()()

template<typename T , std::size_t codim>
value_type FieldCoupling::Fields::Interpolated< T, codim >::operator() ( const Utils::Vector3d pos,
double  = {} 
) const
inline

Definition at line 118 of file Interpolated.hpp.

◆ operator=()

template<typename T , std::size_t codim>
Interpolated & FieldCoupling::Fields::Interpolated< T, codim >::operator= ( const Interpolated< T, codim > &  rhs)
inline

Definition at line 97 of file Interpolated.hpp.

◆ origin()

template<typename T , std::size_t codim>
Utils::Vector3d FieldCoupling::Fields::Interpolated< T, codim >::origin ( ) const
inline

Definition at line 104 of file Interpolated.hpp.

◆ shape()

template<typename T , std::size_t codim>
Utils::Vector3i FieldCoupling::Fields::Interpolated< T, codim >::shape ( ) const
inline

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