Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-appl
dumux-preCICE
Commits
52a76670
Commit
52a76670
authored
Jan 26, 2022
by
Alexander Jaust
Browse files
[doc][style] Add doxygen documentation and fix code formatting
parent
5df753a1
Pipeline
#12994
passed with stages
in 8 minutes and 17 seconds
Changes
30
Pipelines
6
Expand all
Hide whitespace changes
Inline
Side-by-side
.clang-format
View file @
52a76670
---
Language: Cpp
# BasedOnStyle: Chromium
AccessModifierOffset: -
1
AccessModifierOffset: -
4
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
...
...
CHANGELOG.md
View file @
52a76670
...
...
@@ -2,6 +2,10 @@
## Not released yet
-
2022-01-26: Renamed
`dumupreciceindexwrapper.[hh|cc]`
to
`dumupreciceindexmapper.[hh|cc]`
to be consistent with the class name.
-
2022-01-26: Made sure all private member of the adapter are prefixed with an underscore.
-
2022-01-26: Add and configure Doxygen code documentation of coupling adapter.
-
2022-01-25: Fix code formatting configuration to be close to the original DuMuX code formatting configuration.
-
2022-01-25: Added
[
description templates
](
https://docs.gitlab.com/ee/user/project/description_templates.html
)
for merge requests and issues.
-
2022-01-12: The repository has been restructured. The main changes are:
...
...
doc/doxygen/Doxylocal
View file @
52a76670
# This file contains local changes to the doxygen configuration
# please use '+=' to add files/directories to the lists
PROJECT_NAME = "DuMuX-preCICE"
PROJECT_BRIEF = "Adapter to couple DuMuX to other solver via preCICE"
PROJECT_NUMBER = @DUNE_MOD_VERSION@
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT += @top_srcdir@/dune/
INPUT += @top_srcdir@/dumux-precice/ \
@top_srcdir@/doc/doxygen \
# see e.g. dune-grid for the examples of mainpage and modules
# INPUT += @srcdir@/mainpage \
# @srcdir@/modules
...
...
@@ -15,7 +20,7 @@ INPUT += @top_srcdir@/dune/
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
#
EXCLUDE += @top_srcdir@/
dune/
dumux-precice/
test
EXCLUDE += @top_srcdir@/dumux-precice/
dumux-addon/
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
...
...
@@ -28,3 +33,6 @@ INPUT += @top_srcdir@/dune/
# the \image command).
# IMAGE_PATH += @top_srcdir@/dune/dumux-precice/pics
FILE_PATTERNS += *.hh *.dox
doc/doxygen/main.dox
0 → 100644
View file @
52a76670
/*! \mainpage DuMuX-preCICE adapter
*
* This project helps with coupling DuMuX-based solvers
* with other solvers via the coupling library preCICE.
*
*/
\ No newline at end of file
dumux-precice/CMakeLists.txt
View file @
52a76670
...
...
@@ -2,7 +2,7 @@ install(FILES
couplingadapter.hh
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/dumux-precice
)
add_library
(
dumux-precice STATIC couplingadapter.cc dumuxpreciceindex
wr
apper.cc
)
add_library
(
dumux-precice STATIC couplingadapter.cc dumuxpreciceindex
m
apper.cc
)
target_link_libraries
(
dumux-precice PRIVATE precice::precice
)
add_subdirectory
(
dumux-addon
)
dumux-precice/couplingadapter.cc
View file @
52a76670
...
...
@@ -7,17 +7,17 @@
using
namespace
Dumux
::
Precice
;
CouplingAdapter
::
CouplingAdapter
()
:
wasCreated
_
(
false
),
precice
_
(
nullptr
),
meshWasCreated
_
(
false
),
preciceWasInitialized
_
(
false
),
hasIndexMapper
_
(
false
),
meshID
_
(
0
),
timeStepSize
_
(
0.
)
:
_
wasCreated
(
false
),
_
precice
(
nullptr
),
_
meshWasCreated
(
false
),
_
preciceWasInitialized
(
false
),
_
hasIndexMapper
(
false
),
_
meshID
(
0
),
_
timeStepSize
(
0.
)
{
preciceDataID
_
.
reserve
(
reserveSize
_
);
dataNames
_
.
reserve
(
reserveSize
_
);
dataVectors
_
.
reserve
(
reserveSize
_
);
_
preciceDataID
.
reserve
(
_
reserveSize
);
_
dataNames
.
reserve
(
_
reserveSize
);
_
dataVectors
.
reserve
(
_
reserveSize
);
}
CouplingAdapter
&
CouplingAdapter
::
getInstance
()
...
...
@@ -27,79 +27,79 @@ CouplingAdapter &CouplingAdapter::getInstance()
}
void
CouplingAdapter
::
announceSolver
(
const
std
::
string
&
name
,
const
std
::
string
configurationFileName
,
const
int
rank
,
const
int
size
)
const
std
::
string
configurationFileName
,
const
int
rank
,
const
int
size
)
{
assert
(
precice
_
==
nullptr
);
precice
_
=
std
::
make_unique
<
precice
::
SolverInterface
>
(
assert
(
_
precice
==
nullptr
);
_
precice
=
std
::
make_unique
<
precice
::
SolverInterface
>
(
name
,
configurationFileName
,
rank
,
size
);
wasCreated
_
=
true
;
_
wasCreated
=
true
;
}
size_t
CouplingAdapter
::
announceQuantity
(
const
std
::
string
&
name
)
{
assert
(
meshWasCreated
_
);
auto
it
=
std
::
find
(
dataNames
_
.
begin
(),
dataNames
_
.
end
(),
name
);
if
(
it
!=
dataNames
_
.
end
())
{
assert
(
_
meshWasCreated
);
auto
it
=
std
::
find
(
_
dataNames
.
begin
(),
_
dataNames
.
end
(),
name
);
if
(
it
!=
_
dataNames
.
end
())
{
throw
(
std
::
runtime_error
(
" Error! Duplicate quantity announced! "
));
}
dataNames
_
.
push_back
(
name
);
preciceDataID
_
.
push_back
(
precice
_
->
getDataID
(
name
,
meshID
_
));
dataVectors
_
.
push_back
(
std
::
vector
<
double
>
(
vertexIDs
_
.
size
()));
_
dataNames
.
push_back
(
name
);
_
preciceDataID
.
push_back
(
_
precice
->
getDataID
(
name
,
_
meshID
));
_
dataVectors
.
push_back
(
std
::
vector
<
double
>
(
_
vertexIDs
.
size
()));
return
getNumberOfQuantities
()
-
1
;
}
int
CouplingAdapter
::
getDimensions
()
const
{
assert
(
wasCreated
_
);
return
precice
_
->
getDimensions
();
assert
(
_
wasCreated
);
return
_
precice
->
getDimensions
();
}
/*
void CouplingAdapter::setMeshName(const std::string& meshName)
{
assert( wasCreated
_
);
meshID
_
= precice
_
->getMeshID(meshName);
assert(
_
wasCreated );
_
meshID =
_
precice->getMeshID(meshName);
}
*/
void
CouplingAdapter
::
setMesh
(
const
std
::
string
&
meshName
,
const
size_t
numPoints
,
std
::
vector
<
double
>
&
coordinates
)
const
size_t
numPoints
,
std
::
vector
<
double
>
&
coordinates
)
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
assert
(
numPoints
==
coordinates
.
size
()
/
getDimensions
());
meshID
_
=
precice
_
->
getMeshID
(
meshName
);
vertexIDs
_
.
resize
(
numPoints
);
precice
_
->
setMeshVertices
(
meshID
_
,
numPoints
,
coordinates
.
data
(),
vertexIDs
_
.
data
());
meshWasCreated
_
=
true
;
_
meshID
=
_
precice
->
getMeshID
(
meshName
);
_
vertexIDs
.
resize
(
numPoints
);
_
precice
->
setMeshVertices
(
_
meshID
,
numPoints
,
coordinates
.
data
(),
_
vertexIDs
.
data
());
_
meshWasCreated
=
true
;
}
double
CouplingAdapter
::
initialize
()
{
assert
(
wasCreated
_
);
assert
(
meshWasCreated
_
);
assert
(
!
preciceWasInitialized
_
);
assert
(
_
wasCreated
);
assert
(
_
meshWasCreated
);
assert
(
!
_
preciceWasInitialized
);
timeStepSize
_
=
precice
_
->
initialize
();
assert
(
timeStepSize
_
>
0
);
_
timeStepSize
=
_
precice
->
initialize
();
assert
(
_
timeStepSize
>
0
);
preciceWasInitialized
_
=
true
;
return
timeStepSize
_
;
_
preciceWasInitialized
=
true
;
return
_
timeStepSize
;
}
void
CouplingAdapter
::
createIndexMapping
(
const
std
::
vector
<
int
>
&
dumuxFaceIDs
)
{
assert
(
meshWasCreated
_
);
indexMapper
_
.
createMapping
(
dumuxFaceIDs
,
vertexIDs
_
);
hasIndexMapper
_
=
true
;
assert
(
_
meshWasCreated
);
_
indexMapper
.
createMapping
(
dumuxFaceIDs
,
_
vertexIDs
);
_
hasIndexMapper
=
true
;
}
double
CouplingAdapter
::
setMeshAndInitialize
(
const
std
::
string
&
meshName
,
const
size_t
numPoints
,
std
::
vector
<
double
>
&
coordinates
)
const
size_t
numPoints
,
std
::
vector
<
double
>
&
coordinates
)
{
setMesh
(
meshName
,
numPoints
,
coordinates
);
return
initialize
();
...
...
@@ -107,66 +107,66 @@ double CouplingAdapter::setMeshAndInitialize(const std::string &meshName,
void
CouplingAdapter
::
initializeData
()
{
assert
(
preciceWasInitialized
_
);
precice
_
->
initializeData
();
assert
(
_
preciceWasInitialized
);
_
precice
->
initializeData
();
}
void
CouplingAdapter
::
finalize
()
{
assert
(
wasCreated
_
);
if
(
preciceWasInitialized
_
)
precice
_
->
finalize
();
assert
(
_
wasCreated
);
if
(
_
preciceWasInitialized
)
_
precice
->
finalize
();
}
double
CouplingAdapter
::
advance
(
const
double
computedTimeStepLength
)
{
assert
(
wasCreated
_
);
return
precice
_
->
advance
(
computedTimeStepLength
);
assert
(
_
wasCreated
);
return
_
precice
->
advance
(
computedTimeStepLength
);
}
bool
CouplingAdapter
::
isCouplingOngoing
()
{
assert
(
wasCreated
_
);
return
precice
_
->
isCouplingOngoing
();
assert
(
_
wasCreated
);
return
_
precice
->
isCouplingOngoing
();
}
size_t
CouplingAdapter
::
getNumberOfVertices
()
{
assert
(
wasCreated
_
);
return
vertexIDs
_
.
size
();
assert
(
_
wasCreated
);
return
_
vertexIDs
.
size
();
}
double
CouplingAdapter
::
getScalarQuantityOnFace
(
const
size_t
dataID
,
const
int
faceID
)
const
const
int
faceID
)
const
{
assert
(
wasCreated
_
);
assert
(
hasIndexMapper
_
);
if
(
!
hasIndexMapper
_
)
{
assert
(
_
wasCreated
);
assert
(
_
hasIndexMapper
);
if
(
!
_
hasIndexMapper
)
{
throw
std
::
runtime_error
(
"Reading quantity using faceID, but index mapping was not "
"created!"
);
}
const
auto
idx
=
indexMapper
_
.
getPreciceId
(
faceID
);
assert
(
dataID
<
dataVectors
_
.
size
());
const
std
::
vector
<
double
>
&
quantityVector
=
dataVectors
_
[
dataID
];
const
auto
idx
=
_
indexMapper
.
getPreciceId
(
faceID
);
assert
(
dataID
<
_
dataVectors
.
size
());
const
std
::
vector
<
double
>
&
quantityVector
=
_
dataVectors
[
dataID
];
assert
(
idx
<
quantityVector
.
size
());
return
quantityVector
[
idx
];
}
void
CouplingAdapter
::
writeScalarQuantityOnFace
(
const
size_t
dataID
,
const
int
faceID
,
const
double
value
)
const
int
faceID
,
const
double
value
)
{
assert
(
wasCreated
_
);
assert
(
hasIndexMapper
_
);
if
(
!
hasIndexMapper
_
)
{
assert
(
_
wasCreated
);
assert
(
_
hasIndexMapper
);
if
(
!
_
hasIndexMapper
)
{
throw
std
::
runtime_error
(
"Writing quantity using faceID, but index mapping was not "
"created!"
);
}
const
auto
idx
=
indexMapper
_
.
getPreciceId
(
faceID
);
assert
(
dataID
<
dataVectors
_
.
size
());
std
::
vector
<
double
>
&
quantityVector
=
dataVectors
_
[
dataID
];
const
auto
idx
=
_
indexMapper
.
getPreciceId
(
faceID
);
assert
(
dataID
<
_
dataVectors
.
size
());
std
::
vector
<
double
>
&
quantityVector
=
_
dataVectors
[
dataID
];
assert
(
idx
<
quantityVector
.
size
());
quantityVector
[
idx
]
=
value
;
}
...
...
@@ -176,16 +176,16 @@ void CouplingAdapter::writeScalarQuantityOnFace(const size_t dataID,
// const double* value,
// const size_t size)
//{
// assert( wasCreated
_
);
// assert( hasIndexMapper
_
);
// assert(
_
wasCreated );
// assert(
_
hasIndexMapper );
// assert( size == getDimensions() );
// if ( !hasIndexMapper
_
)
// if ( !
_
hasIndexMapper )
// {
// throw std::runtime_error("Writing quantity using faceID, but index mapping was not created!");
// }
// const auto idx = indexMapper
_
.getPreciceId( faceID ) * size;
// assert( dataID < dataVectors
_
.size() );
// std::vector<double>& quantityVector = dataVectors
_
[ dataID ];
// const auto idx =
_
indexMapper.getPreciceId( faceID ) * size;
// assert( dataID <
_
dataVectors.size() );
// std::vector<double>& quantityVector =
_
dataVectors[ dataID ];
// assert( idx < quantityVector.size() );
// //quantityVector[idx] = value;
// std::copy_n( value, size, quantityVector[idx] );
...
...
@@ -193,142 +193,142 @@ void CouplingAdapter::writeScalarQuantityOnFace(const size_t dataID,
std
::
vector
<
double
>
&
CouplingAdapter
::
getQuantityVector
(
const
size_t
dataID
)
{
assert
(
wasCreated
_
);
assert
(
dataID
<
dataVectors
_
.
size
());
return
dataVectors
_
[
dataID
];
assert
(
_
wasCreated
);
assert
(
dataID
<
_
dataVectors
.
size
());
return
_
dataVectors
[
dataID
];
}
const
std
::
vector
<
double
>
&
CouplingAdapter
::
getQuantityVector
(
const
size_t
dataID
)
const
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
return
getQuantityVector
(
dataID
);
}
void
CouplingAdapter
::
writeScalarQuantityVector
(
const
size_t
dataID
,
std
::
vector
<
double
>
&
values
)
std
::
vector
<
double
>
&
values
)
{
assert
(
wasCreated
_
);
assert
(
dataID
<
dataVectors
_
.
size
());
assert
(
dataVectors
_
[
dataID
].
size
()
==
values
.
size
());
dataVectors
_
[
dataID
]
=
values
;
assert
(
_
wasCreated
);
assert
(
dataID
<
_
dataVectors
.
size
());
assert
(
_
dataVectors
[
dataID
].
size
()
==
values
.
size
());
_
dataVectors
[
dataID
]
=
values
;
}
void
CouplingAdapter
::
writeScalarQuantityToOtherSolver
(
const
size_t
dataID
)
{
assert
(
wasCreated
_
);
assert
(
dataID
<
dataVectors
_
.
size
());
assert
(
dataID
<
preciceDataID
_
.
size
());
assert
(
_
wasCreated
);
assert
(
dataID
<
_
dataVectors
.
size
());
assert
(
dataID
<
_
preciceDataID
.
size
());
assert
(
dataID
<
std
::
numeric_limits
<
int
>::
max
());
writeBlockScalarDataToPrecice
(
preciceDataID
_
[
dataID
],
dataVectors
_
[
dataID
]);
writeBlockScalarDataToPrecice
(
_
preciceDataID
[
dataID
],
_
dataVectors
[
dataID
]);
}
void
CouplingAdapter
::
readScalarQuantityFromOtherSolver
(
const
size_t
dataID
)
{
assert
(
wasCreated
_
);
assert
(
dataID
<
dataVectors
_
.
size
());
assert
(
dataID
<
preciceDataID
_
.
size
());
assert
(
_
wasCreated
);
assert
(
dataID
<
_
dataVectors
.
size
());
assert
(
dataID
<
_
preciceDataID
.
size
());
assert
(
dataID
<
std
::
numeric_limits
<
int
>::
max
());
readBlockScalarDataFromPrecice
(
preciceDataID
_
[
dataID
],
dataVectors
_
[
dataID
]);
readBlockScalarDataFromPrecice
(
_
preciceDataID
[
dataID
],
_
dataVectors
[
dataID
]);
}
bool
CouplingAdapter
::
isCoupledEntity
(
const
int
faceID
)
const
{
assert
(
wasCreated
_
);
return
indexMapper
_
.
isDumuxIdMapped
(
faceID
);
assert
(
_
wasCreated
);
return
_
indexMapper
.
isDumuxIdMapped
(
faceID
);
}
size_t
CouplingAdapter
::
getIdFromName
(
const
std
::
string
&
dataName
)
const
{
assert
(
wasCreated
_
);
const
auto
it
=
std
::
find
(
dataNames
_
.
begin
(),
dataNames
_
.
end
(),
dataName
);
if
(
it
==
dataNames
_
.
end
())
{
assert
(
_
wasCreated
);
const
auto
it
=
std
::
find
(
_
dataNames
.
begin
(),
_
dataNames
.
end
(),
dataName
);
if
(
it
==
_
dataNames
.
end
())
{
throw
(
std
::
runtime_error
(
" Error! Name of data not found! "
));
}
const
auto
idx
=
std
::
distance
(
dataNames
_
.
begin
(),
it
);
const
auto
idx
=
std
::
distance
(
_
dataNames
.
begin
(),
it
);
assert
(
idx
>
-
1
);
return
size_t
(
idx
);
}
std
::
string
CouplingAdapter
::
getNameFromId
(
const
size_t
dataID
)
const
{
assert
(
wasCreated
_
);
assert
(
dataID
<
dataNames
_
.
size
());
return
dataNames
_
[
dataID
];
assert
(
_
wasCreated
);
assert
(
dataID
<
_
dataNames
.
size
());
return
_
dataNames
[
dataID
];
}
void
CouplingAdapter
::
print
(
std
::
ostream
&
os
)
{
os
<<
indexMapper
_
;
os
<<
_
indexMapper
;
}
bool
CouplingAdapter
::
checkIfActionIsRequired
(
const
std
::
string
&
condition
)
{
assert
(
wasCreated
_
);
return
precice
_
->
isActionRequired
(
condition
);
assert
(
_
wasCreated
);
return
_
precice
->
isActionRequired
(
condition
);
}
void
CouplingAdapter
::
actionIsFulfilled
(
const
std
::
string
&
condition
)
{
assert
(
wasCreated
_
);
precice
_
->
markActionFulfilled
(
condition
);
assert
(
_
wasCreated
);
_
precice
->
markActionFulfilled
(
condition
);
}
void
CouplingAdapter
::
readBlockScalarDataFromPrecice
(
const
int
dataID
,
std
::
vector
<
double
>
&
data
)
std
::
vector
<
double
>
&
data
)
{
assert
(
wasCreated
_
);
assert
(
vertexIDs
_
.
size
()
==
data
.
size
());
precice
_
->
readBlockScalarData
(
dataID
,
vertexIDs
_
.
size
(),
vertexIDs
_
.
data
(),
assert
(
_
wasCreated
);
assert
(
_
vertexIDs
.
size
()
==
data
.
size
());
_
precice
->
readBlockScalarData
(
dataID
,
_
vertexIDs
.
size
(),
_
vertexIDs
.
data
(),
data
.
data
());
}
void
CouplingAdapter
::
writeBlockScalarDataToPrecice
(
const
int
dataID
,
std
::
vector
<
double
>
&
data
)
std
::
vector
<
double
>
&
data
)
{
assert
(
wasCreated
_
);
assert
(
vertexIDs
_
.
size
()
==
data
.
size
());
precice
_
->
writeBlockScalarData
(
dataID
,
vertexIDs
_
.
size
(),
vertexIDs
_
.
data
(),
assert
(
_
wasCreated
);
assert
(
_
vertexIDs
.
size
()
==
data
.
size
());
_
precice
->
writeBlockScalarData
(
dataID
,
_
vertexIDs
.
size
(),
_
vertexIDs
.
data
(),
data
.
data
());
}
bool
CouplingAdapter
::
hasToWriteInitialData
()
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
return
checkIfActionIsRequired
(
precice
::
constants
::
actionWriteInitialData
());
}
void
CouplingAdapter
::
announceInitialDataWritten
()
{
assert
(
wasCreated
_
);
precice
_
->
markActionFulfilled
(
precice
::
constants
::
actionWriteInitialData
());
assert
(
_
wasCreated
);
_
precice
->
markActionFulfilled
(
precice
::
constants
::
actionWriteInitialData
());
}
bool
CouplingAdapter
::
hasToReadIterationCheckpoint
()
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
return
checkIfActionIsRequired
(
precice
::
constants
::
actionReadIterationCheckpoint
());
}
void
CouplingAdapter
::
announceIterationCheckpointRead
()
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
actionIsFulfilled
(
precice
::
constants
::
actionReadIterationCheckpoint
());
}
bool
CouplingAdapter
::
hasToWriteIterationCheckpoint
()
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
return
checkIfActionIsRequired
(
precice
::
constants
::
actionWriteIterationCheckpoint
());
}
void
CouplingAdapter
::
announceIterationCheckpointWritten
()
{
assert
(
wasCreated
_
);
assert
(
_
wasCreated
);
actionIsFulfilled
(
precice
::
constants
::
actionWriteIterationCheckpoint
());
}
...
...
dumux-precice/couplingadapter.hh
View file @
52a76670
...
...
@@ -5,125 +5,353 @@
#include
<precice/SolverInterface.hpp>
#include
<string>
#include
"dumuxpreciceindex
wr
apper.hh"
#include
"dumuxpreciceindex
m
apper.hh"
/*!
* @brief Namespace of dumux-precice
*
*/
namespace
Dumux
::
Precice
{
/*!
* @brief A DuMuX-preCICE coupling adapter class
*
* The class provides an interface to DuMuX to couple simulations
* via the coupling tool preCICE. The class aims to provide an
* easy-to-use interface that is reasonably close to the coupling
* interface for monolithic couplings that is integrated into DuMuX.
*
* \note The coupling adapter is currently implemented as a Singleton.
*
*/
class
CouplingAdapter
{
private:
bool
wasCreated_
;
std
::
unique_ptr
<
precice
::
SolverInterface
>
precice_
;
private:
//! True if preCICE instance was initiated
bool
_wasCreated
;
//! Pointer to preCICE instance
std
::
unique_ptr
<
precice
::
SolverInterface
>
_precice
;
//! Constructor
CouplingAdapter
();
/*!
* @brief Checks whether an action predefined by preCICE
* needs to be carried out.
*
* @param[in] condition Name of the action.
* @return true Action must be carried out.
* @return false Action must not be carried out.
*/
bool
checkIfActionIsRequired
(
const
std
::
string
&
condition
);
/*!
* @brief Announce to preCICE that an action was carried out.
*
* @param[in] condition Name of the action.
*/
void
actionIsFulfilled
(
const
std
::
string
&
condition
);
/*!
* @brief Reads full block of data from preCICE.
*
* @param[in] dataID Identifier of dataset to read.
* @param[out] data Vector to store the read data to.
*/
void
readBlockScalarDataFromPrecice
(
const
int
dataID
,
std
::
vector
<
double
>
&
data
);
/*!
* @brief Writes full block of data to preCICE.
*
* @param[in] dataID Identifier of dataset to read.
* @param[in] data Vector containing data to write into preCICE's buffer.
*/
void
writeBlockScalarDataToPrecice
(
const
int
dataID
,
std
::
vector
<
double
>
&
data
);
size_t
numberOfQuantities
()
const
{
return
dataNames_
.
size
();
}
bool
meshWasCreated_
;
bool
preciceWasInitialized_
;
bool
hasIndexMapper_
;
int
meshID_
;
double
timeStepSize_
;
std
::
vector
<
std
::
string
>
dataNames_
;