Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
2bcd1afe
Commit
2bcd1afe
authored
Mar 13, 2019
by
Praetorius, Simon
Browse files
make DataTransferOperation an enum class
parent
6dce5bfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/amdis/DataTransfer.hpp
View file @
2bcd1afe
...
...
@@ -11,10 +11,10 @@ namespace AMDiS
* @{
**/
typedef
enum
{
enum
class
DataTransferOperation
{
NO_OPERATION
=
0
,
INTERPOLATE
=
1
}
DataTransferOperation
;
};
/// \brief Interface for Containers allowing data transfer between grid changes.
...
...
@@ -66,10 +66,10 @@ namespace AMDiS
{
switch
(
op
)
{
case
NO_OPERATION
:
case
DataTransferOperation
::
NO_OPERATION
:
return
std
::
make_unique
<
NoDataTransfer
<
Container
>>
();
case
INTERPOLATE
:
return
std
::
make_unique
<
DataTransfer
<
Container
,
Basis
>
>
(
basis
);
case
DataTransferOperation
::
INTERPOLATE
:
return
std
::
make_unique
<
DataTransfer
<
Container
,
Basis
>>
(
basis
);
default:
error_exit
(
"Invalid data transfer
\n
"
);
return
nullptr
;
// avoid warnings
...
...
src/amdis/ProblemInstat.inc.hpp
View file @
2bcd1afe
...
...
@@ -45,7 +45,7 @@ void ProblemInstat<Traits>::createUhOld()
if
(
oldSolution_
)
warning
(
"oldSolution already created
\n
"
);
else
// create oldSolution
oldSolution_
.
reset
(
new
SystemVector
(
*
problemStat_
->
globalBasis
(),
INTERPOLATE
));
oldSolution_
.
reset
(
new
SystemVector
(
*
problemStat_
->
globalBasis
(),
DataTransferOperation
::
INTERPOLATE
));
}
...
...
src/amdis/ProblemStat.inc.hpp
View file @
2bcd1afe
...
...
@@ -173,8 +173,8 @@ template <class Traits>
void
ProblemStat
<
Traits
>::
createMatricesAndVectors
()
{
systemMatrix_
=
std
::
make_shared
<
SystemMatrix
>
(
*
globalBasis_
,
*
globalBasis_
);
solution_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
INTERPOLATE
);
rhs_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
NO_OPERATION
);
solution_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
DataTransferOperation
::
INTERPOLATE
);
rhs_
=
std
::
make_shared
<
SystemVector
>
(
*
globalBasis_
,
DataTransferOperation
::
NO_OPERATION
);
auto
localView
=
globalBasis_
->
localView
();
for_each_node
(
localView
.
tree
(),
[
&
,
this
](
auto
const
&
node
,
auto
treePath
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment