Flow123d  jenkins-Flow123d-windows-release-multijob-285
equation.cc
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  * @file
26  * @brief Abstract base class for equation clasess.
27  *
28  * @author Jan Brezina
29  */
30 
31 #include <petscmat.h>
32 #include "tools/time_governor.hh"
33 
34 
35 #include "equation.hh"
36 #include "system/system.hh"
37 #include "input/accessors.hh"
38 #include "fields/field_set.hh"
39 
40 #include <boost/foreach.hpp>
41 
42 
43 #ifdef CYGWIN
44 #include <sstream>
45 
46 namespace std {
47  template<typename T>
48  string to_string (T &x) {
49  ostringstream str;
50  str << x;
51  return str.str();
52  }
53 }
54 #endif // CYGWIN
55 
56 
57 /*****************************************************************************************
58  * Implementation of EqBase
59  */
60 
62 : equation_empty_(true),
63  mesh_(NULL),
64  time_(NULL),
65  input_record_(),
66  eq_data_(nullptr)
67 {}
68 
69 
70 
72 : equation_empty_(false),
73  mesh_(&mesh),
74  time_(NULL),
75  input_record_(in_rec),
76  eq_data_(nullptr)
77 {}
78 
79 
81 {
82  time_ = &time;
83 }
84 
Abstract base class for equation clasess.
Definition: mesh.h:109
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Basic time management class.
Accessor to the data with type Type::Record.
Definition: accessors.hh:327
virtual void set_time_governor(TimeGovernor &time)
Definition: equation.cc:80
TimeGovernor const & time()
Definition: equation.hh:143
TimeGovernor * time_
Definition: equation.hh:219