Commit Graph

3888 Commits

Author SHA1 Message Date
Roland Kaufmann
6f32b92f6c Renamed away extraneous verbosity in filenames 2013-11-25 14:14:47 +01:00
Roland Kaufmann
36dfc1db52 Assume positive rate for injectors, negative producers
The rate that is written to the file is always (if the flow is natural)
a positive value; for producers we flip the sign before writing.
2013-11-25 14:14:47 +01:00
Roland Kaufmann
c630220e6f Reorder loops to resemble future processing
We will look at the presence of keywords first, and then for each
keyword determine which wells it applies to.
2013-11-25 14:14:47 +01:00
Roland Kaufmann
441fd2825b Masquerade the actual output format with an interface
Using an interface allows us to code the simulator to just pass the
necessary state variables to something which implements this, and
then the user can select the actual output format with configuration
values. This allows us to set new formats without having to change
the code being compiled (for instance, we can have a special debug
"format" which prints out things of interest in each timestep)
2013-11-25 14:14:47 +01:00
Roland Kaufmann
992572c522 Don't rely on implicit inclusion 2013-11-25 14:14:47 +01:00
Roland Kaufmann
8a2fb74f0d Document limitations of type parameter for getValue 2013-11-25 14:14:46 +01:00
Roland Kaufmann
b53e9b952b Copy between arrays instead of function call
By getting a pointer directly into the data store, the copy can be
performed faster than calling a function for every item. Also, the
storage type of the array should now match the C++ one exactly (i.e.
no conversion to float).
2013-11-25 14:14:46 +01:00
Roland Kaufmann
d8db1acc75 Active cell flag is integral, not floating point type 2013-11-25 14:14:46 +01:00
Roland Kaufmann
82ed3dcd72 Refactor common constructor code into a function
GCC 4.4 doesn't handle calling another constructor in the same type.
(Allowed in C++11 but not supported in GCC 4.4's --std=c++0x mode)
2013-11-25 14:14:46 +01:00
Roland Kaufmann
cb14ee7ce8 Provide default (move) constructors and operators
C++11 will write a default move constructor that invoke the same in
the base class. However, GCC 4.4 doesn't support this, so we have to
explicitly give the implementation that would be generated on later
compilers.
2013-11-25 14:14:46 +01:00
Roland Kaufmann
74ed3d54c0 Avoid comparing signed and unsigned integers 2013-11-25 14:14:46 +01:00
Roland Kaufmann
4a6e502869 Use integer for counter and cast to enumeration 2013-11-25 14:14:46 +01:00
Roland Kaufmann
2b1ad42b9e Hide internals in its own namespace
If we put them in the anonymous namespace, then we cannot have a
reference to the types in the header (because that would mean different
things in each compilation unit).
2013-11-25 14:14:46 +01:00
Roland Kaufmann
351043f76e Explicitly mention template parameter for base class
GCC 4.4 doesn't understand that EclipseHandle (without template
parameter) is supposed to refer to the base class and not a field.
2013-11-25 14:14:46 +01:00
Roland Kaufmann
1a0b6f0eb6 Eliminate dependency on UnstructuredGrid
The only thing it was needed for was the number of cells in the grid,
and the Cartesian dimensions, and those are already available from other
structures.
2013-11-25 14:14:46 +01:00
Roland Kaufmann
9dc4df625f Correct parameter sequence
ecl_grid_alloc_GRDECL_kw takes zcorn first, then coord (slightly
unintuitive if you ask me), and this is also the order that is used
in EclipseGrid::make; thus, the order should be consistent through
the constructor also.
2013-11-25 14:14:45 +01:00
Roland Kaufmann
5a914a2852 Initialize writer with directories gotten from params 2013-11-25 14:14:45 +01:00
Roland Kaufmann
98a36189d3 Conditionally use input file
If config.h is written, then the build system will also define
HAVE_CONFIG_H.
2013-11-25 14:14:45 +01:00
Roland Kaufmann
cdc45b2d56 Trim needless header includes 2013-11-25 14:14:45 +01:00
Roland Kaufmann
1cda556cb9 Remove dependency on ERT in header 2013-11-25 14:14:45 +01:00
Roland Kaufmann
5ce5975586 Coalesce called methods into init and timestep 2013-11-25 14:14:45 +01:00
Roland Kaufmann
572123675d Updated copyright statement at top 2013-11-25 14:14:45 +01:00
Roland Kaufmann
92fd082630 Remove now unused member holding starting time
If we restart from a later time, then the SimulatorTimer should be
restarted in that state as well, so it is already always a reflection
of how far we've progressed in the input file's schedule.
2013-11-25 14:14:45 +01:00
Roland Kaufmann
f637a0cea9 Replace summary variables with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
cf8c58a33d Replace restart and solution handling with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
b0a4881d45 Replace init setup with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
3b8d42ca02 Make grid writing part of the grid type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
2ae164a878 Replace grid construction with RAII type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
97b0dcc3ac Centralize all time conversion
Remove duplicate code into a common helper function
2013-11-25 14:14:44 +01:00
Roland Kaufmann
f845163a0b Replace file name handling with RAII type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
fa03df1e8b Replace data series handling with RAII type
The EclipseKeyword class takes care of cleaning up the handle after we
are done using it, and provides several convenience constructors that
make the code read easier.
2013-11-25 14:14:44 +01:00
Roland Kaufmann
7d7470d36b Add generic version of getXxxValue
This allows us to call getIntegerValue/getFloatingPointValue from
generic code where the type to be used is a template parameter.
2013-11-25 14:14:44 +01:00
Bård Skaflestad
1467a16a34 Merge pull request #439 from andlaus/fix_configure_syntax_error
fix syntax error in configure shell script
2013-11-25 03:52:30 -08:00
Bård Skaflestad
aa9117cf02 Merge pull request #420 from rolk/420_state
Refactor BlackoilState and TwophaseState to have a common interface for writing
2013-11-25 03:30:38 -08:00
Bård Skaflestad
6c56cff450 Merge pull request #436 from rolk/436_searchdir
Search in build/ sub-dir if only suite root is given
2013-11-25 02:29:41 -08:00
Andreas Lauser
c1fc5c53c6 fix syntax error in configure shell script
strangly enough, it seems to work like it was in some circumstances...
2013-11-22 18:39:49 +01:00
Roland Kaufmann
3c3e14daed Merge pull request #430 from andlaus/fix_infinite_configure
build system: prevent endless loop when using dunecontrol
2013-11-21 03:07:34 -08:00
Roland Kaufmann
9e54d276bd Only add parent directories for actual variants
Otherwise we'll inadvertedly add the root directory and will probably
find the system implementation underneath there.
2013-11-18 13:19:58 +01:00
Roland Kaufmann
6d433017a4 Only add build sub-directory if it is actually used
Otherwise the search will cascade down one level too many.
2013-11-18 13:19:18 +01:00
Roland Kaufmann
4379ee8da6 Search in build/ sub-dir if only suite root is given
If the package suite was given (e.g. DUNE_ROOT=/blum), then the code
set up the root for each individual package automatically (e.g.
DUNE_COMMON_ROOT=/blum/dune-common), but the path which was then
activated did not get the local build sub-directory (e.g. if we are
building opm-autodiff in /frub/opm-autodiff/build, then the local
build directory is "build/"), and thus this was not appended to the
library search path. The result was that the source was found (because
the root pointed to a valid source tree), but the library was not
(because it is "hidden" in the subdirectory).
2013-11-18 11:21:06 +01:00
Andreas Lauser
58122cc2f5 include the latest review comments by Roland Kaufmann 2013-11-15 13:14:50 +01:00
Atgeirr Flø Rasmussen
1ad84ae3fe Merge pull request #431 from bska/simplify-cpchop-output
CornerPointChopper: Tidy code to output GRDECL format of subsample
2013-11-14 08:36:42 -08:00
Bård Skaflestad
6aacc4f738 Merge pull request #432 from joakim-hove/find-opm-parser
CMAKE: check_cxx_source_compiles() in Findopm-parser to look for Deck.hpp
2013-11-14 08:19:21 -08:00
Joakim Hove
dc27dc1adf Changed the check_cxx_source_compiles() in Findopm-parser to look for Deck.hpp; Parser.hpp had uneccasary complicated interaction with cJSON 2013-11-14 10:20:05 +01:00
Bård Skaflestad
ca5c7bcb6e Remove long-disabled code
The code to condense the output using repeat counts was disabled
long ago (commit fc992da).  If we ever need this feature, we can
bring it back from history or reimplemented in a refined fashion.
2013-11-13 20:41:07 +01:00
Bård Skaflestad
d4b522459a outputField(): Use straight-line code
There is no need to use a nested loop to output a constant number of
items per line.  We only need to output a '\n' rather than a ' '
after every "nl" item output.
2013-11-13 20:37:59 +01:00
Bård Skaflestad
ac4fd4d0cd writeGrdecl(): Use outputField() for COORD and ZCORN
This leverages the "number-of-items-per-line" parameter introduced
in commit 608d4c1.
2013-11-13 20:33:13 +01:00
Bård Skaflestad
608d4c1a11 outputField(): Parametrise number of items per line
This is in preparation of leveraging the outputField() helper for
printing COORD and ZCORN too.
2013-11-13 20:29:47 +01:00
Andreas Lauser
4c1f238fb3 configure script: add a stub implementation for the --config-cache argument
so far, it is only a flag which prevents the cache from being
deleted. To warn the user about a potential infinite loop, a warning
is printed if this flag was specified and some compiler or some compiler
flags were set by the user. This idea was proposed by Roland Kaufmann.
2013-11-13 15:21:39 +01:00
Roland Kaufmann
9bb4941a38 Extract common parts of blackoil and incomp. state
Put the identical parts of the simulator state into a base class that
they can be referenced from when adressing the common fields.
2013-11-13 13:48:28 +01:00