LORENE

Class for representing functions of 3 variables, supposed to be Cartesian coordinates $ f(x, y, z)$. More...

#include <funcspec.h>

Public Member Functions

 FuncSpec (int=2, int=2, int=2)
 
 FuncSpec (const TabSpec &)
 
 FuncSpec (const string &coord_name, const string &field)
 Constructor from files. More...
 
 FuncSpec (const FuncSpec &)
 Copy constructor. More...
 
void set_grids (double, double, double, double, double, double)
 
virtual ~FuncSpec ()
 Destructor. More...
 
void operator= (const FuncSpec &)
 
void operator= (const TabSpec &)
 
void operator= (double)
 
void set_coefs (const TabSpec &)
 
void compute_coefs () const
 
double compute_in_xyz (double, double, double) const
 
void compute_values () const
 
FuncSpec get_partial_x () const
 Computes partial derivative $ \partial f \ \partial x$. More...
 
FuncSpec get_partial_y () const
 Computes partial derivative $ \partial f \ \partial y$. More...
 
FuncSpec get_partial_z () const
 Computes partial derivative $ \partial f \ \partial z$. More...
 
FuncSpec primitive_x () const
 Computes the primitive with respect to $x$ which is 0 at the left boundary of the $x$ interval (xmin ). More...
 
FuncSpec primitive_y () const
 Computes the primitive with respect to $y$ which is 0 at the left boundary of the $x$ interval (ymin ). More...
 
FuncSpec primitive_z () const
 Computes the primitive with respect to $z$ which is 0 at the left boundary of the $x$ interval (zmin ). More...
 
void write_grids (const string &)
 
void write_values (const string &)
 
TabSpec grid_x () const
 
TabSpec grid_y () const
 
TabSpec grid_z () const
 
void interpolate_from_Tab (const TabSpec &values, const TabSpec &x_coord, const TabSpec &y_coord, const TabSpec &z_coord)
 

Protected Member Functions

void del_deriv () const
 

Protected Attributes

int nx
 
int ny
 
int nz
 
double xmin
 
double xmax
 
double ymin
 
double ymax
 
double zmin
 
double zmax
 
TabSpec xx
 
TabSpec yy
 
TabSpec zz
 
TabSpec values
 
TabSpec coefs
 
bool coefs_up_to_date
 
bool values_up_to_date
 
FuncSpecp_dfdx
 
FuncSpecp_dfdy
 
FuncSpecp_dfdz
 

Friends

ostream & operator<< (ostream &, const FuncSpec &)
 
FuncSpec operator+ (const FuncSpec &, const FuncSpec &)
 
FuncSpec operator- (const FuncSpec &)
 
FuncSpec operator+ (const FuncSpec &, double)
 
FuncSpec operator+ (double, const FuncSpec &)
 
FuncSpec operator- (const FuncSpec &, const FuncSpec &)
 
FuncSpec operator- (const FuncSpec &, double)
 
FuncSpec operator- (double, const FuncSpec &)
 
FuncSpec operator* (const FuncSpec &, const FuncSpec &)
 
FuncSpec operator* (const FuncSpec &, double)
 
FuncSpec operator* (double, const FuncSpec &)
 
FuncSpec operator/ (const FuncSpec &, const FuncSpec &)
 
FuncSpec operator/ (const FuncSpec &, double)
 
FuncSpec operator/ (double, const FuncSpec &)
 
FuncSpec sin (const FuncSpec &)
 
FuncSpec cos (const FuncSpec &)
 
FuncSpec tan (const FuncSpec &)
 
FuncSpec exp (const FuncSpec &)
 
FuncSpec log (const FuncSpec &)
 
FuncSpec sqrt (const FuncSpec &)
 
FuncSpec pow (const FuncSpec &, double)
 
FuncSpec abs (const FuncSpec &)
 
double max (const FuncSpec &)
 

Detailed Description

Class for representing functions of 3 variables, supposed to be Cartesian coordinates $ f(x, y, z)$.

()

It relies on a Chebyshev decomposition along all three coordinates, and an affine mapping for each one: e.g. $ [-1,1] \to [\mathrm{xmin}, \mathrm{xmax}] $.

Definition at line 40 of file funcspec.h.

Constructor & Destructor Documentation

◆ FuncSpec() [1/2]

Lorene::FuncSpec::FuncSpec ( const string &  coord_name,
const string &  field 
)
explicit

Constructor from files.

'coord_name' is a prefix for files containing coordinate data (coord_namex.dat, coord_namey.dat, coord_namez.dat); 'field', is the complete name of the file containing the field data.

◆ FuncSpec() [2/2]

Lorene::FuncSpec::FuncSpec ( const FuncSpec )

Copy constructor.

◆ ~FuncSpec()

virtual Lorene::FuncSpec::~FuncSpec ( )
virtual

Destructor.

Member Function Documentation

◆ get_partial_x()

FuncSpec Lorene::FuncSpec::get_partial_x ( ) const

Computes partial derivative $ \partial f \ \partial x$.

◆ get_partial_y()

FuncSpec Lorene::FuncSpec::get_partial_y ( ) const

Computes partial derivative $ \partial f \ \partial y$.

◆ get_partial_z()

FuncSpec Lorene::FuncSpec::get_partial_z ( ) const

Computes partial derivative $ \partial f \ \partial z$.

◆ primitive_x()

FuncSpec Lorene::FuncSpec::primitive_x ( ) const

Computes the primitive with respect to $x$ which is 0 at the left boundary of the $x$ interval (xmin ).

◆ primitive_y()

FuncSpec Lorene::FuncSpec::primitive_y ( ) const

Computes the primitive with respect to $y$ which is 0 at the left boundary of the $x$ interval (ymin ).

◆ primitive_z()

FuncSpec Lorene::FuncSpec::primitive_z ( ) const

Computes the primitive with respect to $z$ which is 0 at the left boundary of the $x$ interval (zmin ).


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