#include #include #include #include #include template Ostream& operator<<(Ostream& os, const std::tr1::array& a) { os << "[ "; std::copy(a.begin(), a.end(), std::ostream_iterator(os, " ")); os << "]"; return os; } template void test_simplefluid2p() { using std::tr1::array; array mu = { {1.0, 1.0} }; array rho = { {0.0, 0.0} }; Opm::SimpleFluid2p fluid(mu, rho); std::cerr << "\\rho = [ " << fluid.density(0) << ", " << fluid.density(1) << " ]\n"; array sl = {{ 1.0, 0.0 }}; array mob; array dmob; fluid.mobility(0, sl, mob, dmob); std::cerr << "s = " << sl << ", m = " << mob << ", dm = " << dmob << '\n'; array sm = {{ 0.5, 0.5 }}; fluid.mobility(0, sm, mob, dmob); std::cerr << "s = " << sm << ", m = " << mob << ", dm = " << dmob << '\n'; array sr = {{ 0.0, 1.0 }}; fluid.mobility(0, sr, mob, dmob); std::cerr << "s = " << sr << ", m = " << mob << ", dm = " << dmob << '\n'; } int main() { std::cerr << "n = 1\n"; test_simplefluid2p<1>(); std::cerr << "n = 2\n"; test_simplefluid2p<2> (); std::cerr << "n = 3\n"; test_simplefluid2p<3>(); return 0; }