Jostein R. Natvig
fdc8af50b6
1) Remove disabled code 2) Restructure code in attempt to improve readability
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
24c4335a9a
Move some code from "process_grdecl" to helper functions, to shorten function-
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
88f59b1a9c
Assert copyright for 2012.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
a740a15d35
Fill faces.neighbors and nodes.coordinates along columns (i.e., unit stride in MATLAB). This means non-unit (but constant, 2 or 3) stride in C whence memory pre-fetching will typically be helpful. The cost is a (large) memory "rewind" operation at the end of each column.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
982c04bcdb
Order cells lexicographically. While here, fix misprint and adjust whitespace.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
51881748d5
Move variable declarations to top of each function. Declare function signatures in the top of each .c file (to avoid warnings).
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
1600f1b4ca
Replace automatic build system with more warnings turned on-
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
e8dd63b5df
Fix a couple of typo's.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
d711a08b55
To bring behavior of processgrid closer to that of processGRDECL, add post-processing to split grid in connected pieces.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
ca0e2600db
Do not check ZCORN monotonicity in inactive cells.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Halvor M. Nilsen
f11772b265
corrected documentation
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Halvor M. Nilsen
1f0b08755c
bska fixed integer overflow in malloc call
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
f2b111f504
Implement new, required field 'G.griddim'.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
5189046528
Separate build script and calling interface for processgrid. This enables simple Matlab postprocessing of output from C-code. This revision adds the 'griddim' field.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
f1ebf2e2cf
Fix stupid typo.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
ba347a9257
GCC 4.4 is perfectly fine. Don't bother using a non-default compiler that might not be available (or differently named) on another system.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
691c3a3b7b
By jrn's blessing, enable the alternative implementation of 'processgrid'. Also remove the existing implementation.
...
While here, assert copyright for 2011.
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Bård Skaflestad
714e052822
Preserve parameter validity status in (nrhs == 2) case.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Bård Skaflestad
d78aae5276
The '.type' is supposed to be a cell array of strings, not a mere string. Update accordingly.
...
While here, infer the '.type' value from the function name rather than
hard-coding 'processgrid'.
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Bård Skaflestad
b23ad048a2
Suggest an alternative implementation of the 'processgrid' function. This, disabled, implementation follows a two-stage allocate+fill algorithm that is slightly easier to control in memory-tight environments. We still have to maintain two copies of the grid, though.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Bård Skaflestad
fbe8157332
Export the cell-face tags (i.e., cells.faces(:,2)) back to M in a manner consistent with the traditional semantics of the grid_structure.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Jostein R. Natvig
a566bc8346
Comment.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:00 +02:00
Bård Skaflestad
ecc86b8c06
Change name of independent makefile to something which does not break
...
dune-<mumble> builds.
2010-08-30 09:10:25 +00:00
Jostein R. Natvig
1d991e26e5
Add alternative interface and makefile that builds library.
2010-08-30 08:37:37 +00:00
Jostein R. Natvig
ad938d1bcb
Whitespace.
2010-08-30 08:36:51 +00:00
Jostein R. Natvig
a2e14eb19d
Add emacs local variables.
2010-08-27 17:12:16 +00:00
Bård Skaflestad
ee9a8fdc59
Implement G.type for OPM processing.
2010-03-18 16:31:10 +00:00
Bård Skaflestad
b3f61acd81
Assert Copyright for 2010 in files missed in OPM -r762.
2010-03-18 15:57:02 +00:00
Jostein R. Natvig
89128edfac
Add hack to reverse sign in ZCORN if ZCORN decrease along pillar.
...
The sign of z-coordinates in the processed grid is restored to ensure
right-handedness in relation between face geometry and face-cell topology.
2010-03-03 06:49:51 +00:00
Jostein R. Natvig
d86ba9ab8d
Add sanity chech of input.
2010-01-15 13:20:25 +00:00
Atgeirr Flø Rasmussen
97718768fd
Changed to ensure a convex combination is taken when points
...
are between pillar extremes. Original code kept in #if 0 block.
2010-01-06 09:22:42 +00:00
Jostein R. Natvig
f795a753ed
Catch up with change in grid structure.
2010-01-05 15:43:59 +00:00
Jostein R. Natvig
d5c900de11
*Change some fields from double to int.
...
*Add copyright.
Lacking functionality to split disconnected grid.
2009-12-16 13:49:14 +00:00
Bård Skaflestad
6b097bf779
Add 'cartDims' field to mex'ed processing.
2009-12-09 09:03:25 +00:00
Bård Skaflestad
e19ff111d0
Expand SVN keywords.
2009-12-01 09:47:13 +00:00
Bård Skaflestad
2ae0fc1532
Re-implement mex building in terms of 'buildmex' function.
2009-12-01 09:46:31 +00:00
Jostein R. Natvig
0e73dd9315
Minor change.
2009-11-26 07:08:44 +00:00
Jostein R. Natvig
f4b0ab8c23
Ensure build mechanism changes back to current directory
...
also when build fails.
2009-11-26 07:06:36 +00:00
Jostein R. Natvig
98ff8ac4f1
Bugfix in mex file. Fixes bug that casued Matlab to crach on
...
second call to procesgrid.
2009-11-26 06:47:19 +00:00
Bård Skaflestad
6fee738652
Use pure C comments only (i.e., /* foo */). C++ type comments (//)
...
yield errors in GCC 4.4 and later. We may consider using C99 mode
though...
2009-11-20 15:36:32 +00:00
Jostein R. Natvig
8d81aa467b
Add field G.cells.facePos to grid struct.
2009-11-19 17:26:07 +00:00
Jostein R. Natvig
0a895e9432
Remove old Matlab files used for debugging. Use new mex gateway
...
function and MRST for testing.
2009-11-19 17:19:23 +00:00
Jostein R. Natvig
01fe4d35e0
Add extra error checks.
2009-11-19 17:16:53 +00:00
Jostein R. Natvig
6c4f2e525c
Matlab frontend, documentation and build instruction for
...
processgrid mex script.
This interface allows users of the Matlab Reservoir
Simulation Toolbox (MRST) to use the OPM corner point
grid processing in MRST. This represent a significant speedup
over the native Matlab grid processing already avaliable in
MRST.
2009-11-19 17:15:09 +00:00
Jostein R. Natvig
5f6544fe73
Use mexopts.sh to control which compiler to use when building Matlab
...
mex script processgrid.c.
2009-11-19 17:10:47 +00:00
Jostein R. Natvig
23665a99e4
Add nodePos to G.faces field.
2009-11-19 15:25:37 +00:00
Jostein R. Natvig
dd1df7ff3f
Removed illegal debug code.
2009-09-21 12:24:27 +00:00
Bård Skaflestad
d1175bc038
- Re-instate the fully unconditional "snap-to-last" behaviour in
...
uniquify(). Mention that "snap-to-last" is a no-op when
second-to-last point is more than <tolerance> apart from the last
point.
- Assert that the <tolerance> is a non-negative value.
- For benefit of Emacs indenting, adjust license block.
2009-08-14 16:42:03 +00:00
Bård Skaflestad
6c6b1aa0c8
Partially revert -r314. The existing tests were more robust in the
...
face of round-off error.
Preserve unconditional "snap to last" feature of function uniquify()
for the time being.
2009-08-14 12:50:21 +00:00
Bjørn Spjelkavik
756454f0fc
Made floating point tests equal to test in old code
2009-08-14 11:12:15 +00:00