Commit b85eda79 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/remove_warnings' into 'master'

remove warnings

See merge request !190
parents c50bd280 10c1ad7e
Pipeline #4503 failed with stage
in 15 seconds
......@@ -89,7 +89,9 @@ namespace AMDiS
}
private:
#if AMDIS_HAS_PETSC
bool petscInitialized_ = false;
#endif
};
} // end namespace AMDiS
......@@ -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";
......
......@@ -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
......
......@@ -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)];
......
......@@ -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 {};
......
......@@ -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));
}
......
......@@ -168,6 +168,8 @@ namespace AMDiS
}
}
using Observer<event::adapt>::update;
protected:
Comm comm_;
};
......
......@@ -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;
......
......@@ -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);
......
......@@ -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.");
......
......@@ -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}};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment