queso-0.57.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-2017 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_SLEPC
28 
29 #ifndef QUESO_LIBMESHFUNCTION_H
30 #define QUESO_LIBMESHFUNCTION_H
31 
32 #include <string>
33 #include <queso/FunctionBase.h>
34 #include <queso/SharedPtr.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 
67  libMesh::MeshBase & m);
68 
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 
102 
105 
106 private:
108 
110 };
111 
112 } // End namespace QUESO
113 
114 #endif // QUESO_LIBMESHFUNCTION_H
115 
116 #endif // QUESO_HAVE_LIBMESH_SLEPC
Abstract base class for function objects.
Definition: FunctionBase.h:47
virtual void save_function(const std::string &filename, double time) const
Save the current function to an Exodus file called filename. time is the time to attach to the functi...
LibMeshFunction(const FunctionOperatorBuilder &builder, libMesh::MeshBase &m)
Construct a function with a user-provided mesh m and builder.
virtual void zero()
Set this to zero everywhere.
virtual void scale(double scale)
Execute this *= scale.
virtual void add(double scale, const FunctionBase &rhs)
Execute this += scale * rhs.
virtual double L2_norm() const
Return the L2-norm of this.
SharedPtr< libMesh::EquationSystems >::Type equation_systems
virtual void pointwise_mult(const FunctionBase &f1, const FunctionBase &f2)
Pointwise multiply f1 and f2 and store the result in *this.
virtual SharedPtr< FunctionBase >::Type zero_clone() const
Create a zero function copy of this and return pointer to it.
virtual SharedPtr< libMesh::EquationSystems >::Type get_equation_systems() const
Return the internal libmesh equation systems object.
~LibMeshFunction()
Destructor.
const FunctionOperatorBuilder & builder
std::shared_ptr< T > Type
Definition: SharedPtr.h:69
void print_info() const
Will print mesh-related libMesh foo to std::cerr.
Function objects using libMesh for the backend.

Generated on Sat Apr 22 2017 14:04:35 for queso-0.57.0 by  doxygen 1.8.5