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
f7b061d2
Commit
f7b061d2
authored
3 years ago
by
Timo Koch
Committed by
Dennis Gläser
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[sequential] Remove deprecation warning by add SequentialBoundaryTypes
parent
31022ac7
No related branches found
No related tags found
1 merge request
!2552
Remove general outflow bc type
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/porousmediumflow/sequential/boundarytypes.hh
+123
-0
123 additions, 0 deletions
dumux/porousmediumflow/sequential/boundarytypes.hh
dumux/porousmediumflow/sequential/properties.hh
+2
-1
2 additions, 1 deletion
dumux/porousmediumflow/sequential/properties.hh
with
125 additions
and
1 deletion
dumux/porousmediumflow/sequential/boundarytypes.hh
0 → 100644
+
123
−
0
View file @
f7b061d2
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Sequential
* \brief Class to specify the type of a boundary.
*/
#ifndef DUMUX_SEQUENTIAL_BOUNDARY_TYPES_HH
#define DUMUX_SEQUENTIAL_BOUNDARY_TYPES_HH
#include
<algorithm>
#include
<array>
#include
<dumux/common/boundarytypes.hh>
namespace
Dumux
{
/*!
* \ingroup Sequential
* \brief Class to specify the type of a boundary.
*/
template
<
int
numEq
>
class
SequentialBoundaryTypes
:
public
BoundaryTypes
<
numEq
>
{
public:
SequentialBoundaryTypes
()
:
BoundaryTypes
<
numEq
>
()
{
reset
();
}
/*!
* \brief Reset the boundary types for one equation.
*/
void
resetEq
(
int
eqIdx
)
{
BoundaryTypes
<
numEq
>::
resetEq
(
eqIdx
);
seqBoundaryInfo_
[
eqIdx
].
isOutflow
=
false
;
}
/*!
* \brief Reset the boundary types for all equations.
*
* After this method no equations will be disabled and neither
* Neumann nor Dirichlet conditions will be evaluated. This
* corresponds to a Neumann zero boundary.
*/
void
reset
()
{
for
(
int
eqIdx
=
0
;
eqIdx
<
numEq
;
++
eqIdx
)
resetEq
(
eqIdx
);
}
/*!
* \brief Set all boundary conditions to Neumann.
*/
void
setAllOutflow
()
{
for
(
int
eqIdx
=
0
;
eqIdx
<
numEq
;
++
eqIdx
)
setOutflow
(
eqIdx
);
}
/*!
* \brief Set a Neumann boundary condition for a single a single
* equation.
*
* \param eqIdx The index of the equation on which the outflow
* condition applies.
*/
void
setOutflow
(
int
eqIdx
)
{
resetEq
(
eqIdx
);
this
->
boundaryInfo_
[
eqIdx
].
visited
=
true
;
seqBoundaryInfo_
[
eqIdx
].
isOutflow
=
true
;
}
/*!
* \brief Returns true if an equation is used to specify an
* outflow condition.
*
* \param eqIdx The index of the equation
*/
bool
isOutflow
(
unsigned
eqIdx
)
const
{
return
seqBoundaryInfo_
[
eqIdx
].
isOutflow
;
}
/*!
* \brief Returns true if some equation is used to specify an
* outflow condition.
*/
bool
hasOutflow
()
const
{
return
std
::
any_of
(
seqBoundaryInfo_
.
begin
(),
seqBoundaryInfo_
.
end
(),
[](
const
BoundaryInfo
&
b
){
return
b
.
isOutflow
;
}
);
}
protected
:
//! use bitfields to minimize the size
struct
BoundaryInfo
{
bool
isOutflow
:
1
;
};
std
::
array
<
BoundaryInfo
,
numEq
>
seqBoundaryInfo_
;
};
}
// end namespace Dumux
#endif
This diff is collapsed.
Click to expand it.
dumux/porousmediumflow/sequential/properties.hh
+
2
−
1
View file @
f7b061d2
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include
<dumux/common/properties/grid.hh>
#include
<dumux/common/properties/grid.hh>
#include
<dumux/common/defaultmappertraits.hh>
#include
<dumux/common/defaultmappertraits.hh>
#include
<dumux/discretization/method.hh>
#include
<dumux/discretization/method.hh>
#include
<dumux/porousmediumflow/sequential/boundarytypes.hh>
#include
<dumux/porousmediumflow/sequential/gridadaptproperties.hh>
#include
<dumux/porousmediumflow/sequential/gridadaptproperties.hh>
#include
<dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh>
#include
<dumux/porousmediumflow/sequential/gridadaptinitializationindicatordefault.hh>
...
@@ -237,7 +238,7 @@ struct SequentialBoundaryTypes<TypeTag, TTag::SequentialModel>
...
@@ -237,7 +238,7 @@ struct SequentialBoundaryTypes<TypeTag, TTag::SequentialModel>
{
private
:
{
private
:
enum
{
numEq
=
getPropValue
<
TypeTag
,
Properties
::
NumEq
>
()
};
enum
{
numEq
=
getPropValue
<
TypeTag
,
Properties
::
NumEq
>
()
};
public
:
public
:
using
type
=
Dumux
::
BoundaryTypes
<
numEq
>
;
using
type
=
Dumux
::
Sequential
BoundaryTypes
<
numEq
>
;
};
};
//! do not specific any model-specific default parameters here
//! do not specific any model-specific default parameters here
...
...
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