Page MenuHomec4science

AbstractTwoDIntegrator.hpp
No OneTemporary

File Metadata

Created
Sun, Feb 23, 11:49

AbstractTwoDIntegrator.hpp

//
// Created by Pauline Ollitrault on 09.12.16.
//
#ifndef NUMINT_ABSTRACTTWODINTEGRATOR_HPP
#define NUMINT_ABSTRACTTWODINTEGRATOR_HPP
#include "AbstractIntegrator.hpp"
class AbstractTwoDIntegrator : public AbstractIntegrator{
/**
* @class AbstractTwoDIntegrator
* @brief Class of two dimensional integrators.
*
* It inherits from AbstractIntegrator. It contains the members and methods shared
* by any two dimensional integrator. An AbstractTwoDIntegrator object, if correctly
* set, has available nodes needed for the integration.
*/
public:
/**Constructors*/
AbstractTwoDIntegrator();
AbstractTwoDIntegrator(TwoDFormula &function, TwoDDomain &interval, const vector<unsigned int> &NPoints);
AbstractTwoDIntegrator(TwoDTab &function);
AbstractTwoDIntegrator(TwoDTab &function, TwoDDomain &interval);
/**Destructors*/
virtual ~AbstractTwoDIntegrator();
/**
* @brief virtual integral method.
* @details if the integration method is not defined the integral value is 0.
* @return 0
*/
virtual double Integral() const = 0;
/**Getters*/
double** GetXnodes() const;
double** GetYnodes() const;
double** GetFunctionDiscretized() const;
/**Setters*/
void SetNodes(const vector<double> &xnodes, const vector<double> &ynodes, const vector<double> &znodes);
void SetNodes(const TwoDDomain &interval, TwoDTab &function);
void SetNodes(const TwoDDomain &interval, TwoDFormula &function, const vector<unsigned int> &NPoints);
protected:
double** xnodes; /**pointer for dynamically allocated matrix of the 1st variable nodes */
double** ynodes; /**pointer for dynamically allocated matrix of the 2nd variable nodes */
double** znodes; /**pointer for dynamically allocated matrix of the evaluated nodes */
unsigned int m_rows; /**number of rows for matrix dimension*/
unsigned int m_cols; /**number of columns for matrix dimension*/
};
#endif //NUMINT_ABSTRACTTWODINTEGRATOR_HPP

Event Timeline