Now library contents build. Headers and tests not done yet.
This commit is contained in:
parent
7e90e732d9
commit
81b58a0acf
12
Makefile.am
12
Makefile.am
@ -7,6 +7,17 @@ SUBDIRS = . tests examples
|
||||
lib_LTLIBRARIES = libopmcore.la
|
||||
|
||||
libopmcore_la_SOURCES = \
|
||||
opm/core/eclipse/EclipseGridInspector.cpp \
|
||||
opm/core/eclipse/EclipseGridParser.cpp \
|
||||
opm/core/utility/MonotCubicInterpolator.cpp \
|
||||
opm/core/utility/parameters/Parameter.cpp \
|
||||
opm/core/utility/parameters/ParameterGroup.cpp \
|
||||
opm/core/utility/parameters/ParameterTools.cpp \
|
||||
opm/core/utility/parameters/ParameterXML.cpp \
|
||||
opm/core/utility/parameters/tinyxml/tinystr.cpp \
|
||||
opm/core/utility/parameters/tinyxml/tinyxml.cpp \
|
||||
opm/core/utility/parameters/tinyxml/tinyxmlerror.cpp \
|
||||
opm/core/utility/parameters/tinyxml/tinyxmlparser.cpp \
|
||||
opm/core/utility/cart_grid.c \
|
||||
opm/core/utility/cpgpreprocess/geometry.c \
|
||||
opm/core/utility/cpgpreprocess/preprocess.c \
|
||||
@ -15,6 +26,7 @@ opm/core/utility/cpgpreprocess/cgridinterface.c \
|
||||
opm/core/utility/cpgpreprocess/sparsetable.c \
|
||||
opm/core/utility/cpgpreprocess/facetopology.c \
|
||||
opm/core/utility/cpgpreprocess/uniquepoints.c \
|
||||
opm/core/utility/StopWatch.cpp \
|
||||
opm/core/linalg/sparse_sys.c \
|
||||
opm/core/pressure/cfsh.c \
|
||||
opm/core/pressure/flow_bc.c \
|
||||
|
@ -20,8 +20,8 @@
|
||||
#ifndef OPM_CORNERPOINTCHOPPER_HEADER_INCLUDED
|
||||
#define OPM_CORNERPOINTCHOPPER_HEADER_INCLUDED
|
||||
|
||||
#include <dune/common/EclipseGridParser.hpp>
|
||||
#include <dune/common/param/ParameterGroup.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||
#include <opm/core/eclipse/param/ParameterGroup.hpp>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
@ -42,9 +42,9 @@
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
#include <algorithm>
|
||||
#include <dune/common/EclipseGridInspector.hpp>
|
||||
#include <dune/common/EclipseGridParser.hpp>
|
||||
#include <dune/common/SpecialEclipseFields.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridInspector.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||
#include <opm/core/eclipse/SpecialEclipseFields.hpp>
|
||||
|
||||
namespace Dune
|
||||
{
|
||||
@ -100,7 +100,7 @@ std::pair<double,double> EclipseGridInspector::cellDips(int i, int j, int k) con
|
||||
}
|
||||
|
||||
// Pick ZCORN-value for all 8 corners of the given cell
|
||||
boost::array<double, 8> cellz = cellZvals(i, j, k);
|
||||
std::tr1::array<double, 8> cellz = cellZvals(i, j, k);
|
||||
|
||||
// Compute rise in positive x-direction for all four edges (and then find mean)
|
||||
// Current implementation is for regularly placed and vertical pillars!
|
||||
@ -125,7 +125,7 @@ std::pair<double,double> EclipseGridInspector::cellDips(int i, int j, int k) con
|
||||
// don't follow an overall dip for the model if it exists.
|
||||
int x_edges = 4;
|
||||
int y_edges = 4;
|
||||
boost::array<double, 6> gridlimits = getGridLimits();
|
||||
std::tr1::array<double, 6> gridlimits = getGridLimits();
|
||||
double zmin = gridlimits[4];
|
||||
double zmax = gridlimits[5];
|
||||
// LLL -> HLL
|
||||
@ -169,11 +169,11 @@ std::pair<double,double> EclipseGridInspector::cellDips(int i, int j, int k) con
|
||||
*/
|
||||
std::pair<double,double> EclipseGridInspector::cellDips(int cell_idx) const
|
||||
{
|
||||
boost::array<int, 3> idxs = cellIdxToLogicalCoords(cell_idx);
|
||||
std::tr1::array<int, 3> idxs = cellIdxToLogicalCoords(cell_idx);
|
||||
return cellDips(idxs[0], idxs[1], idxs[2]);
|
||||
}
|
||||
|
||||
boost::array<int, 3> EclipseGridInspector::cellIdxToLogicalCoords(int cell_idx) const
|
||||
std::tr1::array<int, 3> EclipseGridInspector::cellIdxToLogicalCoords(int cell_idx) const
|
||||
{
|
||||
|
||||
int i,j,k; // Position of cell in cell hierarchy
|
||||
@ -188,8 +188,8 @@ boost::array<int, 3> EclipseGridInspector::cellIdxToLogicalCoords(int cell_idx)
|
||||
j = (horIdx-i)/logical_gridsize_[0]+1;
|
||||
k = ((cell_idx+1)-logical_gridsize_[0]*(j-1)-1)/(logical_gridsize_[0]*logical_gridsize_[1])+1;
|
||||
|
||||
boost::array<int, 3> a = {{i-1, j-1, k-1}};
|
||||
return a; //boost::array<int, 3> {{i-1, j-1, k-1}};
|
||||
std::tr1::array<int, 3> a = {{i-1, j-1, k-1}};
|
||||
return a; //std::tr1::array<int, 3> {{i-1, j-1, k-1}};
|
||||
}
|
||||
|
||||
double EclipseGridInspector::cellVolumeVerticalPillars(int i, int j, int k) const
|
||||
@ -242,7 +242,7 @@ double EclipseGridInspector::cellVolumeVerticalPillars(int i, int j, int k) cons
|
||||
|
||||
double EclipseGridInspector::cellVolumeVerticalPillars(int cell_idx) const
|
||||
{
|
||||
boost::array<int, 3> idxs = cellIdxToLogicalCoords(cell_idx);
|
||||
std::tr1::array<int, 3> idxs = cellIdxToLogicalCoords(cell_idx);
|
||||
return cellVolumeVerticalPillars(idxs[0], idxs[1], idxs[2]);
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ void EclipseGridInspector::checkLogicalCoords(int i, int j, int k) const
|
||||
}
|
||||
|
||||
|
||||
boost::array<double, 6> EclipseGridInspector::getGridLimits() const
|
||||
std::tr1::array<double, 6> EclipseGridInspector::getGridLimits() const
|
||||
{
|
||||
if (! (parser_.hasField("COORD") && parser_.hasField("ZCORN") && parser_.hasField("SPECGRID")) ) {
|
||||
throw std::runtime_error("EclipseGridInspector: Grid does not have SPECGRID, COORD, and ZCORN, can't find dimensions.");
|
||||
@ -293,7 +293,7 @@ boost::array<double, 6> EclipseGridInspector::getGridLimits() const
|
||||
ymin = coord[pillarindex * 6 + 4];
|
||||
}
|
||||
|
||||
boost::array<double, 6> gridlimits = {{ xmin, xmax, ymin, ymax,
|
||||
std::tr1::array<double, 6> gridlimits = {{ xmin, xmax, ymin, ymax,
|
||||
*min_element(zcorn.begin(), zcorn.end()),
|
||||
*max_element(zcorn.begin(), zcorn.end()) }};
|
||||
return gridlimits;
|
||||
@ -301,16 +301,16 @@ boost::array<double, 6> EclipseGridInspector::getGridLimits() const
|
||||
|
||||
|
||||
|
||||
boost::array<int, 3> EclipseGridInspector::gridSize() const
|
||||
std::tr1::array<int, 3> EclipseGridInspector::gridSize() const
|
||||
{
|
||||
boost::array<int, 3> retval = {{ logical_gridsize_[0],
|
||||
std::tr1::array<int, 3> retval = {{ logical_gridsize_[0],
|
||||
logical_gridsize_[1],
|
||||
logical_gridsize_[2] }};
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
boost::array<double, 8> EclipseGridInspector::cellZvals(int i, int j, int k) const
|
||||
std::tr1::array<double, 8> EclipseGridInspector::cellZvals(int i, int j, int k) const
|
||||
{
|
||||
// Get the zcorn field.
|
||||
const std::vector<double>& z = parser_.getFloatingPointValue("ZCORN");
|
||||
@ -324,7 +324,7 @@ boost::array<double, 8> EclipseGridInspector::cellZvals(int i, int j, int k) con
|
||||
2*logical_gridsize_[0],
|
||||
4*logical_gridsize_[0]*logical_gridsize_[1] };
|
||||
int ix = 2*(i*delta[0] + j*delta[1] + k*delta[2]);
|
||||
boost::array<double, 8> cellz = {{ z[ix], z[ix + delta[0]],
|
||||
std::tr1::array<double, 8> cellz = {{ z[ix], z[ix + delta[0]],
|
||||
z[ix + delta[1]], z[ix + delta[1] + delta[0]],
|
||||
z[ix + delta[2]], z[ix + delta[2] + delta[0]],
|
||||
z[ix + delta[2] + delta[1]], z[ix + delta[2] + delta[1] + delta[0]] }};
|
||||
|
@ -36,7 +36,7 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define SINTEF_ECLIPSEGRIDINSPECTOR_HEADER
|
||||
|
||||
#include <vector>
|
||||
#include <boost/array.hpp>
|
||||
#include <tr1/array>
|
||||
|
||||
|
||||
namespace Dune
|
||||
@ -76,22 +76,22 @@ public:
|
||||
std::pair<double,double> cellDips(int cell_idx) const;
|
||||
|
||||
// Convert global cell index to logical ijk-coordinates
|
||||
boost::array<int, 3> cellIdxToLogicalCoords(int cell_idx) const;
|
||||
std::tr1::array<int, 3> cellIdxToLogicalCoords(int cell_idx) const;
|
||||
|
||||
/// Returns a vector with the outer limits of grid (in the grid's unit).
|
||||
/// The vector contains [xmin, xmax, ymin, ymax, zmin, zmax], as
|
||||
/// read from COORDS and ZCORN
|
||||
boost::array<double, 6> getGridLimits() const;
|
||||
std::tr1::array<double, 6> getGridLimits() const;
|
||||
|
||||
/// Returns the extent of the logical cartesian grid
|
||||
/// as number of cells in the (i, j, k) directions.
|
||||
boost::array<int, 3> gridSize() const;
|
||||
std::tr1::array<int, 3> gridSize() const;
|
||||
|
||||
/// Returns the eight z-values associated with a given cell.
|
||||
/// The ordering is such that i runs fastest. That is, with
|
||||
/// L = low and H = high:
|
||||
/// {LLL, HLL, LHL, HHL, LLH, HLH, LHH, HHH }.
|
||||
boost::array<double, 8> cellZvals(int i, int j, int k) const;
|
||||
std::tr1::array<double, 8> cellZvals(int i, int j, int k) const;
|
||||
|
||||
private:
|
||||
const EclipseGridParser& parser_;
|
||||
|
@ -42,12 +42,12 @@
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
#include "EclipseGridParser.hpp"
|
||||
#include "EclipseGridParserHelpers.hpp"
|
||||
#include "SpecialEclipseFields.hpp"
|
||||
#include <dune/common/ErrorMacros.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridParserHelpers.hpp>
|
||||
#include <opm/core/eclipse/SpecialEclipseFields.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <dune/common/Units.hpp>
|
||||
#include <opm/core/utility/Units.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -41,9 +41,9 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <tr1/memory>
|
||||
#include <dune/common/SpecialEclipseFields.hpp>
|
||||
#include <dune/common/EclipseUnits.hpp>
|
||||
#include <dune/common/Factory.hpp>
|
||||
#include <opm/core/eclipse/SpecialEclipseFields.hpp>
|
||||
#include <opm/core/eclipse/EclipseUnits.hpp>
|
||||
#include <opm/core/utility/Factory.hpp>
|
||||
|
||||
namespace Dune
|
||||
{
|
||||
|
@ -40,8 +40,8 @@
|
||||
#include <string>
|
||||
#include <istream>
|
||||
#include <vector>
|
||||
#include <dune/common/ErrorMacros.hpp>
|
||||
#include <dune/common/linInt.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <opm/core/utility/linInt.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
|
||||
namespace Dune
|
||||
|
@ -40,9 +40,9 @@
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
#include <dune/common/ErrorMacros.hpp>
|
||||
#include <dune/common/EclipseGridParserHelpers.hpp>
|
||||
#include <dune/common/EclipseUnits.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <opm/core/eclipse/EclipseGridParserHelpers.hpp>
|
||||
#include <opm/core/eclipse/EclipseUnits.hpp>
|
||||
|
||||
namespace Dune
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
SUBDIRS = tinyxml . test
|
||||
|
||||
paramdir = $(includedir)/dune/common/param
|
||||
paramdir = $(includedir)/opm/core/utility/parameters/param
|
||||
|
||||
param_HEADERS = Parameter.hpp ParameterGroup.hpp ParameterGroup_impl.hpp \
|
||||
ParameterMapItem.hpp ParameterRequirement.hpp \
|
||||
|
@ -37,7 +37,7 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <string>
|
||||
#include <dune/common/param/Parameter.hpp>
|
||||
#include <opm/core/utility/parameters/Parameter.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
|
@ -39,8 +39,8 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <dune/common/param/ParameterMapItem.hpp>
|
||||
#include <dune/common/param/ParameterStrings.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterMapItem.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterStrings.hpp>
|
||||
|
||||
namespace Dune {
|
||||
/// See ParameterGroup.hpp for how to use the parameter system
|
||||
|
@ -36,17 +36,17 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <dune/common/param/ParameterGroup.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include <dune/common/param/Parameter.hpp>
|
||||
#include <dune/common/param/ParameterStrings.hpp>
|
||||
#include <dune/common/param/ParameterTools.hpp>
|
||||
#include <dune/common/param/ParameterXML.hpp>
|
||||
#include <opm/core/utility/parameters/Parameter.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterStrings.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterTools.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterXML.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
|
@ -42,8 +42,8 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <vector>
|
||||
#include <tr1/memory>
|
||||
|
||||
#include <dune/common/param/ParameterMapItem.hpp>
|
||||
#include <dune/common/param/ParameterRequirement.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterMapItem.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterRequirement.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
@ -287,6 +287,6 @@ namespace Dune {
|
||||
} // namespace parameter
|
||||
} // namespace Dune
|
||||
|
||||
#include <dune/common/param/ParameterGroup_impl.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup_impl.hpp>
|
||||
|
||||
#endif // OPENRS_PARAMETERGROUP_HEADER
|
||||
|
@ -39,11 +39,9 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//#include "TermColors.hpp" // from utils
|
||||
|
||||
#include <dune/common/param/ParameterStrings.hpp>
|
||||
#include <dune/common/param/ParameterTools.hpp>
|
||||
#include <dune/common/param/Parameter.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterStrings.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterTools.hpp>
|
||||
#include <opm/core/utility/parameters/Parameter.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
|
@ -36,8 +36,8 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <dune/common/param/ParameterTools.hpp>
|
||||
#include <dune/common/param/ParameterStrings.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterTools.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterStrings.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
|
@ -36,9 +36,9 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <dune/common/param/ParameterXML.hpp>
|
||||
#include <dune/common/param/Parameter.hpp>
|
||||
#include <dune/common/param/ParameterStrings.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterXML.hpp>
|
||||
#include <opm/core/utility/parameters/Parameter.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterStrings.hpp>
|
||||
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
@ -46,7 +46,7 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
|
||||
#include <dune/common/param/tinyxml/tinyxml.h>
|
||||
#include <opm/core/utility/parameters/tinyxml/tinyxml.h>
|
||||
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef OPENRS_PARAMETERXML_HEADER
|
||||
#define OPENRS_PARAMETERXML_HEADER
|
||||
|
||||
#include <dune/common/param/ParameterGroup.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
|
||||
namespace Dune {
|
||||
namespace parameter {
|
||||
|
Loading…
Reference in New Issue
Block a user