Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
f1fa6af2
Commit
f1fa6af2
authored
9 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[boundarytypes] Make boundary types copyable and assignable
parent
9c5852b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!617
[WIP] Next
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/common/boundarytypes.hh
+31
-32
31 additions, 32 deletions
dumux/common/boundarytypes.hh
with
31 additions
and
32 deletions
dumux/common/boundarytypes.hh
+
31
−
32
View file @
f1fa6af2
...
...
@@ -59,14 +59,14 @@ public:
*/
void
resetEq
(
int
eqIdx
)
{
boundaryInfo_
[
eqIdx
].
visited
=
0
;
boundaryInfo_
[
eqIdx
].
visited
=
false
;
boundaryInfo_
[
eqIdx
].
isDirichlet
=
0
;
boundaryInfo_
[
eqIdx
].
isNeumann
=
0
;
boundaryInfo_
[
eqIdx
].
isOutflow
=
0
;
boundaryInfo_
[
eqIdx
].
isCouplingDirichlet
=
0
;
boundaryInfo_
[
eqIdx
].
isCouplingNeumann
=
0
;
boundaryInfo_
[
eqIdx
].
isCouplingMortar
=
0
;
boundaryInfo_
[
eqIdx
].
isDirichlet
=
false
;
boundaryInfo_
[
eqIdx
].
isNeumann
=
false
;
boundaryInfo_
[
eqIdx
].
isOutflow
=
false
;
boundaryInfo_
[
eqIdx
].
isCouplingDirichlet
=
false
;
boundaryInfo_
[
eqIdx
].
isCouplingNeumann
=
false
;
boundaryInfo_
[
eqIdx
].
isCouplingMortar
=
false
;
eq2pvIdx_
[
eqIdx
]
=
eqIdx
;
pv2eqIdx_
[
eqIdx
]
=
eqIdx
;
...
...
@@ -170,8 +170,8 @@ public:
void
setNeumann
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isNeumann
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isNeumann
=
true
;
Valgrind
::
SetDefined
(
boundaryInfo_
[
eqIdx
]);
}
...
...
@@ -188,8 +188,8 @@ public:
void
setDirichlet
(
int
pvIdx
,
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isDirichlet
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isDirichlet
=
true
;
// update the equation <-> primary variable mapping
eq2pvIdx_
[
eqIdx
]
=
pvIdx
;
...
...
@@ -208,8 +208,8 @@ public:
void
setOutflow
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isOutflow
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isOutflow
=
true
;
Valgrind
::
SetDefined
(
boundaryInfo_
[
eqIdx
]);
}
...
...
@@ -221,8 +221,8 @@ public:
void
setCouplingDirichlet
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isCouplingDirichlet
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isCouplingDirichlet
=
true
;
Valgrind
::
SetDefined
(
boundaryInfo_
[
eqIdx
]);
}
...
...
@@ -234,8 +234,8 @@ public:
void
setCouplingNeumann
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isCouplingNeumann
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isCouplingNeumann
=
true
;
Valgrind
::
SetDefined
(
boundaryInfo_
[
eqIdx
]);
}
...
...
@@ -247,8 +247,8 @@ public:
void
setCouplingMortar
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
boundaryInfo_
[
eqIdx
].
visited
=
1
;
boundaryInfo_
[
eqIdx
].
isCouplingMortar
=
1
;
boundaryInfo_
[
eqIdx
].
visited
=
true
;
boundaryInfo_
[
eqIdx
].
isCouplingMortar
=
true
;
Valgrind
::
SetDefined
(
boundaryInfo_
[
eqIdx
]);
}
...
...
@@ -444,19 +444,18 @@ public:
{
return
eq2pvIdx_
[
eqIdx
];
}
protected
:
// this is a bitfield structure!
struct
__attribute__
((
__packed__
))
{
unsigned
char
visited
:
1
;
unsigned
char
isDirichlet
:
1
;
unsigned
char
isNeumann
:
1
;
unsigned
char
isOutflow
:
1
;
unsigned
char
isCouplingDirichlet
:
1
;
unsigned
char
isCouplingNeumann
:
1
;
unsigned
char
isCouplingMortar
:
1
;
}
boundaryInfo_
[
numEq
];
unsigned
char
eq2pvIdx_
[
numEq
];
unsigned
char
pv2eqIdx_
[
numEq
];
struct
BoundaryInfo
{
bool
visited
;
bool
isDirichlet
;
bool
isNeumann
;
bool
isOutflow
;
bool
isCouplingDirichlet
;
bool
isCouplingNeumann
;
bool
isCouplingMortar
;
};
std
::
array
<
BoundaryInfo
,
numEq
>
boundaryInfo_
;
std
::
array
<
unsigned
int
,
numEq
>
eq2pvIdx_
,
pv2eqIdx_
;
};
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment