Flow123d  release_1.8.2-1603-g0109a2b
field_flag.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 field_flag.hh
15  * @brief
16  */
17 
18 #ifndef FIELD_FLAGS_HH_
19 #define FIELD_FLAGS_HH_
20 
21 #include "system/flag_array.hh"
22 
23 class FieldFlag
24 {
25 public:
27  typedef Flags::Mask Mask;
28 
29  /// Number of bits used by Field itself.
30  static constexpr unsigned int flags_size_ = 3;
31 
32  /// The field is data parameter of the owning equation. (default on)
33  static constexpr Mask equation_input{1};
34  /// The field can be set from input. The key in input field descriptor is declared. (default on)
35  static constexpr Mask declare_input{2};
36  /// The field can output. Is part of generated output selection. (default on)
37  static constexpr Mask allow_output{4};
38  /// A field that is input of its equation and can not read from input, thus must be set by copy.
39  static constexpr Mask input_copy = ~declare_input & equation_input;
40 
41  /// A field is part of time term of the equation.
42  static constexpr Mask in_time_term{8};
43  /// A field is part of main "stiffness matrix" of the equation.
44  static constexpr Mask in_main_matrix{16};
45  /// A field is part of the right hand side of the equation.
46  static constexpr Mask in_rhs{32};
47 
48  /// Match result fields. These are never given by input or copy of input.
49  static constexpr Mask equation_result = allow_output & ~declare_input & ~equation_input;
50 
51  /// Match an output field, that can be also copy of other field.
53 
54 };
55 
56 
57 
58 
59 
60 
61 
62 #endif /* FIELD_FLAGS_HH_ */
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
Definition: field_flag.hh:44
static constexpr Mask allow_output
The field can output. Is part of generated output selection. (default on)
Definition: field_flag.hh:37
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
Definition: field_flag.hh:49
static constexpr Mask input_copy
A field that is input of its equation and can not read from input, thus must be set by copy...
Definition: field_flag.hh:39
static constexpr Mask in_time_term
A field is part of time term of the equation.
Definition: field_flag.hh:42
static constexpr Mask equation_external_output
Match an output field, that can be also copy of other field.
Definition: field_flag.hh:52
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
Definition: field_flag.hh:46
static constexpr unsigned int flags_size_
Number of bits used by Field itself.
Definition: field_flag.hh:30
Flags::Mask Mask
Definition: field_flag.hh:27
FlagArray< FieldFlag > Flags
Definition: field_flag.hh:26
static constexpr Mask equation_input
The field is data parameter of the owning equation. (default on)
Definition: field_flag.hh:33
static constexpr Mask declare_input
The field can be set from input. The key in input field descriptor is declared. (default on) ...
Definition: field_flag.hh:35