Flow123d
jenkins-Flow123d-linux-release-multijob-282
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
fields
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
"
21
#include "
fields/field_elementwise.hh
"
22
23
class
Mesh
;
24
25
template
<
int
spacedim>
26
class
GenericField
{
27
public
:
28
29
/// Index value type
30
typedef
typename
FieldValue<spacedim>::Integer
IntegerScalar
;
31
/// Index valued field
32
typedef
Field<spacedim, IntegerScalar>
IndexField
;
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_ */
GenericField::subdomain
static auto subdomain(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:39
field_elementwise.hh
GenericField::IntegerScalar
FieldValue< spacedim >::Integer IntegerScalar
Index value type.
Definition:
generic_field.hh:30
Field
Class template representing a field with values dependent on: point, element, and region...
Definition:
field.hh:52
Mesh
Definition:
mesh.h:109
field.hh
GenericField::IndexField
Field< spacedim, IntegerScalar > IndexField
Index valued field.
Definition:
generic_field.hh:32
GenericField::region_id
static auto region_id(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:18
GenericField
Definition:
generic_field.hh:26
field_constant.hh
FieldValue_
Definition:
field_values.hh:188
Generated by
1.8.5