queso-0.56.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 
30 #include <queso/SharedPtr.h>
31 
32 namespace QUESO {
33 
34 class FunctionOperatorBuilder;
35 
47 class FunctionBase {
48 public:
50 
51  FunctionBase();
53 
55  virtual ~FunctionBase();
57 
59  virtual void add(double scale, const FunctionBase & rhs) = 0;
60 
62  virtual void pointwise_mult(const FunctionBase & f1,
63  const FunctionBase & f2) = 0;
64 
66  virtual void scale(double scale) = 0;
67 
69  virtual void zero() = 0;
70 
72  virtual double L2_norm() const = 0;
73 
75 
80  virtual typename SharedPtr<FunctionBase>::Type zero_clone() const = 0;
81 
83  virtual void save_function(const std::string & filename, double time) const = 0;
84 };
85 
86 } // End namespace QUESO
87 
88 #endif // QUESO_FUNCTION_BASE_H
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...
virtual void scale(double scale)=0
Execute this *= scale.
virtual void zero()=0
Set this to zero everywhere.
virtual double L2_norm() const =0
Return the L2-norm of this.
virtual SharedPtr< FunctionBase >::Type 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
Abstract base class for function objects.
Definition: FunctionBase.h:47

Generated on Tue Nov 29 2016 10:53:10 for queso-0.56.0 by  doxygen 1.8.5