Commit Graph

30 Commits (e5aefb9f0a8c64d62217c9282ab893b6fc4dfa61)

Author SHA1 Message Date
Sébastien Villemot 130004ef47 Simplify types for storing derivatives using std::tuple 2018-06-05 15:34:34 +02:00
Sébastien Villemot 608c43450c Replace most calls to make_pair by braced-initializer lists or emplace()/emplace_back() 2018-06-04 16:36:46 +02:00
Sébastien Villemot 182c53273e Remove useless spaces in type qualifiers
In C++11, it is no longer necessary to put a space between two consecutive ">".
2018-06-04 15:03:31 +02:00
Sébastien Villemot 1e56c73377 Port to C++11 nullptr keyword
Performed using modernize-use-nullptr from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot e73ebc7033 Port to C++11 noexcept keyword
Performed using modernize-use-noexcept from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-noexcept.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot c0ed97d247 Port to C++11 auto keyword
Performed using modernize-use-auto from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2018-06-04 15:03:26 +02:00
Sébastien Villemot 6cf4e6dc0c Port to C++11 range-based for loops
Performed using modernize-loop-convert from clang-tidy.

Manual intervention was needed in MacroValue.cc because of a variable name
capture issue.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2018-06-04 12:26:16 +02:00
Sébastien Villemot 33b280b3d5 Remove some ExprNode::writeOutput variants
More precisely, remove those variants where temporary_terms can be specified
without temporary_terms_idxs, in order to make clear that the latter is
expected. For situations where the tt_idxs are not needed (C, block MATLAB), an
empty map has to be explicitly given.
2018-05-29 11:13:55 +02:00
Sébastien Villemot 3f874cfced Remove obsolete function 2018-05-28 16:39:28 +02:00
Sébastien Villemot dd6799187c Fix derivs w.r.t. parameters with temporary terms array 2018-05-28 15:23:15 +02:00
Sébastien Villemot 61dc80bb64 Fix missing temporary terms indexes in hessian and 3rd derivatives of static model 2018-05-28 11:59:36 +02:00
Sébastien Villemot 8657d4dc98 Fix block decomposition with temporary terms array 2018-05-28 11:58:11 +02:00
Sébastien Villemot 38ed0f2ffc Remove unused writeChainRuleDerivative methods 2018-05-25 17:10:16 +02:00
Sébastien Villemot c7c26190d6 Reactivate use_dll mode 2018-05-25 15:48:55 +02:00
Sébastien Villemot 64323ef730 Add compatibility layer for Matlab/Octave code not using the new temporary terms array interface 2018-05-24 19:35:35 +02:00
Sébastien Villemot 164a6f303b Fix bug in temporary terms array in the presence of model local variables
In the presence of MLVs, the temporary terms indexing was corrupted. The code
was using the implicit assumption that the ExprNodeLess ordering was giving the
same ordering as the temporary terms indexes ordering. But MLVs can be higher
in ExprNodeLess ordering than some other temporary terms, while they have the
lowest temporary terms index, hence the bug.

Fix this by no longer relying on the ExprNodeLess ordering, and rather use a
full map<ExprNode *, int> for ModelTree::temporary_terms_idxs. By the way,
simplify the code by removing a few useless data structures (e.g.
ModelTree::temporary_terms_idxs_*).
2018-05-24 19:35:21 +02:00
Sébastien Villemot a9bfd1223b Fix assertions that check the length of temporary terms vectors
Model local variables had been omitted in the length computations.
2018-05-24 17:04:16 +02:00
Sébastien Villemot 41d7496b46 Fix bug in wrapper functions (*_{dynamic,static}_resid_g1{,_g2,_g2_g3}.m)
The last argument (T_flag) was missing in the function definitions (but it was
used in some function calls).
2018-05-23 17:34:00 +02:00
Sébastien Villemot 3fa14031a2 Fix bug in *_{dynamic,static}_resid_g1_g2_g3.m functions 2018-05-22 12:02:48 +02:00
Stéphane Adjemian(Charybdis) 70ec52a6cc Added a routine returning only the static jacobian.
Also added flags to decide which temporaries have to be (re)computed.
2018-04-10 09:45:40 +02:00
Stéphane Adjemian(Charybdis) dfccecfb11 Fixed bug (x, exogenous variables steady state, is not a Matrix). 2018-03-29 22:23:38 +02:00
Stéphane Adjemian(Charybdis) b52ded0eb4 Fixed doc headers for static and dynamic julia modules. 2018-03-29 09:31:25 +00:00
Stéphane Adjemian(Charybdis) 849936d81b Same as bce9b66312 for matlab output. 2018-03-28 19:14:43 +02:00
Stéphane Adjemian(Charybdis) bce9b66312 Added arrays providing the number of temp terms in Julia modules...
... For static and dynamic models.
2018-03-28 17:50:58 +02:00
Houtan Bastani ec215e2a44 separate temporary terms: WIP 2018-03-28 16:41:48 +02:00
Houtan Bastani 13d408b058 Revert "Added new routine for the static model (only computes the jacobian)."
This reverts commit 7c9c83fba1.
2018-03-28 16:14:15 +02:00
Houtan Bastani 493f98fa3a fix typo 2018-03-27 11:01:29 +02:00
Stéphane Adjemian(Charybdis) 7c9c83fba1 Added new routine for the static model (only computes the jacobian). 2018-03-10 10:20:50 +01:00
Houtan Bastani 204457cd86 explicitly close output streams 2018-03-02 18:39:16 +01:00
Houtan Bastani b504f160ca move files to src directory 2018-02-15 11:48:04 +01:00