25 #ifndef QUESO_FUNCTION_BASE_H
26 #define QUESO_FUNCTION_BASE_H
29 #include <boost/shared_ptr.hpp>
33 class FunctionOperatorBuilder;
65 virtual void scale(
double scale) = 0;
68 virtual void zero() = 0;
71 virtual double L2_norm()
const = 0;
79 virtual boost::shared_ptr<FunctionBase>
zero_clone()
const = 0;
82 virtual void save_function(
const std::string & filename,
double time)
const = 0;
87 #endif // QUESO_FUNCTION_BASE_H
virtual double L2_norm() const =0
Return the L2-norm of this.
virtual void save_function(const std::string &filename, double time) const =0
Save the current function to an Exodus file called filename. time is the time to attach to the functi...
Abstract base class for function objects.
virtual boost::shared_ptr< FunctionBase > zero_clone() const =0
Create a zero function copy of this and return pointer to it.
virtual ~FunctionBase()
Destructor.
virtual void pointwise_mult(const FunctionBase &f1, const FunctionBase &f2)=0
Pointwise multiply f1 and f2 and store the result in *this.
virtual void add(double scale, const FunctionBase &rhs)=0
Execute this += scale * rhs.
FunctionBase()
Constructor.
virtual void scale(double scale)=0
Execute this *= scale.
virtual void zero()=0
Set this to zero everywhere.