Skip to content
Snippets Groups Projects
Commit fe0aab3f authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[localization-study] LA::CommonDenseVector -> DynamicVector, refs #2

However, `DynamicVector` does not have `standard_deviation`, so this is
currently disabled.
parent 155b2980
No related branches found
No related tags found
No related merge requests found
......@@ -7,12 +7,15 @@
// Rene Milk (2015)
#include "config.h"
#include "localization-study.hh"
#include <limits>
#include <boost/io/ios_state.hpp>
#include <dune/xt/common/string.hh>
#include "localization-study.hh"
namespace Dune {
namespace XT {
namespace Common {
......@@ -107,12 +110,13 @@ void LocalizationStudy::run(std::ostream& out)
<< ")!");
const auto difference = reference_indicators - indicators;
// compute L^2 difference
out << std::setw(18) << std::setprecision(2) << std::scientific << difference.l2_norm() << std::flush;
out << std::setw(18) << std::setprecision(2) << std::scientific << difference.two_norm() << std::flush;
// compute L^oo difference
out << " | " << std::setw(18) << std::setprecision(2) << std::scientific << difference.sup_norm() << std::flush;
// compute standard deviation
out << " | " << std::setw(18) << std::setprecision(2) << std::scientific << difference.standard_deviation()
out << " | " << std::setw(18) << std::setprecision(2) << std::scientific << difference.infinity_norm()
<< std::flush;
// compute standard deviation
out << " | " << std::setw(18) << std::setprecision(2) << std::scientific
<< /*difference.standard_deviation()*/ std::numeric_limits<double>::infinity() << std::flush;
if (ind < (actually_used_indicators.size() - 1))
out << "\n" << thin_delimiter;
out << std::endl;
......
......@@ -14,8 +14,9 @@
#include <string>
#include <iostream>
#include <dune/common/dynvector.hh>
#include <dune/xt/common/exceptions.hh>
#include <dune/xt/la/container/common.hh>
namespace Dune {
namespace XT {
......@@ -30,11 +31,11 @@ public:
virtual std::string identifier() const = 0;
virtual LA::CommonDenseVector<double> compute_reference_indicators() const = 0;
virtual DynamicVector<double> compute_reference_indicators() const = 0;
virtual std::vector<std::string> provided_indicators() const = 0;
virtual LA::CommonDenseVector<double> compute_indicators(const std::string type) const = 0;
virtual DynamicVector<double> compute_indicators(const std::string type) const = 0;
std::vector<std::string> used_indicators() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment