preCICE
v3.1.2
Loading...
Searching...
No Matches
src
cplscheme
ImplicitData.cpp
Go to the documentation of this file.
1
#include "
cplscheme/ImplicitData.hpp
"
2
#include "
utils/assertion.hpp
"
3
4
namespace
precice::cplscheme
{
5
6
void
ImplicitData::add
(
DataID
did,
bool
toKeep)
7
{
8
PRECICE_ASSERT
(
entries
.
count
(did) == 0);
9
entries
[did] =
toKeep
;
10
}
11
12
bool
ImplicitData::contains
(
DataID
did)
const
13
{
14
return
entries
.
count
(did) > 0;
15
}
16
17
bool
ImplicitData::toKeep
(
DataID
did)
const
18
{
19
PRECICE_ASSERT
(
contains
(did));
20
return
entries
.
at
(did);
21
}
22
23
}
// namespace precice::cplscheme
ImplicitData.hpp
assertion.hpp
PRECICE_ASSERT
#define PRECICE_ASSERT(...)
Definition
assertion.hpp:87
std::map::at
T at(T... args)
std::map::count
T count(T... args)
precice::cplscheme
contains implementations of coupling schemes for coupled simulations.
Definition
BaseCouplingScheme.cpp:31
precice::DataID
int DataID
Definition
Types.hpp:25
precice::cplscheme::ImplicitData::contains
bool contains(DataID did) const
Definition
ImplicitData.cpp:12
precice::cplscheme::ImplicitData::toKeep
bool toKeep(DataID did) const
Definition
ImplicitData.cpp:17
precice::cplscheme::ImplicitData::add
void add(DataID did, bool toKeep)
Definition
ImplicitData.cpp:6
precice::cplscheme::ImplicitData::entries
std::map< DataID, bool > entries
Definition
ImplicitData.hpp:15