Bård Skaflestad
903c959252
Add an overload suited to pointer arguments (primitive types).
2011-10-05 19:54:12 +02:00
Bård Skaflestad
f72be4bf80
Import std::abs() overloads.
2011-10-05 19:53:13 +02:00
Bård Skaflestad
77894bdf88
Expose zero() method in VectorZero functor.
2011-10-05 19:52:11 +02:00
Bård Skaflestad
8256d4a248
Move tests to a separate directory, 'tests'.
...
Add a test to demonstrate features of the 'JacobianSystem'.
2011-10-05 10:23:49 +02:00
Bård Skaflestad
1e9a26c759
Catch up to changing interface of JacobianSystem class.
...
While here, allow user to override policies for negating a vector and
zeroing the vector. Moreover, the JacobianSystem no longer assumes
responsibility for solving the Jacobian system of linear equations, so
accept a linear solver parameter in solve().
2011-10-04 21:31:35 +02:00
Bård Skaflestad
b0c91979a3
Catch up to changing interface of JacobianSystem class.
2011-10-04 21:29:15 +02:00
Bård Skaflestad
321f84b4f6
Separate handling of NR vectors out to new class NewtonVectorCollection.
...
The class is parametrised on policies for setting the size of
individual vectors, adding two vectors, and assembling local
contributions into the residual vector.
Provide default implementations of these policies, suitable for
base-vectors that implement (some of) the std::vector<T> interface.
2011-10-04 21:27:57 +02:00
Bård Skaflestad
5207b20058
Add a few simple norm implementation based on accumulation.
2011-10-04 21:23:56 +02:00
Bård Skaflestad
4477af094d
Fix build.
2011-10-04 21:22:54 +02:00
Bård Skaflestad
0d43b21f9a
Work around different 'const' rules in C.
2011-10-04 21:21:30 +02:00
Bård Skaflestad
5f475fe5cf
Properly close namespaces...
2011-10-04 19:54:32 +02:00
Bård Skaflestad
9ce211f058
Don't reference unneeded interfaces.
2011-10-04 10:10:44 +02:00
Bård Skaflestad
2b301b448c
Add a block assembler and solver for OPMPressure's CSRMatrix.
...
Solver based on UMFPACK.
2011-10-03 18:17:58 +02:00
Bård Skaflestad
60bdba1433
Add detection and optional support for UMFPACK and OPMPressure.
2011-10-03 18:16:57 +02:00
Bård Skaflestad
54b59bcb98
Catch up to renaming row_structure_ -> connections_ .
2011-10-03 17:15:00 +02:00
Bård Skaflestad
d9aa8888ea
Relinquish row/nnz control to linsys assembler.
...
Pass the scalar number of rows and non-zeros into .setSize() along
with the number of degrees of freedom per cell. This allows the
assembler to impose block structure in an optimal way for each
particular type of linear system.
2011-10-03 12:47:33 +02:00
Bård Skaflestad
d5010efdba
Solvers need to be fully formed objects. Store references.
...
For instance, an iterative linear solver is likely to need some kind
of stopping criterion and the implicit solver should not be tasked
with defining the criterion.
2011-10-03 11:21:41 +02:00
Bård Skaflestad
8769665658
DefaultNewtonVector: Allow outside access to the wrapped base vector.
...
Should be used sparingly, but is needed, e.g., to solve systems of
linear equations.
2011-10-02 19:11:05 +02:00
Bård Skaflestad
d307fdddb2
Implement solution of linear systems.
...
Defer actual mechanism to user-defined 'LinSolve' operation.
2011-10-02 17:03:38 +02:00
Bård Skaflestad
b5da41a8f5
Provide indexing support and 'const'ify the norm().
2011-10-01 11:12:11 +02:00
Bård Skaflestad
150d8b49b5
Add a trivial set of containment classes defining a Jacobian system.
2011-09-30 22:54:47 +02:00
Bård Skaflestad
166ec7bdab
Add a simple test fluid conforming to SinglePoint* interface.
...
Accompanied by demonstration programme. Not integrated into build
system.
2011-09-30 16:39:14 +02:00
Bård Skaflestad
d586edeecc
Implement Newton-Raphson hooks.
2011-09-30 11:37:14 +02:00
Bård Skaflestad
ec5555be36
Conform to file head conventions.
2011-09-30 11:35:38 +02:00
Bård Skaflestad
a197c43cd7
Conform to convention regarding file head.
2011-09-30 10:14:01 +02:00
Bård Skaflestad
bdbd90916b
Use portable array initialisation.
...
Memset() and calloc() define arrays of bytes, not general objects. This
is a lesson learned many times over by generations of C programmers...
2011-09-30 09:39:54 +02:00
Bård Skaflestad
a4e5374c91
Add a trivial top-level implicit solver (NR iteration).
2011-09-29 20:47:06 +02:00
Bård Skaflestad
33f1fe344e
Switch to design based on deriving from 'Model'.
2011-09-29 20:46:40 +02:00
Bård Skaflestad
a30a9c0941
Derive from 'Model' in stead of partially reading from it.
2011-09-29 20:46:14 +02:00
Bård Skaflestad
43c6e00109
Add trivial, partial implementation of an implicit solver.
2011-09-28 21:03:17 +02:00
Bård Skaflestad
3094159bd6
Expand 'ignore' list with a few more auto-generated files.
2011-09-28 14:28:40 +02:00
Bård Skaflestad
ef0bac2fc0
Add gravity contributions in flux calculations.
...
Credit:
Jostein R. Natvig <jostein.r.natvig@sintef.no>
2011-09-20 13:18:33 +02:00
Bård Skaflestad
e077cf6ca4
Suppress warnings about unused parameters.
2011-09-10 16:48:31 +02:00
Bård Skaflestad
2c89db5f87
Add companion output utilities based on already opened streams.
...
Functions csrmatrix_write_stream() and vector_write_stream() subsume
the output responsibilities of csrmatrix_write() and vector_write(),
respectively, but do not deal with opening or closing streams. This
allows, e.g., a call such as
csrmatrix_write_stream(A, stderr);
for debugging purposes.
Re-implement csrmatrix_write() and vector_write() in terms of
csrmatrix_write_stream() and vector_write_stream(), respectively.
2011-09-07 23:14:47 +02:00
Bård Skaflestad
7d3d468ed0
Comment copy editing.
...
Remove comments that bring no new information, and formalise
descriptions in a few other cases.
2011-09-06 10:14:02 +02:00
Bård Skaflestad
cdea6504b9
Merge from upstream.
2011-09-01 10:37:00 +02:00
Bård Skaflestad
035dca2b8c
Merge from upstream.
2011-09-01 10:33:06 +02:00
Bård Skaflestad
03a1d1feca
Silence warnings about "signed vs. unsigned" comparisons.
2011-09-01 10:28:27 +02:00
Bård Skaflestad
a56d8a7b25
Implement cset c450ec75621e wherever applicable.
2011-08-30 14:34:27 +02:00
Bård Skaflestad
abc87e170f
Adapt to removal of 'const' in struct compr_quantities.
...
The members cannot be 'const' in C lest the structure be impossible to
create using traditional C idioms (a sequence of malloc() calls). If
the library is to be usable in a more general context, we cannot impose
C++ specific conveniences.
2011-08-30 10:32:19 +02:00
Bård Skaflestad
c723f7d4f7
Add a simple QFS for testing from C.
...
Not integrated into Autotools build system. Compile as
gcc -g -Wall -ansi -pedantic -Wextra test_cfs_tpfa.c cfs_tpfa.c \
well.c flow_bc.c trans_tpfa.c sparse_sys.c compr_quant.c \
-lumfpack -llapack -lblas -lm
(or variants thereof).
2011-08-26 15:30:20 +02:00
Bård Skaflestad
85c05fc31c
Free the 'dof2conn' mapping in _destroy().
...
This memory leak existed for a long time.
2011-08-21 21:09:25 +02:00
Atgeirr Flø Rasmussen
6138255d42
Removed unused class FluidSystemBlackoil.
2011-06-29 14:50:57 +02:00
Atgeirr Flø Rasmussen
79778eb7f6
Removed unused class FluidSystemBlackoil.
2011-06-29 14:50:57 +02:00
Atgeirr Flø Rasmussen
d326b5ca5f
Added FaceFluidData. Further restructuring of fluid computations.
2011-06-29 14:20:50 +02:00
Atgeirr Flø Rasmussen
1cfc197551
Removed unused code.
2011-06-28 18:08:37 +02:00
Atgeirr Flø Rasmussen
249d5af80a
Changed interface, taking pointers to data instead of vectors.
2011-06-28 13:49:02 +02:00
Atgeirr Flø Rasmussen
c68372e76b
Fixed sizing bugs and more.
2011-06-28 11:17:50 +02:00
Atgeirr Flø Rasmussen
6df82bca1c
Made the new compute...() methods const.
2011-06-28 10:27:41 +02:00
Atgeirr Flø Rasmussen
72388ad717
Added AllFluidData struct and its computeNew() method.
2011-06-28 10:17:36 +02:00