Flow123d  release_3.0.0-1212-g8801db3
equation.cc
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 equation.cc
15  * @brief Abstract base class for equation clasess.
16  * @author Jan Brezina
17  */
18 
19 #include <petscmat.h>
20 #include "tools/time_governor.hh"
21 
22 
23 #include "equation.hh"
24 #include "system/system.hh"
25 #include "input/accessors.hh"
26 #include "fields/field_set.hh"
27 
28 #include <boost/foreach.hpp>
29 
30 
31 
32 /*****************************************************************************************
33  * Implementation of EqBase
34  */
35 
37 : equation_empty_(true),
38  mesh_(NULL),
39  time_(NULL),
40  input_record_(),
41  eq_data_(nullptr)
42 {}
43 
44 
45 
47 : equation_empty_(false),
48  mesh_(&mesh),
49  time_(NULL),
50  input_record_(in_rec),
51  eq_data_(nullptr)
52 {}
53 
54 
56 {
57  time_ = &time;
58 }
59 
TimeGovernor & time()
Definition: equation.hh:148
FieldSet * eq_data_
Definition: equation.hh:232
Abstract base class for equation clasess.
Definition: mesh.h:76
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Basic time management class.
Mesh & mesh()
Definition: equation.hh:176
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
Mesh * mesh_
Definition: equation.hh:223
virtual void set_time_governor(TimeGovernor &time)
Definition: equation.cc:55
bool equation_empty_
flag is true if only default constructor was called
Definition: equation.hh:222
Input::Record input_record_
Definition: equation.hh:225
TimeGovernor * time_
Definition: equation.hh:224