1% First-order HO for hydrodynamyc-type system compatible with g^3
2% 2020-04-16
3% Raffaele Vitolo
4
5% Loading the interface to cdiff packages;
6load_package cde;
7
8% Initialization of the jet environment of the differential equation.
9indep_var:={x}$
10dep_var_equ:={u1,u2,u3}$
11total_order:=10$
12loc_arg:={psi1,psi2,psi3}$
13% names for output of the state of cde and results of computations
14resname:="wdvv_wnl1_res.red"$
15
16% right-hand side of the differential equation defining the two operators
17de:={
18  u2_x + u3_x,
19 - ( - 2*u1*u2*u2_x - u1*u2*u3_x - u1*u2_x*u3 + u1_x*u2**2 + u1_x*u2*u3 -
20 u1_x)/u1**2,
21  u1_x
22    }$
23
24nc:=length(dep_var_equ)$
25dv1:={u1_x,u2_x,u3_x}$
26
27% Define the velocity matrix of the system
28
29matrix av(nc,nc);
30for i:=1:nc do
31  for j:=1:nc do
32    av(i,j):=df(part(de,i),part(dv1,j));
33
34% Load the metric of the first-order operator in upper indices:
35matrix gu1(nc,nc);
36gu1(1,1):=(u1**2 + u2**2 + 2*u2*u3 + u3**2 + 1)$
37gu1(1,2):=(u1**2*u2 + u2**3 + 2*u2**2*u3 + u2*u3**2 - u2 - u3)/(u1)$
38gu1(1,3):=(u1*(u2 + 2*u3))$
39gu1(2,1):=(u1**2*u2 + u2**3 + 2*u2**2*u3 + u2*u3**2 - u2 - u3)/(u1)$
40gu1(2,2):=(u1**2*u2**2 + 4*u1**2 + u2**4 + 2*u2**3*u3 + u2**2*u3**2 - 2*u2**2 -
412*u2*u3 + 1)/(u1**2)$
42gu1(2,3):=(u2**2 + 2*u2*u3 - 3)$
43gu1(3,1):=(u1*(u2 + 2*u3))$
44gu1(3,2):=(u2**2 + 2*u2*u3 - 3)$
45gu1(3,3):=(u1**2 + u3**2 + 4)$
46
47% Defining the Christoffel symbols with two upper indices,
48% chr3_ijk stands for \Gamma^{ij}_k
49
50chr3_111:=u1$
51chr3_112:=u2 + u3$
52chr3_113:=u2 + u3$
53chr3_121:=u2$
54chr3_122:=(u2**2 + u2*u3 - 1)/u1$
55chr3_123:=(u2**2 + u2*u3 - 1)/u1$
56chr3_131:=u3$
57chr3_132:=u1$
58chr3_133:=u1$
59chr3_211:=( - u2**3 - 2*u2**2*u3 - u2*u3**2 + u2 + u3)/u1**2$
60chr3_212:=(u1**2 + 2*u2**2 + 3*u2*u3 + u3**2)/u1$
61chr3_213:=(u2*(u2 + u3))/u1$
62chr3_221:=( - u2**4 - 2*u2**3*u3 - u2**2*u3**2 + 2*u2**2 + 2*u2*u3 - 1)/u1**3$
63chr3_222:=(u1**2*u2 + 2*u2**3 + 3*u2**2*u3 + u2*u3**2 - 2*u2 - u3)/u1**2$
64chr3_223:=(u2*(u2**2 + u2*u3 - 1))/u1**2$
65chr3_231:=( - u2**2 - u2*u3 + 1)/u1$
66chr3_232:=2*(u2 + u3)$
67chr3_233:=u2$
68chr3_311:=u2 + u3$
69chr3_312:=0$
70chr3_313:=u1$
71chr3_321:=(u2**2 + u2*u3 - 1)/u1$
72chr3_322:=0$
73chr3_323:=u2$
74chr3_331:=u1$
75chr3_332:=0$
76chr3_333:=u3$
77
78operator b;
79for i:=1:nc do for j:=1:nc do
80  b(i,j):=for k:=1:nc sum mkid(mkid(mkid(chr3_,i),j),k)*part(dv1,k);
81
82% Defining the local part of the operator
83mk_cdiffop(ham_l,1,{3},3);
84for all i,j,psi let ham_l(i,j,psi)=
85  gu1(i,j)*td(psi,x) + b(i,j)*psi;
86
87% Coefficient matrix; syntax: c^{alpha,beta} = c(alpha,beta)
88% Tail vector; syntax: w^i_\alpha = w(i,alpha)
89mk_wnlop(c,w,2);
90c(1,1):= - 1;
91c(2,2):= - 1;
92c(1,2):=0;
93c(2,1):=0;
94for i:=1:nc do w(i,1):=(for j:=1:nc sum av(i,j)*part(dv1,j));
95w(1,2):=u1_x;
96w(2,2):=u2_x;
97w(3,2):=u3_x;
98
99% Input for the first wnl operator
100ham1:={ham_l,c,w};
101
102% Input for the second wnl operator
103ham2:=ham1;
104
105% The list of all distinct non-local variables to be used in the jetspace.
106% Each (w^i_\alpha) (with given \alpha) gives rise to 3 distinct
107% nonlocal variables \tilde{psi}^a_\alpha, a=1,2,3.
108% The format of the list is:
109% {nonlocal variable, tail vector, alpha}
110nloc_var:={{tpsi,w,1},{tpsi,w,2},{tpsi,w,3}};
111
112% Preparing the jetspace
113dep_var_tot:=cde_weaklynl(indep_var,dep_var_equ,loc_arg,nloc_var,total_order);
114
115% The list of the two names of nonlocal variables for the two operators;
116% here the two names can be the same if necessary.
117nloc_arg:={{tpsi,w},{tpsi,w}};
118
119% Computing the Schouten bracket
120on time;
121sb_res:=schouten_bracket_wnl(ham1,ham2,dep_var_equ,loc_arg,nloc_arg);
122off time;
123
124;end;
125
126Local Variables:
127mode:reduce
128End: