From 5b7ce1cc5b10d891a7daa3185b38bb7fed22eb2c Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 25 Jul 2016 14:07:04 +0200 Subject: [PATCH] Fix include guard, avoid duplication --- dune/solvers/computeenergy.hh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dune/solvers/computeenergy.hh b/dune/solvers/computeenergy.hh index 1356ea92..e6933f04 100644 --- a/dune/solvers/computeenergy.hh +++ b/dune/solvers/computeenergy.hh @@ -1,20 +1,19 @@ // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=8 sw=4 sts=4: -#ifndef CONTACT_COMPUTE_ENERGY_HH -#define CONTACT_COMPUTE_ENERGY_HH +#ifndef DUNE_SOLVERS_COMPUTEENERGY_HH +#define DUNE_SOLVERS_COMPUTEENERGY_HH #include "common/arithmetic.hh" template <class M, class V> -double computeEnergy(const M& mat, const V& x, const V& rhs) +double computeEnergy(const M& mat, const V& x) { - return 0.5*Arithmetic::Axy(mat,x,x) - rhs*x; + return 0.5*Arithmetic::Axy(mat,x,x); } template <class M, class V> -double computeEnergy(const M& mat, const V& x) +double computeEnergy(const M& mat, const V& x, const V& rhs) { - return 0.5*Arithmetic::Axy(mat,x,x); + return computeEnergy(mat,x) - rhs*x; } - #endif -- GitLab