Bård Skaflestad
a606cd1e76
Up-case macros (min->MIN, max->MAX).
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
40848dc0b0
checkmemory(): Group (re)allocations according to the size-parameter used to effect the allocations.
...
Furthermore: Capture all allocations that succeed even if some other
allocation fails.
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
adf266f077
linearindex(): Assert component indices in range.
...
While here, split a long line and sort includes.
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
736b623d4b
findconnections(): Insert white-space for readability.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
406016998b
Continue reorganisation to promote readability.
...
Specifically:
* Move linearindex() ahead of all existing functions and use it in
compute_cell_index().
* compute_cell_index(): Insert white-space and comments.
* process_vertical_faces(): Add comments to describe stages in the
process of computing new connections (faces).
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
0d84dad30c
Fully parenthesise the MEANINGFUL_FACE macro.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
7d68712136
Up-case all macro names.
...
While here, insert white-space for readability.
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
1ee27a4484
Up-case "min" and "max" macros to provide visual cues that there's macro expansion afoot. While here, remove unused "overlap" macro.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
eaaad64242
?getvectors(): Re-factor field offset calculations out to new helper, vector_positions().
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
fd3b5783fc
Sort includes.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
ce073c0318
Fix unmatched parentheses.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
2864de1ddb
Sort and group includes.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
fbc19e6d0c
process_grdecl(): Prefer "size_t" when defining allocation sizes.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
37351d2adb
Initialise all "intersect" elements to -1 to avoid confusion surrounding ={-1} syntax.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
e9931d8c9c
Make 'coord' a pointer-to-const rather than a pointer-to-modifiable. We don't need to change the coord array.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
140d4ade25
Make a few concessions to readability by inserting some white-space around binary operators where appropriate.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
7dfb478e2e
Remove dependency on C99's isinf() and isnan() functions.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
b21134fede
Remove dependency on C99's isinf() and isnan().
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:02 +02:00
Bård Skaflestad
16169c57c5
Sort includes.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
52c322047b
Staticise several internal functions to reduce impact on libraries embedding this software.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
8884e4fc59
computeFaceTopology(): Initialise all elements of the mask array to -1. The ={-1} syntax just sets mask[0], leaving [1..7] at the default value (zero).
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
de91035e3a
Replace comparison function with one that honours qsort() requirements.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
ee9db9493c
Remove code that was disabled in -r967.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Bård Skaflestad
e5ecded0a8
Add convenience: Interpret ACTNUM==NULL as "all cells active".
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
ea6c01dd95
Remove references to old intersection implementation.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
08f1e2e3e6
Change code that computes new node coordinates on bilinear surfaces defined by pillar pairs. Old code computes *rough* approximation, new code computes exact value.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
2be1ecf16c
Re-indent to four-spaces. While at it, do whitespace-cleanup.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
53bf30cb43
Parametrize macro, adjust braces. Remove commented-out warning message, that only confuse the reader.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
828141662e
Add braces.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
fb46be25c2
Remove unused files.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
03c752013d
Remove last references to sparse_table_t.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
Jostein R. Natvig
0f2cbf66a2
Remove references to sparse_table_t, as this is only used to allocate and free two data vectors.
...
Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
2012-06-26 18:43:01 +02:00
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