GRINS-0.8.0
postprocessed_quantities.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 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 
26 #ifndef GRINS_POSTPROCESSED_QUANTITIES_H
27 #define GRINS_POSTPROCESSED_QUANTITIES_H
28 
29 //libMesh
30 #include "libmesh/getpot.h"
31 #include "libmesh/fem_function_base.h"
32 #include "libmesh/equation_systems.h"
33 
34 //GRINS
35 #include "grins/multiphysics_sys.h"
36 
37 namespace GRINS
38 {
39  template<class NumericType>
40  class PostProcessedQuantities : public libMesh::FEMFunctionBase<NumericType>
41  {
42  public:
43 
44  PostProcessedQuantities( const GetPot& input );
45  virtual ~PostProcessedQuantities();
46 
47  /* Methods to override from FEMFunctionBase needed for libMesh-based evaluations */
48  virtual void init_context( const libMesh::FEMContext & context);
49 
50  virtual libMesh::UniquePtr<libMesh::FEMFunctionBase<NumericType> >
51  clone() const
52  {
53  return libMesh::UniquePtr<libMesh::FEMFunctionBase<NumericType> >
54  ( new PostProcessedQuantities(*this) );
55  }
56 
57  virtual NumericType operator()( const libMesh::FEMContext& context,
58  const libMesh::Point& p,
59  const libMesh::Real time = 0. );
60 
61  virtual void operator()( const libMesh::FEMContext& context,
62  const libMesh::Point& p,
63  const libMesh::Real time,
64  libMesh::DenseVector<NumericType>& output );
65 
66  virtual NumericType component( const libMesh::FEMContext& context,
67  unsigned int i,
68  const libMesh::Point& p,
69  libMesh::Real time=0. );
70 
71  /* Methods for GRINS usage below */
72 
74 
79  unsigned int register_quantity( std::string name );
80 
81  virtual void initialize( MultiphysicsSystem& system,
82  libMesh::EquationSystems& equation_systems );
83 
84  virtual void update_quantities( libMesh::EquationSystems& equation_systems );
85 
86  protected:
87 
88  std::map<std::string, unsigned int> _quantity_name_index_map;
89  std::map<VariableIndex, unsigned int> _quantity_index_var_map;
90 
92  SharedPtr<AssemblyContext> _multiphysics_context;
93 
94  private:
95 
97 
98  };
99 
100 } // namespace GRINS
101 
102 #endif //GRINS_POSTPROCESSED_QUANTITIES_H
unsigned int register_quantity(std::string name)
Register quantity to be postprocessed.
virtual void initialize(MultiphysicsSystem &system, libMesh::EquationSystems &equation_systems)
virtual NumericType operator()(const libMesh::FEMContext &context, const libMesh::Point &p, const libMesh::Real time=0.)
GRINS namespace.
std::map< VariableIndex, unsigned int > _quantity_index_var_map
SharedPtr< AssemblyContext > _multiphysics_context
Interface with libMesh for solving Multiphysics problems.
std::map< std::string, unsigned int > _quantity_name_index_map
virtual NumericType component(const libMesh::FEMContext &context, unsigned int i, const libMesh::Point &p, libMesh::Real time=0.)
virtual void init_context(const libMesh::FEMContext &context)
virtual void update_quantities(libMesh::EquationSystems &equation_systems)
virtual libMesh::UniquePtr< libMesh::FEMFunctionBase< NumericType > > clone() const

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1