From 85f79c0e846041621ca4df28ec6d7d127fc2d134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 19 Sep 2013 12:53:28 +0200 Subject: [PATCH] Rename AutoDiff::ForwardBlock -> Opm::AutoDiffBlock. Also moved AutoDiffHelpers.hpp content to Opm namespace, and modified other files as required by these two changes. --- examples/sim_simple.cpp | 8 +- examples/test_impestpfa_ad.cpp | 2 - opm/autodiff/AutoDiffBlock.hpp | 110 +++++++++---------- opm/autodiff/AutoDiffHelpers.hpp | 48 ++++---- opm/autodiff/BlackoilPropsAd.hpp | 2 +- opm/autodiff/BlackoilPropsAdFromDeck.hpp | 2 +- opm/autodiff/BlackoilPropsAdInterface.hpp | 2 +- opm/autodiff/FullyImplicitBlackoilSolver.cpp | 15 ++- opm/autodiff/FullyImplicitBlackoilSolver.hpp | 2 +- opm/autodiff/ImpesTPFAAD.cpp | 10 +- opm/autodiff/ImpesTPFAAD.hpp | 2 +- opm/autodiff/TransportSolverTwophaseAd.hpp | 2 +- tests/test_block.cpp | 12 +- tests/test_scalar_mult.cpp | 4 +- tests/test_span.cpp | 2 + 15 files changed, 118 insertions(+), 105 deletions(-) diff --git a/examples/sim_simple.cpp b/examples/sim_simple.cpp index 9ddc29832..b8403b7ef 100644 --- a/examples/sim_simple.cpp +++ b/examples/sim_simple.cpp @@ -111,7 +111,7 @@ fluxFunc(const std::vector& m) int main() try { - typedef AutoDiff::ForwardBlock ADB; + typedef Opm::AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; @@ -148,11 +148,11 @@ try std::cerr << "Opm core " << clock.secsSinceLast() << std::endl; // Define neighbourhood-derived operator matrices. - const HelperOps ops(grid); + const Opm::HelperOps ops(grid); const int num_internal = ops.internal_faces.size(); std::cerr << "Topology matrices " << clock.secsSinceLast() << std::endl; - typedef AutoDiff::ForwardBlock ADB; + typedef Opm::AutoDiffBlock ADB; typedef ADB::V V; // q @@ -248,7 +248,7 @@ try V sw1 = 0.5*V::Ones(nc,1); const V ndp = (ops.ngrad * p1.matrix()).array(); const V dflux = mobtransf * ndp; - const UpwindSelector upwind(grid, ops, dflux); + const Opm::UpwindSelector upwind(grid, ops, dflux); const V pv = Eigen::Map(props.porosity(), nc, 1) * Eigen::Map(grid.cell_volumes, nc, 1); const double dt = 0.0005; diff --git a/examples/test_impestpfa_ad.cpp b/examples/test_impestpfa_ad.cpp index 4179182a2..d0252694d 100644 --- a/examples/test_impestpfa_ad.cpp +++ b/examples/test_impestpfa_ad.cpp @@ -58,8 +58,6 @@ try const Opm::BlackoilPropertiesBasic oldprops(param, 2, nc); const Opm::BlackoilPropsAd props(oldprops); - typedef AutoDiff::ForwardBlock ADB; - Wells* wells = create_wells(2, 2, 5); const double inj_frac[] = { 1.0, 0.0 }; const double prod_frac[] = { 0.0, 0.0 }; diff --git a/opm/autodiff/AutoDiffBlock.hpp b/opm/autodiff/AutoDiffBlock.hpp index f1cd9d86b..ef73bd5a2 100644 --- a/opm/autodiff/AutoDiffBlock.hpp +++ b/opm/autodiff/AutoDiffBlock.hpp @@ -25,11 +25,11 @@ #include #include -namespace AutoDiff +namespace Opm { template - class ForwardBlock + class AutoDiffBlock { public: /// Underlying types for scalar vectors and jacobians. @@ -37,14 +37,14 @@ namespace AutoDiff typedef Eigen::SparseMatrix M; /// Named constructor pattern used here. - static ForwardBlock null() + static AutoDiffBlock null() { V val; std::vector jac; - return ForwardBlock(val, jac); + return AutoDiffBlock(val, jac); } - static ForwardBlock constant(const V& val, const std::vector& blocksizes) + static AutoDiffBlock constant(const V& val, const std::vector& blocksizes) { std::vector jac; const int num_elem = val.size(); @@ -54,10 +54,10 @@ namespace AutoDiff for (int i = 0; i < num_blocks; ++i) { jac[i] = M(num_elem, blocksizes[i]); } - return ForwardBlock(val, jac); + return AutoDiffBlock(val, jac); } - static ForwardBlock variable(const int index, const V& val, const std::vector& blocksizes) + static AutoDiffBlock variable(const int index, const V& val, const std::vector& blocksizes) { std::vector jac; const int num_elem = val.size(); @@ -73,24 +73,24 @@ namespace AutoDiff for (typename M::Index row = 0; row < val.size(); ++row) { jac[index].insert(row, row) = Scalar(1.0); } - return ForwardBlock(val, jac); + return AutoDiffBlock(val, jac); } - static ForwardBlock function(const V& val, const std::vector& jac) + static AutoDiffBlock function(const V& val, const std::vector& jac) { - return ForwardBlock(val, jac); + return AutoDiffBlock(val, jac); } /// Construct a set of primary variables, /// each initialized to a given vector. - static std::vector variables(const std::vector& initial_values) + static std::vector variables(const std::vector& initial_values) { const int num_vars = initial_values.size(); std::vector bpat; for (int v = 0; v < num_vars; ++v) { bpat.push_back(initial_values[v].size()); } - std::vector vars; + std::vector vars; for (int v = 0; v < num_vars; ++v) { vars.emplace_back(variable(v, initial_values[v], bpat)); } @@ -98,7 +98,7 @@ namespace AutoDiff } /// Operator += - ForwardBlock& operator+=(const ForwardBlock& rhs) + AutoDiffBlock& operator+=(const AutoDiffBlock& rhs) { assert (numBlocks() == rhs.numBlocks()); assert (value().size() == rhs.value().size()); @@ -116,7 +116,7 @@ namespace AutoDiff } /// Operator + - ForwardBlock operator+(const ForwardBlock& rhs) const + AutoDiffBlock operator+(const AutoDiffBlock& rhs) const { std::vector jac = jac_; assert(numBlocks() == rhs.numBlocks()); @@ -130,7 +130,7 @@ namespace AutoDiff } /// Operator - - ForwardBlock operator-(const ForwardBlock& rhs) const + AutoDiffBlock operator-(const AutoDiffBlock& rhs) const { std::vector jac = jac_; assert(numBlocks() == rhs.numBlocks()); @@ -144,7 +144,7 @@ namespace AutoDiff } /// Operator * - ForwardBlock operator*(const ForwardBlock& rhs) const + AutoDiffBlock operator*(const AutoDiffBlock& rhs) const { int num_blocks = numBlocks(); std::vector jac(num_blocks); @@ -161,7 +161,7 @@ namespace AutoDiff } /// Operator / - ForwardBlock operator/(const ForwardBlock& rhs) const + AutoDiffBlock operator/(const AutoDiffBlock& rhs) const { int num_blocks = numBlocks(); std::vector jac(num_blocks); @@ -226,8 +226,8 @@ namespace AutoDiff } private: - ForwardBlock(const V& val, - const std::vector& jac) + AutoDiffBlock(const V& val, + const std::vector& jac) : val_(val), jac_(jac) { #ifndef NDEBUG @@ -241,12 +241,12 @@ namespace AutoDiff V val_; std::vector jac_; - }; + }; template Ostream& - operator<<(Ostream& os, const ForwardBlock& fw) + operator<<(Ostream& os, const AutoDiffBlock& fw) { return fw.print(os); } @@ -254,81 +254,81 @@ namespace AutoDiff /// Multiply with sparse matrix from the left. template - ForwardBlock operator*(const typename ForwardBlock::M& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator*(const typename AutoDiffBlock::M& lhs, + const AutoDiffBlock& rhs) { int num_blocks = rhs.numBlocks(); - std::vector::M> jac(num_blocks); + std::vector::M> jac(num_blocks); assert(lhs.cols() == rhs.value().rows()); for (int block = 0; block < num_blocks; ++block) { jac[block] = lhs*rhs.derivative()[block]; } - typename ForwardBlock::V val = lhs*rhs.value().matrix(); - return ForwardBlock::function(val, jac); + typename AutoDiffBlock::V val = lhs*rhs.value().matrix(); + return AutoDiffBlock::function(val, jac); } template - ForwardBlock operator*(const typename ForwardBlock::V& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator*(const typename AutoDiffBlock::V& lhs, + const AutoDiffBlock& rhs) { - return ForwardBlock::constant(lhs, rhs.blockPattern()) * rhs; + return AutoDiffBlock::constant(lhs, rhs.blockPattern()) * rhs; } template - ForwardBlock operator*(const ForwardBlock& lhs, - const typename ForwardBlock::V& rhs) + AutoDiffBlock operator*(const AutoDiffBlock& lhs, + const typename AutoDiffBlock::V& rhs) { return rhs * lhs; // Commutative operation. } template - ForwardBlock operator+(const typename ForwardBlock::V& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator+(const typename AutoDiffBlock::V& lhs, + const AutoDiffBlock& rhs) { - return ForwardBlock::constant(lhs, rhs.blockPattern()) + rhs; + return AutoDiffBlock::constant(lhs, rhs.blockPattern()) + rhs; } template - ForwardBlock operator+(const ForwardBlock& lhs, - const typename ForwardBlock::V& rhs) + AutoDiffBlock operator+(const AutoDiffBlock& lhs, + const typename AutoDiffBlock::V& rhs) { return rhs + lhs; // Commutative operation. } template - ForwardBlock operator-(const typename ForwardBlock::V& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator-(const typename AutoDiffBlock::V& lhs, + const AutoDiffBlock& rhs) { - return ForwardBlock::constant(lhs, rhs.blockPattern()) - rhs; + return AutoDiffBlock::constant(lhs, rhs.blockPattern()) - rhs; } template - ForwardBlock operator-(const ForwardBlock& lhs, - const typename ForwardBlock::V& rhs) + AutoDiffBlock operator-(const AutoDiffBlock& lhs, + const typename AutoDiffBlock::V& rhs) { - return lhs - ForwardBlock::constant(rhs, lhs.blockPattern()); + return lhs - AutoDiffBlock::constant(rhs, lhs.blockPattern()); } template - ForwardBlock operator/(const typename ForwardBlock::V& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator/(const typename AutoDiffBlock::V& lhs, + const AutoDiffBlock& rhs) { - return ForwardBlock::constant(lhs, rhs.blockPattern()) / rhs; + return AutoDiffBlock::constant(lhs, rhs.blockPattern()) / rhs; } template - ForwardBlock operator/(const ForwardBlock& lhs, - const typename ForwardBlock::V& rhs) + AutoDiffBlock operator/(const AutoDiffBlock& lhs, + const typename AutoDiffBlock::V& rhs) { - return lhs / ForwardBlock::constant(rhs, lhs.blockPattern()); + return lhs / AutoDiffBlock::constant(rhs, lhs.blockPattern()); } @@ -340,15 +340,15 @@ namespace AutoDiff * @return The product */ template - ForwardBlock operator*(const ForwardBlock& lhs, - const Scalar& rhs) + AutoDiffBlock operator*(const AutoDiffBlock& lhs, + const Scalar& rhs) { - std::vector< typename ForwardBlock::M > jac; + std::vector< typename AutoDiffBlock::M > jac; jac.reserve( lhs.numBlocks() ); for (int block=0; block::function( lhs.value() * rhs, jac ); + return AutoDiffBlock::function( lhs.value() * rhs, jac ); } @@ -360,14 +360,14 @@ namespace AutoDiff * @return The product */ template - ForwardBlock operator*(const Scalar& lhs, - const ForwardBlock& rhs) + AutoDiffBlock operator*(const Scalar& lhs, + const AutoDiffBlock& rhs) { return rhs * lhs; // Commutative operation. } -} // namespace Autodiff +} // namespace Opm diff --git a/opm/autodiff/AutoDiffHelpers.hpp b/opm/autodiff/AutoDiffHelpers.hpp index 30e4db08c..8959c2c79 100644 --- a/opm/autodiff/AutoDiffHelpers.hpp +++ b/opm/autodiff/AutoDiffHelpers.hpp @@ -26,14 +26,17 @@ #include +namespace Opm +{ + // -------------------- class HelperOps -------------------- /// Contains vectors and sparse matrices that represent subsets or /// operations on (AD or regular) vectors of data. struct HelperOps { - typedef AutoDiff::ForwardBlock::M M; - typedef AutoDiff::ForwardBlock::V V; + typedef AutoDiffBlock::M M; + typedef AutoDiffBlock::V V; /// A list of internal faces. typedef Eigen::Array IFaces; @@ -202,7 +205,7 @@ namespace { template class UpwindSelector { public: - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; UpwindSelector(const UnstructuredGrid& g, const HelperOps& h, @@ -297,11 +300,11 @@ namespace { /// Returns x(indices). template -AutoDiff::ForwardBlock -subset(const AutoDiff::ForwardBlock& x, +AutoDiffBlock +subset(const AutoDiffBlock& x, const IntVec& indices) { - return ::constructSubsetSparseMatrix(x.value().size(), indices) * x; + return constructSubsetSparseMatrix(x.value().size(), indices) * x; } @@ -312,19 +315,19 @@ Eigen::Array subset(const Eigen::Array& x, const IntVec& indices) { - return (::constructSubsetSparseMatrix(x.size(), indices) * x.matrix()).array(); + return (constructSubsetSparseMatrix(x.size(), indices) * x.matrix()).array(); } /// Returns v where v(indices) == x, v(!indices) == 0 and v.size() == n. template -AutoDiff::ForwardBlock -superset(const AutoDiff::ForwardBlock& x, +AutoDiffBlock +superset(const AutoDiffBlock& x, const IntVec& indices, const int n) { - return ::constructSupersetSparseMatrix(n, indices) * x; + return constructSupersetSparseMatrix(n, indices) * x; } @@ -336,7 +339,7 @@ superset(const Eigen::Array& x, const IntVec& indices, const int n) { - return ::constructSupersetSparseMatrix(n, indices) * x.matrix(); + return constructSupersetSparseMatrix(n, indices) * x.matrix(); } @@ -345,10 +348,10 @@ superset(const Eigen::Array& x, /// elements of d on the diagonal. /// Need to mark this as inline since it is defined in a header and not a template. inline -AutoDiff::ForwardBlock::M -spdiag(const AutoDiff::ForwardBlock::V& d) +AutoDiffBlock::M +spdiag(const AutoDiffBlock::V& d) { - typedef AutoDiff::ForwardBlock::M M; + typedef AutoDiffBlock::M M; const int n = d.size(); M mat(n, n); @@ -367,7 +370,7 @@ spdiag(const AutoDiff::ForwardBlock::V& d) template class Selector { public: - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; Selector(const typename ADB::V& selection_basis) { @@ -421,10 +424,10 @@ spdiag(const AutoDiff::ForwardBlock::V& d) /// Returns the input expression, but with all Jacobians collapsed to one. inline -AutoDiff::ForwardBlock -collapseJacs(const AutoDiff::ForwardBlock& x) +AutoDiffBlock +collapseJacs(const AutoDiffBlock& x) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; const int nb = x.numBlocks(); typedef Eigen::Triplet Tri; int nnz = 0; @@ -457,9 +460,9 @@ collapseJacs(const AutoDiff::ForwardBlock& x) /// Returns the vertical concatenation [ x; y ] of the inputs. inline -AutoDiff::ForwardBlock -vertcat(const AutoDiff::ForwardBlock& x, - const AutoDiff::ForwardBlock& y) +AutoDiffBlock +vertcat(const AutoDiffBlock& x, + const AutoDiffBlock& y) { const int nx = x.size(); const int ny = y.size(); @@ -585,4 +588,7 @@ inline Eigen::ArrayXd sign (const Eigen::ArrayXd& x) return retval; } + +} // namespace Opm + #endif // OPM_AUTODIFFHELPERS_HEADER_INCLUDED diff --git a/opm/autodiff/BlackoilPropsAd.hpp b/opm/autodiff/BlackoilPropsAd.hpp index 28696961a..23aaf2159 100644 --- a/opm/autodiff/BlackoilPropsAd.hpp +++ b/opm/autodiff/BlackoilPropsAd.hpp @@ -67,7 +67,7 @@ namespace Opm // Fluid interface // //////////////////////////// - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef std::vector Cells; diff --git a/opm/autodiff/BlackoilPropsAdFromDeck.hpp b/opm/autodiff/BlackoilPropsAdFromDeck.hpp index c14e45788..09d07459e 100644 --- a/opm/autodiff/BlackoilPropsAdFromDeck.hpp +++ b/opm/autodiff/BlackoilPropsAdFromDeck.hpp @@ -75,7 +75,7 @@ namespace Opm // Fluid interface // //////////////////////////// - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef std::vector Cells; diff --git a/opm/autodiff/BlackoilPropsAdInterface.hpp b/opm/autodiff/BlackoilPropsAdInterface.hpp index fb376d1a9..98e63fa77 100644 --- a/opm/autodiff/BlackoilPropsAdInterface.hpp +++ b/opm/autodiff/BlackoilPropsAdInterface.hpp @@ -64,7 +64,7 @@ namespace Opm // Fluid interface // //////////////////////////// - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; typedef std::vector Cells; diff --git a/opm/autodiff/FullyImplicitBlackoilSolver.cpp b/opm/autodiff/FullyImplicitBlackoilSolver.cpp index 974657e90..42bdcdd77 100644 --- a/opm/autodiff/FullyImplicitBlackoilSolver.cpp +++ b/opm/autodiff/FullyImplicitBlackoilSolver.cpp @@ -37,6 +37,7 @@ #include #include +// A debugging utility. #define DUMP(foo) \ do { \ std::cout << "==========================================\n" \ @@ -44,7 +45,11 @@ << collapseJacs(foo) << std::endl; \ } while (0) -typedef AutoDiff::ForwardBlock ADB; + + +namespace Opm { + +typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; typedef Eigen::Array - AutoDiff::ForwardBlock::M + AutoDiffBlock::M gravityOperator(const UnstructuredGrid& grid, const HelperOps& ops , const GeoProps& geo ) @@ -86,8 +91,8 @@ namespace { } } - typedef AutoDiff::ForwardBlock::V V; - typedef AutoDiff::ForwardBlock::M M; + typedef AutoDiffBlock::V V; + typedef AutoDiffBlock::M M; const V& gpot = geo.gravityPotential(); const V& trans = geo.transmissibility(); @@ -182,8 +187,6 @@ namespace { -namespace Opm { - FullyImplicitBlackoilSolver:: FullyImplicitBlackoilSolver(const UnstructuredGrid& grid , diff --git a/opm/autodiff/FullyImplicitBlackoilSolver.hpp b/opm/autodiff/FullyImplicitBlackoilSolver.hpp index a3859f472..a909745cf 100644 --- a/opm/autodiff/FullyImplicitBlackoilSolver.hpp +++ b/opm/autodiff/FullyImplicitBlackoilSolver.hpp @@ -60,7 +60,7 @@ namespace Opm { private: // Types and enums - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; typedef Eigen::Array #include +namespace Opm { // Repeated from inside ImpesTPFAAD for convenience. -typedef AutoDiff::ForwardBlock ADB; +typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; @@ -48,7 +49,7 @@ namespace { } template - AutoDiff::ForwardBlock::M + AutoDiffBlock::M gravityOperator(const UnstructuredGrid& grid, const HelperOps& ops , const GeoProps& geo ) @@ -65,8 +66,8 @@ namespace { } } - typedef AutoDiff::ForwardBlock::V V; - typedef AutoDiff::ForwardBlock::M M; + typedef AutoDiffBlock::V V; + typedef AutoDiffBlock::M M; const V& gpot = geo.gravityPotential(); const V& trans = geo.transmissibility(); @@ -122,7 +123,6 @@ namespace { } // anonymous namespace -namespace Opm { diff --git a/opm/autodiff/ImpesTPFAAD.hpp b/opm/autodiff/ImpesTPFAAD.hpp index 298f0543a..edb2480e3 100644 --- a/opm/autodiff/ImpesTPFAAD.hpp +++ b/opm/autodiff/ImpesTPFAAD.hpp @@ -63,7 +63,7 @@ namespace Opm { ImpesTPFAAD& operator=(const ImpesTPFAAD& rhs); // Types - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; typedef Eigen::Array ADB; + typedef AutoDiffBlock ADB; typedef ADB::V V; typedef ADB::M M; diff --git a/tests/test_block.cpp b/tests/test_block.cpp index c6cb04154..6a8936e3c 100644 --- a/tests/test_block.cpp +++ b/tests/test_block.cpp @@ -32,6 +32,8 @@ #include #include +using namespace Opm; + namespace { template bool @@ -73,7 +75,7 @@ namespace { BOOST_AUTO_TEST_CASE(ConstantInitialisation) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; @@ -92,7 +94,7 @@ BOOST_AUTO_TEST_CASE(ConstantInitialisation) BOOST_AUTO_TEST_CASE(VariableInitialisation) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; @@ -119,7 +121,7 @@ BOOST_AUTO_TEST_CASE(VariableInitialisation) BOOST_AUTO_TEST_CASE(FunctionInitialisation) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; std::vector::size_type num_blocks = blocksizes.size(); @@ -150,7 +152,7 @@ BOOST_AUTO_TEST_CASE(FunctionInitialisation) BOOST_AUTO_TEST_CASE(Addition) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; ADB::V va(3); @@ -195,7 +197,7 @@ BOOST_AUTO_TEST_CASE(Addition) int main() try { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; int num_blocks = blocksizes.size(); ADB::V v1(3); diff --git a/tests/test_scalar_mult.cpp b/tests/test_scalar_mult.cpp index ac2077dce..aa2741aac 100644 --- a/tests/test_scalar_mult.cpp +++ b/tests/test_scalar_mult.cpp @@ -34,9 +34,11 @@ #include +using namespace Opm; + BOOST_AUTO_TEST_CASE(ScalarMultiplication) { - typedef AutoDiff::ForwardBlock ADB; + typedef AutoDiffBlock ADB; std::vector blocksizes = { 3, 1, 2 }; ADB::V vx(3); diff --git a/tests/test_span.cpp b/tests/test_span.cpp index f4d0d8e18..5ddee5695 100644 --- a/tests/test_span.cpp +++ b/tests/test_span.cpp @@ -32,6 +32,8 @@ #include +using namespace Opm; + BOOST_AUTO_TEST_CASE(OneArgConstr) { const int num = 4;