Flow123d
JS_before_hm-1576-g4d0b70e
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
"
// for Field
30
#include "
fields/field_values.hh
"
// for FieldValue
31
#include "
input/type_base.hh
"
// for Array
32
#include "
input/type_generic.hh
"
// for Instance
33
34
class
Mesh
;
35
36
template
<
int
spacedim>
37
class
GenericField
{
38
public
:
39
40
/// Index value type
41
typedef
typename
FieldValue<spacedim>::Scalar
DoubleScalar
;
42
/// Index valued field
43
typedef
Field<spacedim, DoubleScalar>
IndexField
;
44
45
/**
46
* Returns an instance of a scalar integer field that provides ID's of regions.
47
*/
48
static
auto
region_id
(
Mesh
&mesh) ->
IndexField
;
49
50
/**
51
* Returns an instance of a scalar integer field that provides ID's of subdomains used for
52
* domain decomposition.
53
*
54
* TODO: FieldFE just use provided data pointer (unsafe solution), so currently we store the data into a mesh.
55
* Which is safe as long as we have one mesh for whol calculation.
56
* After we have FieldFE that use some sort of Vector class with own memory management, we should use these
57
* to pass the data in safe way.
58
*/
59
static
auto
subdomain
(
Mesh
&mesh) ->
IndexField
;
60
};
61
62
63
#endif
/* GENERAL_FIELDS_HH_ */
GenericField::subdomain
static auto subdomain(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:58
field_values.hh
Field
Class template representing a field with values dependent on: point, element, and region...
Definition:
field.hh:94
Mesh
Definition:
mesh.h:77
type_generic.hh
GenericField::IndexField
Field< spacedim, DoubleScalar > IndexField
Index valued field.
Definition:
generic_field.hh:43
type_base.hh
field.hh
GenericField::region_id
static auto region_id(Mesh &mesh) -> IndexField
Definition:
generic_field.impl.hh:39
GenericField::DoubleScalar
FieldValue< spacedim >::Scalar DoubleScalar
Index value type.
Definition:
generic_field.hh:41
GenericField
Definition:
generic_field.hh:37
FieldValue_
Definition:
field_values.hh:248
Generated by
1.8.11