Commit Graph

14 Commits

Author SHA1 Message Date
Arne Morten Kvarving
adee0a1649 changed: let the build system handle the dynamic boost test defines 2018-02-14 16:04:48 +01:00
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
Tor Harald Sanve
650fef5bc2 Add power operator to AutoDiffBlock 2015-12-10 10:30:28 +01:00
babrodtk
3a9a153c22 Fixed test_block 2015-09-07 13:00:41 +02:00
Atgeirr Flø Rasmussen
5ff65b40e1 Fix bug added when adapting to new API.
Avoid using invalidated 'jacs', make copy.
2015-03-16 14:22:32 +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
Atgeirr Flø Rasmussen
347016a066 Add more checks to cover bug that was in operator -=. 2014-03-26 12:25:11 +01:00
Atgeirr Flø Rasmussen
60ff38adc6 Added test for += and -= operators. 2014-03-26 12:03:44 +01:00
Atgeirr Flø Rasmussen
37a23825c4 Removed dead code in test_block.cpp. 2014-03-26 11:48:13 +01: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
Andreas Lauser
51cb4f2cb8 Add exception handlers to all tutorials and examples 2013-09-05 12:28:04 +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