hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Scaled Class Reference

Scales a function of a single variable. More...

#include <Qpoint_func.hpp>

Inheritance diagram for hexed::Scaled:
hexed::Qpoint_func hexed::Output_data

Public Member Functions

 Scaled (const Qpoint_func &base, std::array< double, 2 > bounds)
 
 Scaled (Qpoint_func &&base, std::array< double, 2 > bounds)=delete
 
int n_var (int n_dim) const override
 number of output variables when called on n_dim-dimensional input
 
std::string variable_name (int n_dim, int i_var) const override
 name of i_varth variable (for plotting) when called on n_dim-dimensional input
 
std::vector< double > operator() (Element &e, const Basis &b, int i_qpoint, double time) const override
 

Detailed Description

Scales a function of a single variable.

Computes a linear transformation that maps bounds to [0, 1] and then applies this transformation to the input function (base). Thus if bounds are lower and upper bounds for the function, then Scaled will return an output which is in the range [0, 1]. This is useful for manually computing contour plots or colormapping data.

Constructor & Destructor Documentation

◆ Scaled()

hexed::Scaled::Scaled ( const Qpoint_func & base,
std::array< double, 2 > bounds )
inline
Parameters
baseFunction you want to scale.
boundsPoints to define the linear map (see class description).

Member Function Documentation

◆ n_var()

int hexed::Scaled::n_var ( int n_dim) const
inlineoverridevirtual

number of output variables when called on n_dim-dimensional input

Implements hexed::Output_data.

◆ operator()()

std::vector< double > hexed::Scaled::operator() ( Element & e,
const Basis & b,
int i_qpoint,
double time ) const
inlineoverridevirtual

Implements hexed::Qpoint_func.

◆ variable_name()

std::string hexed::Scaled::variable_name ( int n_dim,
int i_var ) const
inlineoverridevirtual

name of i_varth variable (for plotting) when called on n_dim-dimensional input

Reimplemented from hexed::Output_data.


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