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