queso-0.53.0
FunctionBase.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef QUESO_FUNCTION_BASE_H
26 #define QUESO_FUNCTION_BASE_H
27 
28 #include <string>
29 #include <boost/shared_ptr.hpp>
30 
31 namespace QUESO {
32 
33 class FunctionOperatorBuilder;
34 
46 class FunctionBase {
47 public:
49 
50  FunctionBase();
52 
54  virtual ~FunctionBase();
56 
58  virtual void add(double scale, const FunctionBase & rhs) = 0;
59 
61  virtual void pointwise_mult(const FunctionBase & f1,
62  const FunctionBase & f2) = 0;
63 
65  virtual void scale(double scale) = 0;
66 
68  virtual void zero() = 0;
69 
71  virtual double L2_norm() const = 0;
72 
74 
79  virtual boost::shared_ptr<FunctionBase> zero_clone() const = 0;
80 
82  virtual void save_function(const std::string & filename, double time) const = 0;
83 };
84 
85 } // End namespace QUESO
86 
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.
Definition: FunctionBase.h:46
virtual boost::shared_ptr< FunctionBase > zero_clone() const =0
Create a zero function copy of this and return pointer to it.
virtual ~FunctionBase()
Destructor.
Definition: FunctionBase.C:34
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.
Definition: FunctionBase.C:30
virtual void scale(double scale)=0
Execute this *= scale.
virtual void zero()=0
Set this to zero everywhere.

Generated on Thu Jun 11 2015 13:52:31 for queso-0.53.0 by  doxygen 1.8.5