Flow123d  jenkins-Flow123d-windows-release-multijob-285
generic_field.hh
Go to the documentation of this file.
1 /*
2  * general_fields.hh
3  *
4  * Created on: Dec 9, 2014
5  * Author: jb
6  */
7 
8 #ifndef GENERIC_FIELDS_HH_
9 #define GENERIC_FIELDS_HH_
10 
11 /**
12  * @file
13  * @brief Fields computed from the mesh data.
14  *
15  * This file collects fields that are independent of particular equation and
16  * depends only on data in mesh.
17  */
18 
19 #include "fields/field.hh"
20 #include "fields/field_constant.hh"
22 
23 class Mesh;
24 
25 template <int spacedim>
26 class GenericField {
27 public:
28 
29  /// Index value type
31  /// Index valued field
33 
34  /**
35  * Returns an instance of a scalar integer field that provides ID's of regions.
36  */
37  static auto region_id(Mesh &mesh) -> IndexField;
38 
39  /**
40  * Returns an instance of a scalar integer field that provides ID's of subdomains used for
41  * domain decomposition.
42  *
43  * TODO: FieldElementwise just use provided data pointer (unsafe solution), so currently we store the data into a mesh.
44  * Which is safe as long as we have one mesh for whol calculation.
45  * After we have FieldFE that use some sort of Vector class with own memory management, we should use these
46  * to pass the data in safe way.
47  */
48  static auto subdomain(Mesh &mesh) -> IndexField;
49 };
50 
51 
52 #endif /* GENERAL_FIELDS_HH_ */
static auto subdomain(Mesh &mesh) -> IndexField
FieldValue< spacedim >::Integer IntegerScalar
Index value type.
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:52
Definition: mesh.h:109
Field< spacedim, IntegerScalar > IndexField
Index valued field.
static auto region_id(Mesh &mesh) -> IndexField