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
10c1ad7e
Commit
10c1ad7e
authored
Jul 27, 2020
by
Praetorius, Simon
Browse files
remove warnings
parent
c50bd280
Changes
11
Hide whitespace changes
Inline
Side-by-side
amdis/Environment.hpp
View file @
10c1ad7e
...
...
@@ -89,7 +89,9 @@ namespace AMDiS
}
private:
#if AMDIS_HAS_PETSC
bool
petscInitialized_
=
false
;
#endif
};
}
// end namespace AMDiS
amdis/InitfileParser.cpp
View file @
10c1ad7e
...
...
@@ -129,7 +129,7 @@ std::string InitfileParser::replaceVariable(Dune::ParameterTree const& pt, std::
}
std
::
string
InitfileParser
::
replaceExpression
(
Dune
::
ParameterTree
const
&
pt
,
std
::
string
const
&
input
)
std
::
string
InitfileParser
::
replaceExpression
(
Dune
::
ParameterTree
const
&
/*pt*/
,
std
::
string
const
&
input
)
{
#if 0
std::string whitespaces = " \t\r\f";
...
...
amdis/Marker.hpp
View file @
10c1ad7e
...
...
@@ -221,7 +221,7 @@ namespace AMDiS
:
Super
{
name
,
component
,
est
,
grid
}
{}
void
markElement
(
AdaptInfo
&
adaptInfo
,
Element
const
&
elem
)
override
void
markElement
(
AdaptInfo
&
/*
adaptInfo
*/
,
Element
const
&
elem
)
override
{
if
(
this
->
refineAllowed_
)
this
->
mark
(
elem
,
1
);
...
...
@@ -388,7 +388,7 @@ namespace AMDiS
/// \brief Implementation of \ref Marker::markElement. Does nothing since marking is
/// done in \ref markGrid().
void
markElement
(
AdaptInfo
&
adaptInfo
,
Element
const
&
elem
)
final
{}
void
markElement
(
AdaptInfo
&
/*
adaptInfo
*/
,
Element
const
&
/*
elem
*/
)
final
{
/* do nothing */
}
/// Mark element for refinement, if grid-function \ref gridFct_ evaluates to
/// a value larger than the current level and is marked for coarsening of
...
...
amdis/Marker.inc.hpp
View file @
10c1ad7e
...
...
@@ -29,7 +29,7 @@ void Marker<Grid>::mark(Element const& elem, int newMark)
template
<
class
Grid
>
void
Marker
<
Grid
>::
initMarking
(
AdaptInfo
&
adaptInfo
)
void
Marker
<
Grid
>::
initMarking
(
AdaptInfo
&
/*
adaptInfo
*/
)
{
this
->
elMarkRefine_
=
0
;
this
->
elMarkCoarsen_
=
0
;
...
...
@@ -37,7 +37,7 @@ void Marker<Grid>::initMarking(AdaptInfo& adaptInfo)
template
<
class
Grid
>
void
Marker
<
Grid
>::
finishMarking
(
AdaptInfo
&
adaptInfo
)
void
Marker
<
Grid
>::
finishMarking
(
AdaptInfo
&
/*
adaptInfo
*/
)
{
if
(
info_
>
0
)
{
msg
(
"{} elements marked for refinement"
,
elMarkRefine_
);
...
...
@@ -82,7 +82,7 @@ void EstimatorMarker<Grid>::initMarking(AdaptInfo& adaptInfo)
template
<
class
Grid
>
void
EstimatorMarker
<
Grid
>::
markElement
(
AdaptInfo
&
adaptInfo
,
const
Element
&
elem
)
void
EstimatorMarker
<
Grid
>::
markElement
(
AdaptInfo
&
/*
adaptInfo
*/
,
const
Element
&
elem
)
{
const
auto
&
index
=
this
->
grid_
->
leafIndexSet
().
index
(
elem
);
double
lError
=
est_
[
index
];
...
...
@@ -240,7 +240,7 @@ Flag GERSMarker<Grid>::markGrid(AdaptInfo& adaptInfo)
template
<
class
Grid
>
void
GERSMarker
<
Grid
>::
markElementForRefinement
(
AdaptInfo
&
adaptInfo
,
const
Element
&
elem
)
void
GERSMarker
<
Grid
>::
markElementForRefinement
(
AdaptInfo
&
/*
adaptInfo
*/
,
const
Element
&
elem
)
{
double
lError
=
this
->
est_
[
this
->
grid_
->
leafIndexSet
().
index
(
elem
)];
...
...
@@ -252,7 +252,7 @@ void GERSMarker<Grid>::markElementForRefinement(AdaptInfo& adaptInfo, const Elem
template
<
class
Grid
>
void
GERSMarker
<
Grid
>::
markElementForCoarsening
(
AdaptInfo
&
adaptInfo
,
const
Element
&
elem
)
void
GERSMarker
<
Grid
>::
markElementForCoarsening
(
AdaptInfo
&
/*
adaptInfo
*/
,
const
Element
&
elem
)
{
double
lError
=
this
->
est_
[
this
->
grid_
->
leafIndexSet
().
index
(
elem
)];
...
...
amdis/MeshCreator.hpp
View file @
10c1ad7e
...
...
@@ -191,7 +191,7 @@ namespace AMDiS
// fallback if GmshReader cannot be used
template
<
class
GridType
=
HostGrid
>
std
::
unique_ptr
<
GridType
>
read_gmsh_file
(
std
::
string
const
&
filename
,
Dune
::
PriorityTag
<
0
>
)
const
std
::
unique_ptr
<
GridType
>
read_gmsh_file
(
std
::
string
const
&
,
Dune
::
PriorityTag
<
0
>
)
const
{
error_exit
(
"Gmsh reader not supported for this grid type!"
);
return
{};
...
...
@@ -236,7 +236,7 @@ namespace AMDiS
#else
// fallback if no Alberta is available
template
<
class
GridType
>
std
::
unique_ptr
<
GridType
>
read_alberta_file
(
std
::
string
const
&
filename
,
Dune
::
PriorityTag
<
0
>
)
const
std
::
unique_ptr
<
GridType
>
read_alberta_file
(
std
::
string
const
&
,
Dune
::
PriorityTag
<
0
>
)
const
{
error_exit
(
"AlbertaGrid (and AlbertaReader) not available. Set AlbertaFlags to your executable in cmake!"
);
return
{};
...
...
@@ -292,7 +292,7 @@ namespace AMDiS
template
<
int
dim
,
class
ct
>
std
::
unique_ptr
<
HostGrid
>
create_yaspgrid
(
Types
<
Dune
::
YaspGrid
<
dim
,
Dune
::
TensorProductCoordinates
<
ct
,
dim
>>>
,
int
overlap
,
std
::
bitset
<
dimension
>
const
&
per
)
const
int
,
std
::
bitset
<
dimension
>
const
&
)
const
{
error_exit
(
"MeshCreator cannot create YaspGrid with TensorProductCoordinates."
);
return
{};
...
...
amdis/common/ForEach.hpp
View file @
10c1ad7e
...
...
@@ -28,6 +28,20 @@ namespace AMDiS
Tools
::
for_each
(
std
::
make_index_sequence
<
static_size_v
<
Tuple
>>
{},
FWD
(
tuple
),
FWD
(
f
));
}
template
<
class
T
,
std
::
size_t
n
,
class
Functor
>
constexpr
void
for_each
(
std
::
array
<
T
,
n
>
const
&
a
,
Functor
&&
f
)
{
for
(
auto
const
&
ai
:
a
)
f
(
ai
);
}
template
<
class
T
,
class
Functor
>
constexpr
void
for_each
(
std
::
vector
<
T
>
const
&
v
,
Functor
&&
f
)
{
for
(
auto
const
&
vi
:
v
)
f
(
vi
);
}
template
<
std
::
size_t
I0
=
0
,
std
::
size_t
...
I
,
class
Functor
>
constexpr
void
for_range
(
std
::
index_sequence
<
I
...
>
,
Functor
&&
f
)
...
...
@@ -36,7 +50,7 @@ namespace AMDiS
}
template
<
std
::
size_t
I0
,
std
::
size_t
I1
,
class
Functor
>
constexpr
void
for_range
(
index_t
<
I0
>
i0
,
index_t
<
I1
>
i1
,
Functor
&&
f
)
constexpr
void
for_range
(
index_t
<
I0
>
,
index_t
<
I1
>
,
Functor
&&
f
)
{
Tools
::
for_range
<
I0
>
(
std
::
make_index_sequence
<
std
::
size_t
(
I1
-
I0
)
>
{},
FWD
(
f
));
}
...
...
amdis/functions/ParallelGlobalBasis.hpp
View file @
10c1ad7e
...
...
@@ -168,6 +168,8 @@ namespace AMDiS
}
}
using
Observer
<
event
::
adapt
>::
update
;
protected:
Comm
comm_
;
};
...
...
amdis/gridfunctions/ConstantGridFunction.hpp
View file @
10c1ad7e
...
...
@@ -54,7 +54,7 @@ namespace AMDiS
/// \brief Create a \ref ConstantLocalFunction representing the derivative
/// of a constant function, that ist, the value 0.
template
<
class
Type
>
auto
makeDerivative
(
Type
const
&
type
)
const
auto
makeDerivative
(
Type
const
&
/*
type
*/
)
const
{
using
RawSignature
=
typename
Dune
::
Functions
::
SignatureTraits
<
R
(
D
)
>::
RawSignature
;
using
DerivativeRange
=
typename
DerivativeTraits
<
RawSignature
,
Type
>::
Range
;
...
...
amdis/gridfunctions/CoordsGridFunction.hpp
View file @
10c1ad7e
...
...
@@ -44,7 +44,7 @@ namespace AMDiS
struct
Derivative
{
template
<
class
T
,
int
N
>
Dune
::
DiagonalMatrix
<
T
,
N
>
const
&
operator
()(
Dune
::
FieldVector
<
T
,
N
>
const
&
x
)
const
Dune
::
DiagonalMatrix
<
T
,
N
>
const
&
operator
()(
Dune
::
FieldVector
<
T
,
N
>
const
&
/*x*/
)
const
{
return
Dune
::
DiagonalMatrix
<
T
,
N
>
{
T
(
1
)};
}
...
...
@@ -94,7 +94,7 @@ namespace AMDiS
{}
template
<
class
T
,
int
N
>
Dune
::
FieldVector
<
T
,
N
>
operator
()(
Dune
::
FieldVector
<
T
,
N
>
const
&
x
)
const
Dune
::
FieldVector
<
T
,
N
>
operator
()(
Dune
::
FieldVector
<
T
,
N
>
const
&
/*x*/
)
const
{
Dune
::
FieldVector
<
T
,
N
>
result
(
0
);
result
[
comp_
]
=
T
(
1
);
...
...
amdis/linearalgebra/Constraints.hpp
View file @
10c1ad7e
...
...
@@ -13,14 +13,14 @@ namespace AMDiS
struct
Constraints
{
template
<
class
Mat
,
class
Sol
,
class
Rhs
,
class
BitVec
>
static
void
dirichletBC
(
Mat
&
matrix
,
Sol
&
solution
,
Rhs
&
rhs
,
BitVec
const
&
nodes
,
bool
setDiagonal
=
true
)
static
void
dirichletBC
(
Mat
&
/*
matrix
*/
,
Sol
&
/*
solution
*/
,
Rhs
&
/*
rhs
*/
,
BitVec
const
&
/*
nodes
*/
,
bool
/*
setDiagonal
*/
=
true
)
{
/* do nothing */
warning
(
"dirichletBC not implemented for this matrix type."
);
}
template
<
class
Mat
,
class
Sol
,
class
Rhs
,
class
BitVec
,
class
Assoc
>
static
void
periodicBC
(
Mat
&
matrix
,
Sol
&
solution
,
Rhs
&
rhs
,
BitVec
const
&
left
,
Assoc
const
&
association
,
bool
setDiagonal
=
true
)
static
void
periodicBC
(
Mat
&
/*
matrix
*/
,
Sol
&
/*
solution
*/
,
Rhs
&
/*
rhs
*/
,
BitVec
const
&
/*
left
*/
,
Assoc
const
&
/*
association
*/
,
bool
/*
setDiagonal
*/
=
true
)
{
/* do nothing */
warning
(
"periodicBC not implemented for this matrix type."
);
...
...
amdis/typetree/TreePath.hpp
View file @
10c1ad7e
...
...
@@ -175,7 +175,7 @@ namespace AMDiS
return
ss
.
str
();
}
inline
std
::
string
to_string
(
Dune
::
TypeTree
::
HybridTreePath
<>
const
&
tp
)
inline
std
::
string
to_string
(
Dune
::
TypeTree
::
HybridTreePath
<>
const
&
)
{
return
""
;
}
...
...
@@ -195,7 +195,7 @@ namespace AMDiS
return
Impl
::
toArrayImpl
(
tp
,
std
::
make_index_sequence
<
1
+
sizeof
...(
T
)
>
{});
}
inline
std
::
array
<
std
::
size_t
,
1
>
to_array
(
Dune
::
TypeTree
::
HybridTreePath
<>
const
&
tp
)
inline
std
::
array
<
std
::
size_t
,
1
>
to_array
(
Dune
::
TypeTree
::
HybridTreePath
<>
const
&
)
{
return
{{
0u
}};
}
...
...
Write
Preview
Markdown
is supported
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