1 #ifndef CLASSIC_LieMap_HH
2 #define CLASSIC_LieMap_HH
102 std::ostream &operator<<(std::ostream &, const LieMap<T> &x);
141 template <
class T>
inline
146 template <
class T>
inline
156 int nDim = x.getDimension();
158 for(
int q = 0; q < nDim; q += 2) {
170 int nDim = x.getDimension();
172 for(
int q = 0; q < nDim; q += 2) {
191 throw LogicalError(
"LieMap::ExpMap()",
"Tps dimension is zero or odd.");
193 if(nDim == 0)
return M;
197 "Lie map and Hamiltonian have inconsistent dimensions.");
203 for(
int i = 0; i < nDim; i += 2) {
208 for(
int var = 0; var < nDim; var++) {
210 Tps<T> u = temp[var] = M[var];
212 for(
int count = 1; temp[var] != old; count++) {
213 if(count >= MAXITER) {
215 "No convergence in ExpMap()");
219 for(
int v = 0; v < nDim; v++) w += dH[v] * u.
derivative(v);
232 {
return x.
get(is); }
236 std::ostream &operator<<(std::ostream &os, const LieMap<T> &x)
237 {
return x.put(os); }
244 if(this->getDimension() % 2 != 0) {
245 throw LogicalError(
"LieMap::check()",
"LieMap representation corrupted.");
249 #endif // CLASSIC_LieMap_HH
static LieMap< T > ExpMap(const Tps< T > &H)
Lie series.
std::istream & get(std::istream &is)
Get a Vps<T> from stream is.
int getVariables() const
Get number of variables (the same in all components).
Invertible power series map.
Tps< T > PoissonBracket(const Tps< T > &x, const Tps< T > &y)
Poisson bracket.
Convergence error exception.
FVps< T, N > ExpMap(const FTps< T, N > &H, int trunc=FTps< T, N >::EXACT)
Build the exponential series.
int getVariables() const
Get number of variables.
void check() const
Check consistency.
Vector truncated power series.
VpsInvMap< T > & operator=(const VpsInvMap< T > &y)
void check() const
Check consistency.
LieMap< T > & operator=(const LieMap< T > &)
Tps< T > derivative(int var) const
Partial derivative.
std::istream & operator>>(std::istream &, LieMap< T > &x)
Extract LieMap<T> from stream.