OPM
Tutorials
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
flow_bc.h
1
/*
2
Copyright 2010 SINTEF ICT, Applied Mathematics.
3
4
This file is part of the Open Porous Media project (OPM).
5
6
OPM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
OPM is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef OPM_FLOW_BC_HEADER_INCLUDED
21
#define OPM_FLOW_BC_HEADER_INCLUDED
22
23
#include <stddef.h>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
enum
FlowBCType { BC_NOFLOW ,
30
BC_PRESSURE ,
31
BC_FLUX_TOTVOL };
32
33
/* Boundary condition structure.
34
*
35
* Condition i (in [0 .. nbc-1]) affects (outer) interface face[i], is
36
* of type type[i], and specifies a target value of value[i].
37
*
38
* The field 'cpty' is for internal use by the implementation. */
39
struct
FlowBoundaryConditions
{
40
size_t
nbc;
/* Current number of bdry. conditions */
41
42
size_t
face_cpty;
/* Internal management. Do not touch */
43
size_t
cond_cpty;
/* Internal management. Do not touch */
44
45
size_t
*cond_pos;
/* Indirection pointer into '.face' */
46
47
enum
FlowBCType *type;
/* Condition type */
48
double
*value;
/* Condition value (target) */
49
int
*face;
/* Outer faces affected by ind. target */
50
};
51
52
53
/* Allocate a 'FlowBoundaryConditions' structure, initially capable of
54
* managing 'nbc' individual boundary conditions. */
55
struct
FlowBoundaryConditions
*
56
flow_conditions_construct(
size_t
nbc);
57
58
59
/* Release memory resources managed by 'fbc', including the containing
60
* 'struct' pointer, 'fbc'. */
61
void
62
flow_conditions_destroy(
struct
FlowBoundaryConditions
*fbc);
63
64
65
/* Append a new boundary condition to existing set.
66
*
67
* Return one (1) if successful, and zero (0) otherwise. */
68
int
69
flow_conditions_append(
enum
FlowBCType type ,
70
int
face ,
71
double
value,
72
struct
FlowBoundaryConditions
*fbc );
73
74
/* Append a new boundary condition that affects multiple interfaces.
75
*
76
* Return one (1) if successful, and zero (0) otherwise. */
77
int
78
flow_conditions_append_multi(
enum
FlowBCType type ,
79
size_t
nfaces,
80
const
int
*faces ,
81
double
value ,
82
struct
FlowBoundaryConditions
*fbc );
83
84
85
/* Clear existing set of boundary conditions */
86
void
87
flow_conditions_clear(
struct
FlowBoundaryConditions
*fbc);
88
89
#ifdef __cplusplus
90
}
91
#endif
92
93
#endif
/* OPM_FLOW_BC_HEADER_INCLUDED */
FlowBoundaryConditions
Definition:
flow_bc.h:39
opm
core
pressure
flow_bc.h
Generated on Sun Mar 25 2018 17:06:49 by
1.8.5