19 #include "headcpp.hpp"
20 #include "val_domain.hpp"
21 #include "array_math.hpp"
22 #include <gsl/gsl_sf_bessel.h>
311 *res.
c = (*a.
c)* (*b.
c) ;
370 *res.
c *=
static_cast<double>(nn) ;
372 *res.
cf *=
static_cast<double>(nn) ;
384 cerr <<
"Division by zero" << endl ;
393 *res.
c = (*a.
c)/ (*b.
c) ;
414 cerr <<
"Division by zero" << endl ;
441 for (
int i=1 ; i<n ; i++)
518 return diffmax (*aa.
c, *bb.
c) ;
527 res.
set(pos) = gsl_sf_bessel_jl (l, so(pos)) ;
541 res.
set(pos) = gsl_sf_bessel_yl (l, so(pos)) ;
551 res.allocate_conf() ;
552 Index pos (res.get_domain()->get_nbr_points()) ;
555 res.set(pos) = cos(so(pos))/so(pos) - sin(so(pos))/so(pos)/so(pos) ;
557 res.set(pos) = gsl_sf_bessel_jl (l-1, so(pos)) - (l+1) * gsl_sf_bessel_jl (l, so(pos))/so(pos) ;
565 Val_domain bessel_dyl (
const Val_domain& so,
int l) {
567 Val_domain res (so.get_domain()) ;
568 res.allocate_conf() ;
569 Index pos (res.get_domain()->get_nbr_points()) ;
572 res.set(pos) = sin(so(pos))/so(pos) + cos(so(pos))/so(pos)/so(pos) ;
574 res.set(pos) = gsl_sf_bessel_yl (l-1, so(pos)) - (l+1) * gsl_sf_bessel_yl (l, so(pos))/so(pos) ;
604 if (fabs(value) > res) res = fabs(value);
virtual Base_spectral mult(const Base_spectral &, const Base_spectral &) const
Method for the multiplication of two Base_spectral.
Dim_array const & get_nbr_points() const
Returns the number of points.
Class that gives the position inside a multi-dimensional Array.
bool inc(int increm, int var=0)
Increments the position of the Index.
Class for storing the basis of decompositions of a field and its values on both the configuration and...
void operator/=(const Val_domain &)
Operator /=.
Base_spectral base
Spectral basis of the field.
void set_in_conf()
Destroys the values in the coefficient space.
void set_zero()
Sets the Val_domain to zero (logical state to zero and arrays destroyed).
bool check_if_zero() const
Check whether the logical state is zero or not.
bool in_conf
Is the field known in the configuration space ?
Array< double > * cf
Pointer on the Array of the values in the coefficients space.
void coef_i() const
Computes the values in the configuration space.
double & set(const Index &pos)
Read/write the value of the field in the configuration space.
bool is_zero
Indicator used for null fields (for speed issues).
void std_base()
Sets the standard basis of decomposition.
void operator*=(const Val_domain &)
Operator *=.
bool in_coef
Is the field known in the coefficient space ?
void coef() const
Computes the coefficients.
void operator-=(const Val_domain &)
Operator -=.
Array< double > * c
Pointer on the Array of the values in the configuration space.
void allocate_conf()
Allocates the values in the configuration space and destroys the values in the coefficients space.
void operator+=(const Val_domain &)
Operator +=.
const Domain * get_domain() const
const Domain * zone
Pointer to the associated Domain.