Commit d2e81d3c authored by gsell's avatar gsell
Browse files

Merge branch 'master' of gitorious.psi.ch:opal/src

parents 8792b0ca 03fb919c
......@@ -126,4 +126,8 @@ src/ValueDefinitions/cmake_install.cmake
src/cmake_install.cmake
src/config.h
src/opal
*~
\ No newline at end of file
unit_tests/gtest/include/
unit_tests/gtest/lib/
unit_tests/gtest/src/
*~
/Debug/
\ No newline at end of file
......@@ -19,8 +19,8 @@
//
// ------------------------------------------------------------------------
#include "Algebra/Tps.cpp"
#include "Algebra/Vps.cpp"
#include <Algebra/Tps.hpp>
#include <Algebra/Vps.hpp>
#include <complex>
......
......@@ -19,8 +19,8 @@
//
// ------------------------------------------------------------------------
#include "Algebra/Tps.cpp"
#include "Algebra/Vps.cpp"
#include <Algebra/Tps.hpp>
#include <Algebra/Vps.hpp>
// Force instantiation of Tps<double> class.
......
......@@ -19,8 +19,8 @@
//
// ------------------------------------------------------------------------
#include "Algebra/Tps.cpp"
#include "Algebra/Vps.cpp"
#include <Algebra/Tps.hpp>
#include <Algebra/Vps.hpp>
// Force instantiation of Tps< Tps<T> > class.
......
......@@ -209,6 +209,6 @@ PoissonBracket(const FLieGenerator<T, N> &, const FLieGenerator<T, N> &);
template <class T, int N>
std::ostream &operator<<(std::ostream &, const FLieGenerator<T, N> &);
#include "FixedAlgebra/FLieGenerator.cpp"
#include <FixedAlgebra/FLieGenerator.hpp>
#endif // CLASSIC_FLieGenerator_HH
......@@ -486,6 +486,6 @@ std::ostream &operator<<(std::ostream &os, const FTps<T, N> &);
// Implementation.
#include "FixedAlgebra/FVps.h"
#include "FixedAlgebra/FTps.cpp"
#include <FixedAlgebra/FTps.hpp>
#endif // CLASSIC_FTps_HH
......@@ -318,6 +318,6 @@ std::ostream &operator<<(std::ostream &os, const FVps<T, N> &vps);
// Implementation.
#include "FixedAlgebra/FVps.cpp"
#include "FixedAlgebra/FVps.hpp"
#endif // CLASSIC_FVps_HH
......@@ -733,9 +733,10 @@ FVps<T, N> FVps<T, N>::substitute(const FMatrix<T, N, N> &mat, int nl, int nh) c
// Initialisations.
// Array element fp[k][m] points to the next order m monomial
// to transform in k-th component.
const T *fp[N][nh+1];
const T **fp[N];
T *g[N];
for(int k = N; k-- > 0;) {
fp[k] = new const T* [nh+1];
for(int m = nl; m <= nh; ++m) fp[k][m] = f[k].begin(m);
g[k] = result[k].begin();
}
......@@ -831,6 +832,10 @@ FVps<T, N> FVps<T, N>::substitute(const FMatrix<T, N, N> &mat, int nl, int nh) c
oldvrbl = vrbl;
}
for(int k = N; k-- > 0;) {
delete[] fp[k];
}
return result;
}
......@@ -875,14 +880,16 @@ FVps<T, N> FVps<T, N>::substitute(const FVps<T, N> &rhs, int trunc) const {
if(nl == 0) nl = 1;
// Allocate working arrays.
const T *fp[N][nh+1];
const T ** fp[N];
Array1D< FTps<T, N> > t(nh + 1);
// Initialisations.
// Array element fp[k][m] points to the next order m monomial
// to transform in the k-th component.
for(int k = N; k-- > 0;)
for(int k = N; k-- > 0;) {
fp[k] = new const T* [nh+1];
for(int m = nl; m <= nh; ++m) fp[k][m] = f[k].begin(m);
}
const Array1D<int> *oldvrbl = 0;
int start_nh = FTps<T, N>::orderStart(nh), end_nh = FTps<T, N>::orderEnd(nh);
int nh1 = nh - 1, nh2 = nh - 2;
......@@ -963,6 +970,10 @@ FVps<T, N> FVps<T, N>::substitute(const FVps<T, N> &rhs, int trunc) const {
oldvrbl = vrbl;
}
for(int k = N; k-- > 0;) {
delete[] fp[k];
}
return result;
}
......
......@@ -234,7 +234,7 @@ std::ostream &operator<<(std::ostream &os, const LinearFun<T, N> &);
// Implementation.
#include "FixedAlgebra/LinearFun.cpp"
#include <FixedAlgebra/LinearFun.hpp>
#include "FixedAlgebra/LinearMap.h"
#endif // CLASSIC_LinearFun_HH
......@@ -214,6 +214,6 @@ std::ostream &operator<<(std::ostream &os, const LinearMap<T, N> &vps);
// Implementation.
#include "FixedAlgebra/LinearMap.cpp"
#include <FixedAlgebra/LinearMap.hpp>
#endif // CLASSIC_LinearMap_HH
......@@ -147,6 +147,6 @@ PoissonBracket(const Taylor<T> &, const Taylor<T> &);
template <class T>
std::ostream &operator<<(std::ostream &, const Taylor<T> &);
#include "FixedAlgebra/Taylor.cpp"
#include <FixedAlgebra/Taylor.hpp>
#endif // CLASSIC_Taylor_HH
......@@ -262,7 +262,7 @@ std::ostream &operator<<(std::ostream &os, const TransportFun<T, N> &);
// Implementation.
#include "FixedAlgebra/TransportFun.cpp"
#include <FixedAlgebra/TransportFun.hpp>
#include "FixedAlgebra/TransportMap.h"
#endif // CLASSIC_TransportFun_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment