Merge branch 'master' into reorder_tof
This commit is contained in:
commit
69cc72eec9
72
README
72
README
@ -35,33 +35,85 @@ regularly run on Mac OS X. No efforts have been made to ensure that
|
||||
the code will compile and run on windows platforms.
|
||||
|
||||
|
||||
DEPENDENCIES FOR DEBIAN BASED DISTRIBUTIONS (Debian Squeeze/Ubuntu Precise)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
# packages necessary for building
|
||||
sudo apt-get install -y build-essential gfortran pkg-config libtool \
|
||||
automake autoconf
|
||||
|
||||
# packages necessary for documentation
|
||||
sudo apt-get install -y doxygen ghostscript texlive-latex-recommended pgf
|
||||
|
||||
# packages necessary for version control
|
||||
sudo apt-get install -y git-core git-svn subversion
|
||||
|
||||
# libraries necessary for DUNE
|
||||
sudo apt-get install -y libboost-all-dev libsuperlu3-dev libsuitesparse-dev
|
||||
|
||||
# libraries necessary for OPM
|
||||
sudo apt-get install -y libxml0-dev
|
||||
|
||||
|
||||
DEPENDENCIES FOR SUSE BASED DISTRIBUTIONS
|
||||
-----------------------------------------
|
||||
|
||||
# libraries
|
||||
sudo zypper install blas libblas3 lapack liblapack3 libboost libxml2 umfpack
|
||||
|
||||
# tools
|
||||
sudo zypper install gcc automake autoconf git doxygen
|
||||
|
||||
|
||||
RETRIEVING AND BUILDING DUNE PREREQUISITES
|
||||
------------------------------------------
|
||||
|
||||
(only necessary if you want to use opm-core as a dune module)
|
||||
|
||||
# trust DUNE certificate (sic)
|
||||
echo p | svn list https://svn.dune-project.org/svn/dune-common
|
||||
|
||||
# checkout DUNE libraries
|
||||
for module in common istl geometry grid localfunctions; do
|
||||
git svn clone -s \
|
||||
https://svn.dune-project.org/svn/dune-$module/branches/release-2.2/ \
|
||||
dune-$module
|
||||
done
|
||||
|
||||
# building DUNE libraries
|
||||
for module in common istl geometry grid localfunctions; do
|
||||
env CCACHE_DISABLE=1 dune-common/bin/dunecontrol --only=dune-$module \
|
||||
--configure-opts="--enable-fieldvector-size-is-method" \
|
||||
--make-opts="-j -l 0.8" autogen : configure : make
|
||||
done
|
||||
|
||||
|
||||
DOWNLOADING
|
||||
-----------
|
||||
|
||||
For a read-only download:
|
||||
git clone git://github.com/OPM/opm-core.git
|
||||
|
||||
If you want to contribute, fork OPM/opm-core on github.
|
||||
|
||||
|
||||
BUILDING
|
||||
--------
|
||||
|
||||
(standalone opm-core:)
|
||||
|
||||
cd ../opm-core
|
||||
autoreconf -i
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
(using opm-core as a dune module:)
|
||||
|
||||
DEPENDENCIES FOR DEBIAN BASED DISTRIBUTIONS
|
||||
-------------------------------------------
|
||||
# note: this is done from the parent directory of opm-core
|
||||
env CCACHE_DISABLE=1 dune-common/bin/dunecontrol --only=opm-core \
|
||||
--configure-opts="" --make-opts="-j -l 0.8" autogen : configure : make
|
||||
|
||||
(to be updated)
|
||||
|
||||
|
||||
DEPENDENCIES FOR SUSE BASED DISTRIBUTIONS
|
||||
-----------------------------------------
|
||||
|
||||
blas libblas3 lapack liblapack3 libboost libxml2 gcc automake autoconf
|
||||
git doxygen umfpack
|
||||
|
||||
|
||||
DOCUMENTATION
|
||||
|
@ -277,9 +277,9 @@ main(int argc, char** argv)
|
||||
rep.report(std::cout);
|
||||
|
||||
if (output) {
|
||||
std::string filename = output_dir + "/walltime.param";
|
||||
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
|
||||
rep.reportParam(tot_os);
|
||||
std::string filename = output_dir + "/walltime.param";
|
||||
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
|
||||
rep.reportParam(tot_os);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -504,13 +504,13 @@ namespace Opm
|
||||
cq.phasemobf = &face_phasemob_[0];
|
||||
cq.voldiscr = &cell_voldisc_[0];
|
||||
int was_adjusted = 0;
|
||||
if (rock_comp_props_ == NULL || !rock_comp_props_->isActive()) {
|
||||
was_adjusted =
|
||||
if (! (rock_comp_props_ && rock_comp_props_->isActive())) {
|
||||
was_adjusted =
|
||||
cfs_tpfa_res_assemble(gg, dt, &forces, z, &cq, &trans_[0],
|
||||
&face_gravcap_[0], cell_press, well_bhp,
|
||||
&porevol_[0], h_);
|
||||
} else {
|
||||
was_adjusted =
|
||||
was_adjusted =
|
||||
cfs_tpfa_res_comprock_assemble(gg, dt, &forces, z, &cq, &trans_[0],
|
||||
&face_gravcap_[0], cell_press, well_bhp,
|
||||
&porevol_[0], &initial_porevol_[0],
|
||||
|
@ -61,7 +61,7 @@ namespace Opm
|
||||
/// and completions does not change during the
|
||||
/// run. However, controls (only) are allowed
|
||||
/// to change.
|
||||
CompressibleTpfa(const UnstructuredGrid& grid,
|
||||
CompressibleTpfa(const UnstructuredGrid& grid,
|
||||
const BlackoilPropertiesInterface& props,
|
||||
const RockCompressibility* rock_comp_props,
|
||||
const LinearSolverInterface& linsolver,
|
||||
@ -71,8 +71,8 @@ namespace Opm
|
||||
const double* gravity,
|
||||
const Wells* wells);
|
||||
|
||||
/// Destructor.
|
||||
~CompressibleTpfa();
|
||||
/// Destructor.
|
||||
~CompressibleTpfa();
|
||||
|
||||
/// Solve the pressure equation by Newton-Raphson scheme.
|
||||
/// May throw an exception if the number of iterations
|
||||
@ -112,11 +112,11 @@ namespace Opm
|
||||
void solveIncrement();
|
||||
double residualNorm() const;
|
||||
double incrementNorm() const;
|
||||
void computeResults(BlackoilState& state,
|
||||
void computeResults(BlackoilState& state,
|
||||
WellState& well_state) const;
|
||||
|
||||
// ------ Data that will remain unmodified after construction. ------
|
||||
const UnstructuredGrid& grid_;
|
||||
const UnstructuredGrid& grid_;
|
||||
const BlackoilPropertiesInterface& props_;
|
||||
const RockCompressibility* rock_comp_props_;
|
||||
const LinearSolverInterface& linsolver_;
|
||||
@ -125,12 +125,12 @@ namespace Opm
|
||||
const int maxiter_;
|
||||
const double* gravity_; // May be NULL
|
||||
const Wells* wells_; // May be NULL, outside may modify controls (only) between calls to solve().
|
||||
std::vector<double> htrans_;
|
||||
std::vector<double> trans_ ;
|
||||
std::vector<double> htrans_;
|
||||
std::vector<double> trans_ ;
|
||||
std::vector<int> allcells_;
|
||||
|
||||
// ------ Internal data for the cfs_tpfa_res solver. ------
|
||||
struct cfs_tpfa_res_data* h_;
|
||||
struct cfs_tpfa_res_data* h_;
|
||||
|
||||
// ------ Data that will be modified for every solve. ------
|
||||
std::vector<double> wellperf_gpot_;
|
||||
|
@ -96,7 +96,7 @@ namespace Opm
|
||||
props_.viscosity(props_.numCells(), pressure, NULL, &allcells_[0], &visc_[0], NULL);
|
||||
props_.matrix(props_.numCells(), pressure, NULL, &allcells_[0], &A_[0], NULL);
|
||||
|
||||
// Check non-miscibility requirement (only done for first cell).
|
||||
// Check immiscibility requirement (only done for first cell).
|
||||
if (A_[1] != 0.0 || A_[2] != 0.0) {
|
||||
THROW("TransportModelCompressibleTwophase requires a property object without miscibility.");
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace Opm
|
||||
std::vector<double>& saturation);
|
||||
|
||||
//// Return the number of iterations used by the reordering solver.
|
||||
//// \param[out] vector of iteration per cell
|
||||
//// \return vector of iteration per cell
|
||||
const std::vector<int>& getReorderIterations() const;
|
||||
|
||||
private:
|
||||
|
@ -243,9 +243,9 @@ namespace Opm
|
||||
// matrix data.
|
||||
std::fill(surfacevol, surfacevol + n*np, 0.0);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
for (int row = 0; row < np; ++row) {
|
||||
for (int col = 0; col < np; ++col) {
|
||||
surfacevol[i*np + row] += A[i*np*np + row*np + col] * saturation[i*np + col];
|
||||
for (int col = 0; col < np; ++col) {
|
||||
for (int row = 0; row < np; ++row) {
|
||||
surfacevol[i*np + row] += A[i*np*np + row + col*np] * saturation[i*np + col];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user