Tor Harald Sandve
35b34f1b3a
Add pow() for constant base raised to variable exponent in AutoDiffBlock
...
- associated tests are added
- this PR also contains some clean up
2016-03-08 10:35:29 +01:00
Tor Harald Sandve
b2e02f6d2b
Add power method for general f^g in the AutoDiffBlock
...
A power method where both f and g are ADB variables is added
using the general derivative rule
(f^g)' = f^g * ln(f) * g' + g * f^(g-1) * f'
Tests are added to test_block.cpp
2016-03-07 14:23:45 +01:00
Atgeirr Flø Rasmussen
569df33ab2
Merge pull request #583 from totto82/solventSupportRegions
...
Support regions in the solvent model
2016-02-18 15:43:27 +01:00
Tor Harald Sandve
fd219dd544
Add whitespaces and comments to beautify the code
2016-02-17 10:43:01 +01:00
Robert Kloefkorn
75ffd897da
AutoDiffBlock: revert changes in operator /.
...
equalSparsityPattern: also include outer index in check.
2016-02-16 17:18:04 +01:00
Robert Kloefkorn
4df4c9147a
fastSparseProduct.hpp --> fastSparseOperations.hpp
2016-02-16 10:25:57 +01:00
Robert Kloefkorn
98c49fd52f
AutoDiffMatrix: use operator += to add matrices
2016-02-16 10:25:57 +01:00
Tor Harald Sandve
b02589316f
Add support for MISC regions
...
- element wise power operator impemented in AutoDiffBlock
- TL parameters are given pr cell
2016-02-15 14:44:14 +01:00
Tor Harald Sanve
650fef5bc2
Add power operator to AutoDiffBlock
2015-12-10 10:30:28 +01:00
Atgeirr Flø Rasmussen
98a3d1675a
Merge pull request #454 from babrodtk/openpm_experiment
...
Parallel assembly (partial)
2015-10-19 15:32:50 +02:00
Joakim Hove
76f674b16b
Updated path to warning suppression header.
2015-10-06 12:11:49 +02:00
babrodtk
1d6f12e870
Added OMP pragmas
2015-10-02 10:37:08 +02:00
babrodtk
4073abeafb
Added documentation for AutoDiffMatrix
2015-10-02 10:21:28 +02:00
babrodtk
38865cac31
Cleaned up comments
2015-09-07 13:01:31 +02:00
babrodtk
6a6a1d5280
Fixed warnings
2015-09-07 13:00:41 +02:00
Atgeirr Flø Rasmussen
097542a527
Whitespace fixes.
...
It turns out I accidentally used tabs for a while, this commit
fixes that for all touched files.
2015-09-07 13:00:41 +02:00
Atgeirr Flø Rasmussen
dd52d444e7
Fix print() method.
2015-09-07 13:00:02 +02:00
Atgeirr Flø Rasmussen
c795113ce3
Changes to make flow compile with AutoDiffMatrix.
2015-09-07 13:00:02 +02:00
Atgeirr Flø Rasmussen
ad3da1d946
Re-add copying overload of AutoDiffBlock::function().
2015-03-19 11:46:48 +01:00
Atgeirr Flø Rasmussen
0a76af1b14
Include <utility> for std::move().
2015-03-17 09:46:15 +01:00
Atgeirr Flø Rasmussen
04b255a03f
Make more use of move semantics in AD code.
...
This makes some API changes to AutoDiffBlock.
- Add overload for the constant() constructor taking rvalue ref.
- Add overload for the variable() constructor taking rvalue ref.
- Make the function() constructor *require* rvalue refs.
- Add a swap() function.
The remaining changes in this commit are follow-ups especially
to the third change (adding std::move in many places), and
some removal of unnecessary block pattern arguments from calls to
the constant() static method.
2015-03-16 14:22:32 +01:00
Markus Blatt
7c8f992a2d
Fixes raisal of assertion in Eigen because of empty vector and matrices.
...
Apparently Eigen cannot handle empty containers during reserve correctly.
Therfore we check for the size of the vector and if it is zero simply create
empty jacobians.
Closes #290
2015-01-29 17:14:09 +01:00
Atgeirr Flø Rasmussen
c43b9f4a22
Use fastSparseProduct(), do not use hijacked Eigen header.
2014-12-05 13:09:46 +01:00
Robert K
21a9a7c446
avoid multiplication with empty matrices.
2014-12-03 15:48:43 +01:00
Robert K
3f821f1d5f
overloaded ConservativeSparseSparseProduct to speed up matrix-matrix multiplication.
2014-12-02 10:40:48 +01:00
Atgeirr Flø Rasmussen
25c9b36d4f
Use new location of warning suppression header.
2014-09-20 10:39:34 +02:00
Atgeirr Flø Rasmussen
1e75efd097
Add generation and use of warning-suppressing headers.
2014-04-15 20:46:45 +02:00
Atgeirr Flø Rasmussen
3bc57780aa
Fix bug in -= operator.
2014-03-26 11:44:49 +01:00
Tor Harald Sandve
9cb7e8635e
Adds -= operator
...
An elementwise -= operator is added to the autodiff class.
2014-03-11 14:30:54 +01:00
Atgeirr Flø Rasmussen
258d8e0e24
Avoid infinite loop with two constant operands.
2013-10-24 13:41:55 +02:00
Atgeirr Flø Rasmussen
1eec8b16d6
Fix bug in operator+ introduced by previous commit.
...
Also make documentation clearer.
2013-10-24 00:17:15 +02:00
Atgeirr Flø Rasmussen
46a17945a3
Fix minor whitespace issue.
2013-10-23 22:42:32 +02:00
Atgeirr Flø Rasmussen
b996959c61
Add new AutoDiffBlock::constant() overload without block sizes.
...
This should simplify some uses of the autodiff code. The internals
have been changed to allow for objects to have an empty vector of
Jacobians, always treating that object as a constant.
2013-10-23 20:09:55 +02:00
Atgeirr Flø Rasmussen
f40271d96c
Minimal fix for Eigen versions lacking pow(Eigen::Array).
2013-10-20 22:02:32 +02:00
Atgeirr Flø Rasmussen
cc58bc3cef
Fix minor issues pointed out by bska.
2013-09-23 13:02:56 +02:00
Atgeirr Flø Rasmussen
0aa96af329
Documentation refinement. Added main doc file.
2013-09-19 14:45:40 +02:00
Atgeirr Flø Rasmussen
9a20c1ee02
Documented AutoDiffBlock.
2013-09-19 14:07:05 +02:00
Atgeirr Flø Rasmussen
85f79c0e84
Rename AutoDiff::ForwardBlock -> Opm::AutoDiffBlock.
...
Also moved AutoDiffHelpers.hpp content to Opm namespace, and modified other
files as required by these two changes.
2013-09-19 12:53:28 +02:00
Atgeirr Flø Rasmussen
86e9e04d2f
Remove unnecessary include statement.
2013-09-19 11:32:29 +02:00
Jens Olav Nygaard
383b88252a
Modified according to comments in pull-request discussion.
2013-08-05 09:47:47 +02:00
Jens Olav Nygaard
d3a02e4891
Added ForwardBlock operator* for scalars.
2013-08-02 12:24:12 +02:00
Bård Skaflestad
2621283f1d
Add operator+=
...
This simplifies updating residuals.
2013-05-23 18:24:37 +02:00
Bård Skaflestad
e0c85a2fdb
Adapt to CMake-based build system.
...
Specifically,
- #include <config.h> where appropriate (all .cpp files)
- Adjust include statements to account for sub-directory locations
of .hpp files.
2013-05-15 16:10:20 +02:00
Bård Skaflestad
9309024d1e
First partitioning into source/examples/tests
...
Reorganisations are likely.
2013-05-15 10:35:39 +02:00