Flow123d  release_1.8.2-1603-g0109a2b
mh_dofhandler.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file mh_dofhandler.hh
15  * @brief
16  */
17 
18 #ifndef MH_DOFHANDLER_HH_
19 #define MH_DOFHANDLER_HH_
20 
21 #include <vector>
22 #include "mesh/mesh_types.hh"
23 
24 using namespace std;
25 
26 class Mesh;
27 class Side;
28 class SideIter;
29 
30 
31 /// temporary solution to provide access to results
32 /// from DarcyFlowMH independent of mesh
34 public:
35  void reinit(Mesh *mesh);
36 
37  void set_solution( double time, double * solution, double precision);
38 
39  inline double time_changed() const
40  { return time_; }
41 
42  unsigned int side_dof(const SideIter side) const;
43 
44  /// temporary replacement for DofHandler accessor, flux through given side
45  double side_flux(const Side &side) const;
46 
47  /// temporary replacement for DofHandler accessor, scalar (pressure) on edge of the side
48  double side_scalar(const Side &side) const;
49 
50  /// temporary replacement for DofHandler accessor, scalar (pressure) on element
51  double element_scalar( ElementFullIter &ele ) const;
52 
53  inline double precision() const { return solution_precision; };
54 
55 
56 protected:
57  vector< vector<unsigned int> > elem_side_to_global;
58  double * mh_solution;
60  double time_;
61 };
62 
63 #endif /* MH_DOFHANDLER_HH_ */
Definition: sides.h:31
double time_changed() const
Definition: mesh.h:99
double precision() const
double * mh_solution
double solution_precision