Merge pull request #26 from andlaus/dune_to_opm

change namespace from 'Dune' to 'Opm'
This commit is contained in:
Bård Skaflestad 2013-02-05 07:39:36 -08:00
commit 64e6952c9a
71 changed files with 211 additions and 209 deletions

View File

@ -3,7 +3,7 @@
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
SUBDIRS = m4 dune doc examples
SUBDIRS = m4 opm doc examples
if BUILD_DOCS
# TODO: set up documentation tree automatically

View File

@ -13,7 +13,7 @@ AM_INIT_AUTOMAKE
#
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([dune/upscaling/SinglePhaseUpscaler.hpp])
AC_CONFIG_SRCDIR([opm/upscaling/SinglePhaseUpscaler.hpp])
AM_CONFIG_HEADER([config.h])
@ -36,10 +36,10 @@ AC_CONFIG_FILES([
doc/Makefile
doc/doxygen/Makefile
doc/doxygen/Doxyfile
dune/Makefile
dune/upscaling/Makefile
dune/elasticity/Makefile
dune/upscaling/test/Makefile
opm/Makefile
opm/upscaling/Makefile
opm/elasticity/Makefile
opm/upscaling/test/Makefile
opm-upscaling.pc
examples/Makefile
])

View File

@ -41,7 +41,7 @@ upscale_cond_SOURCES = upscale_cond.cpp
upscale_elasticity_SOURCES = upscale_elasticity.cpp
upscale_elasticity_CXXFLAGS = ${OPENMP_CXXFLAGS}
upscale_elasticity_LDADD = \
$(top_srcdir)/dune/elasticity/libelasticityupscale.la \
$(top_srcdir)/opm/elasticity/libelasticityupscale.la \
$(LDADD)
upscale_perm_SOURCES = upscale_perm.cpp

View File

@ -21,9 +21,9 @@
#include <opm/core/utility/have_boost_redef.hpp>
#include <opm/core/eclipse/CornerpointChopper.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/core/utility/Units.hpp>
#include <boost/random/mersenne_twister.hpp>
@ -222,17 +222,17 @@ int main(int argc, char** argv)
gen.seed(userseed);
}
Dune::SinglePhaseUpscaler::BoundaryConditionType bctype = Dune::SinglePhaseUpscaler::Fixed;
Opm::SinglePhaseUpscaler::BoundaryConditionType bctype = Opm::SinglePhaseUpscaler::Fixed;
bool isFixed, isPeriodic;
isFixed = isPeriodic = false;
if (upscale) {
if (bc == "fixed") {
isFixed = true;
bctype = Dune::SinglePhaseUpscaler::Fixed;
bctype = Opm::SinglePhaseUpscaler::Fixed;
}
else if (bc == "periodic") {
isPeriodic = true;
bctype = Dune::SinglePhaseUpscaler::Periodic;
bctype = Opm::SinglePhaseUpscaler::Periodic;
}
else {
std::cout << "Boundary condition type (bc=" << bc << ") not allowed." << std::endl;
@ -295,12 +295,12 @@ int main(int argc, char** argv)
if (upscale) {
Opm::EclipseGridParser subparser = ch.subparser();
subparser.convertToSI();
Dune::SinglePhaseUpscaler upscaler;
Opm::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, bctype, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
Dune::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
Opm::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
upscaled_K *= (1.0/(Opm::prefix::milli*Opm::unit::darcy));
@ -320,7 +320,7 @@ int main(int argc, char** argv)
Opm::EclipseGridParser subparser = ch.subparser();
std::vector<double> perms = subparser.getFloatingPointValue("PERMX");
subparser.convertToSI();
Dune::SinglePhaseUpscaler upscaler;
Opm::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, bctype, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
std::vector<int> satnums = subparser.getIntegerValue("SATNUM");

View File

@ -22,8 +22,8 @@
#include <opm/core/eclipse/CornerpointChopper.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/core/utility/Units.hpp>
#include <boost/random/mersenne_twister.hpp>
@ -156,11 +156,11 @@ int main(int argc, char** argv)
if (upscale) {
Opm::EclipseGridParser subparser = ch.subparser();
subparser.convertToSI();
Dune::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, Dune::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
Opm::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, Opm::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
Dune::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
Opm::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
upscaled_K *= (1.0/(Opm::prefix::milli*Opm::unit::darcy));

View File

@ -39,8 +39,8 @@
#include <opm/core/eclipse/CornerpointChopper.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/eclipse/EclipseGridInspector.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/core/utility/Units.hpp>
#include <ios>
@ -161,11 +161,11 @@ int main(int argc, char** argv)
try {
Opm::EclipseGridParser subparser = ch.subparser();
subparser.convertToSI(); // Because the upscaler expects SI units.
Dune::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, Dune::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
Opm::SinglePhaseUpscaler upscaler;
upscaler.init(subparser, Opm::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
Dune::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
Opm::SinglePhaseUpscaler::permtensor_t upscaled_K = upscaler.upscaleSinglePhase();
upscaled_K *= (1.0/(Opm::prefix::milli*Opm::unit::darcy));
poro.push_back(upscaler.upscalePorosity());
permx.push_back(upscaled_K(0,0));

View File

@ -34,8 +34,8 @@
#include <opm/core/utility/have_boost_redef.hpp>
#include <opm/core/eclipse/CornerpointChopper.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/core/utility/Units.hpp>
#include <boost/random/mersenne_twister.hpp>
@ -168,10 +168,10 @@ int main(int argc, char** argv)
Opm::EclipseGridParser subparser_1 = ch.subparser();
subparser_1.convertToSI();
Dune::SinglePhaseUpscaler upscaler_1;
upscaler_1.init(subparser_1, Dune::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
Opm::SinglePhaseUpscaler upscaler_1;
upscaler_1.init(subparser_1, Opm::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
Dune::SinglePhaseUpscaler::permtensor_t upscaled_K_1 = upscaler_1.upscaleSinglePhase();
Opm::SinglePhaseUpscaler::permtensor_t upscaled_K_1 = upscaler_1.upscaleSinglePhase();
upscaled_K_1 *= (1.0/(Opm::prefix::milli*Opm::unit::darcy));
double porosity_1 = upscaler_1.upscalePorosity();
@ -192,10 +192,10 @@ int main(int argc, char** argv)
Opm::EclipseGridParser subparser_2 = ch.subparser();
subparser_2.convertToSI();
Dune::SinglePhaseUpscaler upscaler_2;
upscaler_2.init(subparser_2, Dune::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
Opm::SinglePhaseUpscaler upscaler_2;
upscaler_2.init(subparser_2, Opm::SinglePhaseUpscaler::Fixed, minpermSI, z_tolerance,
residual_tolerance, linsolver_verbosity, linsolver_type, false);
Dune::SinglePhaseUpscaler::permtensor_t upscaled_K_2 = upscaler_2.upscaleSinglePhase();
Opm::SinglePhaseUpscaler::permtensor_t upscaled_K_2 = upscaler_2.upscaleSinglePhase();
upscaled_K_2 *= (1.0/(Opm::prefix::milli*Opm::unit::darcy));
double porosity_2 = upscaler_2.upscalePorosity();

View File

@ -36,8 +36,8 @@
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/eclipse/CornerpointChopper.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/core/utility/Units.hpp>

View File

@ -52,9 +52,9 @@
#include <numeric> // for std::accumulate
#include <sys/utsname.h>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
using namespace Dune;
using namespace Opm;
using namespace std;
void usage() {
@ -243,7 +243,7 @@ int main(int varnum, char** vararg) {
}
const std::vector<int>& ecl_idx = upscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
size_t cell_idx = ecl_idx[c->index()];

View File

@ -67,9 +67,9 @@
#include <sys/utsname.h>
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
using namespace Dune;
using namespace Opm;
using namespace std;
/**
@ -427,7 +427,7 @@ int main(int varnum, char** vararg)
double Sworvolume = 0;
const std::vector<int>& ecl_idx = upscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
unsigned int cell_idx = ecl_idx[c->index()];
if (satnums[cell_idx] > 0) { // Satnum zero is "no rock"

View File

@ -68,9 +68,9 @@
#endif
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
using namespace Dune;
using namespace Opm;
using namespace std;
@ -529,7 +529,7 @@ int main(int varnum, char** vararg)
double Swirvolume = 0;
double Sworvolume = 0;
const std::vector<int>& ecl_idx = upscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
size_t cell_idx = ecl_idx[c->index()];
if (satnums[cell_idx] > 0) { // Satnum zero is "no rock"
@ -723,7 +723,7 @@ int main(int varnum, char** vararg)
}
double waterVolume = 0.0;
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
size_t cell_idx = ecl_idx[c->index()];
// for (size_t cell_idx = 0; cell_idx < satnums.size(); ++cell_idx) {
@ -852,7 +852,7 @@ int main(int varnum, char** vararg)
// capillary pressure:
waterVolumeLF = 0.0;
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
size_t cell_idx = ecl_idx[c->index()];
// for (size_t cell_idx = 0; cell_idx < satnums.size(); ++cell_idx) {

View File

@ -27,8 +27,8 @@
#include <omp.h>
#endif
#include <dune/elasticity/elasticity_upscale.hpp>
#include <dune/elasticity/matrixops.hpp>
#include <opm/elasticity/elasticity_upscale.hpp>
#include <opm/elasticity/matrixops.hpp>
//! \brief Display the available command line parameters

View File

@ -54,7 +54,7 @@
#include <ctime>
#include <sys/utsname.h>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <dune/common/mpihelper.hh>
using namespace std;
@ -177,7 +177,7 @@ int upscale(int varnum, char** vararg) {
cout << endl;
// Storage for upscaled results:
using Dune::SinglePhaseUpscaler;
using Opm::SinglePhaseUpscaler;
typedef SinglePhaseUpscaler::permtensor_t Matrix;
Matrix Kfixed, Klinear, Kperiodic;

View File

@ -76,9 +76,9 @@
#endif
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
using namespace Dune;
using namespace Opm;
using namespace std;
@ -1062,7 +1062,7 @@ int main(int varnum, char** vararg)
double Sworvolume = 0;
// cell_idx is the eclipse index.
const std::vector<int>& ecl_idx = upscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
unsigned int cell_idx = ecl_idx[c->index()];
if (satnums[cell_idx] > 0) { // Satnum zero is "no rock"

View File

@ -86,9 +86,9 @@
#endif
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
using namespace Dune;
using namespace Opm;
using namespace std;
/**
@ -864,7 +864,7 @@ int main(int varnum, char** vararg)
// Loop through all cells. Add the cells porevolume to the corresponding rock type volume
// Also determine bounds for fractional flow ratio
const std::vector<int>& ecl_idx = upscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = upscaler.grid().leafbegin<0>();
for (; c != upscaler.grid().leafend<0>(); ++c) {
unsigned int cell_idx = ecl_idx[c->index()];
if (satnums[cell_idx] > 0) { // Satnum zero is "no rock"

View File

@ -37,14 +37,14 @@
//#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <dune/upscaling/SteadyStateUpscalerManagerImplicit.hpp>
#include <dune/porsol/euler/EulerUpstreamImplicit.hpp>
#include <dune/porsol/common/SimulatorTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <opm/upscaling/SteadyStateUpscalerManagerImplicit.hpp>
#include <opm/porsol/euler/EulerUpstreamImplicit.hpp>
#include <opm/porsol/common/SimulatorTraits.hpp>
#include <opm/core/utility/MonotCubicInterpolator.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <sys/utsname.h>
namespace Dune{
namespace Opm{
template <class IsotropyPolicy>
struct Implicit
{
@ -63,7 +63,7 @@ namespace Dune{
};
typedef SimulatorTraits<Isotropic, Implicit> UpscalingTraitsBasicImplicit;
}
using namespace Dune;
using namespace Opm;
void usage()
{
@ -196,7 +196,7 @@ int main(int argc, char** argv)
int linsolver_smooth_steps = param.getDefault("linsolver_smooth_steps", 2);
double linsolver_prolongate_factor = param.getDefault("linsolver_prolongate_factor", 1.6);
std::string bc=param.getDefault<std::string>("bc","fixed");
double gravity = param.getDefault("gravity", 0);
//double gravity = param.getDefault("gravity", 0);
double surfaceTension = param.getDefault("surfaceTension", 11);
int num_sats = param.getDefault("num_sats", 10);
int num_pdrops = param.getDefault("num_pdrops", 10);
@ -273,8 +273,8 @@ int main(int argc, char** argv)
<< "the number of rock types in grid(" << num_rock_types_grid << ")." << std::endl;
usageandexit();
}
Dune::SinglePhaseUpscaler spupscaler; // needed to access porosities and cell volumes
spupscaler.init(eclparser, Dune::SinglePhaseUpscaler::Fixed,
Opm::SinglePhaseUpscaler spupscaler; // needed to access porosities and cell volumes
spupscaler.init(eclparser, Opm::SinglePhaseUpscaler::Fixed,
0.0,0.0, linsolver_tolerance, linsolver_verbosity, linsolver_type, false, linsolver_maxit,
linsolver_prolongate_factor, linsolver_smooth_steps);
std::vector<double> cellPoreVolumes;
@ -283,7 +283,7 @@ int main(int argc, char** argv)
double sworvolume = 0.0;
// cell_idx is the eclipse index.
const std::vector<int>& ecl_idx = spupscaler.grid().globalCell();
CpGrid::Codim<0>::LeafIterator c = spupscaler.grid().leafbegin<0>();
Dune::CpGrid::Codim<0>::LeafIterator c = spupscaler.grid().leafbegin<0>();
for (; c != spupscaler.grid().leafend<0>(); ++c) {
unsigned int cell_idx = ecl_idx[c->index()];
if (satnums[cell_idx] > 0) { // Satnum zero is "no rock"

View File

@ -13,6 +13,6 @@ AC_DEFUN([OPM_UPSCALING_CHECKS])
# not by opm-upscaling itself
AC_DEFUN([OPM_UPSCALING_CHECK_MODULE],
[
DUNE_CHECK_MODULES([opm-upscaling],
[upscaling/SinglePhaseUpscaler.hpp])
OPM_PORSOL_CHECK_MODULES([opm-upscaling],
[opm/upscaling/SinglePhaseUpscaler.hpp])
])

View File

@ -16,9 +16,9 @@
#include <dune/common/fmatrix.hh>
#include <dune/istl/bvector.hh>
#include <dune/common/fvector.hh>
#include <dune/elasticity/logutils.hpp>
#include <dune/elasticity/mpc.hh>
#include <dune/elasticity/matrixops.hpp>
#include <opm/elasticity/logutils.hpp>
#include <opm/elasticity/mpc.hh>
#include <opm/elasticity/matrixops.hpp>
#include <iostream>

View File

@ -127,7 +127,7 @@ extern void DGEEV_FORTRAN(const char* jobvl, const char* jobvr, const long
} // end extern C
#endif
namespace Dune {
namespace Opm {
namespace DynamicMatrixHelp {
@ -148,5 +148,5 @@ void eigenValuesNonsymLapackCall(
} // end namespace FMatrixHelp
} // end namespace Dune
} // end namespace Opm
#endif

View File

@ -3,7 +3,7 @@
#include <dune/common/dynmatrix.hh>
namespace Dune {
namespace Opm {
namespace DynamicMatrixHelp {
@ -15,8 +15,8 @@ extern void eigenValuesNonsymLapackCall(
const long int* lwork, const long int* info);
template <typename K, class C>
static void eigenValuesNonSym(const DynamicMatrix<K>& matrix,
DynamicVector<C>& eigenValues)
static void eigenValuesNonSym(const Dune::DynamicMatrix<K>& matrix,
Dune::DynamicVector<C>& eigenValues)
{
{
const long int N = matrix.rows();
@ -53,7 +53,7 @@ static void eigenValuesNonSym(const DynamicMatrix<K>& matrix,
if( info != 0 )
{
std::cerr << "For matrix " << matrix << " eigenvalue calculation failed! " << std::endl;
DUNE_THROW(InvalidStateException,"eigenValues: Eigenvalue calculation failed!");
DUNE_THROW(Dune::InvalidStateException,"eigenValues: Eigenvalue calculation failed!");
}
for (int i=0;i<N;++i)
eigenValues[i] = std::complex<double>(eigenR[i], eigenI[i]);

View File

@ -19,21 +19,21 @@
#include <dune/istl/ilu.hh>
#include <dune/istl/solvers.hh>
#include <dune/istl/preconditioners.hh>
#include <dune/elasticity/seqlu.hpp>
#include <opm/elasticity/seqlu.hpp>
#include <dune/grid/CpGrid.hpp>
#include <dune/elasticity/shapefunctions.hpp>
#include <opm/elasticity/shapefunctions.hpp>
#include <dune/elasticity/asmhandler.hpp>
#include <dune/elasticity/boundarygrid.hh>
#include <dune/elasticity/elasticity.hpp>
#include <dune/elasticity/logutils.hpp>
#include <dune/elasticity/materials.hh>
#include <dune/elasticity/mpc.hh>
#include <dune/elasticity/mortar_schur.hpp>
#include <dune/elasticity/mortar_utils.hpp>
#include <dune/elasticity/mortar_evaluator.hpp>
#include <dune/elasticity/mortar_schur_precond.hpp>
#include <dune/elasticity/uzawa_solver.hpp>
#include <opm/elasticity/asmhandler.hpp>
#include <opm/elasticity/boundarygrid.hh>
#include <opm/elasticity/elasticity.hpp>
#include <opm/elasticity/logutils.hpp>
#include <opm/elasticity/materials.hh>
#include <opm/elasticity/mpc.hh>
#include <opm/elasticity/mortar_schur.hpp>
#include <opm/elasticity/mortar_utils.hpp>
#include <opm/elasticity/mortar_evaluator.hpp>
#include <opm/elasticity/mortar_schur_precond.hpp>
#include <opm/elasticity/uzawa_solver.hpp>
#include <dune/istl/paamg/amg.hh>

View File

@ -127,7 +127,7 @@ extern void DGEEV_FORTRAN(const char* jobvl, const char* jobvr, const long
} // end extern C
#endif
namespace Dune {
namespace Opm {
namespace FMatrixHelp {
@ -148,5 +148,5 @@ void eigenValuesNonsymLapackCall(
} // end namespace FMatrixHelp
} // end namespace Dune
} // end namespace Opm
#endif

View File

@ -1,7 +1,7 @@
#ifndef DUNE_FMATRIXEIGENVALUES_EXT_HH
#define DUNE_FMATRIXEIGENVALUES_EXT_HH
namespace Dune {
namespace Opm {
namespace FMatrixHelp {
@ -14,7 +14,7 @@ extern void eigenValuesNonsymLapackCall(
template <int dim, typename K, class C>
static void eigenValuesNonSym(const FieldMatrix<K, dim, dim>& matrix,
FieldVector<C, dim>& eigenValues)
Dune::FieldVector<C, dim>& eigenValues)
{
{
const long int N = dim ;
@ -54,7 +54,7 @@ static void eigenValuesNonSym(const FieldMatrix<K, dim, dim>& matrix,
if( info != 0 )
{
std::cerr << "For matrix " << matrix << " eigenvalue calculation failed! " << std::endl;
DUNE_THROW(InvalidStateException,"eigenValues: Eigenvalue calculation failed!");
DUNE_THROW(Dune::InvalidStateException,"eigenValues: Eigenvalue calculation failed!");
}
for (int i=0;i<N;++i) {
eigenValues[i].real = eigenR[i];

View File

@ -10,6 +10,7 @@
//!
//==============================================================================
#include "config.h"
#include "material.hh"
#include "materials.hh"
#include <fstream>
@ -133,7 +134,7 @@ Material* Material::create(int ID, const std::string& file)
E = p1;
nu = p2;
} else {
std::cerr << "Could not parse rock file " << file << ", bailing" << std::endl
std::cerr << "Could not parse rock file " << file << ", bailing" << std::endl;
exit(1);
}

View File

@ -10,6 +10,7 @@
//!
//==============================================================================
#include "config.h"
#include "materials.hh"
#include <string.h>

View File

@ -13,8 +13,8 @@
#define MORTAR_EVALUATOR_HPP_
#include <dune/istl/matrixmatrix.hh>
#include <dune/elasticity/matrixops.hpp>
#include <dune/elasticity/mortar_utils.hpp>
#include <opm/elasticity/matrixops.hpp>
#include <opm/elasticity/mortar_utils.hpp>
namespace Opm {
namespace Elasticity {

View File

@ -13,8 +13,8 @@
#define MORTAR_SCHUR_HPP_
#include <dune/istl/matrixmatrix.hh>
#include <dune/elasticity/applier.hpp>
#include <dune/elasticity/matrixops.hpp>
#include <opm/elasticity/applier.hpp>
#include <opm/elasticity/matrixops.hpp>
namespace Opm {
namespace Elasticity {

View File

@ -14,8 +14,8 @@
#include <dune/istl/preconditioners.hh>
#include <dune/istl/matrixmatrix.hh>
#include <dune/elasticity/matrixops.hpp>
#include <dune/elasticity/mortar_utils.hpp>
#include <opm/elasticity/matrixops.hpp>
#include <opm/elasticity/mortar_utils.hpp>
namespace Opm {
namespace Elasticity {

View File

@ -368,7 +368,7 @@ protected:
A[n-1][n-2] = (n-1.0)/(2.0*n-1.0);
Dune::DynamicVector<std::complex<double> > eigenValues(n);
Dune::DynamicMatrixHelp::eigenValuesNonSym(A, eigenValues);
Opm::DynamicMatrixHelp::eigenValuesNonSym(A, eigenValues);
std::vector<double> result(n);
for (int i=0; i < n; ++i)

View File

@ -3,7 +3,7 @@
SUBDIRS = test
upscalingdir = $(includedir)/dune/upscaling
upscalingdir = $(includedir)/opm/upscaling
upscaling_HEADERS = SinglePhaseUpscaler.hpp \
SteadyStateUpscaler.hpp SteadyStateUpscaler_impl.hpp

View File

@ -33,14 +33,14 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_SINGLEPHASEUPSCALER_HEADER
#define OPENRS_SINGLEPHASEUPSCALER_HEADER
#ifndef OPM_SINGLEPHASEUPSCALER_HEADER
#define OPM_SINGLEPHASEUPSCALER_HEADER
#include <dune/upscaling/UpscalingTraits.hpp>
#include <dune/upscaling/UpscalerBase.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/UpscalerBase.hpp>
namespace Dune
namespace Opm
{
/**
@ -52,7 +52,7 @@ namespace Dune
};
} // namespace Dune
} // namespace Opm
#endif // OPENRS_SINGLEPHASEUPSCALER_HEADER
#endif // OPM_SINGLEPHASEUPSCALER_HEADER

View File

@ -33,15 +33,15 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALER_HEADER
#define OPENRS_STEADYSTATEUPSCALER_HEADER
#ifndef OPM_STEADYSTATEUPSCALER_HEADER
#define OPM_STEADYSTATEUPSCALER_HEADER
#include <dune/upscaling/UpscalerBase.hpp>
#include <dune/porsol/euler/EulerUpstream.hpp>
#include <dune/porsol/euler/ImplicitCapillarity.hpp>
#include <opm/upscaling/UpscalerBase.hpp>
#include <opm/porsol/euler/EulerUpstream.hpp>
#include <opm/porsol/euler/ImplicitCapillarity.hpp>
#include <boost/array.hpp>
namespace Dune
namespace Opm
{
/**
@brief A class for doing steady state upscaling.
@ -117,9 +117,9 @@ namespace Dune
TransportSolver transport_solver_;
};
} // namespace Dune
} // namespace Opm
#include "SteadyStateUpscaler_impl.hpp"
#endif // OPENRS_STEADYSTATEUPSCALER_HEADER
#endif // OPM_STEADYSTATEUPSCALER_HEADER

View File

@ -33,16 +33,16 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALERIMPLICIT_HEADER
#define OPENRS_STEADYSTATEUPSCALERIMPLICIT_HEADER
#ifndef OPM_STEADYSTATEUPSCALERIMPLICIT_HEADER
#define OPM_STEADYSTATEUPSCALERIMPLICIT_HEADER
#include <dune/upscaling/UpscalerBase.hpp>
#include <dune/porsol/euler/EulerUpstream.hpp>
#include <dune/porsol/euler/ImplicitCapillarity.hpp>
#include <opm/upscaling/UpscalerBase.hpp>
#include <opm/porsol/euler/EulerUpstream.hpp>
#include <opm/porsol/euler/ImplicitCapillarity.hpp>
#include <opm/core/GridAdapter.hpp>
#include <boost/array.hpp>
namespace Dune
namespace Opm
{
/**
@brief A class for doing steady state upscaling.
@ -130,9 +130,9 @@ namespace Dune
GridAdapter grid_adapter_;
};
} // namespace Dune
} // namespace Opm
#include "SteadyStateUpscalerImplicit_impl.hpp"
#endif // OPENRS_STEADYSTATEUPSCALERIMPLICIT_HEADER
#endif // OPM_STEADYSTATEUPSCALERIMPLICIT_HEADER

View File

@ -33,21 +33,21 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER
#define OPENRS_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER
#ifndef OPM_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER
#define OPM_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER
#include <boost/lexical_cast.hpp>
#include <dune/porsol/common/MatrixInverse.hpp>
#include <dune/porsol/common/SimulatorUtilities.hpp>
#include <dune/porsol/common/ReservoirPropertyFixedMobility.hpp>
#include <dune/porsol/euler/MatchSaturatedVolumeFunctor.hpp>
#include <opm/porsol/common/MatrixInverse.hpp>
#include <opm/porsol/common/SimulatorUtilities.hpp>
#include <opm/porsol/common/ReservoirPropertyFixedMobility.hpp>
#include <opm/porsol/euler/MatchSaturatedVolumeFunctor.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/core/utility/writeECLData.hpp>
#include <opm/core/utility/miscUtilities.hpp>
#include <algorithm>
namespace Dune
namespace Opm
{
@ -156,7 +156,7 @@ namespace Dune
std::vector<double> src(num_cells, 0.0);
Opm::SparseVector<double> injection(num_cells);
// Gravity.
FieldVector<double, 3> gravity(0.0);
Dune::FieldVector<double, 3> gravity(0.0);
if (use_gravity_) {
gravity[2] = Opm::unit::gravity;
}
@ -457,7 +457,7 @@ namespace Dune
} // namespace Dune
} // namespace Opm
#endif // OPENRS_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER
#endif // OPM_STEADYSTATEUPSCALERIMPLICIT_IMPL_HEADER

View File

@ -33,12 +33,12 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALERMANAGER_HEADER
#define OPENRS_STEADYSTATEUPSCALERMANAGER_HEADER
#ifndef OPM_STEADYSTATEUPSCALERMANAGER_HEADER
#define OPM_STEADYSTATEUPSCALERMANAGER_HEADER
#include <dune/upscaling/SteadyStateUpscaler.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscaler.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/core/utility/SparseTable.hpp>
#include <cmath>
@ -46,7 +46,7 @@
#include <iostream>
namespace Dune
namespace Opm
{
@ -245,6 +245,6 @@ namespace Dune
} // namespace Dune
} // namespace Opm
#endif // OPENRS_STEADYSTATEUPSCALERMANAGER_HEADER
#endif // OPM_STEADYSTATEUPSCALERMANAGER_HEADER

View File

@ -33,12 +33,12 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALERMANAGERIMPLICIT_HEADER
#define OPENRS_STEADYSTATEUPSCALERMANAGERIMPLICIT_HEADER
#ifndef OPM_STEADYSTATEUPSCALERMANAGERIMPLICIT_HEADER
#define OPM_STEADYSTATEUPSCALERMANAGERIMPLICIT_HEADER
#include <dune/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/core/utility/SparseTable.hpp>
#include <cmath>
@ -46,7 +46,7 @@
#include <iostream>
namespace Dune
namespace Opm
{
@ -279,6 +279,6 @@ namespace Dune
} // namespace Dune
} // namespace Opm
#endif // OPENRS_STEADYSTATEUPSCALERMANAGER_HEADER
#endif // OPM_STEADYSTATEUPSCALERMANAGER_HEADER

View File

@ -33,18 +33,18 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_STEADYSTATEUPSCALER_IMPL_HEADER
#define OPENRS_STEADYSTATEUPSCALER_IMPL_HEADER
#ifndef OPM_STEADYSTATEUPSCALER_IMPL_HEADER
#define OPM_STEADYSTATEUPSCALER_IMPL_HEADER
#include <boost/lexical_cast.hpp>
#include <dune/porsol/common/MatrixInverse.hpp>
#include <dune/porsol/common/SimulatorUtilities.hpp>
#include <dune/porsol/common/ReservoirPropertyFixedMobility.hpp>
#include <opm/porsol/common/MatrixInverse.hpp>
#include <opm/porsol/common/SimulatorUtilities.hpp>
#include <opm/porsol/common/ReservoirPropertyFixedMobility.hpp>
#include <opm/core/utility/Units.hpp>
#include <algorithm>
namespace Dune
namespace Opm
{
@ -142,7 +142,7 @@ namespace Dune
std::vector<double> src(num_cells, 0.0);
Opm::SparseVector<double> injection(num_cells);
// Gravity.
FieldVector<double, 3> gravity(0.0);
Dune::FieldVector<double, 3> gravity(0.0);
if (use_gravity_) {
gravity[2] = Opm::unit::gravity;
}
@ -384,7 +384,7 @@ namespace Dune
} // namespace Dune
} // namespace Opm
#endif // OPENRS_STEADYSTATEUPSCALER_IMPL_HEADER
#endif // OPM_STEADYSTATEUPSCALER_IMPL_HEADER

View File

@ -32,17 +32,17 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_UPSCALERBASE_HEADER
#define OPENRS_UPSCALERBASE_HEADER
#ifndef OPM_UPSCALERBASE_HEADER
#define OPM_UPSCALERBASE_HEADER
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <dune/grid/CpGrid.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <dune/porsol/common/GridInterfaceEuler.hpp>
#include <dune/porsol/common/BoundaryConditions.hpp>
#include <opm/porsol/common/GridInterfaceEuler.hpp>
#include <opm/porsol/common/BoundaryConditions.hpp>
namespace Dune
namespace Opm
{
/**
@brief A base class for upscaling.
@ -54,7 +54,7 @@ namespace Dune
protected:
public:
// ------- Typedefs -------
typedef CpGrid GridType;
typedef Dune::CpGrid GridType;
enum { Dimension = GridType::dimension };
typedef GridInterfaceEuler<GridType> GridInterface;
typedef typename Traits::template ResProp<Dimension>::Type ResProp;
@ -146,11 +146,11 @@ namespace Dune
FlowSolver flow_solver_;
};
} // namespace Dune
} // namespace Opm
#include "UpscalerBase_impl.hpp"
#endif // OPENRS_UPSCALERBASE_HEADER
#endif // OPM_UPSCALERBASE_HEADER

View File

@ -32,14 +32,14 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_UPSCALERBASE_IMPL_HEADER
#define OPENRS_UPSCALERBASE_IMPL_HEADER
#ifndef OPM_UPSCALERBASE_IMPL_HEADER
#define OPM_UPSCALERBASE_IMPL_HEADER
#include <dune/porsol/common/setupGridAndProps.hpp>
#include <dune/porsol/common/setupBoundaryConditions.hpp>
#include <dune/porsol/common/ReservoirPropertyTracerFluid.hpp>
#include <opm/porsol/common/setupGridAndProps.hpp>
#include <opm/porsol/common/setupBoundaryConditions.hpp>
#include <opm/porsol/common/ReservoirPropertyTracerFluid.hpp>
namespace Dune
namespace Opm
{
template <class Traits>
@ -227,7 +227,7 @@ namespace Dune
// Just water.
std::vector<double> sat(num_cells, 1.0);
// Gravity.
FieldVector<double, 3> gravity(0.0);
Dune::FieldVector<double, 3> gravity(0.0);
// gravity[2] = -Dune::unit::gravity;
permtensor_t upscaled_K(3, 3, (double*)0);
@ -383,8 +383,8 @@ namespace Dune
} // namespace Dune
} // namespace Opm
#endif // OPENRS_UPSCALERBASE_IMPL_HEADER
#endif // OPM_UPSCALERBASE_IMPL_HEADER

View File

@ -32,18 +32,18 @@
along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENRS_UPSCALINGTRAITS_HEADER
#define OPENRS_UPSCALINGTRAITS_HEADER
#ifndef OPM_UPSCALINGTRAITS_HEADER
#define OPM_UPSCALINGTRAITS_HEADER
#include <dune/porsol/common/SimulatorTraits.hpp>
#include <opm/porsol/common/SimulatorTraits.hpp>
namespace Dune
namespace Opm
{
typedef SimulatorTraits<Isotropic, Explicit> UpscalingTraitsBasic;
//typedef SimulatorTraits<Isotropic, Implicit> UpscalingTraitsBasicImplicit;
typedef SimulatorTraits<Anisotropic, Explicit> UpscalingTraitsAnisoRelperm;
} // namespace Dune
} // namespace Opm
#endif // OPENRS_UPSCALINGTRAITS_HEADER
#endif // OPM_UPSCALINGTRAITS_HEADER

View File

@ -38,10 +38,10 @@
#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerManager.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
using namespace Dune;
using namespace Opm;
int main(int argc, char** argv)
{

View File

@ -38,10 +38,10 @@
//#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerManager.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
using namespace Dune;
using namespace Opm;
int main(int argc, char** argv)
{

View File

@ -38,10 +38,10 @@
#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerManager.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
using namespace Dune;
using namespace Opm;
int main(int argc, char** argv)
{

View File

@ -25,12 +25,12 @@
#include <opm/core/utility/have_boost_redef.hpp>
#include <dune/upscaling/UpscalerBase.hpp>
#include <opm/upscaling/UpscalerBase.hpp>
#include <opm/core/utility/Units.hpp>
#include <dune/porsol/common/SimulatorTraits.hpp>
#include <dune/porsol/mimetic/IfshInterface.hpp>
#include <opm/porsol/common/SimulatorTraits.hpp>
#include <opm/porsol/mimetic/IfshInterface.hpp>
using namespace Dune;
using namespace Opm;
using namespace Opm::prefix;
using namespace Opm::unit;

View File

@ -39,10 +39,10 @@
//#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerManager.hpp>
#include <dune/upscaling/UpscalingTraits.hpp>
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
#include <opm/upscaling/UpscalingTraits.hpp>
using namespace Dune;
using namespace Opm;
int main(int argc, char** argv)
{

View File

@ -38,12 +38,12 @@
//#define VERBOSE
#include <dune/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <dune/upscaling/SteadyStateUpscalerManagerImplicit.hpp>
//#include <dune/upscaling/UpscalingTraits.hpp>
#include <dune/porsol/euler/EulerUpstreamImplicit.hpp>
#include <dune/porsol/common/SimulatorTraits.hpp>
namespace Dune{
#include <opm/upscaling/SteadyStateUpscalerImplicit.hpp>
#include <opm/upscaling/SteadyStateUpscalerManagerImplicit.hpp>
//#include <opm/upscaling/UpscalingTraits.hpp>
#include <opm/porsol/euler/EulerUpstreamImplicit.hpp>
#include <opm/porsol/common/SimulatorTraits.hpp>
namespace Opm{
template <class IsotropyPolicy>
struct Implicit
{
@ -62,7 +62,7 @@ namespace Dune{
};
typedef SimulatorTraits<Isotropic, Implicit> UpscalingTraitsBasicImplicit;
}
using namespace Dune;
using namespace Opm;
int main(int argc, char** argv)
{

View File

@ -39,10 +39,10 @@
#include <opm/core/utility/have_boost_redef.hpp>
#include <dune/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
#include <opm/core/utility/Units.hpp>
using namespace Dune;
using namespace Opm;
using namespace Opm::prefix;
using namespace Opm::unit;