Flow123d
release_2.2.0-22-g936454a
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
*
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 generic_field.hh
15
* @brief
16
*/
17
18
#ifndef GENERIC_FIELDS_HH_
19
#define GENERIC_FIELDS_HH_
20
21
/**
22
* @file
23
* @brief Fields computed from the mesh data.
24
*
25
* This file collects fields that are independent of particular equation and
26
* depends only on data in mesh.
27
*/
28
29
#include "
fields/field.hh
"
30
#include "
fields/field_constant.hh
"
31
#include "
fields/field_elementwise.hh
"
32
33
class
Mesh
;
34
35
template
<
int
spacedim>
36
class
GenericField
{
37
public
:
38
39
/// Index value type
40
typedef
typename
FieldValue<spacedim>::Integer
IntegerScalar
;
41
/// Index valued field
42
typedef
Field<spacedim, IntegerScalar>
IndexField
;
43
44
/**
45
* Returns an instance of a scalar integer field that provides ID's of regions.
46
*/
47
static
auto
region_id
(
Mesh
&mesh) ->
IndexField
;
48
49
/**
50
* Returns an instance of a scalar integer field that provides ID's of subdomains used for
51
* domain decomposition.
52
*
53
* TODO: FieldElementwise just use provided data pointer (unsafe solution), so currently we store the data into a mesh.
54
* Which is safe as long as we have one mesh for whol calculation.
55
* After we have FieldFE that use some sort of Vector class with own memory management, we should use these
56
* to pass the data in safe way.
57
*/
58
static
auto
subdomain
(
Mesh
&mesh) ->
IndexField
;
59
};
60
61
62
#endif
/* GENERAL_FIELDS_HH_ */
GenericField::subdomain
static auto subdomain(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:47
field_elementwise.hh
GenericField::IntegerScalar
FieldValue< spacedim >::Integer IntegerScalar
Index value type.
Definition:
generic_field.hh:40
Field
Class template representing a field with values dependent on: point, element, and region...
Definition:
field.hh:62
Mesh
Definition:
mesh.h:97
field.hh
GenericField::IndexField
Field< spacedim, IntegerScalar > IndexField
Index valued field.
Definition:
generic_field.hh:42
GenericField::region_id
static auto region_id(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:28
GenericField
Definition:
generic_field.hh:36
field_constant.hh
FieldValue_
Definition:
field_values.hh:234
Generated by
1.8.11