Commit Graph

4486 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
c6f42a63bd Fixes performance bug in matrix construction.
At the same time changes the construction to be value-oriented, not
constructing it in OEM_DATA, but rather in to_petsc_mat
2014-12-10 18:05:04 +01:00
Jørgen Kvalsvik
114b335ce6 Moved KSPCreate to the Data constructor
This is where it was always intended to be called, so this fixes a mistake in
earlier development.
2014-11-12 20:41:21 +01:00
Jørgen Kvalsvik
d380d1759e Reduces CHKERRXX usage to where necessary.
The error checking macro makes it harder to read and harder to write, so
instead we now only check for functions  that can contain errors. Bounds and
range checks are handled by PETSc and not OPM.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
4a79f2e2ca Petsc constructor now uses intialiser list.
The previous implementation set plenty of values in the initialization list and
immediately overwrote these values with values looked up from the param group.
This patch makes it look up the parameteres from the param group argument,
making the constructor simpler.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
2917387845 Makes using wrong constructor a compile-time error
Petsc only supports initialisation through the ParameterGroup constructor.
Calling the default, non-arg constructor is a static error, and not
implementing it makes using it break compiles.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
5ed0f73ba2 Removes call_petsc.c and calls the lib from C++
call_petsc.c was really a thin C wrapper around the call to petsc itself and
turns out was mostly unnecessary C++ emulation. This removes the file entirely
and ports its functionality into LinearSolverPetsc.cpp.

All features from the file should now be more readable as well as properly
utilising modern C++ features.

The patch uses the CHKERRXX macro from petsc to handle errors reported by
petsc, and currently does not handle this and give the control back to OPM's
error/throw system.
2014-10-14 14:43:42 +02:00
Liu Ming
ad7b064556 Merge pull request #1 from jorgekva/linsolver_petsc
Improvements to FindPetsc.cmake module
2014-09-22 09:48:29 +08:00
Jørgen Kvalsvik
48b54d321a Simplifcations in FindPetsc logic
Removes a lot of the conditionals in the makefile. As reflected in the
comments, find_* won't run if the target variable is already set, and appending
empty list elements changes nothing. In order to make reading the file easier
these conditionals have mostly been removed.
2014-09-19 12:32:50 +02:00
Jørgen Kvalsvik
60ca9698ba PETSC_ROOT now sets NO_DEFAULT_PATH
Allows a specific PETSC_ROOT to override and replace default search paths. Now,
if PETSC_ROOT is passed and the find_library calls cannot find the libraries,
the makefile will only search in user provided directories.
2014-09-19 11:40:20 +02:00
Jørgen Kvalsvik
95357155e4 FindPetsc uses system-provided MPI if available
When building with USE_MPI=ON the FindPetsc now uses the system provided
MPI if available. Falls back to looking for the PETSc provided unimpi for
sequential builds.
2014-09-17 13:33:41 +02:00
Jørgen Kvalsvk
b595dd0abd FindPets searches default paths w/ general namings
Removed the NO_DEFAULT_PATH flag as this really isn't working for most systems
(where PETSc will be installed from a repository and in /usr or /). Path suffix
parameters extended to accept more version-less configs too, to be compatible
with a default PETSc (debian style) install.
2014-09-16 11:42:23 +00:00
Jørgen Kvalsvk
3204518bcc Removes broken conditional check.
The FindPetsc module would check for a PETSC_ROOT and not attempt to look for
mpi and the petsc header if this was not set, which it in most cases won't be.
If the variable is set then the conditional include is redundant, as it will
search the explicitly passed paths first anyways.
2014-09-16 11:42:23 +00:00
Jørgen Kvalsvk
18b6b4c566 Fixes status message when PETSc couldn't be found. 2014-09-16 11:42:17 +00:00
Liu Ming
4cb4b09a32 add HAVE_PETSC for config.h 2014-07-08 11:03:26 +08:00
Liu Ming
f9eecfb015 if no petsc installed, we should remove petsc related files from cmake file
list.
2014-07-08 11:02:07 +08:00
Liu Ming
53c539de6a use block{} guarantee for if and for statements. 2014-07-08 11:00:19 +08:00
Liu Ming
d8962ff1ce Add HAVE_PETSC macro. 2014-07-08 10:58:39 +08:00
Liu Ming
399a8f6884 use malloc instead of calloc and rename functions. 2014-05-23 11:11:07 +08:00
Liu Ming
afe51ae669 rename the private member. 2014-05-23 11:10:22 +08:00
Liu Ming
05d3f73390 use unordered_map for "string-enum" translations. 2014-05-23 11:09:04 +08:00
Liu Ming
1d75fdba58 Fix duplication errors. 2014-05-16 15:06:14 +08:00
Liu Ming
55f348e4cd Throw information for Petsc. 2014-05-16 15:02:49 +08:00
Liu Ming
8820781158 Test Petsc. 2014-05-16 14:55:23 +08:00
Liu Ming
46fca4d9fc Initialize Petsc from constructor.
Remove private members for initializing Petsc.
2014-05-16 14:53:49 +08:00
Liu Ming
a0bf6042da Let opm-core find Petsc if PETSC_ROOT is specified. 2014-05-16 14:43:28 +08:00
Liu Ming
fbfaf2aec1 cmake Module for finding Petsc. 2014-05-16 14:43:04 +08:00
Liu Ming
34dfb85919 Add Petsc to OPM. 2014-05-16 14:41:51 +08:00
Atgeirr Flø Rasmussen
d50b7ab4aa Merge pull request #589 from atgeirr/fix-comparison-warning
Supress signed-unsigned comparison warning.
2014-05-12 09:22:42 +02:00
Atgeirr Flø Rasmussen
9690ccc978 Supress signed-unsigned comparison warning. 2014-05-12 09:18:52 +02:00
Atgeirr Flø Rasmussen
a681bcf869 Merge pull request #573 from osae/test-eps
Endpoint scaling - taking advantage of the new parser.
2014-05-12 08:28:48 +02:00
Atgeirr Flø Rasmussen
7e9fbcba4f Merge pull request #586 from osae/equil-update
EQLNUM in case of non-trivial ACTNUM
2014-05-09 21:34:32 +02:00
osae
f0069c7868 Removing a few bugs ... 2014-05-06 18:15:03 +02:00
osae
57b694f66a Proper interpretation of ENDNUM and IMBNUM fields.
Made consistent with grid discretization.
2014-05-06 14:41:17 +02:00
osae
6cd46c5585 Initialisation of EGLNUM (analogous to e.g SATNUM) 2014-05-06 12:47:24 +02:00
osae
2beb0631b2 Inserted some documentation. 2014-05-05 11:27:10 +02:00
osae
c6a83df998 Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2014-05-05 11:23:43 +02:00
osae
7280ce2517 ENDNUM: changed default value and jtab-logic
Default value changed from 'no scaling' to 'use table 1'.
Range of jtab changed to [-1,#tables-1].
2014-05-05 10:33:04 +02:00
osae
61a52eee2e Reset gwseg as the model for endpoint scaling. 2014-05-05 10:33:04 +02:00
osae
7f04384b10 Make use of keywords SATOPTS and EHYSTR. 2014-05-05 10:33:04 +02:00
osae
003b37ad88 Use ENDNUM and prepare for IMBNUM. 2014-05-05 10:33:04 +02:00
osae
f7d2468d79 Added missing line (parser conversion). 2014-05-05 10:33:04 +02:00
Joakim Hove
85b300323a Merge pull request #584 from andlaus/adapt_to_opm-parser_renames
adapt to the renames of the table classes in opm-parser
2014-05-02 17:00:26 +02:00
Joakim Hove
c99cd947f2 Merge pull request #585 from joakim-hove/testdata-error
Fixed error in testdata tests/CORNERPOPINT_ACTNUM.DATA
2014-04-29 09:21:01 +02:00
Joakim Hove
a9d11675d4 Fixed error in testdata tests/CORNERPOPINT_ACTNUM.DATA 2014-04-29 09:19:07 +02:00
Andreas Lauser
89f4a6db5b adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2014-04-28 18:47:28 +02:00
Bård Skaflestad
6c1a9feed0 Merge pull request #579 from andlaus/move_to_opm-parser
Move to opm parser
2014-04-25 18:39:27 +02:00
Andreas Lauser
1d7ed18419 convert the examples and the tests to opm-parser 2014-04-25 14:25:54 +02:00
Andreas Lauser
3b2aa175d5 remove the import_rewrite example
that one was quite specific to the old parser and would thus require
more work to convert to the opm-parser than what it is worth the
effort. If you _really_ want to keep this tool, ping me and I'll port
it...
2014-04-25 14:25:54 +02:00
Andreas Lauser
7917295923 add opm-parser variants for the incompressible property classes 2014-04-25 14:25:54 +02:00
Andreas Lauser
6a90aa086a CornerPointChopper: add methods opm-parser'y methods 2014-04-25 14:25:53 +02:00