ASPECT
advection_field.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2025 - by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_advection_field_h
23 #define _aspect_advection_field_h
24 
25 #include <aspect/global.h>
26 #include <aspect/parameters.h>
27 
28 #include <deal.II/fe/fe_values_extractors.h>
29 
30 namespace aspect
31 {
32  using namespace dealii;
33 
37  template <int dim> struct Introspection;
38 
46  {
51  enum FieldType { temperature_field, compositional_field };
52 
58 
64  const unsigned int compositional_variable;
65 
77  AdvectionField (const FieldType field_type,
78  const unsigned int compositional_variable = numbers::invalid_unsigned_int);
79 
87  static
89 
97  static
98  AdvectionField composition (const unsigned int compositional_variable);
99 
103  bool
104  is_temperature () const;
105 
110  template<int dim>
111  bool
112  is_discontinuous (const Introspection<dim> &introspection) const;
113 
118  template<int dim>
120  advection_method (const Introspection<dim> &introspection) const;
121 
126  template<int dim>
127  unsigned int
128  component_index(const Introspection<dim> &introspection) const;
129 
134  template<int dim>
135  unsigned int
136  block_index(const Introspection<dim> &introspection) const;
137 
145  template<int dim>
146  unsigned int
147  sparsity_pattern_block_index(const Introspection<dim> &introspection) const;
148 
155  unsigned int
156  field_index() const;
157 
163  template<int dim>
164  unsigned int
165  base_element(const Introspection<dim> &introspection) const;
166 
173  template<int dim>
174  FEValuesExtractors::Scalar
175  scalar_extractor(const Introspection<dim> &introspection) const;
176 
181  template<int dim>
182  unsigned int
183  polynomial_degree(const Introspection<dim> &introspection) const;
184 
189  template<int dim>
190  std::string
191  name(const Introspection<dim> &introspection) const;
192  };
193 }
194 
195 
196 #endif
const unsigned int compositional_variable
const FieldType field_type
Definition: compat.h:42