queso-0.53.0
LibMeshFunction.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 #include <queso/Defines.h>
26 
27 #ifdef QUESO_HAVE_LIBMESH
28 
29 #ifndef QUESO_LIBMESHFUNCTION_H
30 #define QUESO_LIBMESHFUNCTION_H
31 
32 #include <string>
33 #include <boost/shared_ptr.hpp>
34 #include <queso/FunctionBase.h>
35 
36 namespace libMesh {
37  class MeshBase;
38  class EquationSystems;
39 }
40 
41 namespace QUESO {
42 
43 class FunctionOperatorBuilder;
44 
53 class LibMeshFunction : public FunctionBase {
54 public:
56 
57 
59 
66  LibMeshFunction(const FunctionOperatorBuilder & builder,
67  libMesh::MeshBase & m);
68 
70  ~LibMeshFunction();
72 
74  void print_info() const;
75 
77  virtual void save_function(const std::string & filename, double time) const;
78 
80  virtual void add(double scale, const FunctionBase & rhs);
81 
83  virtual void pointwise_mult(const FunctionBase & f1,
84  const FunctionBase & f2);
85 
87  virtual void scale(double scale);
88 
90  virtual void zero();
91 
93  virtual double L2_norm() const;
94 
96 
101  virtual boost::shared_ptr<FunctionBase> zero_clone() const;
102 
104  virtual boost::shared_ptr<libMesh::EquationSystems> get_equation_systems() const;
105 
106 private:
107  const FunctionOperatorBuilder & builder;
108 
109  boost::shared_ptr<libMesh::EquationSystems> equation_systems;
110 };
111 
112 } // End namespace QUESO
113 
114 #endif // QUESO_LIBMESHFUNCTION_H
115 
116 #endif // QUESO_HAVE_LIBMESH
double scale
Definition: ann2fig.cpp:85

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