xref: /petsc/src/snes/tutorials/ex69.c (revision c4762a1b19cd2af06abeed90e8f9d34fb975dd94)
1*c4762a1bSJed Brown static char help[] = "The variable-viscosity Stokes Problem in 2d with finite elements.\n\
2*c4762a1bSJed Brown We solve the Stokes problem in a square domain\n\
3*c4762a1bSJed Brown and compare against exact solutions from Mirko Velic.\n\n\n";
4*c4762a1bSJed Brown 
5*c4762a1bSJed Brown /* We discretize the variable-viscosity Stokes problem using the finite element method on an unstructured mesh. The weak form equations are
6*c4762a1bSJed Brown \begin{align*}
7*c4762a1bSJed Brown   (\nabla v, \mu (\nabla u + {\nabla u}^T)) - (\nabla\cdot v, p) + (v, f) &= 0 \\
8*c4762a1bSJed Brown   (q, \nabla\cdot u)                                                      &= 0
9*c4762a1bSJed Brown \end{align*}
10*c4762a1bSJed Brown Free slip conditions for velocity are enforced on every wall. The pressure is
11*c4762a1bSJed Brown constrained to have zero integral over the domain.
12*c4762a1bSJed Brown 
13*c4762a1bSJed Brown To produce nice output, use
14*c4762a1bSJed Brown 
15*c4762a1bSJed Brown   -dm_refine 3 -show_error -dm_view hdf5:sol1.h5 -error_vec_view hdf5:sol1.h5::append -sol_vec_view hdf5:sol1.h5::append -exact_vec_view hdf5:sol1.h5::append
16*c4762a1bSJed Brown 
17*c4762a1bSJed Brown Testing the solver:
18*c4762a1bSJed Brown 
19*c4762a1bSJed Brown ./ex69 -sol_type solkx -simplex 0 -mantle_basename /PETSc3/geophysics/MM/input_data/TwoDimSlab45cg1deguf4 -dm_plex_separate_marker -vel_petscspace_degree 1 -pres_petscspace_degree 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -snes_monitor -snes_converged_reason -ksp_monitor_true_residual -ksp_converged_reason -fieldsplit_velocity_ksp_monitor_no -fieldsplit_velocity_ksp_converged_reason_no -fieldsplit_pressure_ksp_monitor -fieldsplit_pressure_ksp_converged_reason -ksp_rtol 1e-8 -fieldsplit_pressure_ksp_rtol 1e-3 -fieldsplit_pressure_pc_type lu -snes_max_it 1 -snes_error_if_not_converged 0 -snes_view -petscds_jac_pre 1
20*c4762a1bSJed Brown 
21*c4762a1bSJed Brown Testing the Jacobian:
22*c4762a1bSJed Brown 
23*c4762a1bSJed Brown ./ex69  -sol_type solkx -simplex 0 -mantle_basename $PETSC_DIR/share/petsc/datafiles/mantle/small -dm_plex_separate_marker -vel_petscspace_degree 1 -pres_petscspace_degree 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -snes_monitor -snes_converged_reason -ksp_monitor -ksp_converged_reason -fieldsplit_velocity_ksp_monitor -fieldsplit_velocity_ksp_converged_reason -fieldsplit_velocity_ksp_view_pmat -fieldsplit_pressure_ksp_monitor -fieldsplit_pressure_ksp_converged_reason -fieldsplit_pressure_ksp_view_pmat -snes_test_jacobian -snes_test_jacobian_view -petscds_jac_pre 0
24*c4762a1bSJed Brown 
25*c4762a1bSJed Brown */
26*c4762a1bSJed Brown 
27*c4762a1bSJed Brown #include <petscdmplex.h>
28*c4762a1bSJed Brown #include <petscsnes.h>
29*c4762a1bSJed Brown #include <petscds.h>
30*c4762a1bSJed Brown #include <petscbag.h>
31*c4762a1bSJed Brown 
32*c4762a1bSJed Brown typedef enum {SOLKX, SOLCX, NUM_SOL_TYPES} SolutionType;
33*c4762a1bSJed Brown const char *solTypes[NUM_SOL_TYPES+1] = {"solkx", "solcx", "unknown"};
34*c4762a1bSJed Brown 
35*c4762a1bSJed Brown typedef struct {
36*c4762a1bSJed Brown   PetscInt  n, m;       /* x- and y-wavelengths for variation across the domain */
37*c4762a1bSJed Brown   /* SolKx */
38*c4762a1bSJed Brown   PetscReal B;          /* Exponential scale for viscosity variation */
39*c4762a1bSJed Brown   /* SolCx */
40*c4762a1bSJed Brown   PetscReal etaA, etaB; /* Two viscosities for discontinuous change */
41*c4762a1bSJed Brown   PetscReal xc;         /* The location of viscosity jump */
42*c4762a1bSJed Brown } Parameter;
43*c4762a1bSJed Brown 
44*c4762a1bSJed Brown typedef struct {
45*c4762a1bSJed Brown   PetscInt      debug;             /* The debugging level */
46*c4762a1bSJed Brown   PetscBool     showSolution, showError;
47*c4762a1bSJed Brown   /* Domain and mesh definition */
48*c4762a1bSJed Brown   PetscInt      dim;               /* The topological mesh dimension */
49*c4762a1bSJed Brown   PetscBool     simplex;           /* Use simplices or tensor product cells */
50*c4762a1bSJed Brown   PetscInt      serRef;            /* Number of serial refinements before the mesh gets distributed */
51*c4762a1bSJed Brown   int           verts[3];          /* The number of vertices in each dimension for mantle problems */
52*c4762a1bSJed Brown   int           perm[3] ;          /* The permutation of axes for mantle problems */
53*c4762a1bSJed Brown   /* Problem definition */
54*c4762a1bSJed Brown   SolutionType  solType;           /* The type of exact solution */
55*c4762a1bSJed Brown   PetscBag      bag;               /* Holds problem parameters */
56*c4762a1bSJed Brown   PetscErrorCode (**exactFuncs)(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar u[], void *ctx);
57*c4762a1bSJed Brown } AppCtx;
58*c4762a1bSJed Brown 
59*c4762a1bSJed Brown static PetscErrorCode zero_scalar(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScalar *u, void *ctx)
60*c4762a1bSJed Brown {
61*c4762a1bSJed Brown   u[0] = 0.0;
62*c4762a1bSJed Brown   return 0;
63*c4762a1bSJed Brown }
64*c4762a1bSJed Brown static PetscErrorCode one_scalar(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScalar *u, void *ctx)
65*c4762a1bSJed Brown {
66*c4762a1bSJed Brown   u[0] = 1.0;
67*c4762a1bSJed Brown   return 0;
68*c4762a1bSJed Brown }
69*c4762a1bSJed Brown static PetscErrorCode zero_vector(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nf, PetscScalar *u, void *ctx)
70*c4762a1bSJed Brown {
71*c4762a1bSJed Brown   PetscInt d;
72*c4762a1bSJed Brown   for (d = 0; d < dim; ++d) u[d] = 0.0;
73*c4762a1bSJed Brown   return 0;
74*c4762a1bSJed Brown }
75*c4762a1bSJed Brown 
76*c4762a1bSJed Brown static void f0_u(PetscInt dim, PetscInt Nf, PetscInt NfAux,
77*c4762a1bSJed Brown                  const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
78*c4762a1bSJed Brown                  const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
79*c4762a1bSJed Brown                  PetscReal t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f0[])
80*c4762a1bSJed Brown {
81*c4762a1bSJed Brown   f0[0] = 0.0;
82*c4762a1bSJed Brown   f0[1] = -PetscSinScalar(constants[1]*PETSC_PI*x[1])*PetscCosScalar(constants[0]*PETSC_PI*x[0]);
83*c4762a1bSJed Brown }
84*c4762a1bSJed Brown 
85*c4762a1bSJed Brown static void stokes_momentum_kx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
86*c4762a1bSJed Brown                                const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
87*c4762a1bSJed Brown                                const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
88*c4762a1bSJed Brown                                PetscReal t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f1[])
89*c4762a1bSJed Brown {
90*c4762a1bSJed Brown   const PetscReal mu = PetscExpReal(2.0*PetscRealPart(constants[2])*x[0]);
91*c4762a1bSJed Brown   PetscInt        c, d;
92*c4762a1bSJed Brown 
93*c4762a1bSJed Brown   for (c = 0; c < dim; ++c) {
94*c4762a1bSJed Brown     for (d = 0; d < dim; ++d) {
95*c4762a1bSJed Brown       f1[c*dim+d] = mu * (u_x[c*dim+d] + u_x[d*dim+c]);
96*c4762a1bSJed Brown     }
97*c4762a1bSJed Brown     f1[c*dim+c] -= u[dim];
98*c4762a1bSJed Brown   }
99*c4762a1bSJed Brown }
100*c4762a1bSJed Brown 
101*c4762a1bSJed Brown static void stokes_momentum_cx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
102*c4762a1bSJed Brown                                const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
103*c4762a1bSJed Brown                                const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
104*c4762a1bSJed Brown                                PetscReal t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f1[])
105*c4762a1bSJed Brown {
106*c4762a1bSJed Brown   const PetscReal mu = x[0] < PetscRealPart(constants[4]) ? PetscRealPart(constants[2]) : PetscRealPart(constants[3]);
107*c4762a1bSJed Brown   PetscInt        c, d;
108*c4762a1bSJed Brown 
109*c4762a1bSJed Brown   for (c = 0; c < dim; ++c) {
110*c4762a1bSJed Brown     for (d = 0; d < dim; ++d) {
111*c4762a1bSJed Brown       f1[c*dim+d] = mu * (u_x[c*dim+d] + u_x[d*dim+c]);
112*c4762a1bSJed Brown     }
113*c4762a1bSJed Brown     f1[c*dim+c] -= u[dim];
114*c4762a1bSJed Brown   }
115*c4762a1bSJed Brown }
116*c4762a1bSJed Brown 
117*c4762a1bSJed Brown static void stokes_mass(PetscInt dim, PetscInt Nf, PetscInt NfAux,
118*c4762a1bSJed Brown                         const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
119*c4762a1bSJed Brown                         const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
120*c4762a1bSJed Brown                         PetscReal t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f0[])
121*c4762a1bSJed Brown {
122*c4762a1bSJed Brown   PetscInt d;
123*c4762a1bSJed Brown   f0[0] = 0.0;
124*c4762a1bSJed Brown   for (d = 0; d < dim; ++d) f0[0] += u_x[d*dim+d];
125*c4762a1bSJed Brown }
126*c4762a1bSJed Brown 
127*c4762a1bSJed Brown static void f1_zero(PetscInt dim, PetscInt Nf, PetscInt NfAux,
128*c4762a1bSJed Brown                     const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
129*c4762a1bSJed Brown                     const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
130*c4762a1bSJed Brown                     PetscReal t, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar f1[])
131*c4762a1bSJed Brown {
132*c4762a1bSJed Brown   PetscInt d;
133*c4762a1bSJed Brown   for (d = 0; d < dim*dim; ++d) f1[d] = 0.0;
134*c4762a1bSJed Brown }
135*c4762a1bSJed Brown 
136*c4762a1bSJed Brown /* < q, \nabla\cdot u >, J_{pu} */
137*c4762a1bSJed Brown static void stokes_mass_J(PetscInt dim, PetscInt Nf, PetscInt NfAux,
138*c4762a1bSJed Brown                           const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
139*c4762a1bSJed Brown                           const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
140*c4762a1bSJed Brown                           PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g1[])
141*c4762a1bSJed Brown {
142*c4762a1bSJed Brown   PetscInt d;
143*c4762a1bSJed Brown   for (d = 0; d < dim; ++d) g1[d*dim+d] = 1.0; /* \frac{\partial\phi^{u_d}}{\partial x_d} */
144*c4762a1bSJed Brown }
145*c4762a1bSJed Brown 
146*c4762a1bSJed Brown 
147*c4762a1bSJed Brown /* -< \nabla\cdot v, p >, J_{up} */
148*c4762a1bSJed Brown static void stokes_momentum_pres_J(PetscInt dim, PetscInt Nf, PetscInt NfAux,
149*c4762a1bSJed Brown                                    const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
150*c4762a1bSJed Brown                                    const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
151*c4762a1bSJed Brown                                    PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g2[])
152*c4762a1bSJed Brown {
153*c4762a1bSJed Brown   PetscInt d;
154*c4762a1bSJed Brown   for (d = 0; d < dim; ++d) g2[d*dim+d] = -1.0; /* \frac{\partial\psi^{u_d}}{\partial x_d} */
155*c4762a1bSJed Brown }
156*c4762a1bSJed Brown 
157*c4762a1bSJed Brown /* < \nabla v, \nabla u + {\nabla u}^T >, J_{uu}
158*c4762a1bSJed Brown    This just gives \nabla u, give the perdiagonal for the transpose */
159*c4762a1bSJed Brown static void stokes_momentum_vel_J_kx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
160*c4762a1bSJed Brown                                      const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
161*c4762a1bSJed Brown                                      const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
162*c4762a1bSJed Brown                                      PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g3[])
163*c4762a1bSJed Brown {
164*c4762a1bSJed Brown   const PetscReal mu  = PetscExpReal(2.0*PetscRealPart(constants[2])*x[0]);
165*c4762a1bSJed Brown   PetscInt        cI, d;
166*c4762a1bSJed Brown 
167*c4762a1bSJed Brown   for (cI = 0; cI < dim; ++cI) {
168*c4762a1bSJed Brown     for (d = 0; d < dim; ++d) {
169*c4762a1bSJed Brown       g3[((cI*dim+cI)*dim+d)*dim+d] += mu; /*g3[cI, cI, d, d]*/
170*c4762a1bSJed Brown       g3[((cI*dim+d)*dim+d)*dim+cI] += mu; /*g3[cI, d, d, cI]*/
171*c4762a1bSJed Brown     }
172*c4762a1bSJed Brown   }
173*c4762a1bSJed Brown }
174*c4762a1bSJed Brown static void stokes_momentum_vel_J_cx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
175*c4762a1bSJed Brown                                      const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
176*c4762a1bSJed Brown                                      const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
177*c4762a1bSJed Brown                                      PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g3[])
178*c4762a1bSJed Brown {
179*c4762a1bSJed Brown   const PetscReal mu = x[0] < PetscRealPart(constants[4]) ? PetscRealPart(constants[2]) : PetscRealPart(constants[3]);
180*c4762a1bSJed Brown   PetscInt        cI, d;
181*c4762a1bSJed Brown 
182*c4762a1bSJed Brown   for (cI = 0; cI < dim; ++cI) {
183*c4762a1bSJed Brown     for (d = 0; d < dim; ++d) {
184*c4762a1bSJed Brown       g3[((cI*dim+cI)*dim+d)*dim+d] += mu; /*g3[cI, cI, d, d]*/
185*c4762a1bSJed Brown       g3[((cI*dim+d)*dim+d)*dim+cI] += mu; /*g3[cI, d, d, cI]*/
186*c4762a1bSJed Brown     }
187*c4762a1bSJed Brown   }
188*c4762a1bSJed Brown }
189*c4762a1bSJed Brown 
190*c4762a1bSJed Brown /* 1/mu < q, I q >, Jp_{pp} */
191*c4762a1bSJed Brown static void stokes_identity_J_kx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
192*c4762a1bSJed Brown                                  const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
193*c4762a1bSJed Brown                                  const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
194*c4762a1bSJed Brown                                  PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g0[])
195*c4762a1bSJed Brown {
196*c4762a1bSJed Brown   const PetscReal mu = PetscExpReal(2.0*PetscRealPart(constants[2])*x[0]);
197*c4762a1bSJed Brown   g0[0] = 1.0/mu;
198*c4762a1bSJed Brown }
199*c4762a1bSJed Brown static void stokes_identity_J_cx(PetscInt dim, PetscInt Nf, PetscInt NfAux,
200*c4762a1bSJed Brown                                  const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar u[], const PetscScalar u_t[], const PetscScalar u_x[],
201*c4762a1bSJed Brown                                  const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar a[], const PetscScalar a_t[], const PetscScalar a_x[],
202*c4762a1bSJed Brown                                  PetscReal t, PetscReal u_tShift, const PetscReal x[], PetscInt numConstants, const PetscScalar constants[], PetscScalar g0[])
203*c4762a1bSJed Brown {
204*c4762a1bSJed Brown   const PetscReal mu = x[0] < PetscRealPart(constants[4]) ? PetscRealPart(constants[2]) : PetscRealPart(constants[3]);
205*c4762a1bSJed Brown   g0[0] = 1.0/mu;
206*c4762a1bSJed Brown }
207*c4762a1bSJed Brown 
208*c4762a1bSJed Brown /*
209*c4762a1bSJed Brown   SolKxSolution - Exact Stokes solutions for exponentially varying viscosity
210*c4762a1bSJed Brown 
211*c4762a1bSJed Brown  Input Parameters:
212*c4762a1bSJed Brown + pos   - The (x,z) coordinate at which to evaluate the solution
213*c4762a1bSJed Brown . n     - The constant defining the x-dependence of the forcing function
214*c4762a1bSJed Brown . m     - The constant defining the z-dependence of the forcing function
215*c4762a1bSJed Brown - B     - The viscosity coefficient
216*c4762a1bSJed Brown 
217*c4762a1bSJed Brown   Output Parameters:
218*c4762a1bSJed Brown + vel   - The (x,z)-velocity at (x,z), or NULL
219*c4762a1bSJed Brown . p     - The pressure at (x,z), or NULL
220*c4762a1bSJed Brown . s     - The total stress (sigma_xx, sigma_xz, sigma_zz) at (x,z), or NULL
221*c4762a1bSJed Brown . gamma - The strain rate, or NULL
222*c4762a1bSJed Brown - mu    - The viscosity at (x,z), or NULL
223*c4762a1bSJed Brown 
224*c4762a1bSJed Brown   Note:
225*c4762a1bSJed Brown $  The domain is the square 0 <= x,z <= 1. We solve the Stokes equation for incompressible flow with free-slip boundary
226*c4762a1bSJed Brown $  conditions everywhere. The forcing term f is given by
227*c4762a1bSJed Brown $
228*c4762a1bSJed Brown $    fx = 0
229*c4762a1bSJed Brown $    fz = sigma*sin(km*z)*cos(kn*x)
230*c4762a1bSJed Brown $
231*c4762a1bSJed Brown $  where
232*c4762a1bSJed Brown $
233*c4762a1bSJed Brown $    km = m*Pi (m may be non-integral)
234*c4762a1bSJed Brown $    kn = n*Pi
235*c4762a1bSJed Brown $
236*c4762a1bSJed Brown $  meaning that the density rho is -sigma*sin(km*z)*cos(kn*x). Here we set sigma = 1.
237*c4762a1bSJed Brown $  The viscosity eta is exp(2*B*x).
238*c4762a1bSJed Brown */
239*c4762a1bSJed Brown static PetscErrorCode SolKxSolution(const PetscReal pos[], PetscReal m, PetscInt n, PetscReal B,
240*c4762a1bSJed Brown                                     PetscScalar vel[], PetscScalar *p, PetscScalar s[], PetscScalar gamma[], PetscScalar *mu)
241*c4762a1bSJed Brown {
242*c4762a1bSJed Brown   PetscReal sigma = 1.0;
243*c4762a1bSJed Brown   PetscReal Z;
244*c4762a1bSJed Brown   PetscReal u1,u2,u3,u4,u5,u6;
245*c4762a1bSJed Brown   PetscReal sum1,sum2,sum3,sum4,sum5,sum6;
246*c4762a1bSJed Brown   PetscReal kn,km,x,z;
247*c4762a1bSJed Brown   PetscReal _PC1,_PC2,_PC3,_PC4;
248*c4762a1bSJed Brown   PetscReal Rp, UU, VV;
249*c4762a1bSJed Brown   PetscReal a,b,r,_aa,_bb,AA,BB,Rm;
250*c4762a1bSJed Brown   PetscReal num1,num2,num3,num4,den1;
251*c4762a1bSJed Brown 
252*c4762a1bSJed Brown   PetscReal t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
253*c4762a1bSJed Brown   PetscReal t11,t12,t13,t14,t15,t16,t17,t18,t19,t20;
254*c4762a1bSJed Brown   PetscReal t21,t22,t23,t24,t25,t26,t27,t28,t29,t30;
255*c4762a1bSJed Brown   PetscReal t31,t32,t33,t34,t35,t36,t37,t38,t39,t40;
256*c4762a1bSJed Brown   PetscReal t41,t42,t43,t44,t45,t46,t47,t49,t51,t53;
257*c4762a1bSJed Brown   PetscReal t56,t58,t61,t62,t63,t64,t65,t66,t67,t68;
258*c4762a1bSJed Brown   PetscReal t69,t70,t71,t72,t73,t74,t75,t76,t77,t78;
259*c4762a1bSJed Brown   PetscReal t79,t80,t81,t82,t83,t84,t85,t86,t87,t88;
260*c4762a1bSJed Brown   PetscReal t89,t90,t91,t92,t93,t94,t95,t96,t97,t99;
261*c4762a1bSJed Brown   PetscReal t100,t101,t103,t104,t105,t106,t107,t108,t109,t110;
262*c4762a1bSJed Brown   PetscReal t111,t112,t113,t114,t115,t116,t117,t118,t119,t120;
263*c4762a1bSJed Brown   PetscReal t121,t124,t125,t126,t127,t129,t130,t132,t133,t135;
264*c4762a1bSJed Brown   PetscReal t136,t138,t140,t141,t142,t143,t152,t160,t162;
265*c4762a1bSJed Brown 
266*c4762a1bSJed Brown   PetscFunctionBegin;
267*c4762a1bSJed Brown   /*************************************************************************/
268*c4762a1bSJed Brown   /*************************************************************************/
269*c4762a1bSJed Brown   /* rho = -sin(km*z)*cos(kn*x) */
270*c4762a1bSJed Brown   x = pos[0];
271*c4762a1bSJed Brown   z = pos[1];
272*c4762a1bSJed Brown   Z = PetscExpReal( 2.0 * B * x );
273*c4762a1bSJed Brown   km = m*PETSC_PI; /* solution valid for km not zero -- should get trivial solution if km=0 */
274*c4762a1bSJed Brown   kn = (PetscReal) n*PETSC_PI;
275*c4762a1bSJed Brown   /*************************************************************************/
276*c4762a1bSJed Brown   /*************************************************************************/
277*c4762a1bSJed Brown   a = B*B + km*km;
278*c4762a1bSJed Brown   b = 2.0*km*B;
279*c4762a1bSJed Brown   r = PetscSqrtReal(a*a + b*b);
280*c4762a1bSJed Brown   Rp = PetscSqrtReal( (r+a)/2.0 );
281*c4762a1bSJed Brown   Rm  = PetscSqrtReal( (r-a)/2.0 );
282*c4762a1bSJed Brown   UU  = Rp - B;
283*c4762a1bSJed Brown   VV = Rp + B;
284*c4762a1bSJed Brown 
285*c4762a1bSJed Brown   sum1=0.0;
286*c4762a1bSJed Brown   sum2=0.0;
287*c4762a1bSJed Brown   sum3=0.0;
288*c4762a1bSJed Brown   sum4=0.0;
289*c4762a1bSJed Brown   sum5=0.0;
290*c4762a1bSJed Brown   sum6=0.0;
291*c4762a1bSJed Brown   /*sum7=0.0;*/
292*c4762a1bSJed Brown 
293*c4762a1bSJed Brown   /*******************************************/
294*c4762a1bSJed Brown   /*         calculate the constants         */
295*c4762a1bSJed Brown   /*******************************************/
296*c4762a1bSJed Brown 
297*c4762a1bSJed Brown   t1 = kn * kn;
298*c4762a1bSJed Brown   t4 = km * km;
299*c4762a1bSJed Brown   t5 = t4 + t1;
300*c4762a1bSJed Brown   t6 = t5 * t5;
301*c4762a1bSJed Brown   t8 = pow(km + kn, 0.2e1);
302*c4762a1bSJed Brown   t9 = B * B;
303*c4762a1bSJed Brown   t16 = pow(km - kn, 0.2e1);
304*c4762a1bSJed Brown   _aa = -0.4e1 * B * t1 * sigma * t5 / (t6 + 0.4e1 * t8 * t9) / (t6 + 0.4e1 * t16 * t9);
305*c4762a1bSJed Brown 
306*c4762a1bSJed Brown   t2 = km * km;
307*c4762a1bSJed Brown   t3 = kn * kn;
308*c4762a1bSJed Brown   t5 = pow(t2 + t3, 0.2e1);
309*c4762a1bSJed Brown   t6 = km - kn;
310*c4762a1bSJed Brown   t7 = km + kn;
311*c4762a1bSJed Brown   t9 = B * B;
312*c4762a1bSJed Brown   t13 = t7 * t7;
313*c4762a1bSJed Brown   t19 = t6 * t6;
314*c4762a1bSJed Brown   _bb = sigma * kn * (t5 + 0.4e1 * t6 * t7 * t9) / (t5 + 0.4e1 * t13 * t9) / (t5 + 0.4e1 * t19 * t9);
315*c4762a1bSJed Brown 
316*c4762a1bSJed Brown   AA = _aa;
317*c4762a1bSJed Brown   BB = _bb;
318*c4762a1bSJed Brown 
319*c4762a1bSJed Brown   /*******************************************/
320*c4762a1bSJed Brown   /*       calculate the velocities etc      */
321*c4762a1bSJed Brown   /*******************************************/
322*c4762a1bSJed Brown   t1 = Rm * Rm;
323*c4762a1bSJed Brown   t2 = B - Rp;
324*c4762a1bSJed Brown   t4 = Rp + B;
325*c4762a1bSJed Brown   t6 = UU * x;
326*c4762a1bSJed Brown   t9 = PetscExpReal(t6 - 0.4e1 * Rp);
327*c4762a1bSJed Brown   t13 = B * B;
328*c4762a1bSJed Brown   t16 = Rp * t1;
329*c4762a1bSJed Brown   t18 = Rp * Rp;
330*c4762a1bSJed Brown   t19 = B * t18;
331*c4762a1bSJed Brown   t20 = t13 * Rp;
332*c4762a1bSJed Brown   t22 = kn * kn;
333*c4762a1bSJed Brown   t24 = B * t1;
334*c4762a1bSJed Brown   t32 = 0.8e1 * t13 * BB * kn * Rp;
335*c4762a1bSJed Brown   t34 = 0.2e1 * Rm;
336*c4762a1bSJed Brown   t35 = PetscCosReal(t34);
337*c4762a1bSJed Brown   t37 = Rp * Rm;
338*c4762a1bSJed Brown   t49 = PetscSinReal(t34);
339*c4762a1bSJed Brown   t63 = PetscExpReal(t6 - 0.2e1 * Rp);
340*c4762a1bSJed Brown   t65 = Rm * t2;
341*c4762a1bSJed Brown   t67 = 0.2e1 * B * kn;
342*c4762a1bSJed Brown   t68 = B * Rm;
343*c4762a1bSJed Brown   t69 = t67 + t68 + t37;
344*c4762a1bSJed Brown   t73 = 0.3e1 * t13;
345*c4762a1bSJed Brown   t75 = 0.2e1 * B * Rp;
346*c4762a1bSJed Brown   t76 = t73 - t75 + t1 - t22 - t18;
347*c4762a1bSJed Brown   t78 = t65 * t76 * BB;
348*c4762a1bSJed Brown   t80 = Rm - kn;
349*c4762a1bSJed Brown   t81 = PetscCosReal(t80);
350*c4762a1bSJed Brown   t83 = -t67 + t68 + t37;
351*c4762a1bSJed Brown   t88 = Rm + kn;
352*c4762a1bSJed Brown   t89 = PetscCosReal(t88);
353*c4762a1bSJed Brown   t92 = t65 * t76 * AA;
354*c4762a1bSJed Brown   t97 = PetscSinReal(t80);
355*c4762a1bSJed Brown   t103 = PetscSinReal(t88);
356*c4762a1bSJed Brown   t108 = PetscExpReal(t6 - 0.3e1 * Rp - B);
357*c4762a1bSJed Brown   t110 = Rm * t4;
358*c4762a1bSJed Brown   t111 = t67 + t68 - t37;
359*c4762a1bSJed Brown   t115 = t73 + t75 + t1 - t22 - t18;
360*c4762a1bSJed Brown   t117 = t110 * t115 * BB;
361*c4762a1bSJed Brown   t120 = -t67 + t68 - t37;
362*c4762a1bSJed Brown   t127 = t110 * t115 * AA;
363*c4762a1bSJed Brown   t140 = PetscExpReal(t6 - Rp - B);
364*c4762a1bSJed Brown   num1 = -0.4e1 * t1 * t2 * t4 * AA * t9 + ((0.2e1 * Rp * (0.3e1 * t13 * B - 0.2e1 * t16 - t19 - 0.2e1 * t20 - B * t22 - t24) * AA - t32) * t35 + (0.2e1 * t37 * (t1 + 0.5e1 * t13 - t22 - t18) * AA - 0.8e1 * B * BB * kn * Rm * Rp) * t49 - 0.2e1 * B * (0.3e1 * t20 - Rp * t22 - t18 * Rp - 0.2e1 * t19 - t16 - 0.2e1 * t24) * AA + t32) * t63 + ((0.2e1 * t65 * t69 * AA + t78) * t81 + (0.2e1 * t65 * t83 * AA - t78) * t89 + (t92 - 0.2e1 * t65 * t69 * BB) * t97 + (t92 + 0.2e1 * t65 * t83 * BB) * t103) * t108 + ((-0.2e1 * t110 * t111 * AA - t117) * t81 + (-0.2e1 * t110 * t120 * AA + t117) * t89 + (-t127 + 0.2e1 * t110 * t111 * BB) * t97 + (-t127 - 0.2e1 * t110 * t120 * BB) * t103) * t140;
365*c4762a1bSJed Brown 
366*c4762a1bSJed Brown   t1 = Rp + B;
367*c4762a1bSJed Brown   t2 = Rm * t1;
368*c4762a1bSJed Brown   t3 = B * B;
369*c4762a1bSJed Brown   t4 = 0.3e1 * t3;
370*c4762a1bSJed Brown   t5 = B * Rp;
371*c4762a1bSJed Brown   t7 = Rm * Rm;
372*c4762a1bSJed Brown   t8 = kn * kn;
373*c4762a1bSJed Brown   t9 = Rp * Rp;
374*c4762a1bSJed Brown   t10 = t4 + 0.2e1 * t5 + t7 - t8 - t9;
375*c4762a1bSJed Brown   t12 = t2 * t10 * AA;
376*c4762a1bSJed Brown   t14 = B * Rm;
377*c4762a1bSJed Brown   t20 = UU * x;
378*c4762a1bSJed Brown   t23 = PetscExpReal(t20 - 0.4e1 * Rp);
379*c4762a1bSJed Brown   t25 = Rp * Rm;
380*c4762a1bSJed Brown   t32 = Rm * kn;
381*c4762a1bSJed Brown   t37 = 0.2e1 * Rm;
382*c4762a1bSJed Brown   t38 = PetscCosReal(t37);
383*c4762a1bSJed Brown   t40 = t3 * B;
384*c4762a1bSJed Brown   t44 = B * t9;
385*c4762a1bSJed Brown   t45 = t3 * Rp;
386*c4762a1bSJed Brown   t53 = t3 * BB;
387*c4762a1bSJed Brown   t58 = PetscSinReal(t37);
388*c4762a1bSJed Brown   t69 = PetscExpReal(t20 - 0.2e1 * Rp);
389*c4762a1bSJed Brown   t72 = 0.3e1 * t40 * Rm;
390*c4762a1bSJed Brown   t73 = t9 * Rp;
391*c4762a1bSJed Brown   t74 = t73 * Rm;
392*c4762a1bSJed Brown   t75 = t7 * Rm;
393*c4762a1bSJed Brown   t76 = B * t75;
394*c4762a1bSJed Brown   t77 = t14 * t8;
395*c4762a1bSJed Brown   t78 = Rp * t75;
396*c4762a1bSJed Brown   t80 = 0.8e1 * t45 * kn;
397*c4762a1bSJed Brown   t81 = t25 * t8;
398*c4762a1bSJed Brown   t83 = 0.5e1 * t45 * Rm;
399*c4762a1bSJed Brown   t84 = t44 * Rm;
400*c4762a1bSJed Brown   t85 = t72 - t74 + t76 - t77 + t78 + t80 - t81 + t83 + t84;
401*c4762a1bSJed Brown   t88 = 0.2e1 * t9 * t3;
402*c4762a1bSJed Brown   t90 = 0.3e1 * t40 * Rp;
403*c4762a1bSJed Brown   t91 = t7 * t3;
404*c4762a1bSJed Brown   t93 = 0.2e1 * t5 * t32;
405*c4762a1bSJed Brown   t94 = t5 * t7;
406*c4762a1bSJed Brown   t95 = t5 * t8;
407*c4762a1bSJed Brown   t96 = B * t73;
408*c4762a1bSJed Brown   t97 = t7 * t9;
409*c4762a1bSJed Brown   t100 = 0.2e1 * t3 * Rm * kn;
410*c4762a1bSJed Brown   t101 = -t88 + t90 - t91 - t93 - t94 - t95 - t96 - t97 - t100;
411*c4762a1bSJed Brown   t105 = Rm - kn;
412*c4762a1bSJed Brown   t106 = PetscCosReal(t105);
413*c4762a1bSJed Brown   t108 = t72 - t80 + t83 + t76 + t84 - t81 - t74 + t78 - t77;
414*c4762a1bSJed Brown   t110 = -t97 - t96 - t88 + t100 + t90 - t95 + t93 - t91 - t94;
415*c4762a1bSJed Brown   t114 = Rm + kn;
416*c4762a1bSJed Brown   t115 = PetscCosReal(t114);
417*c4762a1bSJed Brown   t121 = PetscSinReal(t105);
418*c4762a1bSJed Brown   t127 = PetscSinReal(t114);
419*c4762a1bSJed Brown   t132 = PetscExpReal(t20 - 0.3e1 * Rp - B);
420*c4762a1bSJed Brown   t135 = 0.2e1 * B * kn;
421*c4762a1bSJed Brown   t136 = t135 + t14 - t25;
422*c4762a1bSJed Brown   t142 = -t135 + t14 - t25;
423*c4762a1bSJed Brown   t152 = t2 * t10 * BB;
424*c4762a1bSJed Brown   t162 = PetscExpReal(t20 - Rp - B);
425*c4762a1bSJed Brown   num2 = (0.2e1 * t12 - 0.8e1 * t14 * kn * t1 * BB) * t23 + ((-0.2e1 * t25 * (t7 + 0.5e1 * t3 - t8 - t9) * AA + 0.8e1 * B * BB * t32 * Rp) * t38 + (0.2e1 * Rp * (0.3e1 * t40 - 0.2e1 * Rp * t7 - t44 - 0.2e1 * t45 - B * t8 - B * t7) * AA - 0.8e1 * t53 * kn * Rp) * t58 - 0.2e1 * t14 * (-t8 + t9 + t4 + t7) * AA + 0.8e1 * t53 * t32) * t69 + ((-t85 * AA - 0.2e1 * t101 * BB) * t106 + (-t108 * AA + 0.2e1 * t110 * BB) * t115 + (-0.2e1 * t101 * AA + t85 * BB) * t121 + (-0.2e1 * t110 * AA - t108 * BB) * t127) * t132 + ((t12 - 0.2e1 * t2 * t136 * BB) * t106 + (t12 + 0.2e1 * t2 * t142 * BB) * t115 + (-0.2e1 * t2 * t136 * AA - t152) * t121 + (-0.2e1 * t2 * t142 * AA + t152) * t127) * t162;
426*c4762a1bSJed Brown 
427*c4762a1bSJed Brown   t1 = Rm * Rm;
428*c4762a1bSJed Brown   t2 = B - Rp;
429*c4762a1bSJed Brown   t4 = Rp + B;
430*c4762a1bSJed Brown   t6 = VV * x;
431*c4762a1bSJed Brown   t7 = PetscExpReal(-t6);
432*c4762a1bSJed Brown   t11 = kn * kn;
433*c4762a1bSJed Brown   t13 = B * t1;
434*c4762a1bSJed Brown   t14 = Rp * Rp;
435*c4762a1bSJed Brown   t15 = B * t14;
436*c4762a1bSJed Brown   t16 = B * B;
437*c4762a1bSJed Brown   t17 = t16 * Rp;
438*c4762a1bSJed Brown   t21 = Rp * t1;
439*c4762a1bSJed Brown   t30 = 0.8e1 * t16 * BB * kn * Rp;
440*c4762a1bSJed Brown   t32 = 0.2e1 * Rm;
441*c4762a1bSJed Brown   t33 = PetscCosReal(t32);
442*c4762a1bSJed Brown   t35 = Rp * Rm;
443*c4762a1bSJed Brown   t47 = PetscSinReal(t32);
444*c4762a1bSJed Brown   t61 = PetscExpReal(-t6 - 0.2e1 * Rp);
445*c4762a1bSJed Brown   t63 = Rm * t2;
446*c4762a1bSJed Brown   t65 = 0.2e1 * B * kn;
447*c4762a1bSJed Brown   t66 = B * Rm;
448*c4762a1bSJed Brown   t67 = t65 + t66 + t35;
449*c4762a1bSJed Brown   t71 = 0.3e1 * t16;
450*c4762a1bSJed Brown   t73 = 0.2e1 * B * Rp;
451*c4762a1bSJed Brown   t74 = t71 - t73 + t1 - t11 - t14;
452*c4762a1bSJed Brown   t76 = t63 * t74 * BB;
453*c4762a1bSJed Brown   t78 = Rm - kn;
454*c4762a1bSJed Brown   t79 = PetscCosReal(t78);
455*c4762a1bSJed Brown   t81 = -t65 + t66 + t35;
456*c4762a1bSJed Brown   t86 = Rm + kn;
457*c4762a1bSJed Brown   t87 = PetscCosReal(t86);
458*c4762a1bSJed Brown   t90 = t63 * t74 * AA;
459*c4762a1bSJed Brown   t95 = PetscSinReal(t78);
460*c4762a1bSJed Brown   t101 = PetscSinReal(t86);
461*c4762a1bSJed Brown   t106 = PetscExpReal(-t6 - 0.3e1 * Rp - B);
462*c4762a1bSJed Brown   t108 = Rm * t4;
463*c4762a1bSJed Brown   t109 = t65 + t66 - t35;
464*c4762a1bSJed Brown   t113 = t71 + t73 + t1 - t11 - t14;
465*c4762a1bSJed Brown   t115 = t108 * t113 * BB;
466*c4762a1bSJed Brown   t118 = -t65 + t66 - t35;
467*c4762a1bSJed Brown   t125 = t108 * t113 * AA;
468*c4762a1bSJed Brown   t138 = PetscExpReal(-t6 - Rp - B);
469*c4762a1bSJed Brown   num3 = -0.4e1 * t1 * t2 * t4 * AA * t7 + ((-0.2e1 * Rp * (-B * t11 - t13 - t15 + 0.2e1 * t17 + 0.3e1 * t16 * B + 0.2e1 * t21) * AA + t30) * t33 + (-0.2e1 * t35 * (t1 + 0.5e1 * t16 - t11 - t14) * AA + 0.8e1 * B * BB * kn * Rm * Rp) * t47 + 0.2e1 * B * (0.3e1 * t17 - t21 + 0.2e1 * t15 + 0.2e1 * t13 - Rp * t11 - t14 * Rp) * AA - t30) * t61 + ((-0.2e1 * t63 * t67 * AA - t76) * t79 + (-0.2e1 * t63 * t81 * AA + t76) * t87 + (-t90 + 0.2e1 * t63 * t67 * BB) * t95 + (-t90 - 0.2e1 * t63 * t81 * BB) * t101) * t106 + ((0.2e1 * t108 * t109 * AA + t115) * t79 + (0.2e1 * t108 * t118 * AA - t115) * t87 + (t125 - 0.2e1 * t108 * t109 * BB) * t95 + (t125 + 0.2e1 * t108 * t118 * BB) * t101) * t138;
470*c4762a1bSJed Brown 
471*c4762a1bSJed Brown   t1 = B - Rp;
472*c4762a1bSJed Brown   t2 = Rm * t1;
473*c4762a1bSJed Brown   t3 = B * B;
474*c4762a1bSJed Brown   t4 = 0.3e1 * t3;
475*c4762a1bSJed Brown   t5 = B * Rp;
476*c4762a1bSJed Brown   t7 = Rm * Rm;
477*c4762a1bSJed Brown   t8 = kn * kn;
478*c4762a1bSJed Brown   t9 = Rp * Rp;
479*c4762a1bSJed Brown   t10 = t4 - 0.2e1 * t5 + t7 - t8 - t9;
480*c4762a1bSJed Brown   t12 = t2 * t10 * AA;
481*c4762a1bSJed Brown   t14 = B * Rm;
482*c4762a1bSJed Brown   t20 = VV * x;
483*c4762a1bSJed Brown   t21 = PetscExpReal(-t20);
484*c4762a1bSJed Brown   t23 = Rp * Rm;
485*c4762a1bSJed Brown   t30 = Rm * kn;
486*c4762a1bSJed Brown   t35 = 0.2e1 * Rm;
487*c4762a1bSJed Brown   t36 = PetscCosReal(t35);
488*c4762a1bSJed Brown   t40 = B * t9;
489*c4762a1bSJed Brown   t41 = t3 * Rp;
490*c4762a1bSJed Brown   t43 = t3 * B;
491*c4762a1bSJed Brown   t51 = t3 * BB;
492*c4762a1bSJed Brown   t56 = PetscSinReal(t35);
493*c4762a1bSJed Brown   t67 = PetscExpReal(-t20 - 0.2e1 * Rp);
494*c4762a1bSJed Brown   t70 = 0.2e1 * B * kn;
495*c4762a1bSJed Brown   t71 = t70 + t14 + t23;
496*c4762a1bSJed Brown   t76 = Rm - kn;
497*c4762a1bSJed Brown   t77 = PetscCosReal(t76);
498*c4762a1bSJed Brown   t79 = -t70 + t14 + t23;
499*c4762a1bSJed Brown   t84 = Rm + kn;
500*c4762a1bSJed Brown   t85 = PetscCosReal(t84);
501*c4762a1bSJed Brown   t91 = t2 * t10 * BB;
502*c4762a1bSJed Brown   t93 = PetscSinReal(t76);
503*c4762a1bSJed Brown   t99 = PetscSinReal(t84);
504*c4762a1bSJed Brown   t104 = PetscExpReal(-t20 - 0.3e1 * Rp - B);
505*c4762a1bSJed Brown   t107 = 0.3e1 * t43 * Rm;
506*c4762a1bSJed Brown   t108 = t9 * Rp;
507*c4762a1bSJed Brown   t109 = t108 * Rm;
508*c4762a1bSJed Brown   t110 = t7 * Rm;
509*c4762a1bSJed Brown   t111 = B * t110;
510*c4762a1bSJed Brown   t112 = t14 * t8;
511*c4762a1bSJed Brown   t113 = Rp * t110;
512*c4762a1bSJed Brown   t115 = 0.8e1 * t41 * kn;
513*c4762a1bSJed Brown   t116 = t23 * t8;
514*c4762a1bSJed Brown   t118 = 0.5e1 * t41 * Rm;
515*c4762a1bSJed Brown   t119 = t40 * Rm;
516*c4762a1bSJed Brown   t120 = t107 + t109 + t111 - t112 - t113 - t115 + t116 - t118 + t119;
517*c4762a1bSJed Brown   t124 = 0.2e1 * t3 * Rm * kn;
518*c4762a1bSJed Brown   t125 = t5 * t8;
519*c4762a1bSJed Brown   t126 = B * t108;
520*c4762a1bSJed Brown   t127 = t7 * t9;
521*c4762a1bSJed Brown   t129 = 0.2e1 * t9 * t3;
522*c4762a1bSJed Brown   t130 = t5 * t7;
523*c4762a1bSJed Brown   t132 = 0.3e1 * t43 * Rp;
524*c4762a1bSJed Brown   t133 = t7 * t3;
525*c4762a1bSJed Brown   t135 = 0.2e1 * t5 * t30;
526*c4762a1bSJed Brown   t136 = t124 - t125 - t126 + t127 + t129 - t130 + t132 + t133 - t135;
527*c4762a1bSJed Brown   t141 = t107 + t115 - t118 + t111 + t119 + t116 + t109 - t113 - t112;
528*c4762a1bSJed Brown   t143 = t132 + t129 - t125 + t133 + t127 - t124 - t130 - t126 + t135;
529*c4762a1bSJed Brown   t160 = PetscExpReal(-t20 - Rp - B);
530*c4762a1bSJed Brown   num4 = (0.2e1 * t12 - 0.8e1 * t14 * kn * t1 * BB) * t21 + ((0.2e1 * t23 * (t7 + 0.5e1 * t3 - t8 - t9) * AA - 0.8e1 * B * BB * t30 * Rp) * t36 + (-0.2e1 * Rp * (-B * t8 - B * t7 - t40 + 0.2e1 * t41 + 0.3e1 * t43 + 0.2e1 * Rp * t7) * AA + 0.8e1 * t51 * kn * Rp) * t56 - 0.2e1 * t14 * (-t8 + t9 + t4 + t7) * AA + 0.8e1 * t51 * t30) * t67 + ((t12 - 0.2e1 * t2 * t71 * BB) * t77 + (t12 + 0.2e1 * t2 * t79 * BB) * t85 + (-0.2e1 * t2 * t71 * AA - t91) * t93 + (-0.2e1 * t2 * t79 * AA + t91) * t99) * t104 + ((-t120 * AA + 0.2e1 * t136 * BB) * t77 + (-t141 * AA - 0.2e1 * t143 * BB) * t85 + (0.2e1 * t136 * AA + t120 * BB) * t93 + (0.2e1 * t143 * AA - t141 * BB) * t99) * t160;
531*c4762a1bSJed Brown 
532*c4762a1bSJed Brown 
533*c4762a1bSJed Brown   t1 = Rm * Rm;
534*c4762a1bSJed Brown   t2 = Rp * Rp;
535*c4762a1bSJed Brown   t3 = t1 * t2;
536*c4762a1bSJed Brown   t4 = B * B;
537*c4762a1bSJed Brown   t5 = t1 * t4;
538*c4762a1bSJed Brown   t9 = PetscExpReal(-0.4e1 * Rp);
539*c4762a1bSJed Brown   t15 = PetscCosReal(0.2e1 * Rm);
540*c4762a1bSJed Brown   t22 = PetscExpReal(-0.2e1 * Rp);
541*c4762a1bSJed Brown   den1 = (-0.4e1 * t3 + 0.4e1 * t5) * t9 + ((0.8e1 * t1 + 0.8e1 * t4) * t2 * t15 - 0.8e1 * t5 - 0.8e1 * t2 * t4) * t22 - 0.4e1 * t3 + 0.4e1 * t5;
542*c4762a1bSJed Brown 
543*c4762a1bSJed Brown   _PC1=num1/den1; _PC2=num2/den1; _PC3=num3/den1; _PC4=num4/den1;
544*c4762a1bSJed Brown 
545*c4762a1bSJed Brown   t1 = Rm * x;
546*c4762a1bSJed Brown   t2 = PetscCosReal(t1);
547*c4762a1bSJed Brown   t4 = PetscSinReal(t1);
548*c4762a1bSJed Brown   t10 = PetscExpReal(-0.2e1 * x * B);
549*c4762a1bSJed Brown   t12 = kn * x;
550*c4762a1bSJed Brown   t13 = PetscCosReal(t12);
551*c4762a1bSJed Brown   t16 = PetscSinReal(t12);
552*c4762a1bSJed Brown   u1 = -km * (_PC1 * t2 + _PC2 * t4 + _PC3 * t2 + _PC4 * t4 + t10 * AA * t13 + t10 * BB * t16);
553*c4762a1bSJed Brown 
554*c4762a1bSJed Brown   t2 = Rm * x;
555*c4762a1bSJed Brown   t3 = PetscCosReal(t2);
556*c4762a1bSJed Brown   t6 = PetscSinReal(t2);
557*c4762a1bSJed Brown   t22 = PetscExpReal(-0.2e1 * x * B);
558*c4762a1bSJed Brown   t23 = B * t22;
559*c4762a1bSJed Brown   t24 = kn * x;
560*c4762a1bSJed Brown   t25 = PetscCosReal(t24);
561*c4762a1bSJed Brown   t29 = PetscSinReal(t24);
562*c4762a1bSJed Brown   u2 = UU * _PC1 * t3 + UU * _PC2 * t6 - _PC1 * t6 * Rm + _PC2 * t3 * Rm - VV * _PC3 * t3 - VV * _PC4 * t6 - _PC3 * t6 * Rm + _PC4 * t3 * Rm - 0.2e1 * t23 * AA * t25 - 0.2e1 * t23 * BB * t29 - t22 * AA * t29 * kn + t22 * BB * t25 * kn;
563*c4762a1bSJed Brown 
564*c4762a1bSJed Brown   t3 = PetscExpReal(0.2e1 * x * B);
565*c4762a1bSJed Brown   t4 = t3 * B;
566*c4762a1bSJed Brown   t8 = km * km;
567*c4762a1bSJed Brown   t9 = t3 * t8;
568*c4762a1bSJed Brown   t11 = 0.3e1 * t9 * Rm;
569*c4762a1bSJed Brown   t12 = Rm * Rm;
570*c4762a1bSJed Brown   t14 = t3 * t12 * Rm;
571*c4762a1bSJed Brown   t15 = UU * UU;
572*c4762a1bSJed Brown   t19 = 0.4e1 * t4 * UU * Rm - t11 - t14 + 0.3e1 * t3 * t15 * Rm;
573*c4762a1bSJed Brown   t20 = Rm * x;
574*c4762a1bSJed Brown   t21 = PetscSinReal(t20);
575*c4762a1bSJed Brown   t27 = 0.2e1 * B * t9;
576*c4762a1bSJed Brown   t33 = 0.2e1 * t4 * t12;
577*c4762a1bSJed Brown   t36 = 0.3e1 * t3 * UU * t12 - t27 - 0.2e1 * t4 * t15 + 0.3e1 * t9 * UU + t33 - t3 * t15 * UU;
578*c4762a1bSJed Brown   t37 = PetscCosReal(t20);
579*c4762a1bSJed Brown   t49 = VV * VV;
580*c4762a1bSJed Brown   t53 = -0.4e1 * t4 * VV * Rm - t11 + 0.3e1 * t3 * t49 * Rm - t14;
581*c4762a1bSJed Brown   t64 = t3 * t49 * VV + t33 - 0.3e1 * t9 * VV - 0.2e1 * t4 * t49 - t27 - 0.3e1 * t3 * VV * t12;
582*c4762a1bSJed Brown   t76 = B * t8;
583*c4762a1bSJed Brown   t80 = kn * kn;
584*c4762a1bSJed Brown   t83 = B * B;
585*c4762a1bSJed Brown   t87 = t80 * kn;
586*c4762a1bSJed Brown   t90 = kn * x;
587*c4762a1bSJed Brown   t91 = PetscSinReal(t90);
588*c4762a1bSJed Brown   t106 = PetscCosReal(t90);
589*c4762a1bSJed Brown   u3 = -((t19 * t21 + t36 * t37) * _PC1 + (t36 * t21 - t19 * t37) * _PC2 + (t53 * t21 + t64 * t37) * _PC3 + (t64 * t21 - t53 * t37) * _PC4 + (-0.3e1 * t8 * AA * kn - 0.8e1 * t76 * BB - 0.4e1 * BB * B * t80 + 0.4e1 * AA * t83 * kn - AA * t87) * t91 + (-0.4e1 * AA * t80 * B - 0.4e1 * t83 * BB * kn + 0.3e1 * t8 * BB * kn - sigma + BB * t87 - 0.8e1 * t76 * AA) * t106) / km;
590*c4762a1bSJed Brown 
591*c4762a1bSJed Brown   t3 = PetscExpReal(0.2e1 * x * B);
592*c4762a1bSJed Brown   t4 = km * km;
593*c4762a1bSJed Brown   t5 = t3 * t4;
594*c4762a1bSJed Brown   t6 = Rm * x;
595*c4762a1bSJed Brown   t7 = PetscCosReal(t6);
596*c4762a1bSJed Brown   t8 = _PC1 * t7;
597*c4762a1bSJed Brown   t10 = PetscSinReal(t6);
598*c4762a1bSJed Brown   t11 = _PC2 * t10;
599*c4762a1bSJed Brown   t13 = _PC3 * t7;
600*c4762a1bSJed Brown   t15 = _PC4 * t10;
601*c4762a1bSJed Brown   t18 = kn * x;
602*c4762a1bSJed Brown   t19 = PetscCosReal(t18);
603*c4762a1bSJed Brown   t22 = PetscSinReal(t18);
604*c4762a1bSJed Brown   t24 = UU * UU;
605*c4762a1bSJed Brown   t25 = t3 * t24;
606*c4762a1bSJed Brown   t28 = t3 * UU;
607*c4762a1bSJed Brown   t38 = Rm * Rm;
608*c4762a1bSJed Brown   t39 = t7 * t38;
609*c4762a1bSJed Brown   t42 = t10 * t38;
610*c4762a1bSJed Brown   t44 = t5 * t8 + t5 * t11 + t5 * t13 + t5 * t15 + t4 * AA * t19 + t4 * BB * t22 + t25 * t8 + t25 * t11 - 0.2e1 * t28 * _PC1 * t10 * Rm + 0.2e1 * t28 * _PC2 * t7 * Rm - t3 * _PC1 * t39 - t3 * _PC2 * t42;
611*c4762a1bSJed Brown   t45 = VV * VV;
612*c4762a1bSJed Brown   t46 = t3 * t45;
613*c4762a1bSJed Brown   t49 = t3 * VV;
614*c4762a1bSJed Brown   t62 = B * B;
615*c4762a1bSJed Brown   t78 = kn * kn;
616*c4762a1bSJed Brown   t82 = t46 * t13 + t46 * t15 + 0.2e1 * t49 * _PC3 * t10 * Rm - 0.2e1 * t49 * _PC4 * t7 * Rm - t3 * _PC3 * t39 - t3 * _PC4 * t42 + 0.4e1 * t62 * AA * t19 + 0.4e1 * t62 * BB * t22 + 0.4e1 * B * AA * t22 * kn - 0.4e1 * B * BB * t19 * kn - AA * t19 * t78 - BB * t22 * t78;
617*c4762a1bSJed Brown   u4 = t44 + t82;
618*c4762a1bSJed Brown 
619*c4762a1bSJed Brown   t3 = PetscExpReal(0.2e1 * x * B);
620*c4762a1bSJed Brown   t4 = t3 * B;
621*c4762a1bSJed Brown   t8 = km * km;
622*c4762a1bSJed Brown   t9 = t3 * t8;
623*c4762a1bSJed Brown   t10 = t9 * Rm;
624*c4762a1bSJed Brown   t11 = Rm * Rm;
625*c4762a1bSJed Brown   t13 = t3 * t11 * Rm;
626*c4762a1bSJed Brown   t14 = UU * UU;
627*c4762a1bSJed Brown   t18 = 0.4e1 * t4 * UU * Rm - t10 - t13 + 0.3e1 * t3 * t14 * Rm;
628*c4762a1bSJed Brown   t19 = Rm * x;
629*c4762a1bSJed Brown   t20 = PetscSinReal(t19);
630*c4762a1bSJed Brown   t26 = 0.2e1 * B * t9;
631*c4762a1bSJed Brown   t31 = 0.2e1 * t4 * t11;
632*c4762a1bSJed Brown   t34 = 0.3e1 * t3 * UU * t11 - t26 - 0.2e1 * t4 * t14 + t9 * UU + t31 - t3 * t14 * UU;
633*c4762a1bSJed Brown   t35 = PetscCosReal(t19);
634*c4762a1bSJed Brown   t47 = VV * VV;
635*c4762a1bSJed Brown   t51 = -0.4e1 * t4 * VV * Rm - t10 + 0.3e1 * t3 * t47 * Rm - t13;
636*c4762a1bSJed Brown   t61 = t3 * t47 * VV + t31 - t9 * VV - 0.2e1 * t4 * t47 - t26 - 0.3e1 * t3 * VV * t11;
637*c4762a1bSJed Brown   t72 = B * t8;
638*c4762a1bSJed Brown   t76 = kn * kn;
639*c4762a1bSJed Brown   t79 = B * B;
640*c4762a1bSJed Brown   t83 = t76 * kn;
641*c4762a1bSJed Brown   t86 = kn * x;
642*c4762a1bSJed Brown   t87 = PetscSinReal(t86);
643*c4762a1bSJed Brown   t101 = PetscCosReal(t86);
644*c4762a1bSJed Brown   u5 = ((t18 * t20 + t34 * t35) * _PC1 + (t34 * t20 - t18 * t35) * _PC2 + (t51 * t20 + t61 * t35) * _PC3 + (t61 * t20 - t51 * t35) * _PC4 + (-t8 * AA * kn - 0.4e1 * t72 * BB - 0.4e1 * BB * B * t76 + 0.4e1 * AA * t79 * kn - AA * t83) * t87 + (-0.4e1 * AA * t76 * B - 0.4e1 * t79 * BB * kn + t8 * BB * kn - sigma + BB * t83 - 0.4e1 * t72 * AA) * t101) / km;
645*c4762a1bSJed Brown 
646*c4762a1bSJed Brown   t3 = PetscExpReal(0.2e1 * x * B);
647*c4762a1bSJed Brown   t4 = UU * UU;
648*c4762a1bSJed Brown   t8 = km * km;
649*c4762a1bSJed Brown   t9 = t3 * t8;
650*c4762a1bSJed Brown   t10 = t9 * Rm;
651*c4762a1bSJed Brown   t11 = Rm * Rm;
652*c4762a1bSJed Brown   t13 = t3 * t11 * Rm;
653*c4762a1bSJed Brown   t14 = t3 * B;
654*c4762a1bSJed Brown   t18 = 0.3e1 * t3 * t4 * Rm + t10 - t13 + 0.4e1 * t14 * UU * Rm;
655*c4762a1bSJed Brown   t19 = Rm * x;
656*c4762a1bSJed Brown   t20 = PetscSinReal(t19);
657*c4762a1bSJed Brown   t28 = 0.2e1 * B * t9;
658*c4762a1bSJed Brown   t33 = 0.2e1 * t14 * t11;
659*c4762a1bSJed Brown   t34 = -0.2e1 * t4 * t14 + 0.3e1 * t3 * UU * t11 - t28 - t3 * t4 * UU - t9 * UU + t33;
660*c4762a1bSJed Brown   t35 = PetscCosReal(t19);
661*c4762a1bSJed Brown   t47 = VV * VV;
662*c4762a1bSJed Brown   t51 = -0.4e1 * t14 * VV * Rm - t13 + t10 + 0.3e1 * t3 * t47 * Rm;
663*c4762a1bSJed Brown   t61 = -0.3e1 * t3 * VV * t11 + t33 + t3 * t47 * VV + t9 * VV - 0.2e1 * t14 * t47 - t28;
664*c4762a1bSJed Brown   t71 = kn * kn;
665*c4762a1bSJed Brown   t74 = B * B;
666*c4762a1bSJed Brown   t80 = t71 * kn;
667*c4762a1bSJed Brown   t83 = kn * x;
668*c4762a1bSJed Brown   t84 = PetscSinReal(t83);
669*c4762a1bSJed Brown   t96 = PetscCosReal(t83);
670*c4762a1bSJed Brown   u6 = -((t18 * t20 + t34 * t35) * _PC1 + (t34 * t20 - t18 * t35) * _PC2 + (t51 * t20 + t61 * t35) * _PC3 + (t61 * t20 - t51 * t35) * _PC4 + (-0.4e1 * BB * B * t71 + 0.4e1 * AA * t74 * kn + t8 * AA * kn - AA * t80) * t84 + (-0.4e1 * AA * t71 * B - t8 * BB * kn - 0.4e1 * t74 * BB * kn - sigma + BB * t80) * t96) / km;
671*c4762a1bSJed Brown 
672*c4762a1bSJed Brown   /*SS = sin(km*z)*(exp(UU*x)*(_PC1*cos(Rm*x)+_PC2*sin(Rm*x)) + exp(-VV*x)*(_PC3*cos(Rm*x)+_PC4*sin(Rm*x)) + exp(-2*x*B)*(AA*cos(kn*x)+BB*sin(kn*x)));*/
673*c4762a1bSJed Brown 
674*c4762a1bSJed Brown   /* u1 = Vx, u2 = Vz, u3 = txx, u4 = tzx, u5 = pressure, u6 = tzz */
675*c4762a1bSJed Brown 
676*c4762a1bSJed Brown   sum5 += u5*PetscCosReal(km*z);  /* pressure */
677*c4762a1bSJed Brown   sum6 += u6*PetscCosReal(km*z);  /* zz total stress */
678*c4762a1bSJed Brown 
679*c4762a1bSJed Brown   u1 *= PetscCosReal(km*z); /* x velocity */
680*c4762a1bSJed Brown   sum1 += u1;
681*c4762a1bSJed Brown   u2 *= PetscSinReal(km*z); /* z velocity */
682*c4762a1bSJed Brown   sum2 += u2;
683*c4762a1bSJed Brown 
684*c4762a1bSJed Brown   u3 *= PetscCosReal(km*z); /* xx total stress */
685*c4762a1bSJed Brown   sum3 += u3;
686*c4762a1bSJed Brown   u4 *= PetscSinReal(km*z); /* zx stress */
687*c4762a1bSJed Brown   sum4 += u4;
688*c4762a1bSJed Brown 
689*c4762a1bSJed Brown   /* rho = -sigma*sin(km*z)*cos(kn*x); */ /* density */
690*c4762a1bSJed Brown   /* sum7 += rho; */
691*c4762a1bSJed Brown 
692*c4762a1bSJed Brown   /* Output */
693*c4762a1bSJed Brown   if (mu) {
694*c4762a1bSJed Brown     *mu = Z;
695*c4762a1bSJed Brown   }
696*c4762a1bSJed Brown   if (vel) {
697*c4762a1bSJed Brown     vel[0] = sum1;
698*c4762a1bSJed Brown     vel[1] = sum2;
699*c4762a1bSJed Brown   }
700*c4762a1bSJed Brown   if (p) {
701*c4762a1bSJed Brown     (*p) = sum5;
702*c4762a1bSJed Brown   }
703*c4762a1bSJed Brown   if (s) {
704*c4762a1bSJed Brown     s[0] = sum3;
705*c4762a1bSJed Brown     s[1] = sum4;
706*c4762a1bSJed Brown     s[2] = sum6;
707*c4762a1bSJed Brown   }
708*c4762a1bSJed Brown   if (gamma) {
709*c4762a1bSJed Brown     /* sigma = tau - p, tau = sigma + p, tau[] = 2*eta*gamma[] */
710*c4762a1bSJed Brown     gamma[0] = (sum3+sum5)/(2.0*Z);
711*c4762a1bSJed Brown     gamma[1] = (sum4)/(2.0*Z);
712*c4762a1bSJed Brown     gamma[2] = (sum6+sum5)/(2.0*Z);
713*c4762a1bSJed Brown   }
714*c4762a1bSJed Brown   PetscFunctionReturn(0);
715*c4762a1bSJed Brown }
716*c4762a1bSJed Brown 
717*c4762a1bSJed Brown static PetscErrorCode SolKxSolutionVelocity(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar v[], void *ctx)
718*c4762a1bSJed Brown {
719*c4762a1bSJed Brown   Parameter     *s = (Parameter *) ctx;
720*c4762a1bSJed Brown   PetscErrorCode ierr;
721*c4762a1bSJed Brown 
722*c4762a1bSJed Brown   PetscFunctionBegin;
723*c4762a1bSJed Brown   ierr = SolKxSolution(x, s->m, s->n, s->B, v, NULL, NULL, NULL, NULL);CHKERRQ(ierr);
724*c4762a1bSJed Brown   PetscFunctionReturn(0);
725*c4762a1bSJed Brown }
726*c4762a1bSJed Brown 
727*c4762a1bSJed Brown static PetscErrorCode SolKxSolutionPressure(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar p[], void *ctx)
728*c4762a1bSJed Brown {
729*c4762a1bSJed Brown   Parameter     *s = (Parameter *) ctx;
730*c4762a1bSJed Brown   PetscErrorCode ierr;
731*c4762a1bSJed Brown 
732*c4762a1bSJed Brown   PetscFunctionBegin;
733*c4762a1bSJed Brown   ierr = SolKxSolution(x, s->m, s->n, s->B, NULL, p, NULL, NULL, NULL);CHKERRQ(ierr);
734*c4762a1bSJed Brown   PetscFunctionReturn(0);
735*c4762a1bSJed Brown }
736*c4762a1bSJed Brown 
737*c4762a1bSJed Brown /*
738*c4762a1bSJed Brown   SolCxSolution - Exact Stokes solutions for discontinuous viscosity
739*c4762a1bSJed Brown 
740*c4762a1bSJed Brown  Input Parameters:
741*c4762a1bSJed Brown + pos   - The (x,z) coordinate at which to evaluate the solution
742*c4762a1bSJed Brown . n     - The constant defining the x-dependence of the forcing function
743*c4762a1bSJed Brown . m     - The constant defining the z-dependence of the forcing function
744*c4762a1bSJed Brown . xc    - The x coordinate at which the viscosity is discontinuous
745*c4762a1bSJed Brown . etaA  - The viscosity coefficient for x < xc
746*c4762a1bSJed Brown - etaB  - The viscosity coefficient for x > xc
747*c4762a1bSJed Brown 
748*c4762a1bSJed Brown   Output Parameters:
749*c4762a1bSJed Brown + vel   - The (x,z)-velocity at (x,z), or NULL
750*c4762a1bSJed Brown . p     - The pressure at (x,z), or NULL
751*c4762a1bSJed Brown . s     - The total stress (sigma_xx, sigma_xz, sigma_zz) at (x,z), or NULL
752*c4762a1bSJed Brown . gamma - The strain rate, or NULL
753*c4762a1bSJed Brown - mu    - The viscosity at (x,z), or NULL
754*c4762a1bSJed Brown 
755*c4762a1bSJed Brown   Note:
756*c4762a1bSJed Brown $  The domain is the square 0 <= x,z <= 1. We solve the Stokes equation for incompressible flow with free-slip boundary
757*c4762a1bSJed Brown $  conditions everywhere. The forcing term f is given by
758*c4762a1bSJed Brown $
759*c4762a1bSJed Brown $    fx = 0
760*c4762a1bSJed Brown $    fz = sigma*sin(km*z)*cos(kn*x)
761*c4762a1bSJed Brown $
762*c4762a1bSJed Brown $  where
763*c4762a1bSJed Brown $
764*c4762a1bSJed Brown $    km = m*Pi (m may be non-integral)
765*c4762a1bSJed Brown $    kn = n*Pi
766*c4762a1bSJed Brown $
767*c4762a1bSJed Brown $  meaning that the density rho is -sigma*sin(km*z)*cos(kn*x). Here we set sigma = 1.
768*c4762a1bSJed Brown $  The viscosity eta jumps from etaA to etaB at x = xc.
769*c4762a1bSJed Brown */
770*c4762a1bSJed Brown static PetscErrorCode SolCxSolution(const PetscReal pos[], PetscReal m, PetscInt n, PetscReal xc, PetscReal etaA, PetscReal etaB,
771*c4762a1bSJed Brown                                     PetscScalar vel[], PetscScalar *p, PetscScalar s[], PetscScalar gamma[], PetscScalar *mu)
772*c4762a1bSJed Brown {
773*c4762a1bSJed Brown   PetscReal _PC1A,_PC2A,_PC3A,_PC4A,_PC1B,_PC2B,_PC3B,_PC4B,_PC1,_PC2,_PC3,_PC4;
774*c4762a1bSJed Brown   PetscReal t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40;
775*c4762a1bSJed Brown   PetscReal t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80;
776*c4762a1bSJed Brown   PetscReal t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t115,t116,t117,t118,t119,t120;
777*c4762a1bSJed Brown   PetscReal t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160;
778*c4762a1bSJed Brown   PetscReal t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199;
779*c4762a1bSJed Brown   PetscReal t201,t202,t203,t204,t206,t207,t208,t209,t210,t211,t212,t213,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240;
780*c4762a1bSJed Brown   PetscReal t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t258,t259,t260,t261,t262,t263,t264,t265,t267,t268,t269,t270,t272,t273,t274,t275,t276,t277,t278,t279,t280;
781*c4762a1bSJed Brown   PetscReal t281,t282,t283,t284,t285,t286,t288,t289,t290,t291,t292,t295,t296,t297,t298,t299,t300,t301,t303,t304,t305,t307,t308,t310,t311,t312,t313,t314,t315,t316,t317,t318,t319,t320;
782*c4762a1bSJed Brown   PetscReal t321,t322,t323,t324,t325,t326,t327,t328,t329,t330,t331,t332,t334,t335,t336,t337,t338,t339,t340,t341,t342,t344,t345,t346,t347,t348,t349,t350,t351,t352,t353,t354,t355,t356,t358,t359,t360;
783*c4762a1bSJed Brown   PetscReal t361,t362,t363,t364,t365,t366,t367,t368,t369,t370,t371,t372,t373,t374,t375,t376,t377,t378,t379,t380,t381,t382,t383,t384,t385,t386,t387,t389,t390,t391,t393,t394,t395,t396,t397,t398;
784*c4762a1bSJed Brown   PetscReal t401,t402,t403,t404,t405,t406,t407,t408,t409,t410,t411,t412,t413,t414,t415,t416,t417,t418,t419,t421,t422,t423,t424,t425,t426,t427,t428,t429,t430,t431,t432,t433,t434,t436,t437,t438,t439,t440;
785*c4762a1bSJed Brown   PetscReal t441,t442,t443,t444,t445,t446,t447,t448,t450,t451,t453,t454,t455,t456,t457,t458,t459,t461,t462,t463,t464,t465,t466,t468,t469,t470,t471,t474,t475,t478,t480;
786*c4762a1bSJed Brown   PetscReal t482,t483,t484,t485,t488,t489,t490,t492,t493,t495,t497,t498,t499,t501,t502,t503,t504,t505,t507,t508,t509,t510,t511,t512,t513,t515,t518,t520;
787*c4762a1bSJed Brown   PetscReal t522,t525,t527,t528,t529,t530,t532,t533,t534,t535,t536,t538,t539,t541,t542,t544,t545,t546,t547,t548,t549,t550,t551,t552,t553,t554,t555,t556,t557,t560;
788*c4762a1bSJed Brown   PetscReal t561,t562,t563,t564,t567,t568,t571,t573,t575,t576,t578,t579,t583,t590,t591,t594,t595,t596,t597,t598,t600;
789*c4762a1bSJed Brown   PetscReal t601,t602,t604,t606,t607,t608,t611,t613,t615,t616,t617,t619,t621,t623,t624,t625,t626,t627,t629,t630,t632,t633,t634,t638,t639,t640;
790*c4762a1bSJed Brown   PetscReal t641,t642,t643,t644,t645,t647,t648,t649,t650,t651,t652,t653,t654,t655,t656,t657,t658,t659,t660,t662,t663,t665,t666,t667,t668,t670,t671,t672,t673,t674,t675,t676,t679,t680;
791*c4762a1bSJed Brown   PetscReal t682,t683,t684,t685,t686,t688,t689,t690,t691,t693,t694,t695,t696,t697,t698,t699,t700,t701,t702,t704,t705,t708,t709,t711,t712,t713,t714,t717,t718,t719;
792*c4762a1bSJed Brown   PetscReal t721,t722,t723,t726,t727,t728,t730,t733,t734,t735,t736,t737,t738,t739,t740,t741,t744,t745,t746,t749,t750,t752,t753,t754,t755,t757,t758,t759,t760;
793*c4762a1bSJed Brown   PetscReal t761,t762,t763,t764,t766,t767,t768,t770,t771,t772,t773,t774,t775,t776,t777,t778,t780,t781,t782,t785,t786,t789,t790,t791,t792,t793,t794,t795,t796,t797,t798,t800;
794*c4762a1bSJed Brown   PetscReal t801,t806,t807,t808,t809,t811,t812,t817,t818,t819,t821,t822,t824,t827,t828,t830,t834,t835,t837,t840;
795*c4762a1bSJed Brown   PetscReal t842,t843,t844,t845,t846,t849,t850,t853,t854,t855,t857,t858,t859,t860,t863,t864,t867,t868,t869,t873,t874,t877,t878,t879,t880;
796*c4762a1bSJed Brown   PetscReal t884,t888,t891,t894,t900,t901,t903,t904,t907,t908,t909,t911,t914,t915,t916,t919,t920;
797*c4762a1bSJed Brown   PetscReal t923,t924,t925,t926,t927,t929,t932,t935,t937,t939,t942,t943,t944,t945,t947,t948,t949,t950,t952,t953,t954,t955,t956,t957;
798*c4762a1bSJed Brown   PetscReal t961,t964,t965,t966,t967,t968,t969,t971,t972,t974,t977,t978,t981,t983,t987,t988,t992,t993,t994,t997,t998;
799*c4762a1bSJed Brown   PetscReal t1001,t1003,t1005,t1006,t1009,t1010,t1012,t1013,t1015,t1016,t1017,t1018,t1020,t1021,t1029,t1031,t1032,t1033,t1040;
800*c4762a1bSJed Brown   PetscReal t1041,t1042,t1044,t1047,t1050,t1054,t1055,t1057,t1058,t1063,t1068,t1069,t1070,t1079,t1080;
801*c4762a1bSJed Brown   PetscReal t1088,t1089,t1091,t1092,t1094,t1096,t1101,t1102,t1103,t1104,t1105,t1108,t1112,t1113,t1118,t1119,t1120;
802*c4762a1bSJed Brown   PetscReal t1121,t1122,t1123,t1124,t1125,t1126,t1127,t1128,t1129,t1130,t1132,t1133,t1134,t1135,t1138,t1139,t1140,t1141,t1142,t1145,t1146,t1148,t1149,t1150,t1153,t1154,t1156,t1157,t1158,t1159;
803*c4762a1bSJed Brown   PetscReal t1161,t1162,t1165,t1166,t1170,t1171,t1172,t1173,t1175,t1176,t1178,t1180,t1181,t1182,t1185,t1189,t1192,t1193,t1195,t1196,t1199;
804*c4762a1bSJed Brown   PetscReal t1201,t1203,t1209,t1210,t1211,t1213,t1214,t1218,t1221,t1224,t1225,t1226,t1228,t1233,t1234,t1235,t1236,t1237,t1240;
805*c4762a1bSJed Brown   PetscReal t1241,t1242,t1243,t1244,t1245,t1248,t1251,t1252,t1257,t1258,t1259,t1260,t1263,t1268,t1269,t1272,t1280;
806*c4762a1bSJed Brown   PetscReal t1282,t1283,t1284,t1285,t1287,t1288,t1289,t1292,t1293,t1296,t1297,t1300,t1304,t1307,t1310,t1311,t1312,t1316,t1317,t1320;
807*c4762a1bSJed Brown   PetscReal t1321,t1323,t1328,t1330,t1331,t1332,t1333,t1336,t1338,t1343,t1344,t1346,t1349,t1350,t1354;
808*c4762a1bSJed Brown   PetscReal t1366,t1369,t1370,t1371,t1376,t1378,t1380,t1383,t1386,t1387,t1388,t1391,t1393,t1399;
809*c4762a1bSJed Brown   PetscReal t1411,t1412,t1420,t1427;
810*c4762a1bSJed Brown   PetscReal t1450,t1456,t1468,t1472,t1474,t1478;
811*c4762a1bSJed Brown   PetscReal t1504,t1511;
812*c4762a1bSJed Brown   PetscReal t1545;
813*c4762a1bSJed Brown   PetscReal t1564,t1583;
814*c4762a1bSJed Brown 
815*c4762a1bSJed Brown   PetscReal      sum1 = 0.0, sum2 = 0.0, sum3 = 0.0, sum4 = 0.0, sum5 = 0.0, sum6 = 0.0;
816*c4762a1bSJed Brown   PetscReal      ZA = etaA, ZB = etaB;
817*c4762a1bSJed Brown   PetscInt       nz  = m,    nx = n;
818*c4762a1bSJed Brown   PetscReal      u1, u2, u3, u4, u5, u6, Z, x = pos[0], z = pos[1];
819*c4762a1bSJed Brown 
820*c4762a1bSJed Brown   PetscFunctionBegin;
821*c4762a1bSJed Brown   /* Note that there is no Fourier sum here. */
822*c4762a1bSJed Brown   /****************************************************************************************/
823*c4762a1bSJed Brown   _PC1A = 0;
824*c4762a1bSJed Brown   /****************************************************************************************/
825*c4762a1bSJed Brown   t1 = nx * 0.3141592654e1;
826*c4762a1bSJed Brown   t2 = PetscSinReal(t1);
827*c4762a1bSJed Brown   t3 = nx * t2;
828*c4762a1bSJed Brown   t4 = nz * nz;
829*c4762a1bSJed Brown   t5 = t4 * t4;
830*c4762a1bSJed Brown   t6 = 0.3141592654e1 * 0.3141592654e1;
831*c4762a1bSJed Brown   t8 = t3 * t5 * t6;
832*c4762a1bSJed Brown   t9 = ZA * xc;
833*c4762a1bSJed Brown   t12 = PetscExpReal(xc * nz * 0.3141592654e1);
834*c4762a1bSJed Brown   t13 = t12 * t12;
835*c4762a1bSJed Brown   t15 = nz * 0.3141592654e1;
836*c4762a1bSJed Brown   t16 = PetscExpReal(t15);
837*c4762a1bSJed Brown   t17 = t16 * t16;
838*c4762a1bSJed Brown   t18 = t17 * t16;
839*c4762a1bSJed Brown   t19 = ZB * t13 * t18;
840*c4762a1bSJed Brown   t20 = t9 * t19;
841*c4762a1bSJed Brown   t23 = ZA * ZA;
842*c4762a1bSJed Brown   t24 = nx * nx;
843*c4762a1bSJed Brown   t25 = t24 * nx;
844*c4762a1bSJed Brown   t26 = t23 * t25;
845*c4762a1bSJed Brown   t28 = t13 * t13;
846*c4762a1bSJed Brown   t29 = t28 * t13;
847*c4762a1bSJed Brown   t33 = nx * ZB;
848*c4762a1bSJed Brown   t34 = t1 * xc;
849*c4762a1bSJed Brown   t35 = PetscSinReal(t34);
850*c4762a1bSJed Brown   t36 = t4 * nz;
851*c4762a1bSJed Brown   t37 = t35 * t36;
852*c4762a1bSJed Brown   t38 = t33 * t37;
853*c4762a1bSJed Brown   t39 = 0.3141592654e1 * ZA;
854*c4762a1bSJed Brown   t40 = t13 * t12;
855*c4762a1bSJed Brown   t41 = t17 * t40;
856*c4762a1bSJed Brown   t45 = ZB * ZB;
857*c4762a1bSJed Brown   t46 = t45 * t24;
858*c4762a1bSJed Brown   t47 = t46 * t4;
859*c4762a1bSJed Brown   t48 = 0.3141592654e1 * xc;
860*c4762a1bSJed Brown   t49 = t13 * t17;
861*c4762a1bSJed Brown   t53 = xc * xc;
862*c4762a1bSJed Brown   t54 = t36 * t53;
863*c4762a1bSJed Brown   t56 = t54 * t6 * t45;
864*c4762a1bSJed Brown   t57 = PetscCosReal(t34);
865*c4762a1bSJed Brown   t58 = t57 * t24;
866*c4762a1bSJed Brown   t59 = t28 * t12;
867*c4762a1bSJed Brown   t60 = t17 * t59;
868*c4762a1bSJed Brown   t61 = t58 * t60;
869*c4762a1bSJed Brown   t64 = t25 * t2;
870*c4762a1bSJed Brown   t65 = t64 * t15;
871*c4762a1bSJed Brown   t72 = nx * t23;
872*c4762a1bSJed Brown   t74 = t72 * t2 * t5;
873*c4762a1bSJed Brown   t75 = t6 * t53;
874*c4762a1bSJed Brown   t76 = t16 * t29;
875*c4762a1bSJed Brown   t80 = t23 * nz;
876*c4762a1bSJed Brown   t81 = t80 * 0.3141592654e1;
877*c4762a1bSJed Brown   t82 = t18 * t28;
878*c4762a1bSJed Brown   t86 = nx * t5;
879*c4762a1bSJed Brown   t87 = t23 * t6;
880*c4762a1bSJed Brown   t89 = xc * t2;
881*c4762a1bSJed Brown   t90 = t13 * t18;
882*c4762a1bSJed Brown   t91 = t89 * t90;
883*c4762a1bSJed Brown   t94 = t28 * t28;
884*c4762a1bSJed Brown   t96 = t24 * nz;
885*c4762a1bSJed Brown   t98 = t4 * t45;
886*c4762a1bSJed Brown   t99 = t98 * 0.3141592654e1;
887*c4762a1bSJed Brown   t100 = t58 * t41;
888*c4762a1bSJed Brown   t104 = 0.3141592654e1 * t25;
889*c4762a1bSJed Brown   t105 = ZA * nz * t104;
890*c4762a1bSJed Brown   t106 = t2 * ZB;
891*c4762a1bSJed Brown   t110 = t17 * t17;
892*c4762a1bSJed Brown   t111 = ZA * t110;
893*c4762a1bSJed Brown   t116 = nz * t28;
894*c4762a1bSJed Brown   t122 = t64 * t4 * t6;
895*c4762a1bSJed Brown   t126 = t23 * t29 * t4;
896*c4762a1bSJed Brown   t128 = t24 * xc;
897*c4762a1bSJed Brown   t132 = t36 * t23;
898*c4762a1bSJed Brown   t133 = t6 * t57;
899*c4762a1bSJed Brown   t135 = t128 * t41;
900*c4762a1bSJed Brown   t138 = t6 * xc;
901*c4762a1bSJed Brown   t142 = t72 * t2;
902*c4762a1bSJed Brown   t147 = 0.4e1 * t8 * t20 - 0.2e1 * t26 * t2 * t16 * t29 - 0.8e1 * t38 * t39 * t41 + 0.4e1 * t47 * t48 * t49 - 0.8e1 * t56 * t61 - 0.4e1 * t65 * t20 + 0.2e1 * t26 * t2 * t18 * t28 - 0.4e1 * t74 * t75 * t76 - 0.2e1 * t81 * t64 * t82 - 0.4e1 * t86 * t87 * t91 - t23 * t94 * t96 + 0.8e1 * t99 * t100 - 0.2e1 * t105 * t106 * t82 - 0.4e1 * t38 * t48 * t111 * t12 + 0.2e1 * t116 * ZB * t111 * t24 + 0.4e1 * t122 * t20 + 0.4e1 * t126 * 0.3141592654e1 * t17 * t128 + 0.8e1 * t132 * t133 * t135 + 0.4e1 * t74 * t138 * t76 - 0.2e1 * t142 * t4 * t18 * t28;
903*c4762a1bSJed Brown   t149 = ZA * t25 * t2;
904*c4762a1bSJed Brown   t150 = ZB * t28;
905*c4762a1bSJed Brown   t154 = t35 * t5;
906*c4762a1bSJed Brown   t155 = t72 * t154;
907*c4762a1bSJed Brown   t156 = t75 * t41;
908*c4762a1bSJed Brown   t159 = nx * ZA;
909*c4762a1bSJed Brown   t160 = t2 * t36;
910*c4762a1bSJed Brown   t161 = t159 * t160;
911*c4762a1bSJed Brown   t162 = 0.3141592654e1 * ZB;
912*c4762a1bSJed Brown   t163 = t28 * t16;
913*c4762a1bSJed Brown   t167 = t23 * t57;
914*c4762a1bSJed Brown   t168 = t167 * t24;
915*c4762a1bSJed Brown   t169 = nz * t110;
916*c4762a1bSJed Brown   t170 = t169 * t40;
917*c4762a1bSJed Brown   t173 = ZA * ZB;
918*c4762a1bSJed Brown   t174 = t173 * t90;
919*c4762a1bSJed Brown   t177 = t36 * 0.3141592654e1;
920*c4762a1bSJed Brown   t181 = t80 * t104;
921*c4762a1bSJed Brown   t184 = nz * t17;
922*c4762a1bSJed Brown   t188 = t17 * t29;
923*c4762a1bSJed Brown   t190 = t4 * 0.3141592654e1;
924*c4762a1bSJed Brown   t191 = t190 * t24;
925*c4762a1bSJed Brown   t206 = t138 * t60;
926*c4762a1bSJed Brown   t209 = t23 * t4;
927*c4762a1bSJed Brown   t211 = t209 * t6 * t25;
928*c4762a1bSJed Brown   t212 = t89 * t76;
929*c4762a1bSJed Brown   t216 = ZB * t16 * t29;
930*c4762a1bSJed Brown   t217 = t9 * t216;
931*c4762a1bSJed Brown   t220 = ZB * t110;
932*c4762a1bSJed Brown   t221 = ZA * t24;
933*c4762a1bSJed Brown   t222 = t221 * nz;
934*c4762a1bSJed Brown   t225 = t132 * t75;
935*c4762a1bSJed Brown   t232 = t45 * t28;
936*c4762a1bSJed Brown   t233 = t110 * t24;
937*c4762a1bSJed Brown   t234 = t233 * nz;
938*c4762a1bSJed Brown   t236 = t209 * 0.3141592654e1;
939*c4762a1bSJed Brown   t237 = t17 * xc;
940*c4762a1bSJed Brown   t239 = t237 * t13 * t24;
941*c4762a1bSJed Brown   t242 = -0.2e1 * t149 * t150 * t16 - 0.8e1 * t155 * t156 - 0.2e1 * t161 * t162 * t163 + 0.2e1 * t168 * t170 + 0.2e1 * t65 * t174 - 0.2e1 * t142 * t177 * t76 + 0.4e1 * t181 * t91 - 0.4e1 * t168 * t184 * t59 - 0.4e1 * t188 * t23 * t191 + 0.4e1 * t38 * t48 * ZA * t17 * t40 + 0.4e1 * t49 * t23 * t191 + 0.2e1 * t26 * t2 * t13 * t18 - 0.8e1 * t155 * t206 + 0.4e1 * t211 * t212 - 0.4e1 * t8 * t217 + 0.2e1 * t220 * t222 - 0.8e1 * t225 * t100 + 0.2e1 * t142 * t4 * t16 * t29 + t232 * t234 - 0.4e1 * t236 * t239;
942*c4762a1bSJed Brown   t244 = nx * t45;
943*c4762a1bSJed Brown   t245 = t244 * t37;
944*c4762a1bSJed Brown   t246 = t110 * t40;
945*c4762a1bSJed Brown   t251 = t237 * t59;
946*c4762a1bSJed Brown   t256 = t64 * t90;
947*c4762a1bSJed Brown   t260 = t36 * t45 * t133;
948*c4762a1bSJed Brown   t263 = t45 * t57;
949*c4762a1bSJed Brown   t264 = t263 * t24;
950*c4762a1bSJed Brown   t265 = t169 * t12;
951*c4762a1bSJed Brown   t269 = t6 * t36;
952*c4762a1bSJed Brown   t270 = t17 * t24;
953*c4762a1bSJed Brown   t274 = t110 * t13;
954*c4762a1bSJed Brown   t276 = t190 * t128;
955*c4762a1bSJed Brown   t279 = nx * t36;
956*c4762a1bSJed Brown   t281 = t28 * t40;
957*c4762a1bSJed Brown   t282 = t281 * t35;
958*c4762a1bSJed Brown   t286 = t138 * t41;
959*c4762a1bSJed Brown   t289 = t75 * t60;
960*c4762a1bSJed Brown   t296 = t190 * t173;
961*c4762a1bSJed Brown   t305 = t86 * t45 * t35;
962*c4762a1bSJed Brown   t312 = t33 * t154;
963*c4762a1bSJed Brown   t313 = t6 * ZA;
964*c4762a1bSJed Brown   t324 = t232 * t270;
965*c4762a1bSJed Brown   t327 = -0.2e1 * t245 * t48 * t246 + 0.4e1 * t159 * t37 * t162 * t251 + 0.4e1 * t209 * t75 * t256 + 0.8e1 * t260 * t135 + 0.2e1 * t264 * t265 + 0.32e2 * t9 * t150 * t269 * t270 + 0.4e1 * t274 * t23 * t276 + 0.2e1 * t279 * t45 * t282 * t48 + 0.8e1 * t155 * t286 + 0.8e1 * t155 * t289 - 0.8e1 * t150 * ZA * t96 * t17 + 0.8e1 * t296 * t61 - 0.2e1 * t105 * t106 * t163 - 0.2e1 * t81 * t256 - 0.8e1 * t305 * t156 - 0.4e1 * t33 * t282 * t177 * t9 - 0.16e2 * t312 * t313 * t237 * t40 - 0.4e1 * t168 * t184 * t40 + 0.2e1 * t168 * t265 + 0.16e2 * t269 * t53 * t324;
966*c4762a1bSJed Brown   t328 = t3 * t4;
967*c4762a1bSJed Brown   t331 = t72 * t37;
968*c4762a1bSJed Brown   t332 = t48 * t60;
969*c4762a1bSJed Brown   t335 = nz * t94;
970*c4762a1bSJed Brown   t345 = t72 * t35;
971*c4762a1bSJed Brown   t349 = t173 * t57;
972*c4762a1bSJed Brown   t355 = t53 * t17;
973*c4762a1bSJed Brown   t364 = t54 * t6 * ZB;
974*c4762a1bSJed Brown   t365 = t28 * t17;
975*c4762a1bSJed Brown   t369 = xc * ZB;
976*c4762a1bSJed Brown   t370 = t269 * t369;
977*c4762a1bSJed Brown   t371 = ZA * t57;
978*c4762a1bSJed Brown   t373 = t371 * t270 * t40;
979*c4762a1bSJed Brown   t385 = nx * t35;
980*c4762a1bSJed Brown   t396 = t4 * xc;
981*c4762a1bSJed Brown   t397 = t396 * t162;
982*c4762a1bSJed Brown   t415 = t37 * t48;
983*c4762a1bSJed Brown   t418 = -0.32e2 * t364 * t365 * t221 - 0.16e2 * t370 * t373 - 0.4e1 * t331 * t48 * t41 + 0.4e1 * t86 * t23 * t53 * t6 * t2 * t90 + 0.2e1 * t385 * t177 * t23 * xc * t246 + 0.16e2 * t132 * t53 * t6 * t28 * t270 - 0.4e1 * t397 * t371 * t233 * t12 - 0.12e2 * t173 * t58 * t190 * t251 + 0.2e1 * t385 * t36 * 0.3141592654e1 * t23 * xc * t59 - 0.8e1 * t99 * t61 - 0.2e1 * t244 * t59 * t415;
984*c4762a1bSJed Brown   t427 = t371 * t270 * t59;
985*c4762a1bSJed Brown   t439 = t209 * t48;
986*c4762a1bSJed Brown   t440 = t110 * t12;
987*c4762a1bSJed Brown   t441 = t58 * t440;
988*c4762a1bSJed Brown   t447 = t36 * xc;
989*c4762a1bSJed Brown   t455 = t48 * t440;
990*c4762a1bSJed Brown   t471 = ZB * t17;
991*c4762a1bSJed Brown   t492 = 0.12e2 * t397 * t373 - 0.4e1 * t122 * t217 + 0.16e2 * t364 * t427 + 0.16e2 * t312 * t313 * t355 * t40 - 0.8e1 * t279 * t39 * t35 * ZB * t60 + 0.2e1 * t439 * t441 - 0.2e1 * t81 * t64 * t163 + 0.8e1 * t447 * t87 * t61 + 0.2e1 * t23 * t59 * t57 * t276 + 0.2e1 * t245 * t455 - 0.4e1 * t349 * t96 * t440 - 0.16e2 * t370 * t427 + 0.4e1 * t181 * t212 - 0.16e2 * t365 * t23 * t269 * t128 + 0.16e2 * t86 * t138 * ZA * t35 * t471 * t59 + 0.8e1 * t305 * t289 - 0.4e1 * t439 * t100 + 0.2e1 * ZB * t25 * t2 * ZA * t18 * t28 + 0.2e1 * t142 * t4 * t28 * t16 - 0.8e1 * t56 * t100;
992*c4762a1bSJed Brown   t499 = ZA * t53 * t19;
993*c4762a1bSJed Brown   t505 = t396 * 0.3141592654e1;
994*c4762a1bSJed Brown   t518 = t173 * t53 * t16 * t29;
995*c4762a1bSJed Brown   t533 = t23 * t28;
996*c4762a1bSJed Brown   t535 = t188 * t45;
997*c4762a1bSJed Brown   t538 = t24 * t4;
998*c4762a1bSJed Brown   t545 = t3 * t177;
999*c4762a1bSJed Brown   t546 = t173 * t76;
1000*c4762a1bSJed Brown   t555 = t45 * t110;
1001*c4762a1bSJed Brown   t557 = t72 * t160;
1002*c4762a1bSJed Brown   t561 = -0.8e1 * t225 * t61 - 0.2e1 * t161 * t162 * t82 + t533 * t234 + 0.4e1 * t535 * t191 + 0.4e1 * t167 * t538 * t332 + 0.4e1 * t349 * t96 * t60 + 0.2e1 * t545 * t546 - 0.2e1 * t264 * t170 + 0.4e1 * t397 * t281 * ZA * t58 - t555 * t96 - 0.4e1 * t557 * t48 * t76;
1003*c4762a1bSJed Brown   t567 = t396 * 0.3141592654e1 * t45;
1004*c4762a1bSJed Brown   t568 = t58 * t246;
1005*c4762a1bSJed Brown   t597 = t58 * nz;
1006*c4762a1bSJed Brown   t615 = t13 * t45;
1007*c4762a1bSJed Brown   t616 = t615 * t233;
1008*c4762a1bSJed Brown   t619 = t94 * t45;
1009*c4762a1bSJed Brown   t621 = t45 * t59;
1010*c4762a1bSJed Brown   t625 = 0.2e1 * t149 * t216 + 0.2e1 * t567 * t568 - 0.16e2 * t269 * xc * t324 - 0.2e1 * t236 * xc * t281 * t58 - 0.2e1 * t142 * t177 * t90 - 0.8e1 * t567 * t100 + 0.2e1 * t65 * t546 - 0.8e1 * t305 * t206 + 0.2e1 * nz * t45 * t281 * t57 * t24 - t23 * t110 * t96 - 0.8e1 * t296 * t100 + 0.2e1 * t23 * t281 * t597 + 0.4e1 * t545 * t20 + 0.2e1 * t159 * t2 * t4 * ZB * t163 - 0.4e1 * t557 * t48 * t90 + 0.4e1 * t122 * t518 + 0.8e1 * t263 * t538 * t332 - 0.4e1 * t505 * t616 - t619 * t96 - 0.2e1 * t621 * t57 * t276;
1011*c4762a1bSJed Brown   t626 = t49 * t45;
1012*c4762a1bSJed Brown   t660 = t29 * t45;
1013*c4762a1bSJed Brown   t685 = 0.2e1 * t545 * t174 - 0.4e1 * t126 * 0.3141592654e1 * t24 * xc - 0.4e1 * t47 * t48 * t188 + 0.4e1 * t505 * t660 * t24 - 0.2e1 * t142 * t177 * t163 - 0.2e1 * t142 * t4 * t13 * t18 + 0.8e1 * t260 * t128 * t60 - 0.2e1 * t328 * t546 - 0.2e1 * t26 * t2 * t28 * t16 + 0.4e1 * t545 * t217 - 0.4e1 * t209 * t138 * t256;
1014*c4762a1bSJed Brown   t690 = t6 * 0.3141592654e1;
1015*c4762a1bSJed Brown   t691 = ZA * t690;
1016*c4762a1bSJed Brown   t693 = t24 * t24;
1017*c4762a1bSJed Brown   t694 = t693 * xc;
1018*c4762a1bSJed Brown   t695 = t188 * t694;
1019*c4762a1bSJed Brown   t698 = t23 * ZA;
1020*c4762a1bSJed Brown   t699 = t698 * t690;
1021*c4762a1bSJed Brown   t700 = t699 * t5;
1022*c4762a1bSJed Brown   t704 = t5 * t4;
1023*c4762a1bSJed Brown   t705 = t691 * t704;
1024*c4762a1bSJed Brown   t709 = t691 * t5;
1025*c4762a1bSJed Brown   t713 = t5 * nz;
1026*c4762a1bSJed Brown   t714 = t713 * ZB;
1027*c4762a1bSJed Brown   t718 = t698 * t6;
1028*c4762a1bSJed Brown   t719 = t713 * t28;
1029*c4762a1bSJed Brown   t722 = t699 * t704;
1030*c4762a1bSJed Brown   t726 = t713 * t94;
1031*c4762a1bSJed Brown   t733 = t713 * t45;
1032*c4762a1bSJed Brown   t736 = t87 * t36;
1033*c4762a1bSJed Brown   t740 = -0.4e1 * t691 * t98 * t695 + 0.8e1 * t700 * t270 * t13 + 0.4e1 * t705 * t660 * xc + 0.8e1 * t709 * t660 * t128 + 0.2e1 * t87 * t714 * t110 + t718 * t719 * t110 - 0.4e1 * t722 * t237 * t13 - t313 * t726 * t45 - 0.4e1 * t699 * t704 * xc * t29 + t313 * t733 * t28 + 0.4e1 * t736 * t150 * t233;
1034*c4762a1bSJed Brown   t746 = t313 * t36;
1035*c4762a1bSJed Brown   t752 = t6 * t6;
1036*c4762a1bSJed Brown   t753 = t23 * t752;
1037*c4762a1bSJed Brown   t759 = t698 * t752;
1038*c4762a1bSJed Brown   t760 = t759 * t36;
1039*c4762a1bSJed Brown   t761 = t17 * t693;
1040*c4762a1bSJed Brown   t762 = xc * t28;
1041*c4762a1bSJed Brown   t763 = t761 * t762;
1042*c4762a1bSJed Brown   t766 = t87 * t713;
1043*c4762a1bSJed Brown   t773 = t699 * t4;
1044*c4762a1bSJed Brown   t774 = t110 * t693;
1045*c4762a1bSJed Brown   t775 = xc * t13;
1046*c4762a1bSJed Brown   t785 = t704 * t17;
1047*c4762a1bSJed Brown   t789 = -0.16e2 * t736 * t150 * t270 + t718 * t116 * t693 - 0.2e1 * t746 * t555 * t24 + 0.4e1 * t705 * t535 + 0.64e2 * t753 * t713 * t17 * t150 * t128 - 0.16e2 * t760 * t763 + 0.2e1 * t766 * t150 * t110 + 0.4e1 * t722 * t274 * xc + 0.4e1 * t773 * t774 * t775 - 0.8e1 * t766 * t150 * t17 + 0.8e1 * t700 * t233 * t775 + 0.4e1 * t699 * t785 * t13;
1048*c4762a1bSJed Brown   t791 = t691 * t4;
1049*c4762a1bSJed Brown   t792 = t45 * t693;
1050*c4762a1bSJed Brown   t793 = t49 * t792;
1051*c4762a1bSJed Brown   t796 = t759 * t713;
1052*c4762a1bSJed Brown   t797 = t53 * t28;
1053*c4762a1bSJed Brown   t798 = t270 * t797;
1054*c4762a1bSJed Brown   t801 = t87 * nz;
1055*c4762a1bSJed Brown   t818 = t5 * t36;
1056*c4762a1bSJed Brown   t819 = t753 * t818;
1057*c4762a1bSJed Brown   t827 = t753 * t36 * ZB;
1058*c4762a1bSJed Brown   t830 = xc * t45;
1059*c4762a1bSJed Brown   t834 = -0.4e1 * t791 * t793 + 0.32e2 * t796 * t798 + 0.2e1 * t801 * ZB * t693 * t110 + 0.2e1 * t718 * t36 * t28 * t24 - 0.8e1 * t700 * t128 * t29 - 0.8e1 * t700 * t239 - 0.8e1 * t801 * t150 * t761 + 0.32e2 * t819 * t365 * t369 - 0.64e2 * t753 * t714 * t798 + 0.32e2 * t827 * t763 + 0.4e1 * t705 * t830 * t49;
1060*c4762a1bSJed Brown   t842 = xc * t29;
1061*c4762a1bSJed Brown   t843 = t270 * t842;
1062*c4762a1bSJed Brown   t849 = t759 * t818;
1063*c4762a1bSJed Brown   t853 = t691 * t396;
1064*c4762a1bSJed Brown   t857 = t691 * t5 * t45;
1065*c4762a1bSJed Brown   t869 = t313 * nz;
1066*c4762a1bSJed Brown   t874 = -0.2e1 * t718 * t36 * t94 * t24 - 0.4e1 * t773 * t761 * t29 + 0.8e1 * t700 * t843 + 0.2e1 * t87 * t726 * ZB + 0.16e2 * t849 * t797 * t17 + 0.4e1 * t853 * t793 + 0.8e1 * t857 * t239 + 0.2e1 * t801 * t150 * t693 - 0.8e1 * t700 * t270 * t29 - 0.8e1 * t709 * t49 * t46 - t869 * t619 * t693 + t869 * t232 * t693;
1067*c4762a1bSJed Brown   t877 = ZA * t752;
1068*c4762a1bSJed Brown   t878 = t877 * t818;
1069*c4762a1bSJed Brown   t911 = 0.16e2 * t878 * t53 * t45 * t365 - 0.4e1 * t699 * t785 * t29 - 0.4e1 * t705 * t188 * t830 + 0.2e1 * t801 * t94 * t693 * ZB - 0.8e1 * t857 * t843 - t718 * t726 + 0.4e1 * t773 * t761 * t13 - 0.4e1 * t705 * t775 * t555 + 0.2e1 * t746 * t232 * t233 - 0.16e2 * t878 * t830 * t365 - 0.2e1 * t746 * t619 * t24;
1070*c4762a1bSJed Brown   t916 = t110 * t28;
1071*c4762a1bSJed Brown   t945 = t28 * t693 * t45 * t17;
1072*c4762a1bSJed Brown   t948 = 0.32e2 * t877 * t733 * t798 + 0.2e1 * t718 * t36 * t916 * t24 - 0.4e1 * t705 * t626 + t718 * nz * t916 * t693 - t869 * t792 * t110 - 0.4e1 * t773 * t761 * t775 + t718 * t719 + 0.2e1 * t746 * t232 * t24 - 0.16e2 * t849 * t365 * xc - t718 * t713 * t110 - 0.4e1 * t773 * t694 * t29 + 0.16e2 * t877 * t54 * t945;
1073*c4762a1bSJed Brown   t974 = t761 * t797;
1074*c4762a1bSJed Brown   t987 = 0.4e1 * t773 * t695 + 0.4e1 * t736 * t150 * t24 + 0.4e1 * t722 * t842 * t17 - 0.16e2 * t877 * t447 * t945 + 0.2e1 * t87 * t714 * t28 + t313 * t713 * t916 * t45 - 0.4e1 * t853 * t615 * t774 - 0.32e2 * t877 * t713 * xc * t324 + 0.16e2 * t760 * t974 + 0.4e1 * t736 * t94 * t24 * ZB + t869 * t792 * t916 - 0.8e1 * t691 * t5 * xc * t616;
1075*c4762a1bSJed Brown   t1021 = -t718 * t169 * t693 - 0.32e2 * t827 * t974 + 0.2e1 * t801 * t150 * t774 + 0.4e1 * t791 * t188 * t792 + 0.4e1 * t736 * t220 * t24 + 0.4e1 * t791 * t842 * t792 + 0.8e1 * t709 * t660 * t270 - t718 * t335 * t693 - 0.2e1 * t718 * t36 * t110 * t24 - 0.32e2 * t819 * t797 * t471 - t313 * t733 * t110 - 0.32e2 * t796 * t270 * t762;
1076*c4762a1bSJed Brown 
1077*c4762a1bSJed Brown   _PC2A = (t147 - 0.4e1 * t65 * t217 + t418 + 0.2e1 * t150 * t222 + t327 - 0.2e1 * t149 * t19 + 0.2e1 * t335 * ZB * t24 * ZA - 0.16e2 * t312 * t313 * t355 * t59 - 0.4e1 * t281 * ZB * ZA * t597 - 0.2e1 * t505 * t45 * t281 * t58 - 0.4e1 * t211 * t2 * t53 * t76 + 0.8e1 * t305 * t286 - 0.4e1 * t122 * t499 - 0.4e1 * t331 * t332 + 0.8e1 * t345 * t177 * t60 - 0.2e1 * t142 * t177 * t82 + 0.2e1 * t72 * t281 * t415 + 0.4e1 * t349 * t96 * t41 - 0.2e1 * t81 * t64 * t76 + 0.2e1 * t58 * t80 * t59 + 0.8e1 * t345 * t177 * t41 - 0.4e1 * t8 * t499 + t242 + 0.4e1 * t8 * t518 + t625 + t685 + 0.2e1 * t328 * t174 + 0.2e1 * t331 * t455 - 0.2e1 * t33 * t2 * t4 * ZA * t82 - 0.4e1 * t626 * t191 + 0.16e2 * t364 * t373 - 0.2e1 * t621 * t597 - 0.2e1 * t439 * t568 + t492 + t533 * t96 + t232 * t96 + 0.2e1 * t567 * t441 + t561) / (t740 + t789 + t834 + t874 + t911 + t948 + t987 + t1021);
1078*c4762a1bSJed Brown   /****************************************************************************************/
1079*c4762a1bSJed Brown   t1 = nz * nz;
1080*c4762a1bSJed Brown   t2 = t1 * nz;
1081*c4762a1bSJed Brown   t3 = t2 * 0.3141592654e1;
1082*c4762a1bSJed Brown   t4 = t3 * xc;
1083*c4762a1bSJed Brown   t5 = ZB * ZB;
1084*c4762a1bSJed Brown   t7 = PetscExpReal(nz * 0.3141592654e1);
1085*c4762a1bSJed Brown   t8 = t7 * t7;
1086*c4762a1bSJed Brown   t9 = t5 * t8;
1087*c4762a1bSJed Brown   t12 = PetscExpReal(xc * nz * 0.3141592654e1);
1088*c4762a1bSJed Brown   t13 = t12 * t12;
1089*c4762a1bSJed Brown   t14 = t13 * t13;
1090*c4762a1bSJed Brown   t15 = t14 * t13;
1091*c4762a1bSJed Brown   t19 = nx * nx;
1092*c4762a1bSJed Brown   t21 = nx * 0.3141592654e1;
1093*c4762a1bSJed Brown   t22 = PetscSinReal(t21);
1094*c4762a1bSJed Brown   t23 = t19 * nx * t22;
1095*c4762a1bSJed Brown   t24 = t23 * 0.3141592654e1;
1096*c4762a1bSJed Brown   t25 = ZA * ZB;
1097*c4762a1bSJed Brown   t26 = t7 * t15;
1098*c4762a1bSJed Brown   t27 = t25 * t26;
1099*c4762a1bSJed Brown   t30 = t21 * xc;
1100*c4762a1bSJed Brown   t31 = PetscSinReal(t30);
1101*c4762a1bSJed Brown   t32 = t31 * nx;
1102*c4762a1bSJed Brown   t33 = t32 * nz;
1103*c4762a1bSJed Brown   t34 = ZA * ZA;
1104*c4762a1bSJed Brown   t35 = t8 * t8;
1105*c4762a1bSJed Brown   t36 = t34 * t35;
1106*c4762a1bSJed Brown   t40 = t2 * t34;
1107*c4762a1bSJed Brown   t41 = 0.3141592654e1 * t8;
1108*c4762a1bSJed Brown   t42 = t41 * t15;
1109*c4762a1bSJed Brown   t45 = t1 * t5;
1110*c4762a1bSJed Brown   t46 = t14 * t14;
1111*c4762a1bSJed Brown   t49 = t19 * t5;
1112*c4762a1bSJed Brown   t51 = t19 * t46;
1113*c4762a1bSJed Brown   t53 = t19 * t34;
1114*c4762a1bSJed Brown   t55 = t8 * t7;
1115*c4762a1bSJed Brown   t56 = t13 * t55;
1116*c4762a1bSJed Brown   t57 = t25 * t56;
1117*c4762a1bSJed Brown   t60 = t2 * nx;
1118*c4762a1bSJed Brown   t61 = 0.3141592654e1 * 0.3141592654e1;
1119*c4762a1bSJed Brown   t63 = t60 * t31 * t61;
1120*c4762a1bSJed Brown   t64 = xc * xc;
1121*c4762a1bSJed Brown   t65 = ZA * t64;
1122*c4762a1bSJed Brown   t66 = ZB * t8;
1123*c4762a1bSJed Brown   t67 = t14 * t12;
1124*c4762a1bSJed Brown   t68 = t66 * t67;
1125*c4762a1bSJed Brown   t69 = t65 * t68;
1126*c4762a1bSJed Brown   t72 = -0.4e1 * t4 * t9 * t15 + 0.4e1 * t24 * t27 + 0.4e1 * t33 * t36 * t12 - 0.4e1 * t40 * t42 - t45 * t46 + t45 * t14 - t49 * t14 + t51 * t5 - t53 * t14 + 0.4e1 * t24 * t57 + 0.32e2 * t63 * t69;
1127*c4762a1bSJed Brown   t73 = t1 * nx;
1128*c4762a1bSJed Brown   t75 = t73 * t31 * 0.3141592654e1;
1129*c4762a1bSJed Brown   t76 = t8 * t67;
1130*c4762a1bSJed Brown   t77 = t25 * t76;
1131*c4762a1bSJed Brown   t80 = t1 * t1;
1132*c4762a1bSJed Brown   t81 = t80 * t34;
1133*c4762a1bSJed Brown   t83 = t61 * t14;
1134*c4762a1bSJed Brown   t87 = t1 * t19;
1135*c4762a1bSJed Brown   t88 = PetscCosReal(t30);
1136*c4762a1bSJed Brown   t90 = t87 * t88 * t61;
1137*c4762a1bSJed Brown   t91 = t5 * t64;
1138*c4762a1bSJed Brown   t92 = t13 * t12;
1139*c4762a1bSJed Brown   t93 = t8 * t92;
1140*c4762a1bSJed Brown   t94 = t91 * t93;
1141*c4762a1bSJed Brown   t100 = ZB * t64 * ZA * t8 * t92;
1142*c4762a1bSJed Brown   t103 = nz * t19;
1143*c4762a1bSJed Brown   t105 = t103 * t88 * 0.3141592654e1;
1144*c4762a1bSJed Brown   t106 = ZA * xc;
1145*c4762a1bSJed Brown   t107 = ZB * t35;
1146*c4762a1bSJed Brown   t109 = t106 * t107 * t12;
1147*c4762a1bSJed Brown   t112 = t34 * xc;
1148*c4762a1bSJed Brown   t113 = t112 * t93;
1149*c4762a1bSJed Brown   t116 = t35 * t14;
1150*c4762a1bSJed Brown   t118 = t1 * ZA;
1151*c4762a1bSJed Brown   t119 = ZB * t14;
1152*c4762a1bSJed Brown   t122 = t1 * t46;
1153*c4762a1bSJed Brown   t125 = t19 * ZB;
1154*c4762a1bSJed Brown   t126 = t35 * ZA;
1155*c4762a1bSJed Brown   t127 = t125 * t126;
1156*c4762a1bSJed Brown   t129 = t1 * ZB;
1157*c4762a1bSJed Brown   t132 = -0.16e2 * t75 * t77 + 0.16e2 * t81 * t64 * t83 * t8 + 0.16e2 * t90 * t94 - 0.32e2 * t90 * t100 + 0.8e1 * t105 * t109 - 0.8e1 * t75 * t113 + t45 * t116 + 0.2e1 * t118 * t119 + 0.2e1 * t122 * t25 - 0.2e1 * t127 + 0.2e1 * t129 * t126;
1158*c4762a1bSJed Brown   t134 = t1 * t34;
1159*c4762a1bSJed Brown   t136 = t34 * t64;
1160*c4762a1bSJed Brown   t137 = t136 * t76;
1161*c4762a1bSJed Brown   t141 = t91 * t76;
1162*c4762a1bSJed Brown   t145 = t103 * t34;
1163*c4762a1bSJed Brown   t146 = 0.3141592654e1 * xc;
1164*c4762a1bSJed Brown   t147 = t8 * t13;
1165*c4762a1bSJed Brown   t153 = t14 * ZA;
1166*c4762a1bSJed Brown   t156 = xc * t5;
1167*c4762a1bSJed Brown   t157 = t156 * t93;
1168*c4762a1bSJed Brown   t160 = t103 * t5;
1169*c4762a1bSJed Brown   t162 = t146 * t8 * t15;
1170*c4762a1bSJed Brown   t166 = t34 * t7 * t15;
1171*c4762a1bSJed Brown   t169 = t134 * t116 - 0.16e2 * t63 * t137 - t49 * t116 - 0.16e2 * t63 * t141 - t53 * t116 + 0.4e1 * t145 * t146 * t147 - 0.2e1 * t51 * t25 - 0.2e1 * t125 * t153 - 0.16e2 * t75 * t157 + 0.4e1 * t160 * t162 - 0.4e1 * t24 * t166;
1172*c4762a1bSJed Brown   t170 = t106 * t68;
1173*c4762a1bSJed Brown   t177 = t35 * t92;
1174*c4762a1bSJed Brown   t178 = t112 * t177;
1175*c4762a1bSJed Brown   t181 = t156 * t76;
1176*c4762a1bSJed Brown   t186 = t35 * t12;
1177*c4762a1bSJed Brown   t187 = t112 * t186;
1178*c4762a1bSJed Brown   t193 = t5 * 0.3141592654e1;
1179*c4762a1bSJed Brown   t206 = t34 * t14;
1180*c4762a1bSJed Brown   t207 = t206 * t7;
1181*c4762a1bSJed Brown   t210 = -0.32e2 * t63 * t170 + 0.32e2 * t90 * t170 + 0.8e1 * t75 * t109 + 0.4e1 * t105 * t178 - 0.16e2 * t75 * t181 - 0.16e2 * t90 * t113 - 0.4e1 * t75 * t187 + 0.16e2 * t90 * t141 - 0.4e1 * t103 * t15 * t193 * xc + 0.16e2 * t73 * t22 * t34 * t146 * t26 + 0.4e1 * t32 * nz * t34 * t67 + 0.4e1 * t24 * t207;
1182*c4762a1bSJed Brown   t217 = t106 * t66 * t92;
1183*c4762a1bSJed Brown   t226 = t88 * t19 * nz;
1184*c4762a1bSJed Brown   t227 = 0.3141592654e1 * t34;
1185*c4762a1bSJed Brown   t229 = t227 * xc * t67;
1186*c4762a1bSJed Brown   t232 = t73 * t31;
1187*c4762a1bSJed Brown   t234 = t146 * t5 * t67;
1188*c4762a1bSJed Brown   t238 = t61 * ZB;
1189*c4762a1bSJed Brown   t239 = t14 * t8;
1190*c4762a1bSJed Brown   t240 = t238 * t239;
1191*c4762a1bSJed Brown   t243 = t136 * t93;
1192*c4762a1bSJed Brown   t246 = -0.8e1 * t33 * t25 * t186 + 0.32e2 * t90 * t217 - t45 * t35 + t53 * t35 - t134 * t35 - t134 * t46 + t134 * t14 - 0.4e1 * t226 * t229 + 0.4e1 * t232 * t234 + 0.32e2 * t87 * t65 * t240 + 0.16e2 * t63 * t243;
1193*c4762a1bSJed Brown   t247 = t14 * t92;
1194*c4762a1bSJed Brown   t249 = t227 * t247 * xc;
1195*c4762a1bSJed Brown   t254 = t73 * t22;
1196*c4762a1bSJed Brown   t259 = t60 * t22 * t61;
1197*c4762a1bSJed Brown   t260 = t112 * t26;
1198*c4762a1bSJed Brown   t264 = t146 * t247 * t5;
1199*c4762a1bSJed Brown   t268 = xc * t14;
1200*c4762a1bSJed Brown   t274 = t5 * t14;
1201*c4762a1bSJed Brown   t275 = t274 * t8;
1202*c4762a1bSJed Brown   t280 = nz * nx;
1203*c4762a1bSJed Brown   t281 = t280 * t22;
1204*c4762a1bSJed Brown   t282 = t55 * t14;
1205*c4762a1bSJed Brown   t283 = t25 * t282;
1206*c4762a1bSJed Brown   t290 = ZA * t247 * xc * ZB;
1207*c4762a1bSJed Brown   t295 = t22 * nx * t1 * 0.3141592654e1;
1208*c4762a1bSJed Brown   t298 = -0.4e1 * t232 * t249 + 0.8e1 * t105 * t217 - 0.4e1 * t254 * t227 * t26 - 0.8e1 * t259 * t260 - 0.4e1 * t232 * t264 - 0.16e2 * t81 * t61 * t268 * t8 + 0.16e2 * t80 * t64 * t61 * t275 - 0.4e1 * t232 * t229 + 0.8e1 * t281 * t283 - 0.4e1 * t105 * t187 + 0.8e1 * t75 * t290 + 0.4e1 * t295 * t27;
1209*c4762a1bSJed Brown   t301 = t61 * t5;
1210*c4762a1bSJed Brown   t307 = t87 * t34;
1211*c4762a1bSJed Brown   t312 = t61 * xc;
1212*c4762a1bSJed Brown   t313 = t312 * t239;
1213*c4762a1bSJed Brown   t317 = t34 * t55 * t14;
1214*c4762a1bSJed Brown   t329 = ZB * t13 * t55;
1215*c4762a1bSJed Brown   t330 = t65 * t329;
1216*c4762a1bSJed Brown   t337 = -0.16e2 * t87 * t64 * t301 * t239 - 0.32e2 * t90 * t69 - 0.16e2 * t307 * t64 * t61 * t239 + 0.16e2 * t307 * t313 + 0.4e1 * t24 * t317 + t53 * t46 + t49 * t35 - 0.32e2 * t63 * t100 - 0.4e1 * t280 * t31 * t34 * t247 + 0.8e1 * t259 * t330 - 0.4e1 * t280 * t31 * t247 * t5;
1217*c4762a1bSJed Brown   t340 = t5 * t35;
1218*c4762a1bSJed Brown   t344 = t25 * t93;
1219*c4762a1bSJed Brown   t356 = t41 * t13;
1220*c4762a1bSJed Brown   t360 = t23 * nz * t61;
1221*c4762a1bSJed Brown   t363 = t25 * t64 * t7 * t15;
1222*c4762a1bSJed Brown   t366 = t156 * t177;
1223*c4762a1bSJed Brown   t369 = t14 * t7;
1224*c4762a1bSJed Brown   t370 = t25 * t369;
1225*c4762a1bSJed Brown   t373 = t156 * t186;
1226*c4762a1bSJed Brown   t378 = 0.4e1 * t24 * t283 + 0.4e1 * t33 * t340 * t12 - 0.16e2 * t75 * t344 - 0.4e1 * t280 * t31 * t5 * t67 + 0.8e1 * t33 * t25 * t247 + 0.32e2 * t63 * t217 + 0.4e1 * t40 * t356 - 0.8e1 * t360 * t363 + 0.4e1 * t75 * t366 + 0.4e1 * t295 * t370 - 0.4e1 * t75 * t373 - 0.4e1 * t105 * t366;
1227*c4762a1bSJed Brown   t382 = t112 * t76;
1228*c4762a1bSJed Brown   t387 = t80 * t61;
1229*c4762a1bSJed Brown   t391 = t136 * t26;
1230*c4762a1bSJed Brown   t409 = 0.16e2 * t63 * t382 + 0.4e1 * t226 * t234 - 0.16e2 * t387 * xc * t275 + 0.8e1 * t259 * t391 - 0.16e2 * t105 * t344 + 0.4e1 * t226 * t264 - 0.8e1 * t105 * t170 + 0.16e2 * t232 * t193 * t76 + 0.8e1 * t360 * t330 - 0.8e1 * t105 * t290 + 0.16e2 * t90 * t243;
1231*c4762a1bSJed Brown   t423 = t153 * t8;
1232*c4762a1bSJed Brown   t426 = t34 * t13;
1233*c4762a1bSJed Brown   t427 = t426 * t55;
1234*c4762a1bSJed Brown   t430 = t34 * t8;
1235*c4762a1bSJed Brown   t437 = t80 * ZA;
1236*c4762a1bSJed Brown   t441 = 0.4e1 * t145 * t42 - 0.16e2 * t90 * t157 + 0.24e2 * t75 * t217 + 0.4e1 * t226 * t249 + 0.4e1 * t254 * t227 * t282 + 0.4e1 * t160 * t356 - 0.8e1 * t129 * t423 - 0.8e1 * t281 * t427 - 0.8e1 * t33 * t430 * t67 + 0.8e1 * t33 * t430 * t92 + 0.32e2 * t437 * ZB * t313;
1237*c4762a1bSJed Brown   t453 = t106 * ZB * t7 * t15;
1238*c4762a1bSJed Brown   t456 = t2 * t5;
1239*c4762a1bSJed Brown   t459 = t112 * t56;
1240*c4762a1bSJed Brown   t462 = t126 * t14;
1241*c4762a1bSJed Brown   t474 = t40 * 0.3141592654e1;
1242*c4762a1bSJed Brown   t475 = xc * t8;
1243*c4762a1bSJed Brown   t480 = t146 * t13 * t35;
1244*c4762a1bSJed Brown   t483 = -0.4e1 * t103 * xc * t193 * t147 + 0.16e2 * t87 * t61 * t156 * t239 + 0.8e1 * t259 * t453 - 0.4e1 * t456 * t356 + 0.8e1 * t259 * t459 - 0.2e1 * t125 * t462 - 0.8e1 * t281 * t207 + 0.16e2 * t295 * t459 - 0.8e1 * t60 * t22 * ZA * t312 * t329 + 0.4e1 * t474 * t475 * t15 + 0.4e1 * t160 * t480;
1245*c4762a1bSJed Brown   t497 = t136 * t56;
1246*c4762a1bSJed Brown   t504 = t9 * t13;
1247*c4762a1bSJed Brown   t509 = t475 * t13;
1248*c4762a1bSJed Brown   t512 = -0.8e1 * t105 * t113 - 0.4e1 * t254 * t227 * t56 + 0.8e1 * t281 * t57 + 0.4e1 * t295 * t283 + 0.2e1 * t129 * t462 + 0.4e1 * t24 * t370 - 0.8e1 * t360 * t497 - 0.4e1 * t24 * t427 - 0.4e1 * t145 * t162 + 0.4e1 * t4 * t504 - 0.8e1 * t281 * t370 - 0.4e1 * t474 * t509;
1249*c4762a1bSJed Brown   t528 = t5 * t13;
1250*c4762a1bSJed Brown   t529 = t528 * t35;
1251*c4762a1bSJed Brown   t532 = t106 * t329;
1252*c4762a1bSJed Brown   t542 = -0.16e2 * t295 * t453 - 0.32e2 * t437 * t64 * t240 + 0.8e1 * t281 * t317 + 0.24e2 * t75 * t170 - 0.4e1 * t75 * t178 + 0.8e1 * t360 * t453 - 0.4e1 * t4 * t529 - 0.16e2 * t295 * t532 - 0.8e1 * t33 * t344 - 0.16e2 * t90 * t181 + 0.4e1 * t33 * t340 * t92;
1253*c4762a1bSJed Brown   t557 = t146 * t15;
1254*c4762a1bSJed Brown   t562 = xc * t15;
1255*c4762a1bSJed Brown   t563 = t562 * t5;
1256*c4762a1bSJed Brown   t573 = 0.16e2 * t232 * t193 * t93 - 0.8e1 * t259 * t363 - 0.8e1 * t259 * t497 + 0.8e1 * t33 * t77 + 0.8e1 * t360 * t391 + 0.4e1 * t254 * t227 * t369 + 0.4e1 * t145 * t557 + 0.8e1 * t281 * t166 + 0.4e1 * t3 * t563 + 0.8e1 * t105 * t382 - 0.4e1 * t145 * t480 - 0.4e1 * t33 * t36 * t92;
1257*c4762a1bSJed Brown   t600 = 0.4e1 * t456 * t42 - 0.8e1 * t360 * t260 - 0.4e1 * t40 * t557 - 0.4e1 * t105 * t373 + 0.16e2 * t226 * t227 * t93 - 0.16e2 * t90 * t382 - 0.4e1 * t145 * t356 - 0.16e2 * t63 * t157 - 0.32e2 * t87 * t25 * t313 - 0.16e2 * t226 * t227 * t76 - 0.16e2 * t63 * t113;
1258*c4762a1bSJed Brown   t623 = xc * t13;
1259*c4762a1bSJed Brown   t627 = 0.8e1 * t125 * t423 - 0.8e1 * t360 * t532 + 0.16e2 * t90 * t137 - 0.4e1 * t160 * t42 + 0.16e2 * t63 * t94 + 0.16e2 * t63 * t181 - 0.8e1 * t281 * t27 - 0.8e1 * t75 * t382 + 0.8e1 * t360 * t459 + 0.4e1 * t295 * t57 + 0.16e2 * t105 * t77 + 0.4e1 * t474 * t623 * t35;
1260*c4762a1bSJed Brown   t632 = t61 * 0.3141592654e1;
1261*c4762a1bSJed Brown   t633 = t632 * t8;
1262*c4762a1bSJed Brown   t634 = t80 * nz;
1263*c4762a1bSJed Brown   t638 = t632 * t634;
1264*c4762a1bSJed Brown   t639 = t638 * xc;
1265*c4762a1bSJed Brown   t642 = t61 * t34;
1266*c4762a1bSJed Brown   t643 = t122 * t19;
1267*c4762a1bSJed Brown   t649 = t61 * t61;
1268*c4762a1bSJed Brown   t650 = t649 * t1;
1269*c4762a1bSJed Brown   t652 = t19 * t19;
1270*c4762a1bSJed Brown   t653 = t14 * t652;
1271*c4762a1bSJed Brown   t654 = t653 * t9;
1272*c4762a1bSJed Brown   t657 = t14 * t1;
1273*c4762a1bSJed Brown   t658 = t657 * t19;
1274*c4762a1bSJed Brown   t665 = t632 * t34;
1275*c4762a1bSJed Brown   t666 = t665 * t2;
1276*c4762a1bSJed Brown   t667 = t8 * t19;
1277*c4762a1bSJed Brown   t668 = t667 * t623;
1278*c4762a1bSJed Brown   t674 = t665 * nz;
1279*c4762a1bSJed Brown   t675 = t652 * xc;
1280*c4762a1bSJed Brown   t682 = 0.8e1 * t633 * t426 * t634 - 0.8e1 * t639 * t529 - 0.4e1 * t642 * t643 + 0.2e1 * t642 * t116 * t80 + 0.32e2 * t650 * t64 * t654 + 0.4e1 * t301 * t658 + 0.4e1 * t387 * t46 * ZA * ZB - 0.16e2 * t666 * t668 - 0.16e2 * t666 * t667 * t15 - 0.8e1 * t674 * t675 * t15 + 0.4e1 * t238 * t153 * t80;
1281*c4762a1bSJed Brown   t683 = t46 * t652;
1282*c4762a1bSJed Brown   t686 = t633 * t15;
1283*c4762a1bSJed Brown   t691 = t35 * t80;
1284*c4762a1bSJed Brown   t698 = t35 * t652;
1285*c4762a1bSJed Brown   t705 = t14 * t80;
1286*c4762a1bSJed Brown   t708 = t61 * t35;
1287*c4762a1bSJed Brown   t717 = -0.2e1 * t642 * t683 - 0.8e1 * t686 * t5 * t634 * xc - 0.2e1 * t301 * t691 + 0.8e1 * t638 * t563 - 0.2e1 * t642 * t691 - 0.2e1 * t642 * t698 - 0.2e1 * t301 * t698 - 0.2e1 * t301 * t683 + 0.2e1 * t642 * t705 + 0.2e1 * t708 * t274 * t80 + 0.2e1 * t301 * t653 - 0.2e1 * t642 * t80 * t46;
1288*c4762a1bSJed Brown   t727 = t61 * t46;
1289*c4762a1bSJed Brown   t737 = t649 * t34;
1290*c4762a1bSJed Brown   t738 = t737 * t1;
1291*c4762a1bSJed Brown   t739 = t8 * t652;
1292*c4762a1bSJed Brown   t740 = t739 * t268;
1293*c4762a1bSJed Brown   t746 = t61 * ZA;
1294*c4762a1bSJed Brown   t754 = t632 * nz * xc;
1295*c4762a1bSJed Brown   t758 = 0.2e1 * t301 * t705 + 0.2e1 * t642 * t653 - 0.8e1 * t665 * xc * t634 * t15 - 0.2e1 * t727 * t5 * t80 - 0.32e2 * t650 * xc * t654 + 0.2e1 * t301 * t698 * t14 - 0.32e2 * t738 * t740 + 0.8e1 * t674 * t739 * t562 + 0.4e1 * t746 * t119 * t652 + 0.8e1 * t674 * t698 * t623 - 0.8e1 * t754 * t528 * t698;
1296*c4762a1bSJed Brown   t762 = t633 * t13;
1297*c4762a1bSJed Brown   t764 = t5 * nz * t652;
1298*c4762a1bSJed Brown   t767 = t80 * t1;
1299*c4762a1bSJed Brown   t768 = t649 * t767;
1300*c4762a1bSJed Brown   t772 = t649 * ZA;
1301*c4762a1bSJed Brown   t773 = t772 * t129;
1302*c4762a1bSJed Brown   t777 = t35 * t1 * t19;
1303*c4762a1bSJed Brown   t780 = t632 * t5;
1304*c4762a1bSJed Brown   t781 = t780 * t15;
1305*c4762a1bSJed Brown   t786 = t698 * ZA;
1306*c4762a1bSJed Brown   t790 = t64 * t14;
1307*c4762a1bSJed Brown   t800 = t649 * t8;
1308*c4762a1bSJed Brown   t809 = 0.4e1 * t238 * t126 * t80 - 0.8e1 * t762 * t764 - 0.32e2 * t768 * xc * t275 + 0.64e2 * t773 * t740 - 0.4e1 * t301 * t777 - 0.8e1 * t781 * nz * t8 * t675 + 0.4e1 * t238 * t786 + 0.32e2 * t768 * t34 * t790 * t8 - 0.8e1 * t633 * t528 * t634 + 0.8e1 * t754 * t528 * t739 + 0.128e3 * t800 * t119 * t80 * t19 * t106 + 0.8e1 * t674 * t739 * t13;
1309*c4762a1bSJed Brown   t812 = t649 * t80;
1310*c4762a1bSJed Brown   t817 = t83 * ZB;
1311*c4762a1bSJed Brown   t824 = t746 * ZB;
1312*c4762a1bSJed Brown   t828 = t800 * t14;
1313*c4762a1bSJed Brown   t855 = -0.64e2 * t812 * xc * t274 * t667 + 0.4e1 * t817 * t786 + 0.4e1 * t727 * ZA * t652 * ZB - 0.32e2 * t824 * t657 * t667 - 0.32e2 * t828 * t34 * t767 * xc - 0.8e1 * t633 * t15 * t34 * t634 - 0.8e1 * t674 * t739 * t15 + 0.32e2 * t768 * t64 * t275 + 0.4e1 * t708 * t14 * t307 + 0.2e1 * t708 * t206 * t652 + 0.8e1 * t632 * t35 * t13 * t34 * t634 * xc;
1314*c4762a1bSJed Brown   t858 = t35 * t19;
1315*c4762a1bSJed Brown   t873 = t2 * t8;
1316*c4762a1bSJed Brown   t878 = t61 * t1;
1317*c4762a1bSJed Brown   t901 = -0.16e2 * t632 * t2 * xc * t528 * t858 + 0.8e1 * t824 * t658 + 0.4e1 * t301 * t14 * t777 - 0.8e1 * t665 * t634 * t509 - 0.8e1 * t674 * t739 * t623 - 0.16e2 * t781 * t873 * t19 * xc + 0.8e1 * t878 * t14 * t127 + 0.8e1 * t878 * ZA * t51 * ZB + 0.8e1 * t686 * t764 + 0.8e1 * t665 * xc * t634 * t15 * t8 + 0.8e1 * t633 * t15 * t5 * t634 + 0.4e1 * t387 * t14 * t107 * ZA;
1318*c4762a1bSJed Brown   t903 = t739 * t790;
1319*c4762a1bSJed Brown   t923 = t737 * t80;
1320*c4762a1bSJed Brown   t924 = t667 * t790;
1321*c4762a1bSJed Brown   t927 = t780 * t2;
1322*c4762a1bSJed Brown   t937 = t15 * t19 * xc;
1323*c4762a1bSJed Brown   t943 = 0.32e2 * t738 * t903 + 0.16e2 * t781 * t873 * t19 + 0.8e1 * t754 * t15 * t652 * t5 + 0.16e2 * t666 * t858 * t623 + 0.64e2 * t828 * t25 * t767 * xc - 0.16e2 * t762 * t456 * t19 + 0.64e2 * t923 * t924 + 0.16e2 * t927 * t668 - 0.64e2 * t768 * ZA * t790 * t66 - 0.64e2 * t773 * t903 + 0.16e2 * t927 * t937 + 0.16e2 * t666 * t667 * t562;
1324*c4762a1bSJed Brown   t977 = 0.64e2 * t812 * t5 * t924 + 0.8e1 * t639 * t504 + 0.8e1 * t238 * t35 * t118 * t19 + 0.4e1 * t642 * t658 - 0.16e2 * t817 * t437 * t8 - 0.128e3 * t772 * ZB * t80 * t924 + 0.16e2 * t666 * t667 * t13 - 0.4e1 * t301 * t643 - 0.16e2 * t824 * t653 * t8 - 0.4e1 * t642 * t777 - 0.64e2 * t923 * t667 * t268 - 0.16e2 * t666 * t937;
1325*c4762a1bSJed Brown 
1326*c4762a1bSJed Brown   _PC3A = (t72 + t132 + t169 + t210 + t246 + t298 + t337 + t378 + t409 + t441 + t483 + t512 + t542 + t573 + t600 + t627) / (t682 + t717 + t758 + t809 + t855 + t901 + t943 + t977);
1327*c4762a1bSJed Brown   /****************************************************************************************/
1328*c4762a1bSJed Brown   _PC4A = 0;
1329*c4762a1bSJed Brown   /****************************************************************************************/
1330*c4762a1bSJed Brown   t1 = nx * 0.3141592654e1;
1331*c4762a1bSJed Brown   t2 = t1 * xc;
1332*c4762a1bSJed Brown   t3 = PetscCosReal(t2);
1333*c4762a1bSJed Brown   t4 = nx * nx;
1334*c4762a1bSJed Brown   t6 = nz * 0.3141592654e1;
1335*c4762a1bSJed Brown   t7 = t3 * t4 * t6;
1336*c4762a1bSJed Brown   t8 = ZA * ZB;
1337*c4762a1bSJed Brown   t9 = PetscExpReal(t6);
1338*c4762a1bSJed Brown   t10 = t9 * t9;
1339*c4762a1bSJed Brown   t11 = xc * nz;
1340*c4762a1bSJed Brown   t13 = PetscExpReal(t11 * 0.3141592654e1);
1341*c4762a1bSJed Brown   t14 = t13 * t13;
1342*c4762a1bSJed Brown   t15 = t14 * t13;
1343*c4762a1bSJed Brown   t16 = t14 * t14;
1344*c4762a1bSJed Brown   t17 = t16 * t15;
1345*c4762a1bSJed Brown   t18 = t10 * t17;
1346*c4762a1bSJed Brown   t19 = t8 * t18;
1347*c4762a1bSJed Brown   t22 = PetscSinReal(t2);
1348*c4762a1bSJed Brown   t23 = nx * t22;
1349*c4762a1bSJed Brown   t24 = t23 * nz;
1350*c4762a1bSJed Brown   t25 = ZB * ZB;
1351*c4762a1bSJed Brown   t30 = nz * nz;
1352*c4762a1bSJed Brown   t31 = t30 * nz;
1353*c4762a1bSJed Brown   t32 = t31 * nx;
1354*c4762a1bSJed Brown   t33 = 0.3141592654e1 * 0.3141592654e1;
1355*c4762a1bSJed Brown   t35 = t32 * t22 * t33;
1356*c4762a1bSJed Brown   t36 = ZA * ZA;
1357*c4762a1bSJed Brown   t37 = t36 * xc;
1358*c4762a1bSJed Brown   t38 = t16 * t13;
1359*c4762a1bSJed Brown   t39 = t10 * t38;
1360*c4762a1bSJed Brown   t40 = t37 * t39;
1361*c4762a1bSJed Brown   t43 = PetscSinReal(t1);
1362*c4762a1bSJed Brown   t44 = nx * t43;
1363*c4762a1bSJed Brown   t45 = t30 * 0.3141592654e1;
1364*c4762a1bSJed Brown   t46 = t44 * t45;
1365*c4762a1bSJed Brown   t47 = ZA * xc;
1366*c4762a1bSJed Brown   t49 = ZB * t16 * t9;
1367*c4762a1bSJed Brown   t54 = t4 * nx * t43;
1368*c4762a1bSJed Brown   t55 = xc * xc;
1369*c4762a1bSJed Brown   t57 = t54 * t30 * t55;
1370*c4762a1bSJed Brown   t58 = t33 * 0.3141592654e1;
1371*c4762a1bSJed Brown   t59 = t58 * t25;
1372*c4762a1bSJed Brown   t60 = t16 * t9;
1373*c4762a1bSJed Brown   t61 = t59 * t60;
1374*c4762a1bSJed Brown   t64 = xc * t25;
1375*c4762a1bSJed Brown   t65 = t14 * t9;
1376*c4762a1bSJed Brown   t66 = t64 * t65;
1377*c4762a1bSJed Brown   t70 = t44 * t31 * t33;
1378*c4762a1bSJed Brown   t71 = t37 * t65;
1379*c4762a1bSJed Brown   t74 = t10 * t15;
1380*c4762a1bSJed Brown   t75 = t64 * t74;
1381*c4762a1bSJed Brown   t78 = t25 * t10;
1382*c4762a1bSJed Brown   t83 = t54 * nz * t33;
1383*c4762a1bSJed Brown   t84 = t55 * t25;
1384*c4762a1bSJed Brown   t85 = t10 * t9;
1385*c4762a1bSJed Brown   t86 = t14 * t85;
1386*c4762a1bSJed Brown   t87 = t84 * t86;
1387*c4762a1bSJed Brown   t90 = t30 * t30;
1388*c4762a1bSJed Brown   t92 = t44 * t90 * t58;
1389*c4762a1bSJed Brown   t93 = t55 * xc;
1390*c4762a1bSJed Brown   t94 = t93 * t25;
1391*c4762a1bSJed Brown   t95 = t85 * t16;
1392*c4762a1bSJed Brown   t96 = t94 * t95;
1393*c4762a1bSJed Brown   t102 = t23 * t45;
1394*c4762a1bSJed Brown   t103 = t10 * t10;
1395*c4762a1bSJed Brown   t104 = ZB * t103;
1396*c4762a1bSJed Brown   t106 = t47 * t104 * t15;
1397*c4762a1bSJed Brown   t111 = t54 * 0.3141592654e1;
1398*c4762a1bSJed Brown   t112 = t25 * t85;
1399*c4762a1bSJed Brown   t113 = t112 * t16;
1400*c4762a1bSJed Brown   t115 = t8 * t39;
1401*c4762a1bSJed Brown   t118 = t16 * t14;
1402*c4762a1bSJed Brown   t119 = t85 * t118;
1403*c4762a1bSJed Brown   t120 = t37 * t119;
1404*c4762a1bSJed Brown   t123 = t16 * t16;
1405*c4762a1bSJed Brown   t124 = t36 * t123;
1406*c4762a1bSJed Brown   t125 = t124 * t9;
1407*c4762a1bSJed Brown   t127 = -0.8e1 * t7 * t19 + 0.2e1 * t24 * t25 * t13 * t10 - 0.16e2 * t35 * t40 - 0.16e2 * t46 * t47 * t49 - 0.8e1 * t57 * t61 + 0.4e1 * t46 * t66 + 0.2e1 * t70 * t71 - 0.16e2 * t35 * t75 + 0.6e1 * t24 * t78 * t38 - 0.2e1 * t83 * t87 - 0.8e1 * t92 * t96 - 0.8e1 * t46 * t37 * t95 - 0.12e2 * t102 * t106 + 0.2e1 * t83 * t71 + t111 * t113 + 0.8e1 * t7 * t115 + 0.2e1 * t83 * t120 + t111 * t125;
1408*c4762a1bSJed Brown   t128 = t37 * t74;
1409*c4762a1bSJed Brown   t131 = t44 * nz;
1410*c4762a1bSJed Brown   t133 = t25 * t9 * t118;
1411*c4762a1bSJed Brown   t136 = t36 * t14;
1412*c4762a1bSJed Brown   t137 = t136 * t9;
1413*c4762a1bSJed Brown   t140 = t30 * t4;
1414*c4762a1bSJed Brown   t142 = t140 * t3 * t33;
1415*c4762a1bSJed Brown   t143 = t64 * t39;
1416*c4762a1bSJed Brown   t147 = t30 * nx * t43;
1417*c4762a1bSJed Brown   t148 = 0.3141592654e1 * t36;
1418*c4762a1bSJed Brown   t149 = t9 * t118;
1419*c4762a1bSJed Brown   t153 = t44 * t31 * ZA;
1420*c4762a1bSJed Brown   t154 = t33 * xc;
1421*c4762a1bSJed Brown   t155 = t154 * t49;
1422*c4762a1bSJed Brown   t160 = ZA * t17 * xc * ZB;
1423*c4762a1bSJed Brown   t163 = t103 * t13;
1424*c4762a1bSJed Brown   t164 = t64 * t163;
1425*c4762a1bSJed Brown   t170 = t44 * t90 * t55;
1426*c4762a1bSJed Brown   t171 = t58 * ZB;
1427*c4762a1bSJed Brown   t172 = ZA * t16;
1428*c4762a1bSJed Brown   t174 = t171 * t172 * t9;
1429*c4762a1bSJed Brown   t177 = t36 * t55;
1430*c4762a1bSJed Brown   t178 = t177 * t149;
1431*c4762a1bSJed Brown   t181 = t54 * t11;
1432*c4762a1bSJed Brown   t182 = t33 * t25;
1433*c4762a1bSJed Brown   t186 = t25 * t14;
1434*c4762a1bSJed Brown   t187 = t186 * t9;
1435*c4762a1bSJed Brown   t193 = t186 * t85;
1436*c4762a1bSJed Brown   t198 = ZB * t55;
1437*c4762a1bSJed Brown   t199 = ZA * t103;
1438*c4762a1bSJed Brown   t201 = t198 * t199 * t15;
1439*c4762a1bSJed Brown   t204 = 0.2e1 * t7 * t128 - 0.2e1 * t131 * t133 - 0.2e1 * t131 * t137 + 0.16e2 * t142 * t143 - t147 * t148 * t149 + 0.8e1 * t153 * t155 - 0.4e1 * t7 * t160 + 0.2e1 * t7 * t164 + 0.10e2 * t102 * t40 + 0.16e2 * t170 * t174 + 0.2e1 * t83 * t178 - 0.2e1 * t181 * t182 * t65 - t111 * t187 - 0.2e1 * t70 * t87 + 0.4e1 * t102 * t160 - 0.2e1 * t131 * t193 - 0.16e2 * t142 * t75 + 0.16e2 * t35 * t201;
1440*c4762a1bSJed Brown   t210 = t32 * t22;
1441*c4762a1bSJed Brown   t211 = t33 * t55;
1442*c4762a1bSJed Brown   t212 = t25 * t38;
1443*c4762a1bSJed Brown   t213 = t211 * t212;
1444*c4762a1bSJed Brown   t216 = nz * nx;
1445*c4762a1bSJed Brown   t217 = t22 * t25;
1446*c4762a1bSJed Brown   t222 = ZB * t85 * t16;
1447*c4762a1bSJed Brown   t226 = t23 * t30;
1448*c4762a1bSJed Brown   t227 = t13 * t10;
1449*c4762a1bSJed Brown   t228 = t148 * t227;
1450*c4762a1bSJed Brown   t233 = t37 * t163;
1451*c4762a1bSJed Brown   t237 = nz * t4 * t3;
1452*c4762a1bSJed Brown   t238 = t148 * t74;
1453*c4762a1bSJed Brown   t241 = t64 * t86;
1454*c4762a1bSJed Brown   t245 = t148 * xc * t15;
1455*c4762a1bSJed Brown   t248 = t112 * t118;
1456*c4762a1bSJed Brown   t250 = t22 * t36;
1457*c4762a1bSJed Brown   t256 = 0.3141592654e1 * t25;
1458*c4762a1bSJed Brown   t257 = t256 * t39;
1459*c4762a1bSJed Brown   t262 = t38 * t103;
1460*c4762a1bSJed Brown   t263 = t37 * t262;
1461*c4762a1bSJed Brown   t267 = t148 * t17 * xc;
1462*c4762a1bSJed Brown   t270 = -0.6e1 * t7 * t143 - 0.4e1 * t24 * t19 - 0.8e1 * t210 * t213 - 0.2e1 * t216 * t217 * t15 - 0.32e2 * t153 * t211 * t222 + 0.4e1 * t226 * t228 + 0.16e2 * t142 * t201 + 0.2e1 * t7 * t233 - 0.4e1 * t237 * t238 - 0.2e1 * t83 * t241 - 0.2e1 * t237 * t245 + t111 * t248 + 0.2e1 * t216 * t250 * t15 - 0.2e1 * t131 * t125 - 0.4e1 * t226 * t257 + t147 * t148 * t95 - 0.2e1 * t102 * t263 + 0.2e1 * t237 * t267;
1463*c4762a1bSJed Brown   t273 = t37 * t149;
1464*c4762a1bSJed Brown   t277 = t47 * t104 * t13;
1465*c4762a1bSJed Brown   t285 = t31 * t36;
1466*c4762a1bSJed Brown   t286 = t44 * t285;
1467*c4762a1bSJed Brown   t291 = t25 * t123 * t9;
1468*c4762a1bSJed Brown   t304 = 0.3141592654e1 * xc;
1469*c4762a1bSJed Brown   t305 = t304 * t212;
1470*c4762a1bSJed Brown   t312 = t256 * t18;
1471*c4762a1bSJed Brown   t315 = t8 * t60;
1472*c4762a1bSJed Brown   t319 = t54 * t30 * t58;
1473*c4762a1bSJed Brown   t323 = t90 * t36;
1474*c4762a1bSJed Brown   t324 = t44 * t323;
1475*c4762a1bSJed Brown   t325 = t55 * t58;
1476*c4762a1bSJed Brown   t326 = t325 * t60;
1477*c4762a1bSJed Brown   t329 = 0.2e1 * t102 * t164 + 0.2e1 * t83 * t273 - 0.4e1 * t102 * t277 - 0.2e1 * t7 * t263 + 0.4e1 * t24 * t8 * t17 - 0.4e1 * t286 * t154 * t60 - 0.2e1 * t131 * t291 - t147 * t148 * t119 + 0.2e1 * t24 * t78 * t17 + 0.2e1 * t54 * t85 * 0.3141592654e1 * ZA * ZB - 0.4e1 * t226 * t305 - 0.2e1 * t70 * t66 + t147 * t256 * t95 + 0.4e1 * t237 * t312 + 0.2e1 * t111 * t315 - 0.8e1 * t319 * t96 - t111 * t193 - 0.8e1 * t324 * t326;
1478*c4762a1bSJed Brown   t332 = t8 * t95;
1479*c4762a1bSJed Brown   t335 = t136 * t85;
1480*c4762a1bSJed Brown   t337 = t256 * t227;
1481*c4762a1bSJed Brown   t340 = t177 * t119;
1482*c4762a1bSJed Brown   t346 = t37 * t86;
1483*c4762a1bSJed Brown   t351 = t103 * t15;
1484*c4762a1bSJed Brown   t352 = t177 * t351;
1485*c4762a1bSJed Brown   t355 = t64 * t119;
1486*c4762a1bSJed Brown   t358 = t8 * t227;
1487*c4762a1bSJed Brown   t361 = t85 * 0.3141592654e1;
1488*c4762a1bSJed Brown   t365 = t84 * t39;
1489*c4762a1bSJed Brown   t372 = ZB * t10;
1490*c4762a1bSJed Brown   t373 = t372 * t38;
1491*c4762a1bSJed Brown   t374 = t47 * t373;
1492*c4762a1bSJed Brown   t379 = t177 * t39;
1493*c4762a1bSJed Brown   t384 = -0.2e1 * t46 * t332 + t111 * t335 + 0.4e1 * t237 * t337 - 0.2e1 * t83 * t340 + 0.16e2 * t286 * t211 * t95 + 0.2e1 * t70 * t346 - 0.8e1 * t170 * t61 - 0.8e1 * t142 * t352 - 0.2e1 * t83 * t355 - 0.4e1 * t24 * t358 + 0.2e1 * t147 * t361 * t8 + 0.8e1 * t35 * t365 - 0.2e1 * t226 * t267 + 0.8e1 * t102 * t115 - 0.12e2 * t102 * t374 + 0.16e2 * t142 * t40 - 0.8e1 * t142 * t379 + 0.4e1 * t237 * t228;
1494*c4762a1bSJed Brown   t386 = t54 * t30 * t93;
1495*c4762a1bSJed Brown   t387 = ZA * t85;
1496*c4762a1bSJed Brown   t389 = t171 * t387 * t16;
1497*c4762a1bSJed Brown   t394 = t64 * t60;
1498*c4762a1bSJed Brown   t398 = t304 * t25 * t15;
1499*c4762a1bSJed Brown   t401 = t361 * t25;
1500*c4762a1bSJed Brown   t405 = t84 * t65;
1501*c4762a1bSJed Brown   t410 = t148 * t18;
1502*c4762a1bSJed Brown   t414 = t25 * t16 * t9;
1503*c4762a1bSJed Brown   t417 = t84 * t74;
1504*c4762a1bSJed Brown   t422 = t177 * t86;
1505*c4762a1bSJed Brown   t428 = ZB * t38;
1506*c4762a1bSJed Brown   t429 = t47 * t428;
1507*c4762a1bSJed Brown   t432 = t148 * t39;
1508*c4762a1bSJed Brown   t439 = 0.16e2 * t386 * t389 - 0.16e2 * t386 * t174 + 0.8e1 * t46 * t394 + 0.2e1 * t237 * t398 - t147 * t401 + 0.4e1 * t7 * t374 + 0.2e1 * t83 * t405 - 0.4e1 * t46 * t241 - 0.4e1 * t226 * t410 + 0.2e1 * t131 * t414 + 0.8e1 * t35 * t417 - 0.8e1 * t142 * t365 + 0.2e1 * t70 * t422 - 0.4e1 * t181 * t182 * t60 + 0.12e2 * t102 * t429 - 0.4e1 * t226 * t432 + 0.32e2 * t35 * t374 - 0.4e1 * t7 * t106;
1509*c4762a1bSJed Brown   t442 = t36 * t9 * t118;
1510*c4762a1bSJed Brown   t444 = t123 * t9;
1511*c4762a1bSJed Brown   t445 = t8 * t444;
1512*c4762a1bSJed Brown   t448 = t361 * t36;
1513*c4762a1bSJed Brown   t451 = t47 * t372 * t17;
1514*c4762a1bSJed Brown   t454 = t94 * t60;
1515*c4762a1bSJed Brown   t457 = t25 * t103;
1516*c4762a1bSJed Brown   t465 = t47 * t372 * t15;
1517*c4762a1bSJed Brown   t468 = t36 * t85;
1518*c4762a1bSJed Brown   t469 = t468 * t16;
1519*c4762a1bSJed Brown   t474 = t43 * t85;
1520*c4762a1bSJed Brown   t478 = t8 * t74;
1521*c4762a1bSJed Brown   t484 = t256 * t74;
1522*c4762a1bSJed Brown   t489 = t198 * ZA * t10 * t15;
1523*c4762a1bSJed Brown   t501 = -t111 * t442 + 0.4e1 * t131 * t445 - t147 * t448 + 0.4e1 * t7 * t451 + 0.8e1 * t92 * t454 - 0.2e1 * t24 * t457 * t13 - 0.2e1 * t286 * t211 * t65 + 0.4e1 * t7 * t465 + t111 * t469 - 0.2e1 * t216 * t250 * t17 - 0.2e1 * t216 * t474 * t25 - 0.4e1 * t24 * t478 + 0.4e1 * t24 * t8 * t38 + 0.4e1 * t226 * t484 - 0.16e2 * t142 * t489 - 0.2e1 * t24 * t212 * t103 - 0.2e1 * t216 * t22 * t17 * t25 + 0.2e1 * t70 * t120;
1524*c4762a1bSJed Brown   t504 = t33 * t36 * t55 * t38;
1525*c4762a1bSJed Brown   t507 = t37 * t18;
1526*c4762a1bSJed Brown   t512 = t47 * ZB * t13 * t10;
1527*c4762a1bSJed Brown   t518 = t59 * t95;
1528*c4762a1bSJed Brown   t530 = t84 * t351;
1529*c4762a1bSJed Brown   t534 = t37 * t227;
1530*c4762a1bSJed Brown   t549 = -0.8e1 * t210 * t504 + 0.2e1 * t102 * t507 + 0.4e1 * t7 * t512 + t111 * t133 - 0.16e2 * t35 * t489 + 0.8e1 * t170 * t518 + 0.2e1 * t24 * t36 * t13 * t10 + 0.4e1 * t131 * t387 * ZB + 0.12e2 * t102 * t465 - 0.8e1 * t142 * t530 + t111 * t291 - 0.2e1 * t102 * t534 - 0.4e1 * t70 * t394 - 0.10e2 * t102 * t128 + 0.4e1 * t237 * t305 + 0.8e1 * t102 * t19 + 0.2e1 * t83 * t346 - 0.16e2 * t35 * t128;
1531*c4762a1bSJed Brown   t557 = t468 * t118;
1532*c4762a1bSJed Brown   t562 = t93 * t58;
1533*c4762a1bSJed Brown   t563 = t562 * t60;
1534*c4762a1bSJed Brown   t567 = t44 * t90 * t93;
1535*c4762a1bSJed Brown   t575 = ZA * t55;
1536*c4762a1bSJed Brown   t576 = t575 * t428;
1537*c4762a1bSJed Brown   t583 = t37 * t60;
1538*c4762a1bSJed Brown   t590 = t140 * t3;
1539*c4762a1bSJed Brown   t601 = -0.2e1 * t226 * t398 - 0.2e1 * t70 * t340 - 0.2e1 * t131 * t557 - 0.4e1 * t24 * t115 + 0.8e1 * t324 * t563 + 0.16e2 * t567 * t389 + 0.16e2 * t70 * t84 * t95 + 0.2e1 * t70 * t178 - 0.16e2 * t142 * t576 - 0.4e1 * t237 * t257 - 0.4e1 * t226 * t312 + 0.8e1 * t46 * t583 + 0.2e1 * t24 * t36 * t38 * t103 + 0.8e1 * t590 * t213 + 0.2e1 * t102 * t143 - 0.16e2 * t35 * t143 + 0.2e1 * t131 * t248 + 0.4e1 * t46 * t346;
1540*c4762a1bSJed Brown   t604 = nz * t36;
1541*c4762a1bSJed Brown   t606 = t154 * t95;
1542*c4762a1bSJed Brown   t625 = t36 * t103;
1543*c4762a1bSJed Brown   t640 = t30 * t36;
1544*c4762a1bSJed Brown   t641 = t54 * t640;
1545*c4762a1bSJed Brown   t642 = t325 * t95;
1546*c4762a1bSJed Brown   t647 = -0.4e1 * t131 * t315 - 0.4e1 * t54 * t604 * t606 - t147 * t148 * t60 + 0.16e2 * t35 * t576 - 0.8e1 * t102 * t478 + 0.32e2 * t142 * t465 - 0.4e1 * t237 * t484 - 0.2e1 * t70 * t355 + 0.2e1 * t70 * t273 + 0.2e1 * t102 * t233 - 0.2e1 * t24 * t625 * t13 - 0.8e1 * t7 * t358 - 0.2e1 * t111 * t445 - 0.4e1 * t7 * t429 + 0.16e2 * t46 * t47 * t222 + 0.2e1 * t131 * t113 + 0.8e1 * t641 * t642 - 0.2e1 * t7 * t534;
1547*c4762a1bSJed Brown   t652 = t36 * t16;
1548*c4762a1bSJed Brown   t653 = t652 * t9;
1549*c4762a1bSJed Brown   t655 = t64 * t227;
1550*c4762a1bSJed Brown   t658 = t182 * t95;
1551*c4762a1bSJed Brown   t663 = t562 * t95;
1552*c4762a1bSJed Brown   t684 = t64 * t351;
1553*c4762a1bSJed Brown   t689 = t36 * t10;
1554*c4762a1bSJed Brown   t695 = t154 * t222;
1555*c4762a1bSJed Brown   t698 = -0.4e1 * t216 * t217 * t38 - t111 * t653 - 0.2e1 * t7 * t655 - 0.4e1 * t181 * t658 + 0.2e1 * t131 * t469 - 0.8e1 * t641 * t663 - 0.4e1 * t83 * t583 - 0.2e1 * t83 * t177 * t65 - 0.4e1 * t24 * t457 * t15 + 0.16e2 * t70 * t84 * t60 + 0.8e1 * t57 * t518 - 0.32e2 * t142 * t374 + 0.4e1 * t24 * t8 * t351 + 0.4e1 * t102 * t684 - t147 * t256 * t86 - 0.2e1 * t24 * t689 * t15 - 0.2e1 * t70 * t241 + 0.8e1 * t153 * t695;
1556*c4762a1bSJed Brown   t711 = t575 * t373;
1557*c4762a1bSJed Brown   t717 = t304 * t17 * t25;
1558*c4762a1bSJed Brown   t736 = t177 * t74;
1559*c4762a1bSJed Brown   t739 = 0.2e1 * t226 * t245 - 0.8e1 * t102 * t358 - 0.16e2 * t57 * t389 - 0.2e1 * t102 * t655 + 0.8e1 * t590 * t504 - 0.8e1 * t641 * t326 - 0.16e2 * t35 * t711 - t111 * t557 + t111 * t137 - 0.2e1 * t226 * t717 + 0.8e1 * t102 * t37 * t351 + 0.2e1 * t131 * t335 - 0.4e1 * t131 * t332 - 0.2e1 * t216 * t474 * t36 - 0.2e1 * t111 * t332 + 0.16e2 * t142 * t711 - t147 * t256 * t60 + 0.8e1 * t142 * t736;
1560*c4762a1bSJed Brown   t750 = t64 * t262;
1561*c4762a1bSJed Brown   t763 = t44 * t640;
1562*c4762a1bSJed Brown   t770 = t84 * t119;
1563*c4762a1bSJed Brown   t782 = 0.4e1 * t102 * t512 + 0.8e1 * t142 * t417 + 0.8e1 * t641 * t563 - 0.2e1 * t7 * t507 + 0.2e1 * t7 * t750 - 0.8e1 * t35 * t352 + 0.4e1 * t237 * t410 + 0.4e1 * t7 * t684 - 0.2e1 * t46 * t445 + t147 * t148 * t65 + 0.4e1 * t763 * t304 * t119 + 0.16e2 * t70 * t177 * t60 + 0.2e1 * t70 * t770 - t111 * t414 - 0.16e2 * t567 * t174 - 0.4e1 * t46 * t71 - 0.4e1 * t46 * t355 - 0.4e1 * t7 * t277;
1564*c4762a1bSJed Brown   t797 = t64 * t149;
1565*c4762a1bSJed Brown   t821 = -t54 * t448 + 0.2e1 * t131 * t442 + 0.8e1 * t7 * t478 + 0.8e1 * t35 * t379 - 0.2e1 * t181 * t182 * t149 + 0.2e1 * t70 * t405 + 0.2e1 * t83 * t770 - 0.2e1 * t70 * t797 - 0.6e1 * t7 * t75 - 0.4e1 * t286 * t606 - 0.4e1 * t237 * t432 + t147 * t256 * t149 - 0.4e1 * t763 * t304 * t149 - 0.2e1 * t102 * t75 + 0.2e1 * t237 * t717 + 0.8e1 * t324 * t642 - 0.16e2 * t170 * t389 + 0.2e1 * t83 * t422;
1566*c4762a1bSJed Brown   t827 = t84 * t149;
1567*c4762a1bSJed Brown   t846 = t54 * nz * ZA;
1568*c4762a1bSJed Brown   t854 = t64 * t18;
1569*c4762a1bSJed Brown   t867 = -0.16e2 * t142 * t128 + 0.32e2 * t35 * t465 - 0.2e1 * t83 * t827 + 0.2e1 * t46 * t315 + t147 * t148 * t86 - 0.4e1 * t102 * t451 - 0.8e1 * t226 * t148 * xc * t38 - 0.2e1 * t24 * t689 * t38 + 0.2e1 * t131 * t187 + 0.8e1 * t846 * t155 + 0.8e1 * t35 * t736 + 0.2e1 * t24 * t689 * t17 - 0.2e1 * t7 * t854 + t147 * t256 * t119 + 0.2e1 * t102 * t854 - 0.8e1 * t35 * t530 + 0.4e1 * t46 * t797 + 0.2e1 * t102 * t750;
1570*c4762a1bSJed Brown   t909 = -0.8e1 * t324 * t663 + t147 * t256 * t444 - t147 * t256 * t65 + 0.4e1 * t226 * t238 + 0.2e1 * t7 * t40 - t54 * t401 + 0.16e2 * t57 * t174 + 0.4e1 * t226 * t337 + 0.4e1 * t24 * t8 * t163 + 0.8e1 * t846 * t695 + 0.8e1 * t319 * t454 + 0.2e1 * t131 * t653 - 0.8e1 * t46 * t64 * t95 + 0.6e1 * t24 * t78 * t15 - 0.4e1 * t44 * t31 * xc * t658 - 0.32e2 * t153 * t211 * t49 - 0.2e1 * t70 * t827 + t147 * t148 * t444;
1571*c4762a1bSJed Brown   t914 = t25 * ZB;
1572*c4762a1bSJed Brown   t915 = t33 * t914;
1573*c4762a1bSJed Brown   t919 = t4 * t4;
1574*c4762a1bSJed Brown   t920 = t16 * t919;
1575*c4762a1bSJed Brown   t929 = t123 * t90;
1576*c4762a1bSJed Brown   t932 = t919 * t103;
1577*c4762a1bSJed Brown   t935 = t33 * ZB;
1578*c4762a1bSJed Brown   t939 = t652 * t919;
1579*c4762a1bSJed Brown   t942 = t16 * t30;
1580*c4762a1bSJed Brown   t943 = t942 * t4;
1581*c4762a1bSJed Brown   t949 = t103 * t16;
1582*c4762a1bSJed Brown   t950 = t949 * t90;
1583*c4762a1bSJed Brown   t953 = -0.2e1 * t915 * t103 * t90 + 0.2e1 * t915 * t920 - 0.2e1 * t915 * t123 * t919 + 0.2e1 * t915 * t16 * t90 - 0.2e1 * t915 * t929 - 0.2e1 * t915 * t932 - 0.2e1 * t935 * t323 * t123 + 0.2e1 * t935 * t939 + 0.4e1 * t915 * t943 + 0.4e1 * t182 * t172 * t90 + 0.2e1 * t915 * t950;
1584*c4762a1bSJed Brown   t954 = t171 * t36;
1585*c4762a1bSJed Brown   t955 = t90 * nz;
1586*c4762a1bSJed Brown   t956 = xc * t955;
1587*c4762a1bSJed Brown   t957 = t118 * t10;
1588*c4762a1bSJed Brown   t964 = t33 * t33;
1589*c4762a1bSJed Brown   t965 = t964 * ZB;
1590*c4762a1bSJed Brown   t966 = t965 * t640;
1591*c4762a1bSJed Brown   t967 = t10 * t919;
1592*c4762a1bSJed Brown   t968 = t55 * t16;
1593*c4762a1bSJed Brown   t969 = t967 * t968;
1594*c4762a1bSJed Brown   t972 = t935 * t36;
1595*c4762a1bSJed Brown   t974 = t103 * t30 * t4;
1596*c4762a1bSJed Brown   t977 = xc * t16;
1597*c4762a1bSJed Brown   t978 = t967 * t977;
1598*c4762a1bSJed Brown   t981 = t90 * t30;
1599*c4762a1bSJed Brown   t983 = t16 * t10;
1600*c4762a1bSJed Brown   t987 = t182 * ZA;
1601*c4762a1bSJed Brown   t988 = t4 * t10;
1602*c4762a1bSJed Brown   t992 = t171 * t604;
1603*c4762a1bSJed Brown   t993 = xc * t14;
1604*c4762a1bSJed Brown   t994 = t932 * t993;
1605*c4762a1bSJed Brown   t997 = t182 * t30;
1606*c4762a1bSJed Brown   t1005 = t171 * t285;
1607*c4762a1bSJed Brown   t1006 = t988 * t993;
1608*c4762a1bSJed Brown   t1009 = t58 * t914;
1609*c4762a1bSJed Brown   t1010 = t1009 * t31;
1610*c4762a1bSJed Brown   t1013 = 0.8e1 * t954 * t956 * t957 + 0.2e1 * t915 * t932 * t16 + 0.32e2 * t966 * t969 - 0.4e1 * t972 * t974 - 0.32e2 * t966 * t978 + 0.32e2 * t965 * t981 * t177 * t983 - 0.32e2 * t987 * t942 * t988 + 0.8e1 * t992 * t994 + 0.8e1 * t997 * t949 * ZA * t4 - 0.2e1 * t935 * t124 * t919 - 0.16e2 * t1005 * t1006 + 0.16e2 * t1010 * t1006;
1611*c4762a1bSJed Brown   t1015 = t964 * t25;
1612*c4762a1bSJed Brown   t1016 = ZA * t30;
1613*c4762a1bSJed Brown   t1017 = t1015 * t1016;
1614*c4762a1bSJed Brown   t1020 = t967 * t993;
1615*c4762a1bSJed Brown   t1031 = t1009 * t118;
1616*c4762a1bSJed Brown   t1032 = t31 * t10;
1617*c4762a1bSJed Brown   t1040 = t964 * t914;
1618*c4762a1bSJed Brown   t1041 = t1040 * t90;
1619*c4762a1bSJed Brown   t1044 = t55 * t10 * t4 * t16;
1620*c4762a1bSJed Brown   t1047 = t1040 * t30;
1621*c4762a1bSJed Brown   t1050 = t123 * ZA;
1622*c4762a1bSJed Brown   t1054 = t977 * t988;
1623*c4762a1bSJed Brown   t1057 = 0.64e2 * t1017 * t978 - 0.8e1 * t992 * t1020 + 0.2e1 * t972 * t950 + 0.4e1 * t182 * t929 * ZA + 0.4e1 * t182 * t199 * t90 - 0.16e2 * t1031 * t1032 * t4 * xc + 0.4e1 * t182 * t172 * t919 + 0.64e2 * t1041 * t1044 + 0.32e2 * t1047 * t969 + 0.4e1 * t182 * t1050 * t919 - 0.64e2 * t1041 * t1054;
1624*c4762a1bSJed Brown   t1058 = t1009 * nz;
1625*c4762a1bSJed Brown   t1063 = t932 * ZA;
1626*c4762a1bSJed Brown   t1069 = t123 * t30 * t4;
1627*c4762a1bSJed Brown   t1080 = t993 * t103 * t4;
1628*c4762a1bSJed Brown   t1088 = t935 * t103;
1629*c4762a1bSJed Brown   t1094 = -0.8e1 * t1058 * t994 - 0.32e2 * t1047 * t978 + 0.4e1 * t182 * t1063 - 0.4e1 * t915 * t974 - 0.4e1 * t915 * t1069 - 0.2e1 * t935 * t625 * t90 - 0.8e1 * t1009 * t10 * t14 * t955 - 0.16e2 * t1010 * t1080 - 0.2e1 * t935 * t625 * t919 - 0.64e2 * t1017 * t969 + 0.2e1 * t1088 * t939 + 0.8e1 * t1009 * t957 * t955;
1630*c4762a1bSJed Brown   t1113 = t955 * t118 * xc;
1631*c4762a1bSJed Brown   t1120 = t4 * t118;
1632*c4762a1bSJed Brown   t1125 = t981 * xc;
1633*c4762a1bSJed Brown   t1133 = nz * t10;
1634*c4762a1bSJed Brown   t1140 = -0.8e1 * t954 * t955 * t10 * t993 + 0.2e1 * t935 * t652 * t90 - 0.64e2 * t1015 * t981 * t575 * t983 + 0.8e1 * t182 * t103 * t1016 * t4 + 0.8e1 * t1009 * t1113 + 0.16e2 * t954 * t1032 * t4 * t14 - 0.16e2 * t954 * t1032 * t1120 + 0.64e2 * t1015 * t10 * t172 * t1125 + 0.8e1 * t171 * t103 * t136 * t956 - 0.8e1 * t1031 * t1133 * t919 * xc + 0.8e1 * t1058 * t1020;
1635*c4762a1bSJed Brown   t1153 = xc * t118;
1636*c4762a1bSJed Brown   t1165 = t182 * t16;
1637*c4762a1bSJed Brown   t1170 = t171 * t10;
1638*c4762a1bSJed Brown   t1178 = ZA * t90;
1639*c4762a1bSJed Brown   t1182 = 0.4e1 * t1088 * t652 * t140 + 0.8e1 * t954 * t1133 * t919 * t14 + 0.4e1 * t972 * t943 - 0.4e1 * t972 * t1069 - 0.16e2 * t954 * t31 * t4 * t1153 - 0.8e1 * t954 * nz * t919 * t1153 - 0.8e1 * t954 * t1133 * t919 * t118 + 0.4e1 * t1165 * t1063 + 0.16e2 * t1005 * t1080 - 0.8e1 * t1170 * t118 * t36 * t955 - 0.16e2 * t987 * t920 * t10 - 0.16e2 * t1165 * t1178 * t10;
1640*c4762a1bSJed Brown   t1195 = t1040 * t981;
1641*c4762a1bSJed Brown   t1199 = t1009 * t955;
1642*c4762a1bSJed Brown   t1203 = t1009 * t10;
1643*c4762a1bSJed Brown   t1211 = t965 * t323;
1644*c4762a1bSJed Brown   t1225 = -0.32e2 * t965 * t10 * t652 * t1125 + 0.4e1 * t915 * t16 * t974 + 0.4e1 * t182 * t90 * t949 * ZA + 0.32e2 * t1195 * t968 * t10 - 0.8e1 * t1199 * t993 * t103 + 0.8e1 * t1203 * t118 * nz * t919 + 0.8e1 * t1170 * t136 * t955 + 0.64e2 * t1211 * t1044 + 0.16e2 * t1031 * t1032 * t4 + 0.8e1 * t987 * t943 + 0.8e1 * t1199 * t993 * t10 + 0.8e1 * t997 * t1050 * t4;
1645*c4762a1bSJed Brown   t1263 = -0.128e3 * t1015 * t1178 * t1044 + 0.16e2 * t1005 * t988 * t1153 + 0.8e1 * t1058 * t1153 * t919 + 0.16e2 * t1010 * t1120 * xc - 0.8e1 * t954 * t1113 - 0.8e1 * t1203 * t14 * nz * t919 - 0.16e2 * t1203 * t14 * t31 * t4 - 0.8e1 * t1203 * t1113 - 0.32e2 * t1195 * t977 * t10 - 0.64e2 * t1211 * t1054 + 0.8e1 * t992 * t967 * t1153 + 0.128e3 * t1015 * t983 * t90 * t4 * t47;
1646*c4762a1bSJed Brown 
1647*c4762a1bSJed Brown   _PC1B = (t127 + t204 + t270 + t329 + t384 + t439 + t501 + t549 + t601 + t647 + t698 + t739 + t782 + t821 + t867 + t909) / (t953 + t1013 + t1057 + t1094 + t1140 + t1182 + t1225 + t1263);
1648*c4762a1bSJed Brown   /****************************************************************************************/
1649*c4762a1bSJed Brown   t1 = nz * nz;
1650*c4762a1bSJed Brown   t2 = t1 * nz;
1651*c4762a1bSJed Brown   t3 = nx * t2;
1652*c4762a1bSJed Brown   t4 = 0.3141592654e1 * ZA;
1653*c4762a1bSJed Brown   t5 = t3 * t4;
1654*c4762a1bSJed Brown   t6 = nx * 0.3141592654e1;
1655*c4762a1bSJed Brown   t7 = t6 * xc;
1656*c4762a1bSJed Brown   t8 = PetscSinReal(t7);
1657*c4762a1bSJed Brown   t9 = t8 * ZB;
1658*c4762a1bSJed Brown   t10 = nz * 0.3141592654e1;
1659*c4762a1bSJed Brown   t11 = PetscExpReal(t10);
1660*c4762a1bSJed Brown   t12 = t11 * t11;
1661*c4762a1bSJed Brown   t15 = PetscExpReal(xc * nz * 0.3141592654e1);
1662*c4762a1bSJed Brown   t16 = t15 * t15;
1663*c4762a1bSJed Brown   t17 = t16 * t16;
1664*c4762a1bSJed Brown   t18 = t17 * t15;
1665*c4762a1bSJed Brown   t19 = t12 * t18;
1666*c4762a1bSJed Brown   t23 = t1 * t1;
1667*c4762a1bSJed Brown   t24 = nx * t23;
1668*c4762a1bSJed Brown   t25 = ZB * ZB;
1669*c4762a1bSJed Brown   t27 = t18 * t8;
1670*c4762a1bSJed Brown   t28 = 0.3141592654e1 * 0.3141592654e1;
1671*c4762a1bSJed Brown   t29 = xc * xc;
1672*c4762a1bSJed Brown   t30 = t28 * t29;
1673*c4762a1bSJed Brown   t34 = t1 * xc;
1674*c4762a1bSJed Brown   t35 = 0.3141592654e1 * ZB;
1675*c4762a1bSJed Brown   t36 = t34 * t35;
1676*c4762a1bSJed Brown   t37 = PetscCosReal(t7);
1677*c4762a1bSJed Brown   t38 = ZA * t37;
1678*c4762a1bSJed Brown   t39 = nx * nx;
1679*c4762a1bSJed Brown   t40 = t39 * t12;
1680*c4762a1bSJed Brown   t41 = t16 * t15;
1681*c4762a1bSJed Brown   t43 = t38 * t40 * t41;
1682*c4762a1bSJed Brown   t46 = t25 * nz;
1683*c4762a1bSJed Brown   t47 = t46 * 0.3141592654e1;
1684*c4762a1bSJed Brown   t48 = t39 * nx;
1685*c4762a1bSJed Brown   t49 = PetscSinReal(t6);
1686*c4762a1bSJed Brown   t50 = t48 * t49;
1687*c4762a1bSJed Brown   t51 = t12 * t11;
1688*c4762a1bSJed Brown   t52 = t51 * t17;
1689*c4762a1bSJed Brown   t53 = t50 * t52;
1690*c4762a1bSJed Brown   t56 = t34 * 0.3141592654e1 * t25;
1691*c4762a1bSJed Brown   t57 = t37 * t39;
1692*c4762a1bSJed Brown   t58 = t17 * t41;
1693*c4762a1bSJed Brown   t59 = t12 * t58;
1694*c4762a1bSJed Brown   t60 = t57 * t59;
1695*c4762a1bSJed Brown   t63 = t25 * t18;
1696*c4762a1bSJed Brown   t64 = t57 * nz;
1697*c4762a1bSJed Brown   t67 = ZA * ZA;
1698*c4762a1bSJed Brown   t68 = t67 * nz;
1699*c4762a1bSJed Brown   t69 = 0.3141592654e1 * t48;
1700*c4762a1bSJed Brown   t70 = t68 * t69;
1701*c4762a1bSJed Brown   t71 = t49 * xc;
1702*c4762a1bSJed Brown   t72 = t17 * t16;
1703*c4762a1bSJed Brown   t73 = t11 * t72;
1704*c4762a1bSJed Brown   t74 = t71 * t73;
1705*c4762a1bSJed Brown   t77 = t1 * t67;
1706*c4762a1bSJed Brown   t78 = t77 * 0.3141592654e1;
1707*c4762a1bSJed Brown   t81 = nx * t25;
1708*c4762a1bSJed Brown   t82 = t81 * t49;
1709*c4762a1bSJed Brown   t83 = t17 * t17;
1710*c4762a1bSJed Brown   t85 = t1 * t83 * t11;
1711*c4762a1bSJed Brown   t87 = nx * ZB;
1712*c4762a1bSJed Brown   t88 = t8 * t2;
1713*c4762a1bSJed Brown   t89 = t87 * t88;
1714*c4762a1bSJed Brown   t90 = 0.3141592654e1 * xc;
1715*c4762a1bSJed Brown   t91 = t12 * t12;
1716*c4762a1bSJed Brown   t92 = ZA * t91;
1717*c4762a1bSJed Brown   t97 = ZB * ZA;
1718*c4762a1bSJed Brown   t98 = t97 * t37;
1719*c4762a1bSJed Brown   t99 = t39 * nz;
1720*c4762a1bSJed Brown   t100 = t12 * t41;
1721*c4762a1bSJed Brown   t104 = 0.8e1 * t5 * t9 * t19 + 0.8e1 * t24 * t25 * t27 * t30 + 0.12e2 * t36 * t43 - t47 * t53 - 0.2e1 * t56 * t60 - 0.4e1 * t63 * t64 + 0.6e1 * t70 * t74 + 0.4e1 * t78 * t60 - t82 * t85 + 0.4e1 * t89 * t90 * t92 * t41 + 0.4e1 * t98 * t99 * t100;
1722*c4762a1bSJed Brown   t105 = t67 * t48;
1723*c4762a1bSJed Brown   t106 = t49 * t51;
1724*c4762a1bSJed Brown   t107 = t106 * t72;
1725*c4762a1bSJed Brown   t109 = t1 * 0.3141592654e1;
1726*c4762a1bSJed Brown   t110 = t109 * xc;
1727*c4762a1bSJed Brown   t115 = nx * t67;
1728*c4762a1bSJed Brown   t116 = t115 * t49;
1729*c4762a1bSJed Brown   t117 = t1 * t16;
1730*c4762a1bSJed Brown   t118 = t117 * t11;
1731*c4762a1bSJed Brown   t120 = t2 * t25;
1732*c4762a1bSJed Brown   t121 = t28 * 0.3141592654e1;
1733*c4762a1bSJed Brown   t122 = t121 * t29;
1734*c4762a1bSJed Brown   t123 = t120 * t122;
1735*c4762a1bSJed Brown   t129 = t1 * ZB;
1736*c4762a1bSJed Brown   t130 = t129 * t4;
1737*c4762a1bSJed Brown   t131 = t57 * t100;
1738*c4762a1bSJed Brown   t134 = t12 * t16;
1739*c4762a1bSJed Brown   t136 = t109 * t39;
1740*c4762a1bSJed Brown   t139 = ZB * t18;
1741*c4762a1bSJed Brown   t141 = t39 * t1;
1742*c4762a1bSJed Brown   t142 = t141 * t90;
1743*c4762a1bSJed Brown   t145 = t77 * t90;
1744*c4762a1bSJed Brown   t146 = t91 * t41;
1745*c4762a1bSJed Brown   t147 = t57 * t146;
1746*c4762a1bSJed Brown   t151 = t25 * t39 * t1;
1747*c4762a1bSJed Brown   t152 = t72 * t12;
1748*c4762a1bSJed Brown   t156 = t49 * t2;
1749*c4762a1bSJed Brown   t158 = t83 * t11;
1750*c4762a1bSJed Brown   t162 = -t105 * t107 + 0.8e1 * t110 * t72 * t25 * t39 - t116 * t118 + 0.8e1 * t123 * t53 + 0.8e1 * t5 * t9 * t59 - 0.8e1 * t130 * t131 - 0.8e1 * t134 * t25 * t136 - 0.12e2 * t139 * t38 * t142 - 0.8e1 * t145 * t147 - 0.8e1 * t151 * t90 * t152 - 0.2e1 * t87 * t156 * t4 * t158;
1751*c4762a1bSJed Brown   t164 = t115 * t88;
1752*c4762a1bSJed Brown   t165 = t90 * t19;
1753*c4762a1bSJed Brown   t168 = t25 * t48;
1754*c4762a1bSJed Brown   t169 = t49 * t16;
1755*c4762a1bSJed Brown   t170 = t169 * t11;
1756*c4762a1bSJed Brown   t174 = ZA * nz * t69;
1757*c4762a1bSJed Brown   t175 = ZB * t51;
1758*c4762a1bSJed Brown   t176 = t175 * t17;
1759*c4762a1bSJed Brown   t177 = t71 * t176;
1760*c4762a1bSJed Brown   t180 = t1 * t29;
1761*c4762a1bSJed Brown   t181 = t28 * t25;
1762*c4762a1bSJed Brown   t182 = t180 * t181;
1763*c4762a1bSJed Brown   t183 = t50 * t73;
1764*c4762a1bSJed Brown   t186 = ZA * t1;
1765*c4762a1bSJed Brown   t187 = t28 * t48;
1766*c4762a1bSJed Brown   t188 = t186 * t187;
1767*c4762a1bSJed Brown   t189 = ZB * t17;
1768*c4762a1bSJed Brown   t190 = t189 * t11;
1769*c4762a1bSJed Brown   t191 = t71 * t190;
1770*c4762a1bSJed Brown   t194 = t50 * t158;
1771*c4762a1bSJed Brown   t196 = t115 * t156;
1772*c4762a1bSJed Brown   t197 = t90 * t73;
1773*c4762a1bSJed Brown   t201 = t49 * t17 * t11;
1774*c4762a1bSJed Brown   t204 = t88 * t90;
1775*c4762a1bSJed Brown   t207 = t68 * 0.3141592654e1;
1776*c4762a1bSJed Brown   t208 = t17 * t11;
1777*c4762a1bSJed Brown   t209 = t50 * t208;
1778*c4762a1bSJed Brown   t211 = -0.2e1 * t164 * t165 - t168 * t170 + t168 * t107 + 0.8e1 * t174 * t177 + 0.2e1 * t182 * t183 + 0.8e1 * t188 * t191 + t47 * t194 - 0.6e1 * t196 * t197 - t168 * t201 - 0.4e1 * t81 * t18 * t204 - t207 * t209;
1779*c4762a1bSJed Brown   t212 = t2 * 0.3141592654e1;
1780*c4762a1bSJed Brown   t213 = t212 * t52;
1781*c4762a1bSJed Brown   t215 = t81 * t8;
1782*c4762a1bSJed Brown   t216 = t212 * t59;
1783*c4762a1bSJed Brown   t219 = t3 * t90;
1784*c4762a1bSJed Brown   t220 = t25 * t8;
1785*c4762a1bSJed Brown   t221 = t18 * t91;
1786*c4762a1bSJed Brown   t225 = t71 * t52;
1787*c4762a1bSJed Brown   t231 = t16 * t51;
1788*c4762a1bSJed Brown   t232 = t50 * t231;
1789*c4762a1bSJed Brown   t237 = ZA * t12;
1790*c4762a1bSJed Brown   t243 = t67 * t28;
1791*c4762a1bSJed Brown   t244 = t24 * t243;
1792*c4762a1bSJed Brown   t245 = t71 * t231;
1793*c4762a1bSJed Brown   t249 = -t116 * t213 - 0.4e1 * t215 * t216 + 0.2e1 * t219 * t220 * t221 - 0.4e1 * t70 * t225 + 0.4e1 * t98 * t99 * t146 + t47 * t232 - 0.2e1 * t145 * t57 * t221 + 0.4e1 * t89 * t90 * t237 * t41 - t105 * t201 - 0.6e1 * t244 * t245 + t105 * t170;
1794*c4762a1bSJed Brown   t252 = t25 * t37;
1795*c4762a1bSJed Brown   t253 = t252 * t39;
1796*c4762a1bSJed Brown   t255 = nz * t15 * t12;
1797*c4762a1bSJed Brown   t258 = t2 * t29;
1798*c4762a1bSJed Brown   t259 = ZB * t28;
1799*c4762a1bSJed Brown   t260 = t258 * t259;
1800*c4762a1bSJed Brown   t263 = t106 * t17;
1801*c4762a1bSJed Brown   t265 = xc * t25;
1802*c4762a1bSJed Brown   t269 = t25 * t49;
1803*c4762a1bSJed Brown   t270 = t269 * t52;
1804*c4762a1bSJed Brown   t273 = t1 * t25;
1805*c4762a1bSJed Brown   t274 = t273 * 0.3141592654e1;
1806*c4762a1bSJed Brown   t275 = t57 * t19;
1807*c4762a1bSJed Brown   t278 = t24 * t30;
1808*c4762a1bSJed Brown   t288 = t1 * t11 * t72;
1809*c4762a1bSJed Brown   t290 = t212 * t208;
1810*c4762a1bSJed Brown   t292 = t2 * xc;
1811*c4762a1bSJed Brown   t296 = 0.2e1 * t253 * t255 + 0.16e2 * t260 * t43 + t105 * t263 - 0.4e1 * t10 * t265 * t53 + 0.4e1 * t219 * t270 - 0.12e2 * t274 * t275 + 0.8e1 * t278 * t270 - 0.2e1 * ZB * nz * t69 * t49 * ZA * t158 - t82 * t288 - t116 * t290 + 0.16e2 * t292 * t243 * t275;
1812*c4762a1bSJed Brown   t301 = t50 * t176;
1813*c4762a1bSJed Brown   t304 = t51 * t72;
1814*c4762a1bSJed Brown   t305 = t71 * t304;
1815*c4762a1bSJed Brown   t308 = t25 * t41;
1816*c4762a1bSJed Brown   t311 = ZA * t48;
1817*c4762a1bSJed Brown   t312 = t311 * t49;
1818*c4762a1bSJed Brown   t317 = t91 * t15;
1819*c4762a1bSJed Brown   t318 = t57 * t317;
1820*c4762a1bSJed Brown   t321 = t81 * t88;
1821*c4762a1bSJed Brown   t322 = t90 * t59;
1822*c4762a1bSJed Brown   t325 = t212 * t231;
1823*c4762a1bSJed Brown   t327 = t15 * t12;
1824*c4762a1bSJed Brown   t328 = t57 * t327;
1825*c4762a1bSJed Brown   t331 = t77 * t187;
1826*c4762a1bSJed Brown   t334 = t2 * ZA;
1827*c4762a1bSJed Brown   t335 = t334 * t122;
1828*c4762a1bSJed Brown   t336 = t50 * t190;
1829*c4762a1bSJed Brown   t339 = 0.8e1 * t151 * t90 * t134 + 0.16e2 * t186 * t30 * t301 - 0.2e1 * t70 * t305 + 0.2e1 * t308 * t64 - 0.2e1 * t312 * ZB * t83 * t11 + 0.2e1 * t56 * t318 + 0.2e1 * t321 * t322 - t116 * t325 - 0.4e1 * t274 * t328 + 0.2e1 * t331 * t305 - 0.16e2 * t335 * t336;
1830*c4762a1bSJed Brown   t341 = t169 * t51;
1831*c4762a1bSJed Brown   t344 = t49 * t11 * t72;
1832*c4762a1bSJed Brown   t346 = t77 * t30;
1833*c4762a1bSJed Brown   t347 = t50 * t304;
1834*c4762a1bSJed Brown   t350 = t25 * t51;
1835*c4762a1bSJed Brown   t352 = nx * ZA;
1836*c4762a1bSJed Brown   t353 = t49 * t23;
1837*c4762a1bSJed Brown   t354 = t352 * t353;
1838*c4762a1bSJed Brown   t355 = t28 * xc;
1839*c4762a1bSJed Brown   t362 = t25 * t91;
1840*c4762a1bSJed Brown   t365 = t23 * nz;
1841*c4762a1bSJed Brown   t366 = nx * t365;
1842*c4762a1bSJed Brown   t367 = t366 * t122;
1843*c4762a1bSJed Brown   t368 = ZB * t49;
1844*c4762a1bSJed Brown   t369 = ZA * t51;
1845*c4762a1bSJed Brown   t370 = t369 * t17;
1846*c4762a1bSJed Brown   t371 = t368 * t370;
1847*c4762a1bSJed Brown   t374 = t115 * t353;
1848*c4762a1bSJed Brown   t375 = t355 * t73;
1849*c4762a1bSJed Brown   t381 = t105 * t341 - t105 * t344 - 0.2e1 * t346 * t347 - t350 * t50 - 0.8e1 * t354 * t355 * t176 - 0.4e1 * t98 * t99 * t317 - 0.2e1 * t362 * t99 - 0.16e2 * t367 * t371 + 0.6e1 * t374 * t375 - 0.8e1 * t182 * t53 - t82 * t290;
1850*c4762a1bSJed Brown   t382 = t71 * t208;
1851*c4762a1bSJed Brown   t394 = t2 * t67;
1852*c4762a1bSJed Brown   t395 = t394 * t122;
1853*c4762a1bSJed Brown   t398 = t352 * t156;
1854*c4762a1bSJed Brown   t402 = t17 * t12;
1855*c4762a1bSJed Brown   t403 = t39 * ZA;
1856*c4762a1bSJed Brown   t404 = t402 * t403;
1857*c4762a1bSJed Brown   t407 = t269 * t208;
1858*c4762a1bSJed Brown   t411 = t49 * t83 * t11;
1859*c4762a1bSJed Brown   t413 = t46 * t69;
1860*c4762a1bSJed Brown   t419 = -0.4e1 * t331 * t382 + 0.2e1 * t115 * t58 * t204 - 0.2e1 * t145 * t60 + 0.12e2 * t274 * t131 + 0.2e1 * t346 * t232 + 0.8e1 * t395 * t53 - 0.8e1 * t398 * t90 * t176 - 0.64e2 * t260 * t404 + 0.4e1 * t219 * t407 + t168 * t411 - 0.6e1 * t413 * t74 - 0.2e1 * t110 * t308 * t57;
1861*c4762a1bSJed Brown   t424 = t16 * t11;
1862*c4762a1bSJed Brown   t425 = t212 * t424;
1863*c4762a1bSJed Brown   t427 = t258 * t181;
1864*c4762a1bSJed Brown   t430 = t67 * t29;
1865*c4762a1bSJed Brown   t431 = t366 * t430;
1866*c4762a1bSJed Brown   t432 = t121 * t49;
1867*c4762a1bSJed Brown   t433 = t432 * t52;
1868*c4762a1bSJed Brown   t436 = nz * t12;
1869*c4762a1bSJed Brown   t437 = t436 * t18;
1870*c4762a1bSJed Brown   t440 = t29 * xc;
1871*c4762a1bSJed Brown   t441 = t440 * t121;
1872*c4762a1bSJed Brown   t442 = t394 * t441;
1873*c4762a1bSJed Brown   t445 = t67 * t37;
1874*c4762a1bSJed Brown   t446 = t445 * t39;
1875*c4762a1bSJed Brown   t448 = nz * t18 * t91;
1876*c4762a1bSJed Brown   t453 = t352 * t49;
1877*c4762a1bSJed Brown   t458 = t8 * t23;
1878*c4762a1bSJed Brown   t462 = t81 * t458;
1879*c4762a1bSJed Brown   t463 = t30 * t19;
1880*c4762a1bSJed Brown   t466 = -t47 * t209 + t116 * t425 - 0.8e1 * t427 * t275 + 0.8e1 * t431 * t433 - 0.2e1 * t253 * t437 - 0.8e1 * t442 * t53 - 0.2e1 * t446 * t448 + 0.2e1 * t175 * t312 + 0.6e1 * t453 * t129 * t208 + 0.8e1 * t115 * t18 * t458 * t30 + 0.8e1 * t462 * t463;
1881*c4762a1bSJed Brown   t470 = t436 * t58;
1882*c4762a1bSJed Brown   t475 = t2 * t121 * t440 * t25;
1883*c4762a1bSJed Brown   t485 = t212 * t73;
1884*c4762a1bSJed Brown   t488 = t67 * t72 * t1;
1885*c4762a1bSJed Brown   t490 = t39 * xc;
1886*c4762a1bSJed Brown   t501 = 0.4e1 * t374 * t355 * t52 + 0.2e1 * t446 * t470 - 0.8e1 * t475 * t53 - 0.2e1 * t446 * t437 - 0.4e1 * t36 * t38 * t39 * t15 * t12 - t116 * t485 + 0.8e1 * t488 * 0.3141592654e1 * t12 * t490 - t207 * t183 - 0.2e1 * t182 * t232 - 0.6e1 * t413 * t245 - 0.4e1 * t413 * t382;
1887*c4762a1bSJed Brown   t503 = t115 * t8;
1888*c4762a1bSJed Brown   t510 = t355 * t19;
1889*c4762a1bSJed Brown   t513 = t432 * t208;
1890*c4762a1bSJed Brown   t525 = t38 * t40 * t18;
1891*c4762a1bSJed Brown   t533 = -0.4e1 * t503 * t216 - 0.4e1 * t89 * t90 * t92 * t15 - 0.16e2 * t462 * t510 + 0.8e1 * t431 * t513 - 0.4e1 * t78 * t131 + t47 * t183 - 0.2e1 * t67 * t83 * t99 + 0.4e1 * t331 * t225 + 0.16e2 * t260 * t525 - 0.4e1 * t89 * t90 * t237 * t58 - t207 * t53;
1892*c4762a1bSJed Brown   t536 = t28 * t37;
1893*c4762a1bSJed Brown   t538 = t490 * t100;
1894*c4762a1bSJed Brown   t541 = t334 * t441;
1895*c4762a1bSJed Brown   t547 = t394 * t30;
1896*c4762a1bSJed Brown   t550 = t212 * t19;
1897*c4762a1bSJed Brown   t553 = t366 * t441;
1898*c4762a1bSJed Brown   t556 = nz * t17;
1899*c4762a1bSJed Brown   t571 = -0.8e1 * t427 * t131 + 0.16e2 * t394 * t536 * t538 + 0.16e2 * t541 * t336 + 0.2e1 * t453 * t129 * t158 - 0.8e1 * t547 * t147 + 0.4e1 * t503 * t550 - 0.8e1 * t553 * t270 + 0.4e1 * t556 * ZB * t92 * t39 - 0.2e1 * t67 * t91 * t99 - t82 * t425 + 0.4e1 * t78 * t275 + 0.2e1 * t78 * xc * t41 * t57;
1900*c4762a1bSJed Brown   t583 = t90 * t317;
1901*c4762a1bSJed Brown   t594 = t212 * t158;
1902*c4762a1bSJed Brown   t596 = t152 * t67;
1903*c4762a1bSJed Brown   t602 = t67 * t17;
1904*c4762a1bSJed Brown   t607 = 0.8e1 * t367 * t407 - 0.4e1 * t98 * t99 * t59 + 0.16e2 * t260 * t18 * ZA * t57 + 0.2e1 * t321 * t583 - 0.6e1 * t174 * t368 * t52 - 0.4e1 * t89 * t90 * ZA * t15 * t12 + t116 * t594 - 0.8e1 * t596 * t136 - 0.4e1 * t98 * t99 * t327 + 0.2e1 * t602 * t99 + 0.2e1 * t164 * t583;
1905*c4762a1bSJed Brown   t613 = t83 * t25;
1906*c4762a1bSJed Brown   t616 = t81 * t156;
1907*c4762a1bSJed Brown   t627 = t90 * t231;
1908*c4762a1bSJed Brown   t630 = t91 * t16;
1909*c4762a1bSJed Brown   t638 = 0.4e1 * t196 * t90 * t208 - 0.8e1 * t130 * t60 - 0.2e1 * t613 * t99 + 0.6e1 * t616 * t197 - 0.8e1 * t547 * t131 + 0.8e1 * t67 * t18 * t37 * t142 + 0.2e1 * t145 * t328 - 0.6e1 * t196 * t627 + 0.8e1 * t630 * t67 * t142 - 0.8e1 * t547 * t275 + 0.8e1 * t395 * t209;
1910*c4762a1bSJed Brown   t643 = t77 * t355;
1911*c4762a1bSJed Brown   t648 = t115 * t458;
1912*c4762a1bSJed Brown   t651 = t134 * t67;
1913*c4762a1bSJed Brown   t657 = t30 * t304;
1914*c4762a1bSJed Brown   t660 = t30 * t146;
1915*c4762a1bSJed Brown   t665 = t25 * t17;
1916*c4762a1bSJed Brown   t668 = t50 * t424;
1917*c4762a1bSJed Brown   t671 = -0.4e1 * t321 * t90 * t146 - 0.6e1 * t643 * t232 + 0.8e1 * t182 * t209 - 0.16e2 * t648 * t510 + 0.8e1 * t651 * t136 + 0.8e1 * t89 * t4 * t100 - 0.2e1 * t374 * t657 - 0.8e1 * t648 * t660 + 0.8e1 * t130 * t328 + 0.2e1 * t665 * t99 + 0.2e1 * t346 * t668;
1918*c4762a1bSJed Brown   t672 = t90 * t424;
1919*c4762a1bSJed Brown   t676 = t120 * t536;
1920*c4762a1bSJed Brown   t680 = t436 * t41;
1921*c4762a1bSJed Brown   t688 = t366 * t67 * t440;
1922*c4762a1bSJed Brown   t696 = xc * t12;
1923*c4762a1bSJed Brown   t697 = t696 * t18;
1924*c4762a1bSJed Brown   t701 = t252 * t141;
1925*c4762a1bSJed Brown   t702 = t90 * t221;
1926*c4762a1bSJed Brown   t705 = 0.2e1 * t196 * t672 - t47 * t347 + 0.16e2 * t676 * t538 - t116 * t85 - 0.2e1 * t253 * t680 + t207 * t194 + 0.4e1 * t98 * t99 * t19 - 0.8e1 * t688 * t433 + 0.16e2 * t541 * t301 - 0.6e1 * t312 * t190 + 0.4e1 * t352 * t88 * t35 * t697 + 0.2e1 * t701 * t702;
1927*c4762a1bSJed Brown   t712 = t24 * t430;
1928*c4762a1bSJed Brown   t713 = t28 * t49;
1929*c4762a1bSJed Brown   t721 = t1 * t17 * t11;
1930*c4762a1bSJed Brown   t726 = ZB * xc;
1931*c4762a1bSJed Brown   t737 = nz * t91;
1932*c4762a1bSJed Brown   t741 = 0.8e1 * t346 * t209 + 0.2e1 * t712 * t713 * t424 + 0.8e1 * t130 * t275 - t47 * t668 + t116 * t721 - 0.8e1 * t688 * t513 + 0.4e1 * t352 * t27 * t212 * t726 + 0.8e1 * t648 * t463 + 0.4e1 * t274 * t60 - 0.4e1 * t374 * t355 * t208 - 0.4e1 * t253 * t737 * t41;
1933*c4762a1bSJed Brown   t745 = t269 * t231;
1934*c4762a1bSJed Brown   t749 = t1 * t28 * t265;
1935*c4762a1bSJed Brown   t757 = t16 * t39;
1936*c4762a1bSJed Brown   t758 = t696 * t757;
1937*c4762a1bSJed Brown   t762 = t69 * t49;
1938*c4762a1bSJed Brown   t772 = t355 * t100;
1939*c4762a1bSJed Brown   t775 = t81 * t353;
1940*c4762a1bSJed Brown   t778 = -0.8e1 * t398 * t90 * t190 - 0.2e1 * t278 * t745 + 0.4e1 * t749 * t53 + 0.32e2 * t394 * t29 * t28 * t17 * t40 - 0.8e1 * t78 * t758 + t350 * nz * t762 - 0.6e1 * t87 * t49 * t186 * t52 - 0.8e1 * t553 * t407 - 0.4e1 * t749 * t209 + 0.16e2 * t648 * t772 - 0.6e1 * t775 * t375;
1941*c4762a1bSJed Brown   t790 = t212 * t304;
1942*c4762a1bSJed Brown   t793 = t156 * 0.3141592654e1;
1943*c4762a1bSJed Brown   t795 = t355 * t304;
1944*c4762a1bSJed Brown   t800 = t91 * t39;
1945*c4762a1bSJed Brown   t801 = t800 * nz;
1946*c4762a1bSJed Brown   t807 = t2 * t28;
1947*c4762a1bSJed Brown   t808 = t807 * t726;
1948*c4762a1bSJed Brown   t811 = -0.2e1 * t616 * t672 - 0.2e1 * t446 * t680 - 0.2e1 * t78 * xc * t58 * t57 + 0.8e1 * t367 * t270 - t82 * t790 + t115 * t51 * t793 - 0.2e1 * t775 * t795 + 0.8e1 * t123 * t209 + 0.2e1 * t665 * t801 - 0.2e1 * t67 * t41 * t64 - 0.32e2 * t808 * t43;
1949*c4762a1bSJed Brown   t812 = t117 * t51;
1950*c4762a1bSJed Brown   t821 = t24 * t355;
1951*c4762a1bSJed Brown   t827 = t90 * t304;
1952*c4762a1bSJed Brown   t840 = t800 * t41;
1953*c4762a1bSJed Brown   t844 = -t116 * t812 - 0.2e1 * t110 * t25 * t58 * t57 - 0.4e1 * t78 * t328 + t82 * t485 - 0.4e1 * t821 * t407 + 0.4e1 * t196 * t90 * t52 + 0.2e1 * t196 * t827 + t82 * t325 + 0.2e1 * t253 * t448 - 0.32e2 * t402 * t67 * t807 * t490 - t207 * t232 + 0.12e2 * t186 * t90 * ZB * t37 * t840;
1954*c4762a1bSJed Brown   t849 = t1 * t51;
1955*c4762a1bSJed Brown   t850 = t849 * t17;
1956*c4762a1bSJed Brown   t860 = t269 * t424;
1957*c4762a1bSJed Brown   t863 = t273 * t187;
1958*c4762a1bSJed Brown   t874 = 0.16e2 * t462 * t772 - t116 * t850 + 0.16e2 * t553 * t371 + t116 * t288 - 0.12e2 * t97 * t57 * t109 * t697 + t82 * t594 - 0.2e1 * t278 * t860 - 0.2e1 * t863 * t305 - 0.16e2 * t180 * t259 * t311 * t201 - 0.6e1 * t863 * t74 + 0.8e1 * t174 * t191;
1959*c4762a1bSJed Brown   t879 = xc * ZA;
1960*c4762a1bSJed Brown   t888 = t67 * t51;
1961*c4762a1bSJed Brown   t901 = ZA * t17;
1962*c4762a1bSJed Brown   t903 = t368 * t901 * t11;
1963*c4762a1bSJed Brown   t908 = -0.2e1 * t352 * t51 * t156 * t35 + 0.64e2 * t879 * t189 * t807 * t40 + 0.2e1 * t46 * t58 * t37 * t39 - t888 * t50 + t105 * t411 - 0.16e2 * t335 * t301 + 0.8e1 * t152 * t25 * t136 - 0.8e1 * t278 * t407 + 0.2e1 * t712 * t713 * t231 - 0.16e2 * t367 * t903 + 0.2e1 * t145 * t318;
1964*c4762a1bSJed Brown   t923 = t71 * t424;
1965*c4762a1bSJed Brown   t926 = t87 * t458;
1966*c4762a1bSJed Brown   t927 = t28 * ZA;
1967*c4762a1bSJed Brown   t944 = 0.8e1 * t354 * t355 * t190 - 0.8e1 * t110 * t16 * t25 * t800 - 0.2e1 * t374 * t30 * t73 - 0.16e2 * t354 * t30 * t176 - 0.2e1 * t244 * t923 - 0.32e2 * t926 * t927 * t696 * t41 - 0.32e2 * t808 * t525 + 0.6e1 * t749 * t232 - 0.8e1 * t188 * t177 + 0.4e1 * t36 * t58 * ZA * t57 + 0.4e1 * t821 * t270;
1968*c4762a1bSJed Brown   t948 = t90 * t327;
1969*c4762a1bSJed Brown   t961 = t30 * t100;
1970*c4762a1bSJed Brown   t964 = t29 * t49;
1971*c4762a1bSJed Brown   t981 = t106 * t1;
1972*c4762a1bSJed Brown   t983 = -0.2e1 * t219 * t220 * t100 + 0.2e1 * t321 * t948 - 0.16e2 * t189 * ZA * t99 * t12 - 0.2e1 * t369 * nz * t69 * t368 + 0.2e1 * t374 * t795 - 0.8e1 * t462 * t961 - 0.8e1 * t244 * t964 * t208 + 0.2e1 * t413 * t923 + 0.4e1 * t36 * t38 * t40 * t58 - 0.2e1 * t87 * t51 * t49 * t1 * ZA + t888 * nz * t762 + t115 * t981;
1973*c4762a1bSJed Brown   t1012 = 0.6e1 * t616 * t627 - t82 * t213 + 0.2e1 * t775 * t657 - 0.12e2 * t215 * t550 - 0.6e1 * t145 * t131 + 0.2e1 * t81 * t41 * t204 + 0.6e1 * ZB * t48 * t49 * t370 - 0.4e1 * t70 * t382 + 0.2e1 * t446 * t255 + 0.8e1 * t89 * t4 * t327 - 0.4e1 * t56 * t147;
1974*c4762a1bSJed Brown   t1018 = t212 * t100;
1975*c4762a1bSJed Brown   t1029 = t212 * t327;
1976*c4762a1bSJed Brown   t1040 = 0.6e1 * t70 * t245 + 0.2e1 * t56 * t328 + t207 * t668 + 0.4e1 * t503 * t1018 + 0.2e1 * t253 * t470 - 0.6e1 * t398 * t35 * t208 - 0.8e1 * t331 * t964 * t52 - 0.4e1 * t503 * t1029 + 0.6e1 * t821 * t745 + 0.4e1 * t63 * t37 * t142 + 0.16e2 * t260 * t38 * t840;
1977*c4762a1bSJed Brown   t1068 = t207 * t347 - 0.2e1 * t164 * t702 - 0.2e1 * t331 * t964 * t73 + 0.8e1 * t374 * t30 * t52 + 0.16e2 * t278 * t903 + 0.2e1 * t863 * t923 + 0.6e1 * t445 * t141 * t165 - 0.2e1 * t164 * t90 * t100 + 0.6e1 * t331 * t74 - 0.2e1 * t182 * t668 - 0.2e1 * t115 * t41 * t204;
1978*c4762a1bSJed Brown   t1079 = t58 * t8;
1979*c4762a1bSJed Brown   t1091 = t807 * t29;
1980*c4762a1bSJed Brown   t1092 = t665 * t40;
1981*c4762a1bSJed Brown   t1101 = ZB * t91;
1982*c4762a1bSJed Brown   t1102 = t403 * nz;
1983*c4762a1bSJed Brown   t1105 = -0.4e1 * t58 * ZB * ZA * t64 - t82 * t850 + 0.2e1 * t821 * t860 + t81 * t51 * t793 + 0.2e1 * t3 * t25 * t1079 * t90 + t82 * t721 - 0.2e1 * t643 * t668 + 0.16e2 * t926 * t927 * t29 * t91 * t41 + 0.32e2 * t1091 * t1092 - 0.2e1 * t219 * t220 * t19 + 0.4e1 * t139 * ZA * t64 + 0.4e1 * t1101 * t1102;
1984*c4762a1bSJed Brown   t1108 = t849 * t72;
1985*c4762a1bSJed Brown   t1121 = t737 * t15;
1986*c4762a1bSJed Brown   t1124 = t29 * t12;
1987*c4762a1bSJed Brown   t1133 = t116 * t1108 - 0.8e1 * t475 * t209 - 0.32e2 * t807 * xc * t1092 + 0.2e1 * t278 * t269 * t73 + t82 * t812 - 0.6e1 * t56 * t131 + 0.2e1 * t253 * t1121 + 0.16e2 * t926 * t927 * t1124 * t41 + t168 * t263 - 0.2e1 * t616 * t827 + t81 * t981;
1988*c4762a1bSJed Brown   t1134 = t394 * t28;
1989*c4762a1bSJed Brown   t1159 = -0.8e1 * t1134 * t29 * t18 * t57 + t82 * t118 - 0.12e2 * t215 * t1018 + 0.2e1 * t602 * t801 - t168 * t341 + 0.2e1 * t67 * t58 * t64 + t168 * t344 - 0.6e1 * t174 * t368 * t208 + 0.16e2 * t553 * t903 + t116 * t790 - 0.4e1 * t36 * t38 * t800 * t15;
1990*c4762a1bSJed Brown   t1161 = nz * t83;
1991*c4762a1bSJed Brown   t1173 = ZB * t12;
1992*c4762a1bSJed Brown   t1196 = 0.4e1 * t1161 * ZB * t39 * ZA - 0.4e1 * t215 * t1029 - 0.8e1 * t488 * 0.3141592654e1 * t39 * xc + 0.32e2 * t821 * ZA * t8 * t1173 * t18 - 0.8e1 * t427 * t147 + 0.6e1 * t701 * t165 - 0.16e2 * t926 * t927 * t1124 * t18 - 0.8e1 * t1091 * t63 * t57 - 0.8e1 * t442 * t209 - 0.8e1 * t462 * t660 - 0.6e1 * t398 * t35 * t52;
1993*c4762a1bSJed Brown   t1228 = 0.2e1 * t413 * t305 - 0.8e1 * t648 * t961 - 0.16e2 * t87 * t27 * t23 * t28 * ZA * t29 + 0.4e1 * t189 * t1102 - 0.4e1 * t87 * t1079 * t212 * t879 + 0.2e1 * t164 * t948 - 0.2e1 * t70 * t923 + 0.2e1 * t164 * t322 + 0.2e1 * t446 * t1121 + 0.2e1 * t863 * t964 * t304 - t82 * t1108 + 0.16e2 * t676 * t490 * t19;
1994*c4762a1bSJed Brown   t1234 = t25 * ZB;
1995*c4762a1bSJed Brown   t1235 = t1234 * t28;
1996*c4762a1bSJed Brown   t1236 = t365 * t91;
1997*c4762a1bSJed Brown   t1240 = ZB * t121;
1998*c4762a1bSJed Brown   t1241 = t1240 * t77;
1999*c4762a1bSJed Brown   t1242 = t39 * t39;
2000*c4762a1bSJed Brown   t1243 = t12 * t1242;
2001*c4762a1bSJed Brown   t1244 = xc * t72;
2002*c4762a1bSJed Brown   t1245 = t1243 * t1244;
2003*c4762a1bSJed Brown   t1248 = t365 * t25;
2004*c4762a1bSJed Brown   t1252 = t243 * nz;
2005*c4762a1bSJed Brown   t1257 = t23 * t1;
2006*c4762a1bSJed Brown   t1258 = t1240 * t1257;
2007*c4762a1bSJed Brown   t1259 = t67 * t12;
2008*c4762a1bSJed Brown   t1260 = xc * t16;
2009*c4762a1bSJed Brown   t1268 = t1234 * t121;
2010*c4762a1bSJed Brown   t1269 = t1268 * t23;
2011*c4762a1bSJed Brown   t1272 = t1242 * t91;
2012*c4762a1bSJed Brown   t1280 = t67 * xc;
2013*c4762a1bSJed Brown   t1284 = t28 * t28;
2014*c4762a1bSJed Brown   t1285 = t67 * t1284;
2015*c4762a1bSJed Brown   t1287 = t1285 * t2 * ZB;
2016*c4762a1bSJed Brown   t1288 = t17 * xc;
2017*c4762a1bSJed Brown   t1289 = t1243 * t1288;
2018*c4762a1bSJed Brown   t1292 = 0.2e1 * t1235 * t1236 * t17 + 0.8e1 * t1241 * t1245 + 0.4e1 * t927 * t1248 * t91 - 0.2e1 * t1252 * ZB * t1242 * t91 - 0.8e1 * t1258 * t1259 * t1260 - 0.4e1 * t1235 * t2 * t83 * t39 + 0.16e2 * t1269 * t758 + 0.2e1 * t1252 * t189 * t1272 - 0.2e1 * t1252 * t83 * t1242 * ZB + 0.8e1 * t1258 * t630 * t1280 - 0.32e2 * t1287 * t1289;
2019*c4762a1bSJed Brown   t1293 = t365 * t83;
2020*c4762a1bSJed Brown   t1300 = ZA * t1284;
2021*c4762a1bSJed Brown   t1304 = t17 * t1242 * t25 * t12;
2022*c4762a1bSJed Brown   t1307 = t927 * t2;
2023*c4762a1bSJed Brown   t1311 = t23 * t2;
2024*c4762a1bSJed Brown   t1312 = t1300 * t1311;
2025*c4762a1bSJed Brown   t1316 = t1234 * t1284;
2026*c4762a1bSJed Brown   t1317 = t1316 * t1311;
2027*c4762a1bSJed Brown   t1321 = t1240 * t23;
2028*c4762a1bSJed Brown   t1331 = t1240 * t23 * t67;
2029*c4762a1bSJed Brown   t1332 = t40 * t1244;
2030*c4762a1bSJed Brown   t1338 = t1243 * t1260;
2031*c4762a1bSJed Brown   t1344 = -0.2e1 * t1235 * t1293 - 0.16e2 * t181 * t365 * t901 * t12 - 0.64e2 * t1300 * t258 * t1304 + 0.8e1 * t1307 * t613 * t39 + 0.64e2 * t1312 * t265 * t402 - 0.32e2 * t1317 * t1288 * t12 - 0.16e2 * t1321 * t67 * t39 * t1244 + 0.2e1 * t1235 * nz * t1272 * t17 + 0.16e2 * t1331 * t1332 + 0.64e2 * t1300 * t292 * t1304 - 0.8e1 * t1241 * t1338 - 0.2e1 * t243 * t1293 * ZB;
2032*c4762a1bSJed Brown   t1346 = t1316 * t2;
2033*c4762a1bSJed Brown   t1349 = t927 * nz;
2034*c4762a1bSJed Brown   t1350 = t25 * t1242;
2035*c4762a1bSJed Brown   t1354 = t1268 * t1257;
2036*c4762a1bSJed Brown   t1366 = t1268 * t1;
2037*c4762a1bSJed Brown   t1370 = t29 * t17;
2038*c4762a1bSJed Brown   t1371 = t1243 * t1370;
2039*c4762a1bSJed Brown   t1386 = -0.32e2 * t1346 * t1289 + 0.4e1 * t1349 * t1350 * t91 + 0.8e1 * t1354 * t1260 * t12 - 0.16e2 * t181 * nz * t901 * t1243 - 0.4e1 * t1235 * t2 * t91 * t39 + 0.8e1 * t1366 * t152 * t1242 + 0.32e2 * t1287 * t1371 + 0.8e1 * t1258 * t1280 * t152 - 0.8e1 * t1354 * t1260 * t91 + 0.128e3 * t1300 * t365 * xc * t1092 + 0.8e1 * t1366 * t1338;
2040*c4762a1bSJed Brown   t1387 = t1257 * t12;
2041*c4762a1bSJed Brown   t1391 = t1240 * t1;
2042*c4762a1bSJed Brown   t1399 = t1272 * t1260;
2043*c4762a1bSJed Brown   t1412 = t1285 * t1311;
2044*c4762a1bSJed Brown   t1427 = -0.8e1 * t1268 * t1387 * t16 - 0.8e1 * t1391 * t67 * t1242 * t1244 - 0.4e1 * t1134 * t1101 * t39 + 0.8e1 * t1241 * t1399 - 0.8e1 * t1258 * t596 + 0.4e1 * t927 * t1293 * t25 - 0.16e2 * t1331 * t758 + 0.8e1 * t1307 * t665 * t39 + 0.32e2 * t1412 * t1370 * t1173 + 0.8e1 * t1307 * t665 * t800 + 0.8e1 * t1391 * t1259 * t1242 * t16 - 0.8e1 * t1391 * t1259 * t1242 * t72;
2045*c4762a1bSJed Brown   t1456 = t365 * ZB;
2046*c4762a1bSJed Brown   t1468 = 0.4e1 * t927 * t1248 * t17 - 0.2e1 * t1235 * nz * t1242 * t91 + 0.8e1 * t1366 * t1244 * t1242 - 0.16e2 * t1269 * t134 * t39 + 0.8e1 * t1268 * t1257 * t72 * xc + 0.16e2 * t1321 * t1259 * t757 + 0.32e2 * t1317 * t1370 * t12 + 0.4e1 * t1349 * t613 * t1242 + 0.2e1 * t243 * t1456 * t17 - 0.64e2 * t1285 * t365 * t12 * t189 * t490 - 0.8e1 * t1354 * t152 * xc;
2047*c4762a1bSJed Brown   t1472 = t1316 * t365;
2048*c4762a1bSJed Brown   t1474 = t1124 * t39 * t17;
2049*c4762a1bSJed Brown   t1478 = t17 * t91;
2050*c4762a1bSJed Brown   t1504 = t72 * t39;
2051*c4762a1bSJed Brown   t1511 = 0.4e1 * t1134 * t189 * t800 + 0.64e2 * t1472 * t1474 + 0.4e1 * t1235 * t2 * t1478 * t39 + 0.4e1 * t1349 * t665 * t1242 - 0.8e1 * t1258 * t1280 * t72 + 0.2e1 * t1252 * t189 * t1242 + 0.2e1 * t243 * t365 * t189 * t91 + 0.4e1 * t927 * t365 * t1478 * t25 - 0.128e3 * t1300 * t1248 * t1474 - 0.2e1 * t1235 * t1236 + 0.16e2 * t1269 * t1504 * xc + 0.2e1 * t1235 * t365 * t17;
2052*c4762a1bSJed Brown   t1545 = -0.2e1 * t1235 * t1161 * t1242 + 0.4e1 * t1349 * t1350 * t1478 - 0.8e1 * t1366 * t1245 + 0.2e1 * t1235 * t556 * t1242 - 0.32e2 * t1412 * t402 * t726 - 0.8e1 * t1366 * t1399 + 0.8e1 * t1258 * t651 - 0.2e1 * t243 * t1456 * t91 + 0.8e1 * t1268 * t1387 * t72 - 0.16e2 * t1269 * t1332 + 0.4e1 * t1134 * t189 * t39 + 0.16e2 * t1269 * t152 * t39;
2053*c4762a1bSJed Brown   t1564 = t1260 * t800;
2054*c4762a1bSJed Brown   t1583 = 0.64e2 * t1285 * t1456 * t1474 - 0.64e2 * t1472 * t1288 * t40 - 0.8e1 * t1366 * t134 * t1242 + 0.8e1 * t1307 * t362 * t39 + 0.4e1 * t1235 * t2 * t17 * t39 + 0.32e2 * t1346 * t1371 - 0.16e2 * t1269 * t1564 - 0.16e2 * t1321 * t1259 * t1504 + 0.16e2 * t1331 * t1564 - 0.64e2 * t1312 * t29 * t25 * t402 - 0.4e1 * t1134 * t83 * t39 * ZB - 0.32e2 * t181 * t2 * t404;
2055*c4762a1bSJed Brown 
2056*c4762a1bSJed Brown   _PC2B = (t1133 + t1196 + t1068 + t811 + t466 + t1012 + t381 + t162 + t249 + t533 + t844 + t104 + t1159 + t571 + t211 + t874 + t607 + t339 + t296 + t638 + t908 + t671 + t419 + t983 + t705 + t1105 + t501 + t778 + t1040 + t1228 + t741 + t944) / (t1292 + t1344 + t1386 + t1427 + t1468 + t1511 + t1545 + t1583);
2057*c4762a1bSJed Brown   /****************************************************************************************/
2058*c4762a1bSJed Brown   t1 = nz * nz;
2059*c4762a1bSJed Brown   t2 = t1 * nz;
2060*c4762a1bSJed Brown   t3 = t2 * nx;
2061*c4762a1bSJed Brown   t4 = nx * 0.3141592654e1;
2062*c4762a1bSJed Brown   t5 = t4 * xc;
2063*c4762a1bSJed Brown   t6 = PetscSinReal(t5);
2064*c4762a1bSJed Brown   t7 = 0.3141592654e1 * 0.3141592654e1;
2065*c4762a1bSJed Brown   t9 = t3 * t6 * t7;
2066*c4762a1bSJed Brown   t10 = xc * xc;
2067*c4762a1bSJed Brown   t11 = ZA * ZA;
2068*c4762a1bSJed Brown   t12 = t10 * t11;
2069*c4762a1bSJed Brown   t13 = nz * 0.3141592654e1;
2070*c4762a1bSJed Brown   t14 = PetscExpReal(t13);
2071*c4762a1bSJed Brown   t15 = t14 * t14;
2072*c4762a1bSJed Brown   t16 = xc * nz;
2073*c4762a1bSJed Brown   t18 = PetscExpReal(t16 * 0.3141592654e1);
2074*c4762a1bSJed Brown   t19 = t18 * t18;
2075*c4762a1bSJed Brown   t20 = t19 * t18;
2076*c4762a1bSJed Brown   t21 = t15 * t20;
2077*c4762a1bSJed Brown   t22 = t12 * t21;
2078*c4762a1bSJed Brown   t25 = nx * t6;
2079*c4762a1bSJed Brown   t26 = t1 * 0.3141592654e1;
2080*c4762a1bSJed Brown   t27 = t25 * t26;
2081*c4762a1bSJed Brown   t28 = ZA * ZB;
2082*c4762a1bSJed Brown   t29 = t18 * t15;
2083*c4762a1bSJed Brown   t30 = t28 * t29;
2084*c4762a1bSJed Brown   t33 = t25 * nz;
2085*c4762a1bSJed Brown   t34 = t11 * t15;
2086*c4762a1bSJed Brown   t35 = t19 * t19;
2087*c4762a1bSJed Brown   t36 = t35 * t18;
2088*c4762a1bSJed Brown   t40 = t25 * t1;
2089*c4762a1bSJed Brown   t41 = 0.3141592654e1 * t11;
2090*c4762a1bSJed Brown   t42 = t15 * t36;
2091*c4762a1bSJed Brown   t43 = t41 * t42;
2092*c4762a1bSJed Brown   t46 = nx * nx;
2093*c4762a1bSJed Brown   t47 = t1 * t46;
2094*c4762a1bSJed Brown   t48 = t47 * t11;
2095*c4762a1bSJed Brown   t49 = t7 * xc;
2096*c4762a1bSJed Brown   t50 = t35 * t15;
2097*c4762a1bSJed Brown   t51 = t49 * t50;
2098*c4762a1bSJed Brown   t55 = PetscSinReal(t4);
2099*c4762a1bSJed Brown   t56 = t46 * nx * t55;
2100*c4762a1bSJed Brown   t58 = t56 * nz * t7;
2101*c4762a1bSJed Brown   t59 = ZB * ZB;
2102*c4762a1bSJed Brown   t60 = t10 * t59;
2103*c4762a1bSJed Brown   t61 = t15 * t14;
2104*c4762a1bSJed Brown   t62 = t19 * t61;
2105*c4762a1bSJed Brown   t63 = t60 * t62;
2106*c4762a1bSJed Brown   t66 = t19 * t14;
2107*c4762a1bSJed Brown   t67 = t60 * t66;
2108*c4762a1bSJed Brown   t70 = t28 * t42;
2109*c4762a1bSJed Brown   t73 = PetscCosReal(t5);
2110*c4762a1bSJed Brown   t74 = t47 * t73;
2111*c4762a1bSJed Brown   t75 = t7 * t11;
2112*c4762a1bSJed Brown   t77 = t75 * t10 * t36;
2113*c4762a1bSJed Brown   t80 = t73 * t46;
2114*c4762a1bSJed Brown   t81 = t80 * nz;
2115*c4762a1bSJed Brown   t82 = 0.3141592654e1 * t59;
2116*c4762a1bSJed Brown   t83 = t82 * t42;
2117*c4762a1bSJed Brown   t87 = xc * t11;
2118*c4762a1bSJed Brown   t88 = t87 * t62;
2119*c4762a1bSJed Brown   t91 = nz * nx;
2120*c4762a1bSJed Brown   t92 = t55 * t61;
2121*c4762a1bSJed Brown   t96 = nx * t55;
2122*c4762a1bSJed Brown   t98 = t96 * t2 * t7;
2123*c4762a1bSJed Brown   t101 = xc * t59;
2124*c4762a1bSJed Brown   t102 = t101 * t62;
2125*c4762a1bSJed Brown   t108 = t1 * t1;
2126*c4762a1bSJed Brown   t109 = t108 * t7;
2127*c4762a1bSJed Brown   t111 = t59 * t35;
2128*c4762a1bSJed Brown   t112 = t111 * t15;
2129*c4762a1bSJed Brown   t115 = t35 * t20;
2130*c4762a1bSJed Brown   t123 = t1 * nx * t55;
2131*c4762a1bSJed Brown   t124 = t61 * t35;
2132*c4762a1bSJed Brown   t127 = t35 * t19;
2133*c4762a1bSJed Brown   t128 = t61 * t127;
2134*c4762a1bSJed Brown   t129 = t60 * t128;
2135*c4762a1bSJed Brown   t132 = t56 * t16;
2136*c4762a1bSJed Brown   t133 = t7 * t59;
2137*c4762a1bSJed Brown   t134 = t133 * t124;
2138*c4762a1bSJed Brown   t137 = 0.6e1 * t58 * t88 - 0.2e1 * t91 * t92 * t11 + 0.2e1 * t98 * t63 - 0.6e1 * t58 * t102 - 0.2e1 * t91 * t92 * t59 - 0.16e2 * t109 * xc * t112 - 0.2e1 * t91 * t6 * t115 * t59 + 0.12e2 * t40 * t83 + t123 * t41 * t124 - 0.2e1 * t58 * t129 + 0.4e1 * t132 * t134;
2139*c4762a1bSJed Brown   t139 = t56 * 0.3141592654e1;
2140*c4762a1bSJed Brown   t140 = t111 * t14;
2141*c4762a1bSJed Brown   t144 = t49 * t124;
2142*c4762a1bSJed Brown   t147 = t91 * t55;
2143*c4762a1bSJed Brown   t148 = t61 * ZA;
2144*c4762a1bSJed Brown   t154 = ZA * t115 * xc * ZB;
2145*c4762a1bSJed Brown   t157 = t7 * 0.3141592654e1;
2146*c4762a1bSJed Brown   t159 = t96 * t108 * t157;
2147*c4762a1bSJed Brown   t160 = t10 * xc;
2148*c4762a1bSJed Brown   t161 = t160 * t59;
2149*c4762a1bSJed Brown   t162 = t35 * t14;
2150*c4762a1bSJed Brown   t163 = t161 * t162;
2151*c4762a1bSJed Brown   t166 = t28 * t162;
2152*c4762a1bSJed Brown   t169 = t80 * t13;
2153*c4762a1bSJed Brown   t170 = t101 * t42;
2154*c4762a1bSJed Brown   t173 = t2 * t11;
2155*c4762a1bSJed Brown   t174 = t96 * t173;
2156*c4762a1bSJed Brown   t175 = t7 * t10;
2157*c4762a1bSJed Brown   t179 = t59 * t15;
2158*c4762a1bSJed Brown   t184 = t15 * t15;
2159*c4762a1bSJed Brown   t193 = t139 * t140 + 0.4e1 * t56 * nz * t11 * t144 + 0.4e1 * t147 * t148 * ZB + 0.4e1 * t27 * t154 + 0.8e1 * t159 * t163 - 0.12e2 * t147 * t166 + 0.2e1 * t169 * t170 - 0.16e2 * t174 * t175 * t124 + 0.2e1 * t33 * t179 * t20 - 0.2e1 * t33 * t11 * t36 * t184 + 0.2e1 * t56 * t61 * 0.3141592654e1 * ZA * ZB;
2160*c4762a1bSJed Brown   t194 = t173 * 0.3141592654e1;
2161*c4762a1bSJed Brown   t195 = xc * t15;
2162*c4762a1bSJed Brown   t196 = t195 * t19;
2163*c4762a1bSJed Brown   t202 = t15 * t115;
2164*c4762a1bSJed Brown   t203 = t28 * t202;
2165*c4762a1bSJed Brown   t206 = t96 * t26;
2166*c4762a1bSJed Brown   t207 = t14 * t127;
2167*c4762a1bSJed Brown   t208 = t101 * t207;
2168*c4762a1bSJed Brown   t211 = t12 * t128;
2169*c4762a1bSJed Brown   t218 = t11 * t61;
2170*c4762a1bSJed Brown   t219 = t218 * t35;
2171*c4762a1bSJed Brown   t221 = t108 * ZA;
2172*c4762a1bSJed Brown   t223 = t7 * ZB;
2173*c4762a1bSJed Brown   t224 = t223 * t50;
2174*c4762a1bSJed Brown   t227 = ZA * xc;
2175*c4762a1bSJed Brown   t228 = ZB * t15;
2176*c4762a1bSJed Brown   t229 = t228 * t36;
2177*c4762a1bSJed Brown   t230 = t227 * t229;
2178*c4762a1bSJed Brown   t233 = t87 * t207;
2179*c4762a1bSJed Brown   t236 = t6 * t11;
2180*c4762a1bSJed Brown   t240 = -0.4e1 * t194 * t196 + 0.4e1 * t194 * t195 * t127 + 0.4e1 * t33 * t203 - 0.12e2 * t206 * t208 + 0.2e1 * t58 * t211 - 0.16e2 * t47 * t10 * t133 * t50 + t139 * t219 - 0.32e2 * t221 * t10 * t224 - 0.4e1 * t169 * t230 - 0.6e1 * t98 * t233 + 0.2e1 * t91 * t236 * t20;
2181*c4762a1bSJed Brown   t244 = t227 * t228 * t20;
2182*c4762a1bSJed Brown   t252 = t184 * t18;
2183*c4762a1bSJed Brown   t253 = t101 * t252;
2184*c4762a1bSJed Brown   t256 = t35 * t35;
2185*c4762a1bSJed Brown   t257 = t256 * t14;
2186*c4762a1bSJed Brown   t258 = t28 * t257;
2187*c4762a1bSJed Brown   t261 = t108 * t11;
2188*c4762a1bSJed Brown   t263 = t7 * t35;
2189*c4762a1bSJed Brown   t268 = ZB * t61 * t35;
2190*c4762a1bSJed Brown   t273 = t96 * t108 * t160;
2191*c4762a1bSJed Brown   t274 = t157 * ZB;
2192*c4762a1bSJed Brown   t276 = t274 * t148 * t35;
2193*c4762a1bSJed Brown   t279 = t101 * t21;
2194*c4762a1bSJed Brown   t282 = 0.3141592654e1 * xc;
2195*c4762a1bSJed Brown   t283 = t59 * t36;
2196*c4762a1bSJed Brown   t284 = t282 * t283;
2197*c4762a1bSJed Brown   t289 = 0.4e1 * t169 * t244 - 0.4e1 * t132 * t133 * t162 - 0.2e1 * t147 * t140 - 0.2e1 * t27 * t253 + 0.2e1 * t139 * t258 + 0.16e2 * t261 * t10 * t263 * t15 - 0.16e2 * t206 * t227 * t268 - 0.16e2 * t273 * t276 - 0.6e1 * t27 * t279 - 0.4e1 * t40 * t284 - 0.32e2 * t9 * t230;
2198*c4762a1bSJed Brown   t290 = t1 * t11;
2199*c4762a1bSJed Brown   t291 = t96 * t290;
2200*c4762a1bSJed Brown   t297 = t59 * t61;
2201*c4762a1bSJed Brown   t298 = t297 * t127;
2202*c4762a1bSJed Brown   t300 = ZB * t36;
2203*c4762a1bSJed Brown   t301 = t227 * t300;
2204*c4762a1bSJed Brown   t304 = t1 * t59;
2205*c4762a1bSJed Brown   t305 = t184 * t35;
2206*c4762a1bSJed Brown   t310 = t46 * ZB;
2207*c4762a1bSJed Brown   t311 = t184 * ZA;
2208*c4762a1bSJed Brown   t312 = t310 * t311;
2209*c4762a1bSJed Brown   t314 = t60 * t21;
2210*c4762a1bSJed Brown   t317 = t1 * ZA;
2211*c4762a1bSJed Brown   t318 = ZB * t35;
2212*c4762a1bSJed Brown   t321 = t1 * t256;
2213*c4762a1bSJed Brown   t324 = t96 * t261;
2214*c4762a1bSJed Brown   t325 = t10 * t157;
2215*c4762a1bSJed Brown   t326 = t325 * t124;
2216*c4762a1bSJed Brown   t329 = -0.4e1 * t291 * t282 * t128 + t123 * t82 * t62 - t139 * t298 + 0.12e2 * t27 * t301 + t304 * t305 - 0.2e1 * t58 * t12 * t66 - 0.2e1 * t312 + 0.8e1 * t9 * t314 + 0.2e1 * t317 * t318 + 0.2e1 * t321 * t28 - 0.8e1 * t324 * t326;
2217*c4762a1bSJed Brown   t331 = t28 * t124;
2218*c4762a1bSJed Brown   t334 = 0.3141592654e1 * t15;
2219*c4762a1bSJed Brown   t335 = t334 * t127;
2220*c4762a1bSJed Brown   t338 = t35 * ZA;
2221*c4762a1bSJed Brown   t341 = t46 * t256;
2222*c4762a1bSJed Brown   t344 = t46 * t11;
2223*c4762a1bSJed Brown   t346 = t46 * t59;
2224*c4762a1bSJed Brown   t348 = t297 * t35;
2225*c4762a1bSJed Brown   t351 = ZA * t10;
2226*c4762a1bSJed Brown   t352 = t351 * t300;
2227*c4762a1bSJed Brown   t355 = t1 * ZB;
2228*c4762a1bSJed Brown   t362 = 0.12e2 * t147 * t331 - 0.4e1 * t173 * t335 - 0.2e1 * t310 * t338 - 0.2e1 * t341 * t28 - t344 * t305 - t346 * t305 + 0.2e1 * t147 * t348 + 0.16e2 * t9 * t352 + 0.2e1 * t355 * t311 + t290 * t305 + 0.2e1 * t33 * t34 * t20;
2229*c4762a1bSJed Brown   t363 = t36 * t184;
2230*c4762a1bSJed Brown   t364 = t87 * t363;
2231*c4762a1bSJed Brown   t368 = t47 * t73 * t7;
2232*c4762a1bSJed Brown   t373 = t160 * t157;
2233*c4762a1bSJed Brown   t374 = t373 * t124;
2234*c4762a1bSJed Brown   t377 = t311 * t35;
2235*c4762a1bSJed Brown   t380 = t12 * t62;
2236*c4762a1bSJed Brown   t386 = ZB * t10 * ZA * t15 * t20;
2237*c4762a1bSJed Brown   t389 = t87 * t66;
2238*c4762a1bSJed Brown   t393 = t56 * t1 * t10;
2239*c4762a1bSJed Brown   t401 = 0.2e1 * t27 * t364 - 0.16e2 * t368 * t279 - t123 * t41 * t257 + 0.8e1 * t324 * t374 + 0.2e1 * t355 * t377 - 0.2e1 * t98 * t380 - 0.16e2 * t9 * t386 + 0.2e1 * t58 * t389 + 0.16e2 * t393 * t276 + t123 * t82 * t162 - 0.2e1 * t33 * t179 * t36;
2240*c4762a1bSJed Brown   t412 = t11 * t14 * t127;
2241*c4762a1bSJed Brown   t416 = t11 * t19;
2242*c4762a1bSJed Brown   t417 = t416 * t61;
2243*c4762a1bSJed Brown   t421 = t96 * t2 * ZA;
2244*c4762a1bSJed Brown   t426 = t56 * nz * ZA;
2245*c4762a1bSJed Brown   t427 = t318 * t14;
2246*c4762a1bSJed Brown   t428 = t49 * t427;
2247*c4762a1bSJed Brown   t431 = t82 * t29;
2248*c4762a1bSJed Brown   t434 = t87 * t21;
2249*c4762a1bSJed Brown   t442 = 0.2e1 * t33 * t11 * t184 * t18 + 0.4e1 * t81 * t284 - t139 * t412 + 0.2e1 * t147 * t219 - 0.2e1 * t147 * t417 + 0.32e2 * t421 * t175 * t268 + 0.8e1 * t426 * t428 + 0.4e1 * t81 * t431 - 0.2e1 * t169 * t434 - 0.2e1 * t98 * t129 - 0.32e2 * t47 * t28 * t51;
2250*c4762a1bSJed Brown   t443 = t184 * t20;
2251*c4762a1bSJed Brown   t447 = t61 * 0.3141592654e1;
2252*c4762a1bSJed Brown   t448 = t447 * t11;
2253*c4762a1bSJed Brown   t450 = t49 * t268;
2254*c4762a1bSJed Brown   t453 = t60 * t42;
2255*c4762a1bSJed Brown   t456 = t41 * t202;
2256*c4762a1bSJed Brown   t463 = t101 * t443;
2257*c4762a1bSJed Brown   t469 = t41 * xc * t20;
2258*c4762a1bSJed Brown   t474 = -0.8e1 * t27 * t87 * t443 - t56 * t448 - 0.8e1 * t426 * t450 + 0.8e1 * t368 * t453 + 0.4e1 * t40 * t456 + 0.4e1 * t40 * t431 - 0.4e1 * t81 * t456 - 0.4e1 * t27 * t463 + 0.6e1 * t139 * t331 + 0.2e1 * t40 * t469 - 0.16e2 * t9 * t434;
2259*c4762a1bSJed Brown   t482 = t108 * t10;
2260*c4762a1bSJed Brown   t492 = nz * t46;
2261*c4762a1bSJed Brown   t493 = t492 * t11;
2262*c4762a1bSJed Brown   t495 = t282 * t19 * t184;
2263*c4762a1bSJed Brown   t498 = t56 * t290;
2264*c4762a1bSJed Brown   t499 = t325 * t162;
2265*c4762a1bSJed Brown   t502 = t416 * t14;
2266*c4762a1bSJed Brown   t504 = t60 * t207;
2267*c4762a1bSJed Brown   t507 = -t123 * t82 * t257 - 0.4e1 * t169 * t301 + t123 * t41 * t162 + 0.16e2 * t482 * t7 * t112 - 0.12e2 * t206 * t102 - t123 * t82 * t66 - 0.4e1 * t147 * t258 - 0.4e1 * t493 * t495 - 0.8e1 * t498 * t499 + t139 * t502 - 0.2e1 * t98 * t504;
2268*c4762a1bSJed Brown   t508 = t101 * t162;
2269*c4762a1bSJed Brown   t512 = t41 * t115 * xc;
2270*c4762a1bSJed Brown   t515 = t87 * t42;
2271*c4762a1bSJed Brown   t520 = ZB * t184;
2272*c4762a1bSJed Brown   t522 = t227 * t520 * t18;
2273*c4762a1bSJed Brown   t525 = t492 * t59;
2274*c4762a1bSJed Brown   t528 = t6 * t59;
2275*c4762a1bSJed Brown   t532 = t520 * t20;
2276*c4762a1bSJed Brown   t533 = t351 * t532;
2277*c4762a1bSJed Brown   t539 = t447 * t59;
2278*c4762a1bSJed Brown   t544 = 0.8e1 * t206 * t508 - 0.2e1 * t40 * t512 - 0.16e2 * t368 * t515 + 0.12e2 * t206 * t88 + 0.4e1 * t27 * t522 + 0.4e1 * t525 * t495 - 0.4e1 * t91 * t528 * t36 - 0.16e2 * t368 * t533 - 0.16e2 * t206 * t227 * t427 - t56 * t539 - 0.2e1 * t132 * t133 * t66;
2279*c4762a1bSJed Brown   t551 = t87 * t162;
2280*c4762a1bSJed Brown   t554 = t351 * t229;
2281*c4762a1bSJed Brown   t560 = t59 * t19;
2282*c4762a1bSJed Brown   t561 = t560 * t14;
2283*c4762a1bSJed Brown   t564 = t101 * t202;
2284*c4762a1bSJed Brown   t567 = t87 * t252;
2285*c4762a1bSJed Brown   t573 = t227 * t228 * t115;
2286*c4762a1bSJed Brown   t578 = 0.4e1 * t33 * t70 + 0.4e1 * t493 * t335 - 0.4e1 * t58 * t551 + 0.16e2 * t9 * t554 - 0.4e1 * t33 * t28 * t252 + 0.2e1 * t147 * t561 + 0.2e1 * t169 * t564 - 0.2e1 * t27 * t567 - 0.8e1 * t324 * t499 - 0.4e1 * t169 * t573 + 0.12e2 * t27 * t244;
2287*c4762a1bSJed Brown   t579 = t82 * t202;
2288*c4762a1bSJed Brown   t591 = t282 * t115 * t59;
2289*c4762a1bSJed Brown   t598 = t101 * t66;
2290*c4762a1bSJed Brown   t606 = -0.4e1 * t81 * t579 - 0.2e1 * t169 * t567 - 0.6e1 * t27 * t170 + 0.8e1 * t169 * t203 + 0.2e1 * t98 * t67 + 0.2e1 * t81 * t591 + 0.32e2 * t368 * t244 - 0.2e1 * t27 * t564 + 0.4e1 * t206 * t598 + 0.16e2 * t9 * t170 + 0.2e1 * t33 * t283 * t184;
2291*c4762a1bSJed Brown   t608 = t373 * t162;
2292*c4762a1bSJed Brown   t611 = t59 * t184;
2293*c4762a1bSJed Brown   t617 = t101 * t29;
2294*c4762a1bSJed Brown   t624 = t227 * ZB * t18 * t15;
2295*c4762a1bSJed Brown   t629 = t157 * t59;
2296*c4762a1bSJed Brown   t630 = t629 * t124;
2297*c4762a1bSJed Brown   t633 = t3 * t6;
2298*c4762a1bSJed Brown   t634 = t175 * t283;
2299*c4762a1bSJed Brown   t644 = 0.8e1 * t498 * t608 + 0.2e1 * t33 * t611 * t18 - 0.4e1 * t206 * t389 - 0.2e1 * t27 * t617 - 0.4e1 * t169 * t154 + 0.4e1 * t27 * t624 + 0.12e2 * t27 * t230 - 0.8e1 * t393 * t630 - 0.8e1 * t633 * t634 + 0.16e2 * t47 * t7 * t101 * t50 + 0.2e1 * t123 * t447 * t28;
2300*c4762a1bSJed Brown   t645 = t41 * t29;
2301*c4762a1bSJed Brown   t648 = t2 * 0.3141592654e1;
2302*c4762a1bSJed Brown   t649 = t648 * xc;
2303*c4762a1bSJed Brown   t650 = t560 * t184;
2304*c4762a1bSJed Brown   t656 = t56 * t1 * t157;
2305*c4762a1bSJed Brown   t659 = t87 * t128;
2306*c4762a1bSJed Brown   t662 = t96 * t482;
2307*c4762a1bSJed Brown   t663 = t629 * t162;
2308*c4762a1bSJed Brown   t671 = t161 * t124;
2309*c4762a1bSJed Brown   t674 = t218 * t127;
2310*c4762a1bSJed Brown   t679 = 0.4e1 * t81 * t645 - 0.4e1 * t649 * t650 - 0.8e1 * t169 * t70 + 0.8e1 * t656 * t163 - 0.2e1 * t98 * t659 - 0.8e1 * t662 * t663 - 0.32e2 * t421 * t175 * t427 - 0.2e1 * t147 * t502 + 0.8e1 * t656 * t671 + 0.2e1 * t147 * t674 - 0.16e2 * t368 * t386;
2311*c4762a1bSJed Brown   t714 = t334 * t19;
2312*c4762a1bSJed Brown   t719 = t12 * t42;
2313*c4762a1bSJed Brown   t722 = t304 * t35 - t346 * t35 + t341 * t59 - t344 * t35 + t344 * t256 + t346 * t184 - 0.16e2 * t368 * t554 - 0.16e2 * t48 * t175 * t50 + 0.4e1 * t525 * t714 - 0.2e1 * t58 * t659 + 0.8e1 * t368 * t719;
2314*c4762a1bSJed Brown   t730 = xc * t19;
2315*c4762a1bSJed Brown   t735 = t59 * t256 * t14;
2316*c4762a1bSJed Brown   t752 = 0.4e1 * t173 * t714 - 0.6e1 * t27 * t515 - 0.16e2 * t9 * t279 + 0.4e1 * t194 * t730 * t184 - t139 * t735 - 0.4e1 * t492 * t127 * t82 * xc - 0.4e1 * t98 * t508 - t123 * t41 * t207 - 0.2e1 * t147 * t298 + 0.8e1 * t368 * t314 + 0.6e1 * t132 * t133 * t207;
2317*c4762a1bSJed Brown   t755 = t28 * t21;
2318*c4762a1bSJed Brown   t759 = t274 * t338 * t14;
2319*c4762a1bSJed Brown   t767 = t11 * t35;
2320*c4762a1bSJed Brown   t768 = t767 * t14;
2321*c4762a1bSJed Brown   t778 = t560 * t61;
2322*c4762a1bSJed Brown   t781 = -0.2e1 * t58 * t504 - 0.8e1 * t27 * t755 + 0.16e2 * t662 * t759 + 0.12e2 * t291 * t282 * t207 - 0.6e1 * t27 * t434 + t139 * t768 - 0.8e1 * t498 * t326 + 0.4e1 * t33 * t611 * t20 + 0.2e1 * t81 * t512 - t139 * t561 + 0.2e1 * t147 * t778;
2323*c4762a1bSJed Brown   t786 = t12 * t443;
2324*c4762a1bSJed Brown   t790 = t282 * t59 * t20;
2325*c4762a1bSJed Brown   t796 = t59 * t14 * t127;
2326*c4762a1bSJed Brown   t806 = t41 * t21;
2327*c4762a1bSJed Brown   t811 = -0.8e1 * t393 * t663 + 0.8e1 * t368 * t786 + 0.2e1 * t81 * t790 + 0.4e1 * t169 * t624 + t139 * t796 + 0.2e1 * t206 * t258 - 0.2e1 * t40 * t591 - 0.8e1 * t662 * t630 - 0.4e1 * t33 * t30 - 0.4e1 * t40 * t806 + 0.8e1 * t9 * t786;
2328*c4762a1bSJed Brown   t819 = t282 * t15 * t127;
2329*c4762a1bSJed Brown   t822 = t101 * t363;
2330*c4762a1bSJed Brown   t830 = t11 * t256 * t14;
2331*c4762a1bSJed Brown   t835 = t227 * t532;
2332*c4762a1bSJed Brown   t842 = 0.2e1 * t33 * t11 * t18 * t15 + t123 * t41 * t66 - 0.4e1 * t493 * t819 - 0.2e1 * t27 * t822 - 0.16e2 * t368 * t170 - 0.4e1 * t169 * t463 - t139 * t830 - 0.4e1 * t649 * t179 * t127 + 0.12e2 * t27 * t835 - 0.16e2 * t368 * t434 - 0.2e1 * t40 * t790;
2333*c4762a1bSJed Brown   t845 = t87 * t202;
2334*c4762a1bSJed Brown   t854 = t338 * t15;
2335*c4762a1bSJed Brown   t859 = t12 * t207;
2336*c4762a1bSJed Brown   t868 = t139 * t348 - 0.2e1 * t27 * t845 + 0.8e1 * t169 * t755 - 0.2e1 * t58 * t380 + 0.6e1 * t206 * t331 + 0.8e1 * t310 * t854 - 0.2e1 * t169 * t822 + 0.2e1 * t98 * t859 + 0.8e1 * t159 * t671 + 0.8e1 * t74 * t634 - 0.2e1 * t169 * t253;
2337*c4762a1bSJed Brown   t880 = t60 * t443;
2338*c4762a1bSJed Brown   t891 = t101 * t128;
2339*c4762a1bSJed Brown   t894 = -t123 * t539 - 0.2e1 * t147 * t796 + 0.32e2 * t368 * t230 + t139 * t674 - 0.16e2 * t98 * t60 * t124 + 0.32e2 * t9 * t244 + 0.8e1 * t368 * t880 - 0.8e1 * t40 * t41 * xc * t36 - t123 * t82 * t128 - 0.6e1 * t58 * t233 + 0.2e1 * t58 * t891;
2340*c4762a1bSJed Brown   t903 = t179 * t19;
2341*c4762a1bSJed Brown   t920 = t56 * t1 * t160;
2342*c4762a1bSJed Brown   t925 = -0.2e1 * t174 * t175 * t66 - 0.4e1 * t493 * t714 + 0.4e1 * t649 * t903 - 0.4e1 * t81 * t43 + t123 * t82 * t207 + 0.4e1 * t206 * t891 - 0.16e2 * t273 * t759 - 0.8e1 * t27 * t203 + 0.32e2 * t221 * ZB * t51 - 0.16e2 * t920 * t759 - 0.8e1 * t9 * t453;
2343*c4762a1bSJed Brown   t932 = t87 * t29;
2344*c4762a1bSJed Brown   t945 = t82 * t21;
2345*c4762a1bSJed Brown   t953 = -0.16e2 * t920 * t276 - 0.8e1 * t169 * t30 - 0.8e1 * t633 * t77 - 0.2e1 * t27 * t932 - 0.4e1 * t174 * t49 * t162 + 0.8e1 * t206 * t87 * t124 - 0.2e1 * t147 * t768 + 0.4e1 * t169 * t522 - 0.12e2 * t81 * t945 + 0.4e1 * t33 * t28 * t115 + 0.4e1 * t525 * t819;
2346*c4762a1bSJed Brown   t971 = t282 * t127;
2347*c4762a1bSJed Brown   t978 = -0.6e1 * t98 * t102 + 0.2e1 * t169 * t515 - 0.2e1 * t310 * t377 + 0.2e1 * t147 * t830 + 0.8e1 * t368 * t22 - 0.2e1 * t169 * t617 + 0.16e2 * t662 * t276 - 0.8e1 * t355 * t854 + 0.4e1 * t493 * t971 - 0.16e2 * t9 * t533 - 0.2e1 * t169 * t279;
2348*c4762a1bSJed Brown   t997 = xc * t127;
2349*c4762a1bSJed Brown   t998 = t997 * t59;
2350*c4762a1bSJed Brown   t1003 = 0.4e1 * t40 * t579 + 0.2e1 * t169 * t845 + 0.16e2 * t9 * t515 + 0.8e1 * t206 * t551 + t123 * t41 * t128 + 0.16e2 * t98 * t60 * t162 + 0.2e1 * t169 * t364 - 0.2e1 * t169 * t932 + t139 * t778 + 0.4e1 * t648 * t998 + 0.2e1 * t147 * t412;
2351*c4762a1bSJed Brown   t1006 = t2 * t59;
2352*c4762a1bSJed Brown   t1017 = xc * t35;
2353*c4762a1bSJed Brown   t1033 = 0.4e1 * t1006 * t335 + 0.4e1 * t81 * t806 - 0.2e1 * t33 * t34 * t115 + 0.8e1 * t498 * t374 - 0.16e2 * t261 * t7 * t1017 * t15 + 0.8e1 * t206 * t101 * t124 - t123 * t448 + 0.2e1 * t147 * t735 + 0.6e1 * t98 * t208 + 0.6e1 * t98 * t88 - 0.4e1 * t33 * t755;
2354*c4762a1bSJed Brown   t1055 = -0.4e1 * t173 * t971 + 0.2e1 * t98 * t891 + 0.8e1 * t9 * t880 + 0.4e1 * t169 * t835 - t304 * t184 + t344 * t184 - t123 * t41 * t62 - 0.2e1 * t98 * t598 + 0.2e1 * t58 * t859 + 0.32e2 * t47 * t351 * t224 + 0.2e1 * t98 * t389;
2355*c4762a1bSJed Brown   t1070 = t15 * t19;
2356*c4762a1bSJed Brown   t1089 = -0.16e2 * t368 * t352 - 0.8e1 * t9 * t719 + 0.4e1 * t96 * t2 * xc * t134 - 0.2e1 * t91 * t236 * t115 + 0.4e1 * t27 * t573 + 0.4e1 * t493 * t282 * t1070 + 0.2e1 * t33 * t59 * t18 * t15 + 0.12e2 * t40 * t945 - 0.4e1 * t492 * xc * t82 * t1070 - 0.2e1 * t91 * t528 * t20 + 0.8e1 * t324 * t608;
2357*c4762a1bSJed Brown   t1113 = t123 * t82 * t124 + 0.8e1 * t421 * t428 - t139 * t417 + 0.4e1 * t40 * t645 + 0.16e2 * t393 * t759 - 0.2e1 * t33 * t179 * t115 - 0.4e1 * t525 * t335 + 0.4e1 * t33 * t28 * t36 - 0.4e1 * t1006 * t714 + 0.6e1 * t206 * t166 - 0.8e1 * t421 * t450;
2358*c4762a1bSJed Brown   t1119 = t321 * t46;
2359*c4762a1bSJed Brown   t1122 = t157 * t11;
2360*c4762a1bSJed Brown   t1123 = t1122 * t2;
2361*c4762a1bSJed Brown   t1124 = t184 * t46;
2362*c4762a1bSJed Brown   t1128 = t108 * nz;
2363*c4762a1bSJed Brown   t1132 = t7 * t7;
2364*c4762a1bSJed Brown   t1133 = t1132 * t11;
2365*c4762a1bSJed Brown   t1134 = t1133 * t108;
2366*c4762a1bSJed Brown   t1135 = t15 * t46;
2367*c4762a1bSJed Brown   t1139 = t7 * ZA;
2368*c4762a1bSJed Brown   t1140 = t1139 * ZB;
2369*c4762a1bSJed Brown   t1141 = t1 * t35;
2370*c4762a1bSJed Brown   t1145 = t629 * t2;
2371*c4762a1bSJed Brown   t1146 = t1135 * t730;
2372*c4762a1bSJed Brown   t1149 = t157 * t1128;
2373*c4762a1bSJed Brown   t1150 = t1149 * xc;
2374*c4762a1bSJed Brown   t1153 = t46 * xc;
2375*c4762a1bSJed Brown   t1154 = t1153 * t127;
2376*c4762a1bSJed Brown   t1158 = t184 * t1 * t46;
2377*c4762a1bSJed Brown   t1161 = t46 * t46;
2378*c4762a1bSJed Brown   t1162 = t35 * t1161;
2379*c4762a1bSJed Brown   t1166 = t7 * t1;
2380*c4762a1bSJed Brown   t1170 = -0.4e1 * t133 * t1119 + 0.16e2 * t1123 * t1124 * t730 - 0.8e1 * t1122 * t1128 * t196 - 0.64e2 * t1134 * t1135 * t1017 - 0.32e2 * t1140 * t1141 * t1135 + 0.16e2 * t1145 * t1146 - 0.8e1 * t1150 * t650 - 0.16e2 * t1123 * t1154 - 0.4e1 * t133 * t1158 - 0.16e2 * t1140 * t1162 * t15 + 0.8e1 * t1166 * t35 * t312;
2381*c4762a1bSJed Brown   t1171 = t1161 * t184;
2382*c4762a1bSJed Brown   t1175 = t1122 * nz;
2383*c4762a1bSJed Brown   t1176 = t15 * t1161;
2384*c4762a1bSJed Brown   t1180 = t1132 * ZA;
2385*c4762a1bSJed Brown   t1181 = t1180 * t355;
2386*c4762a1bSJed Brown   t1182 = t1176 * t1017;
2387*c4762a1bSJed Brown   t1185 = t1161 * xc;
2388*c4762a1bSJed Brown   t1189 = t1133 * t1;
2389*c4762a1bSJed Brown   t1192 = t108 * t1;
2390*c4762a1bSJed Brown   t1193 = t1132 * t1192;
2391*c4762a1bSJed Brown   t1195 = t10 * t35;
2392*c4762a1bSJed Brown   t1199 = t157 * t15;
2393*c4762a1bSJed Brown   t1203 = t1141 * t46;
2394*c4762a1bSJed Brown   t1211 = t184 * t108;
2395*c4762a1bSJed Brown   t1218 = 0.2e1 * t133 * t1171 * t35 + 0.8e1 * t1175 * t1176 * t997 + 0.64e2 * t1181 * t1182 - 0.8e1 * t1175 * t1185 * t127 - 0.32e2 * t1189 * t1182 - 0.64e2 * t1193 * ZA * t1195 * t228 + 0.8e1 * t1199 * t416 * t1128 + 0.8e1 * t1140 * t1203 - 0.4e1 * t75 * t1158 - 0.8e1 * t1199 * t560 * t1128 - 0.2e1 * t133 * t1211 - 0.8e1 * t1199 * t127 * t11 * t1128;
2396*c4762a1bSJed Brown   t1221 = t256 * t1161;
2397*c4762a1bSJed Brown   t1224 = t35 * t108;
2398*c4762a1bSJed Brown   t1233 = t7 * t256;
2399*c4762a1bSJed Brown   t1236 = -t75 * t1211 - t75 * t1221 - t133 * t1221 + t75 * t1224 - t75 * t1171 - t133 * t1171 + t133 * t1224 + t75 * t1162 - t75 * t108 * t256 + t133 * t1162 - t1233 * t59 * t108;
2400*c4762a1bSJed Brown   t1240 = t1135 * t1195;
2401*c4762a1bSJed Brown   t1252 = t629 * t127;
2402*c4762a1bSJed Brown   t1263 = t1171 * ZA;
2403*c4762a1bSJed Brown   t1280 = -0.128e3 * t1180 * ZB * t108 * t1240 + 0.32e2 * t1193 * t10 * t112 + 0.4e1 * t133 * t1203 + 0.4e1 * t109 * t256 * ZA * ZB - 0.8e1 * t1252 * nz * t15 * t1185 + 0.8e1 * t1175 * t1171 * t730 - 0.8e1 * t1175 * t1176 * t127 + 0.4e1 * t223 * t1263 - 0.8e1 * t1175 * t1176 * t730 + 0.8e1 * t1166 * ZA * t341 * ZB + 0.64e2 * t1134 * t1240 + 0.8e1 * t1122 * xc * t1128 * t127 * t15;
2404*c4762a1bSJed Brown   t1283 = t1199 * t19;
2405*c4762a1bSJed Brown   t1287 = t1199 * t127;
2406*c4762a1bSJed Brown   t1289 = t59 * nz * t1161;
2407*c4762a1bSJed Brown   t1293 = t157 * nz * xc;
2408*c4762a1bSJed Brown   t1304 = t1132 * t108;
2409*c4762a1bSJed Brown   t1310 = t263 * ZB;
2410*c4762a1bSJed Brown   t1316 = t2 * t15;
2411*c4762a1bSJed Brown   t1323 = -0.16e2 * t1283 * t1006 * t46 + 0.8e1 * t1287 * t1289 + 0.8e1 * t1293 * t127 * t1161 * t59 + 0.16e2 * t1123 * t1135 * t19 + 0.8e1 * t1293 * t560 * t1176 + 0.64e2 * t1304 * t59 * t1240 + 0.4e1 * t75 * t1203 + 0.4e1 * t1310 * t1263 + 0.4e1 * t223 * t338 * t108 - 0.16e2 * t1252 * t1316 * t1153 - 0.16e2 * t1310 * t221 * t15;
2412*c4762a1bSJed Brown   t1330 = t1132 * t15;
2413*c4762a1bSJed Brown   t1336 = t1132 * t1;
2414*c4762a1bSJed Brown   t1338 = t1162 * t179;
2415*c4762a1bSJed Brown   t1370 = 0.8e1 * t1175 * t1176 * t19 + 0.4e1 * t1139 * t318 * t1161 + 0.128e3 * t1330 * t318 * t108 * t46 * t227 - 0.32e2 * t1336 * xc * t1338 + 0.4e1 * t1233 * ZA * t1161 * ZB - 0.8e1 * t1287 * t59 * t1128 * xc + 0.2e1 * t75 * t305 * t108 + 0.8e1 * t1199 * t127 * t59 * t1128 - 0.8e1 * t1283 * t1289 - 0.8e1 * t1293 * t560 * t1171 + 0.4e1 * t133 * t35 * t1158 + 0.8e1 * t157 * t184 * t19 * t11 * t1128 * xc;
2416*c4762a1bSJed Brown   t1376 = t7 * t184;
2417*c4762a1bSJed Brown   t1380 = t1176 * t1195;
2418*c4762a1bSJed Brown   t1393 = t1330 * t35;
2419*c4762a1bSJed Brown   t1411 = 0.16e2 * t1145 * t1154 + 0.8e1 * t1149 * t998 + 0.4e1 * t1376 * t35 * t48 + 0.32e2 * t1189 * t1380 + 0.32e2 * t1193 * t11 * t1195 * t15 - 0.64e2 * t1304 * xc * t111 * t1135 - 0.16e2 * t1123 * t1146 + 0.64e2 * t1393 * t28 * t1192 * xc - 0.16e2 * t1123 * t1135 * t127 - 0.8e1 * t1122 * xc * t1128 * t127 - 0.32e2 * t1193 * xc * t112 + 0.16e2 * t1252 * t1316 * t46;
2420*c4762a1bSJed Brown   t1450 = 0.2e1 * t1376 * t767 * t1161 + 0.2e1 * t1376 * t111 * t108 + 0.4e1 * t223 * t311 * t108 + 0.4e1 * t109 * t35 * t520 * ZA + 0.16e2 * t1123 * t1135 * t997 - 0.64e2 * t1181 * t1380 + 0.8e1 * t1150 * t903 - 0.32e2 * t1393 * t11 * t1192 * xc - 0.16e2 * t157 * t2 * xc * t560 * t1124 + 0.8e1 * t223 * t184 * t317 * t46 + 0.32e2 * t1336 * t10 * t1338 - 0.4e1 * t75 * t1119;
2421*c4762a1bSJed Brown   _PC3B = (t606 + t722 + t1089 + t781 + 0.16e2 * t48 * t51 + t978 + t868 + t507 - t304 * t256 + 0.8e1 * t9 * t22 + t752 + 0.4e1 * t174 * t144 - 0.2e1 * t81 * t469 + 0.6e1 * t139 * t166 + t362 + 0.2e1 * t98 * t211 + t925 + t137 - t290 * t184 + 0.12e2 * t81 * t83 + t842 + 0.8e1 * t74 * t77 + 0.16e2 * t98 * t12 * t162 - 0.4e1 * t33 * t28 * t443 - 0.8e1 * t27 * t70 - 0.2e1 * t33 * t34 * t36 - 0.8e1 * t27 * t30 + 0.2e1 * t58 * t67 - 0.4e1 * t40 * t43 + 0.2e1 * t58 * t63 + t1033 - t290 * t256 + t290 * t35 + t193 + t1113 + t578 + t442 + t474 + t544 + t329 + t679 + t401 + t953 + t811 + t644 + t894 + t289 + t240 + t1055 + t1003) / (t1170 + t1218 + 0.2e1 * t1236 + t1280 + t1323 + t1370 + t1411 + t1450);
2422*c4762a1bSJed Brown   /****************************************************************************************/
2423*c4762a1bSJed Brown   t1 = nz * nz;
2424*c4762a1bSJed Brown   t2 = t1 * xc;
2425*c4762a1bSJed Brown   t3 = ZB * ZB;
2426*c4762a1bSJed Brown   t5 = t2 * 0.3141592654e1 * t3;
2427*c4762a1bSJed Brown   t6 = nx * 0.3141592654e1;
2428*c4762a1bSJed Brown   t7 = t6 * xc;
2429*c4762a1bSJed Brown   t8 = PetscCosReal(t7);
2430*c4762a1bSJed Brown   t9 = nx * nx;
2431*c4762a1bSJed Brown   t10 = t8 * t9;
2432*c4762a1bSJed Brown   t11 = nz * 0.3141592654e1;
2433*c4762a1bSJed Brown   t12 = PetscExpReal(t11);
2434*c4762a1bSJed Brown   t13 = t12 * t12;
2435*c4762a1bSJed Brown   t16 = PetscExpReal(xc * nz * 0.3141592654e1);
2436*c4762a1bSJed Brown   t17 = t16 * t16;
2437*c4762a1bSJed Brown   t18 = t17 * t16;
2438*c4762a1bSJed Brown   t19 = t17 * t17;
2439*c4762a1bSJed Brown   t20 = t19 * t18;
2440*c4762a1bSJed Brown   t21 = t13 * t20;
2441*c4762a1bSJed Brown   t22 = t10 * t21;
2442*c4762a1bSJed Brown   t25 = ZA * ZA;
2443*c4762a1bSJed Brown   t26 = t1 * t25;
2444*c4762a1bSJed Brown   t27 = xc * 0.3141592654e1;
2445*c4762a1bSJed Brown   t28 = t26 * t27;
2446*c4762a1bSJed Brown   t29 = t19 * t16;
2447*c4762a1bSJed Brown   t30 = t13 * t13;
2448*c4762a1bSJed Brown   t31 = t29 * t30;
2449*c4762a1bSJed Brown   t35 = t9 * nx;
2450*c4762a1bSJed Brown   t36 = t3 * t35;
2451*c4762a1bSJed Brown   t37 = PetscSinReal(t6);
2452*c4762a1bSJed Brown   t38 = t13 * t12;
2453*c4762a1bSJed Brown   t39 = t37 * t38;
2454*c4762a1bSJed Brown   t40 = t39 * t19;
2455*c4762a1bSJed Brown   t42 = t1 * t1;
2456*c4762a1bSJed Brown   t43 = nx * t42;
2457*c4762a1bSJed Brown   t44 = xc * xc;
2458*c4762a1bSJed Brown   t45 = t25 * t44;
2459*c4762a1bSJed Brown   t46 = t43 * t45;
2460*c4762a1bSJed Brown   t47 = 0.3141592654e1 * 0.3141592654e1;
2461*c4762a1bSJed Brown   t48 = t47 * t37;
2462*c4762a1bSJed Brown   t49 = t17 * t38;
2463*c4762a1bSJed Brown   t54 = 0.3141592654e1 * t35;
2464*c4762a1bSJed Brown   t55 = ZA * nz * t54;
2465*c4762a1bSJed Brown   t56 = t37 * ZB;
2466*c4762a1bSJed Brown   t57 = t19 * t12;
2467*c4762a1bSJed Brown   t61 = t25 * t8;
2468*c4762a1bSJed Brown   t62 = t61 * t9;
2469*c4762a1bSJed Brown   t63 = nz * t30;
2470*c4762a1bSJed Brown   t64 = t63 * t16;
2471*c4762a1bSJed Brown   t67 = t1 * nz;
2472*c4762a1bSJed Brown   t69 = t47 * ZB;
2473*c4762a1bSJed Brown   t70 = t67 * t44 * t69;
2474*c4762a1bSJed Brown   t75 = nx * t3;
2475*c4762a1bSJed Brown   t76 = t75 * t37;
2476*c4762a1bSJed Brown   t77 = t67 * 0.3141592654e1;
2477*c4762a1bSJed Brown   t78 = t19 * t19;
2478*c4762a1bSJed Brown   t79 = t78 * t12;
2479*c4762a1bSJed Brown   t80 = t77 * t79;
2480*c4762a1bSJed Brown   t82 = t3 * t38;
2481*c4762a1bSJed Brown   t84 = t54 * t37;
2482*c4762a1bSJed Brown   t87 = PetscSinReal(t7);
2483*c4762a1bSJed Brown   t88 = t29 * t87;
2484*c4762a1bSJed Brown   t89 = t47 * t44;
2485*c4762a1bSJed Brown   t93 = nx * t25;
2486*c4762a1bSJed Brown   t94 = t87 * t42;
2487*c4762a1bSJed Brown   t95 = t93 * t94;
2488*c4762a1bSJed Brown   t96 = t47 * xc;
2489*c4762a1bSJed Brown   t97 = t13 * t29;
2490*c4762a1bSJed Brown   t98 = t96 * t97;
2491*c4762a1bSJed Brown   t101 = t87 * t67;
2492*c4762a1bSJed Brown   t102 = t93 * t101;
2493*c4762a1bSJed Brown   t103 = t13 * t18;
2494*c4762a1bSJed Brown   t107 = t47 * t35;
2495*c4762a1bSJed Brown   t108 = t26 * t107;
2496*c4762a1bSJed Brown   t109 = t37 * t44;
2497*c4762a1bSJed Brown   t110 = t19 * t17;
2498*c4762a1bSJed Brown   t111 = t12 * t110;
2499*c4762a1bSJed Brown   t116 = t37 * t19 * t12;
2500*c4762a1bSJed Brown   t118 = t37 * xc;
2501*c4762a1bSJed Brown   t119 = ZB * t19;
2502*c4762a1bSJed Brown   t120 = t119 * t12;
2503*c4762a1bSJed Brown   t121 = t118 * t120;
2504*c4762a1bSJed Brown   t125 = xc * t3;
2505*c4762a1bSJed Brown   t126 = t1 * t47 * t125;
2506*c4762a1bSJed Brown   t127 = t35 * t37;
2507*c4762a1bSJed Brown   t128 = t38 * t19;
2508*c4762a1bSJed Brown   t129 = t127 * t128;
2509*c4762a1bSJed Brown   t132 = t26 * 0.3141592654e1;
2510*c4762a1bSJed Brown   t133 = t16 * t13;
2511*c4762a1bSJed Brown   t134 = t10 * t133;
2512*c4762a1bSJed Brown   t137 = 0.3141592654e1 * ZB;
2513*c4762a1bSJed Brown   t138 = t2 * t137;
2514*c4762a1bSJed Brown   t139 = ZA * t8;
2515*c4762a1bSJed Brown   t140 = t9 * t13;
2516*c4762a1bSJed Brown   t145 = t30 * t18;
2517*c4762a1bSJed Brown   t146 = t10 * t145;
2518*c4762a1bSJed Brown   t149 = t3 * t8;
2519*c4762a1bSJed Brown   t150 = t149 * t9;
2520*c4762a1bSJed Brown   t153 = 0.2e1 * t5 * t22 + 0.2e1 * t28 * t10 * t31 + t36 * t40 - 0.2e1 * t46 * t48 * t49 - 0.2e1 * t55 * t56 * t57 - 0.2e1 * t62 * t64 + 0.16e2 * t70 * t29 * ZA * t10 - t76 * t80 + t82 * nz * t84 + 0.8e1 * t43 * t3 * t88 * t89 + 0.16e2 * t95 * t98 + 0.2e1 * t102 * t27 * t103 - 0.2e1 * t108 * t109 * t111 + t36 * t116 + 0.8e1 * t55 * t121 - 0.4e1 * t126 * t129 - 0.4e1 * t132 * t134 - 0.4e1 * t138 * t139 * t140 * t20 + 0.8e1 * t28 * t146 - 0.2e1 * t150 * t64;
2521*c4762a1bSJed Brown   t154 = t42 * nz;
2522*c4762a1bSJed Brown   t155 = nx * t154;
2523*c4762a1bSJed Brown   t156 = t44 * xc;
2524*c4762a1bSJed Brown   t157 = t47 * 0.3141592654e1;
2525*c4762a1bSJed Brown   t158 = t156 * t157;
2526*c4762a1bSJed Brown   t159 = t155 * t158;
2527*c4762a1bSJed Brown   t162 = t56 * ZA * t19 * t12;
2528*c4762a1bSJed Brown   t165 = t77 * t49;
2529*c4762a1bSJed Brown   t167 = t1 * t3;
2530*c4762a1bSJed Brown   t168 = t167 * t89;
2531*c4762a1bSJed Brown   t169 = t127 * t49;
2532*c4762a1bSJed Brown   t172 = t37 * t67;
2533*c4762a1bSJed Brown   t173 = t75 * t172;
2534*c4762a1bSJed Brown   t174 = t38 * t110;
2535*c4762a1bSJed Brown   t175 = t27 * t174;
2536*c4762a1bSJed Brown   t179 = t47 * t25;
2537*c4762a1bSJed Brown   t181 = t10 * t97;
2538*c4762a1bSJed Brown   t184 = t27 * t31;
2539*c4762a1bSJed Brown   t187 = t67 * t47;
2540*c4762a1bSJed Brown   t188 = t44 * t3;
2541*c4762a1bSJed Brown   t189 = t187 * t188;
2542*c4762a1bSJed Brown   t192 = t25 * t35;
2543*c4762a1bSJed Brown   t193 = t37 * t17;
2544*c4762a1bSJed Brown   t194 = t193 * t12;
2545*c4762a1bSJed Brown   t196 = nx * ZA;
2546*c4762a1bSJed Brown   t197 = t196 * t172;
2547*c4762a1bSJed Brown   t198 = ZB * t38;
2548*c4762a1bSJed Brown   t199 = t198 * t19;
2549*c4762a1bSJed Brown   t204 = t1 * t12 * t110;
2550*c4762a1bSJed Brown   t207 = nx * ZB;
2551*c4762a1bSJed Brown   t209 = t1 * ZA;
2552*c4762a1bSJed Brown   t215 = t67 * t3;
2553*c4762a1bSJed Brown   t216 = t47 * t8;
2554*c4762a1bSJed Brown   t217 = t215 * t216;
2555*c4762a1bSJed Brown   t218 = t9 * xc;
2556*c4762a1bSJed Brown   t222 = nx * t67;
2557*c4762a1bSJed Brown   t223 = t222 * t27;
2558*c4762a1bSJed Brown   t224 = t3 * t87;
2559*c4762a1bSJed Brown   t228 = t167 * t107;
2560*c4762a1bSJed Brown   t232 = t26 * t96;
2561*c4762a1bSJed Brown   t235 = t207 * t94;
2562*c4762a1bSJed Brown   t236 = t47 * ZA;
2563*c4762a1bSJed Brown   t243 = xc * t13;
2564*c4762a1bSJed Brown   t244 = t243 * t29;
2565*c4762a1bSJed Brown   t248 = t25 * nz;
2566*c4762a1bSJed Brown   t249 = t248 * 0.3141592654e1;
2567*c4762a1bSJed Brown   t253 = ZB * ZA;
2568*c4762a1bSJed Brown   t254 = t253 * t8;
2569*c4762a1bSJed Brown   t255 = t9 * nz;
2570*c4762a1bSJed Brown   t256 = t30 * t16;
2571*c4762a1bSJed Brown   t260 = 0.2e1 * t207 * t37 * t209 * t128 + 0.2e1 * t5 * t134 - 0.16e2 * t217 * t218 * t97 - 0.2e1 * t223 * t224 * t31 - 0.2e1 * t228 * t109 * t174 - 0.2e1 * t232 * t169 - 0.16e2 * t235 * t236 * t44 * t30 * t18 - 0.4e1 * t196 * t101 * t137 * t244 + t249 * t169 + 0.8e1 * t168 * t129 + 0.4e1 * t254 * t255 * t256;
2572*c4762a1bSJed Brown   t263 = t43 * t179;
2573*c4762a1bSJed Brown   t267 = t3 * nz;
2574*c4762a1bSJed Brown   t268 = t267 * t54;
2575*c4762a1bSJed Brown   t269 = t118 * t57;
2576*c4762a1bSJed Brown   t272 = t39 * t1;
2577*c4762a1bSJed Brown   t274 = t67 * t25;
2578*c4762a1bSJed Brown   t275 = t274 * t158;
2579*c4762a1bSJed Brown   t278 = t75 * t87;
2580*c4762a1bSJed Brown   t279 = t77 * t103;
2581*c4762a1bSJed Brown   t282 = t25 * t38;
2582*c4762a1bSJed Brown   t285 = ZA * t38;
2583*c4762a1bSJed Brown   t290 = t267 * 0.3141592654e1;
2584*c4762a1bSJed Brown   t296 = t77 * t111;
2585*c4762a1bSJed Brown   t298 = t196 * t37;
2586*c4762a1bSJed Brown   t299 = t1 * ZB;
2587*c4762a1bSJed Brown   t303 = t37 * t42;
2588*c4762a1bSJed Brown   t304 = t196 * t303;
2589*c4762a1bSJed Brown   t308 = t77 * t57;
2590*c4762a1bSJed Brown   t310 = t26 * t89;
2591*c4762a1bSJed Brown   t313 = t77 * t128;
2592*c4762a1bSJed Brown   t316 = t101 * t27;
2593*c4762a1bSJed Brown   t319 = t93 * t87;
2594*c4762a1bSJed Brown   t320 = t77 * t97;
2595*c4762a1bSJed Brown   t323 = t127 * t57;
2596*c4762a1bSJed Brown   t326 = t10 * nz;
2597*c4762a1bSJed Brown   t329 = t118 * t174;
2598*c4762a1bSJed Brown   t332 = -0.8e1 * t263 * t109 * t57 - 0.4e1 * t268 * t269 + t93 * t272 + 0.8e1 * t275 * t129 - 0.4e1 * t278 * t279 + t282 * nz * t84 - 0.2e1 * t285 * nz * t54 * t56 - t290 * t169 - 0.2e1 * t196 * t38 * t172 * t137 + t76 * t296 - 0.2e1 * t298 * t299 * t79 + 0.8e1 * t304 * t96 * t120 + t76 * t308 - 0.2e1 * t310 * t169 - t76 * t313 + 0.2e1 * t75 * t18 * t316 + 0.4e1 * t319 * t320 + t249 * t323 - 0.2e1 * t25 * t18 * t326 + 0.2e1 * t228 * t329;
2599*c4762a1bSJed Brown   t335 = t75 * t101;
2600*c4762a1bSJed Brown   t336 = t27 * t21;
2601*c4762a1bSJed Brown   t342 = t77 * t133;
2602*c4762a1bSJed Brown   t347 = t209 * t137;
2603*c4762a1bSJed Brown   t350 = t9 * t1;
2604*c4762a1bSJed Brown   t351 = t149 * t350;
2605*c4762a1bSJed Brown   t355 = t37 * t78 * t12;
2606*c4762a1bSJed Brown   t359 = t93 * t303;
2607*c4762a1bSJed Brown   t367 = t172 * 0.3141592654e1;
2608*c4762a1bSJed Brown   t369 = t96 * t103;
2609*c4762a1bSJed Brown   t376 = t209 * t107;
2610*c4762a1bSJed Brown   t379 = t10 * t103;
2611*c4762a1bSJed Brown   t383 = t207 * t101;
2612*c4762a1bSJed Brown   t389 = 0.3141592654e1 * ZA;
2613*c4762a1bSJed Brown   t390 = t222 * t389;
2614*c4762a1bSJed Brown   t391 = t87 * ZB;
2615*c4762a1bSJed Brown   t398 = -0.2e1 * t102 * t336 + t93 * t38 * t367 + 0.16e2 * t95 * t369 - t82 * t127 - 0.8e1 * t197 * t27 * t120 + 0.8e1 * t376 * t121 - 0.8e1 * t189 * t379 - t249 * t129 - 0.4e1 * t383 * t27 * ZA * t16 * t13 - 0.8e1 * t390 * t391 * t21 - 0.2e1 * t197 * t137 * t57;
2616*c4762a1bSJed Brown   t402 = t39 * t110;
2617*c4762a1bSJed Brown   t404 = t193 * t38;
2618*c4762a1bSJed Brown   t406 = t127 * t174;
2619*c4762a1bSJed Brown   t408 = t167 * 0.3141592654e1;
2620*c4762a1bSJed Brown   t411 = t44 * t157;
2621*c4762a1bSJed Brown   t412 = t155 * t411;
2622*c4762a1bSJed Brown   t413 = t285 * t19;
2623*c4762a1bSJed Brown   t414 = t56 * t413;
2624*c4762a1bSJed Brown   t417 = ZA * t30;
2625*c4762a1bSJed Brown   t424 = t93 * t37;
2626*c4762a1bSJed Brown   t426 = t248 * t54;
2627*c4762a1bSJed Brown   t427 = t17 * t12;
2628*c4762a1bSJed Brown   t428 = t118 * t427;
2629*c4762a1bSJed Brown   t431 = t77 * t21;
2630*c4762a1bSJed Brown   t438 = ZA * t13;
2631*c4762a1bSJed Brown   t443 = t93 * t172;
2632*c4762a1bSJed Brown   t444 = t27 * t427;
2633*c4762a1bSJed Brown   t448 = t1 * t78 * t12;
2634*c4762a1bSJed Brown   t455 = t274 * t89;
2635*c4762a1bSJed Brown   t461 = t118 * t111;
2636*c4762a1bSJed Brown   t464 = -t36 * t402 + t36 * t404 - t249 * t406 - 0.4e1 * t408 * t134 + 0.16e2 * t412 * t414 - 0.4e1 * t383 * t27 * t417 * t18 + 0.2e1 * t28 * t22 - t424 * t80 - 0.2e1 * t426 * t428 + 0.4e1 * t278 * t431 + 0.4e1 * t254 * t255 * t103 + t290 * t323 + 0.4e1 * t383 * t27 * t438 * t20 + 0.2e1 * t443 * t444 + t424 * t448 - t36 * t194 - 0.32e2 * t235 * t236 * t243 * t18 + 0.8e1 * t455 * t181 - 0.4e1 * t359 * t96 * t128 - 0.2e1 * t426 * t461;
2637*c4762a1bSJed Brown   t469 = nz * t16 * t13;
2638*c4762a1bSJed Brown   t474 = t1 * t38;
2639*c4762a1bSJed Brown   t475 = t474 * t19;
2640*c4762a1bSJed Brown   t480 = t89 * t103;
2641*c4762a1bSJed Brown   t483 = t67 * ZA;
2642*c4762a1bSJed Brown   t484 = t483 * t411;
2643*c4762a1bSJed Brown   t485 = t127 * t120;
2644*c4762a1bSJed Brown   t488 = t127 * t111;
2645*c4762a1bSJed Brown   t497 = t77 * t427;
2646*c4762a1bSJed Brown   t502 = t27 * t97;
2647*c4762a1bSJed Brown   t508 = t1 * t19 * t12;
2648*c4762a1bSJed Brown   t511 = t155 * t25 * t156;
2649*c4762a1bSJed Brown   t512 = t157 * t37;
2650*c4762a1bSJed Brown   t513 = t512 * t128;
2651*c4762a1bSJed Brown   t527 = t1 * t17;
2652*c4762a1bSJed Brown   t528 = t527 * t38;
2653*c4762a1bSJed Brown   t530 = -t76 * t497 - 0.4e1 * t254 * t255 * t97 - 0.2e1 * t102 * t502 - 0.4e1 * t108 * t269 - t76 * t508 + 0.8e1 * t511 * t513 + 0.4e1 * t150 * t63 * t18 + 0.4e1 * t383 * t27 * t438 * t18 + 0.4e1 * t132 * t379 + 0.2e1 * t168 * t488 - t76 * t528;
2654*c4762a1bSJed Brown   t535 = t44 * t13;
2655*c4762a1bSJed Brown   t542 = t527 * t12;
2656*c4762a1bSJed Brown   t544 = nz * t13;
2657*c4762a1bSJed Brown   t545 = t544 * t20;
2658*c4762a1bSJed Brown   t548 = t75 * t303;
2659*c4762a1bSJed Brown   t549 = t96 * t111;
2660*c4762a1bSJed Brown   t552 = ZA * t35;
2661*c4762a1bSJed Brown   t553 = t552 * t37;
2662*c4762a1bSJed Brown   t562 = t43 * t96;
2663*c4762a1bSJed Brown   t563 = t3 * t37;
2664*c4762a1bSJed Brown   t564 = t563 * t128;
2665*c4762a1bSJed Brown   t579 = t474 * t110;
2666*c4762a1bSJed Brown   t590 = t9 * t30;
2667*c4762a1bSJed Brown   t591 = t590 * t18;
2668*c4762a1bSJed Brown   t595 = t127 * t427;
2669*c4762a1bSJed Brown   t598 = t77 * t174;
2670*c4762a1bSJed Brown   t600 = 0.4e1 * t5 * t146 + 0.16e2 * t235 * t236 * t535 * t18 + 0.8e1 * t455 * t146 + t76 * t542 - 0.2e1 * t150 * t545 + 0.2e1 * t548 * t549 - 0.2e1 * t553 * t120 + t290 * t488 - 0.8e1 * t274 * t47 * t44 * t29 * t10 - 0.4e1 * t562 * t564 - 0.2e1 * t132 * xc * t20 * t10 - 0.32e2 * t562 * ZA * t87 * ZB * t13 * t29 - 0.8e1 * t347 * t379 + t76 * t579 - 0.4e1 * t359 * t96 * t57 + 0.4e1 * t408 * t181 - 0.4e1 * t223 * t564 - 0.12e2 * t209 * t27 * ZB * t8 * t591 + 0.2e1 * t310 * t595 + t76 * t598;
2671*c4762a1bSJed Brown   t601 = t27 * t49;
2672*c4762a1bSJed Brown   t604 = t127 * t79;
2673*c4762a1bSJed Brown   t606 = ZB * t29;
2674*c4762a1bSJed Brown   t616 = t139 * t140 * t18;
2675*c4762a1bSJed Brown   t638 = t10 * t256;
2676*c4762a1bSJed Brown   t643 = t118 * t199;
2677*c4762a1bSJed Brown   t653 = t544 * t29;
2678*c4762a1bSJed Brown   t658 = t3 * t29;
2679*c4762a1bSJed Brown   t660 = t350 * t27;
2680*c4762a1bSJed Brown   t663 = -0.4e1 * t254 * t255 * t145 + 0.2e1 * t267 * t20 * t8 * t9 - 0.4e1 * t138 * t139 * t9 * t16 * t13 - 0.2e1 * t5 * t638 + 0.2e1 * t126 * t169 + 0.8e1 * t376 * t643 + 0.4e1 * t335 * t27 * t145 + 0.16e2 * t235 * t236 * t535 * t29 + 0.6e1 * t150 * t653 - 0.4e1 * t426 * t269 + 0.4e1 * t658 * t8 * t660;
2681*c4762a1bSJed Brown   t670 = t274 * t411;
2682*c4762a1bSJed Brown   t673 = t118 * t49;
2683*c4762a1bSJed Brown   t694 = t155 * t45;
2684*c4762a1bSJed Brown   t713 = nz * t29 * t30;
2685*c4762a1bSJed Brown   t717 = t20 * t87;
2686*c4762a1bSJed Brown   t723 = t512 * t57;
2687*c4762a1bSJed Brown   t728 = -0.2e1 * t443 * t175 - 0.8e1 * t670 * t129 + 0.2e1 * t426 * t673 - 0.16e2 * t207 * t88 * t42 * t47 * ZA * t44 + 0.4e1 * t254 * t255 * t21 + t249 * t595 + 0.8e1 * t25 * t29 * t8 * t660 + 0.2e1 * t268 * t461 + 0.8e1 * t189 * t181 - 0.8e1 * t694 * t513 + 0.2e1 * t198 * t553 - 0.12e2 * t606 * t139 * t660 - 0.2e1 * t359 * t549 + 0.4e1 * t138 * t139 * t590 * t16 + 0.8e1 * t93 * t29 * t94 * t89 - 0.2e1 * t150 * t713 + 0.2e1 * t222 * t3 * t717 * t27 + 0.8e1 * t670 * t323 + 0.8e1 * t694 * t723 - 0.2e1 * t62 * t653;
2688*c4762a1bSJed Brown   t734 = t43 * t89;
2689*c4762a1bSJed Brown   t735 = t563 * t427;
2690*c4762a1bSJed Brown   t740 = t75 * t94;
2691*c4762a1bSJed Brown   t744 = ZB * xc;
2692*c4762a1bSJed Brown   t750 = t563 * t57;
2693*c4762a1bSJed Brown   t754 = t218 * t103;
2694*c4762a1bSJed Brown   t771 = t127 * t199;
2695*c4762a1bSJed Brown   t776 = t89 * t174;
2696*c4762a1bSJed Brown   t791 = -0.4e1 * t207 * t717 * t77 * xc * ZA + 0.4e1 * t443 * t27 * t57 + t192 * t40 - 0.8e1 * t55 * t643 - 0.16e2 * t209 * t89 * t771 - 0.8e1 * t275 * t323 + 0.2e1 * t359 * t776 + 0.16e2 * t304 * t89 * t199 + 0.4e1 * t278 * t320 + 0.2e1 * t207 * t172 * t389 * t79 - 0.8e1 * t390 * t391 * t97;
2697*c4762a1bSJed Brown   t794 = t483 * t158;
2698*c4762a1bSJed Brown   t801 = t2 * 0.3141592654e1;
2699*c4762a1bSJed Brown   t818 = t215 * t411;
2700*c4762a1bSJed Brown   t827 = t96 * t174;
2701*c4762a1bSJed Brown   t837 = t37 * t12 * t110;
2702*c4762a1bSJed Brown   t845 = 0.16e2 * t794 * t485 + 0.8e1 * t159 * t564 - 0.8e1 * t455 * t379 - 0.2e1 * t801 * t3 * t20 * t10 - 0.4e1 * t132 * t22 - 0.8e1 * t734 * t564 - 0.8e1 * t187 * t44 * t658 * t10 - 0.8e1 * t412 * t564 + 0.4e1 * t132 * t181 - 0.8e1 * t818 * t129 + 0.2e1 * t46 * t48 * t427 - 0.4e1 * t75 * t29 * t316 - 0.2e1 * t359 * t827 - t290 * t595 + 0.16e2 * t217 * t754 - t424 * t542 - 0.8e1 * t734 * t750 - t192 * t837 - 0.4e1 * t254 * t255 * t133 + 0.8e1 * t304 * t96 * t199;
2703*c4762a1bSJed Brown   t864 = t544 * t18;
2704*c4762a1bSJed Brown   t867 = t3 * t18;
2705*c4762a1bSJed Brown   t884 = t27 * t256;
2706*c4762a1bSJed Brown   t891 = t187 * t744;
2707*c4762a1bSJed Brown   t894 = t563 * t49;
2708*c4762a1bSJed Brown   t900 = -0.2e1 * t263 * t428 + 0.2e1 * t228 * t428 - 0.6e1 * t223 * t224 * t103 - t192 * t404 + 0.2e1 * t268 * t428 - 0.2e1 * t335 * t884 - t424 * t296 + 0.2e1 * t93 * t20 * t316 - 0.32e2 * t891 * t616 + 0.2e1 * t562 * t894 - 0.2e1 * t801 * t867 * t10;
2709*c4762a1bSJed Brown   t904 = t27 * t111;
2710*c4762a1bSJed Brown   t907 = t118 * t128;
2711*c4762a1bSJed Brown   t915 = t89 * t145;
2712*c4762a1bSJed Brown   t947 = t139 * t140 * t29;
2713*c4762a1bSJed Brown   t952 = -0.2e1 * t173 * t904 + 0.4e1 * t426 * t907 + 0.12e2 * t253 * t10 * t1 * 0.3141592654e1 * t244 + 0.8e1 * t95 * t915 - t36 * t355 - 0.16e2 * t794 * t771 - 0.8e1 * t511 * t723 + 0.16e2 * t734 * t162 + t36 * t837 + 0.2e1 * t298 * t299 * t57 - 0.2e1 * t28 * t638 - 0.2e1 * t62 * t545 + 0.2e1 * t310 * t406 + 0.12e2 * t138 * t616 + 0.4e1 * t223 * t750 + t424 * t497 + 0.2e1 * t734 * t894 + 0.2e1 * t132 * xc * t18 * t10 - 0.16e2 * t70 * t947 + 0.32e2 * t891 * t947;
2714*c4762a1bSJed Brown   t969 = t67 * t157 * t156 * t3;
2715*c4762a1bSJed Brown   t974 = t27 * t133;
2716*c4762a1bSJed Brown   t1001 = -0.8e1 * t159 * t750 - 0.16e2 * t412 * t162 - t290 * t129 + 0.8e1 * t310 * t323 - 0.4e1 * t319 * t342 + t75 * t272 + t192 * t402 - 0.8e1 * t359 * t89 * t128 - 0.10e2 * t61 * t350 * t502 + 0.8e1 * t818 * t323 - 0.4e1 * t108 * t907;
2717*c4762a1bSJed Brown   t1042 = t89 * t97;
2718*c4762a1bSJed Brown   t1055 = -0.2e1 * t168 * t595 + 0.16e2 * t484 * t771 + 0.4e1 * t11 * t125 * t129 - 0.2e1 * t173 * t444 + 0.2e1 * ZB * nz * t54 * t37 * ZA * t79 - t424 * t475 + 0.2e1 * t562 * t735 - 0.2e1 * t548 * t776 + t424 * t204 + 0.2e1 * t25 * t20 * t326 + 0.8e1 * t383 * t389 * t133 + t75 * t38 * t367 + 0.2e1 * t62 * t469 + 0.2e1 * t197 * t137 * t128 - 0.2e1 * t102 * t884 - 0.2e1 * t5 * t379 - 0.8e1 * t740 * t1042 - 0.16e2 * t159 * t414 - 0.2e1 * ZB * t35 * t37 * t413 + 0.2e1 * t553 * ZB * t78 * t12;
2719*c4762a1bSJed Brown   t1096 = 0.2e1 * t443 * t904 - 0.2e1 * t268 * t329 - 0.2e1 * t443 * t601 + 0.2e1 * t102 * t974 - 0.2e1 * t263 * t673 + t424 * t165 + 0.2e1 * t62 * t713 + t424 * t308 - t424 * t313 + 0.8e1 * t347 * t22 - t424 * t598;
2720*c4762a1bSJed Brown   t1103 = t42 * t1 * t157;
2721*c4762a1bSJed Brown   t1104 = t1103 * t25;
2722*c4762a1bSJed Brown   t1108 = t3 * t19;
2723*c4762a1bSJed Brown   t1112 = nz * t47;
2724*c4762a1bSJed Brown   t1113 = t9 * t9;
2725*c4762a1bSJed Brown   t1118 = t42 * t157;
2726*c4762a1bSJed Brown   t1119 = t1118 * t9;
2727*c4762a1bSJed Brown   t1120 = t25 * xc;
2728*c4762a1bSJed Brown   t1121 = t13 * t110;
2729*c4762a1bSJed Brown   t1122 = t1120 * t1121;
2730*c4762a1bSJed Brown   t1125 = t47 * t47;
2731*c4762a1bSJed Brown   t1126 = t67 * t1125;
2732*c4762a1bSJed Brown   t1127 = t1113 * ZA;
2733*c4762a1bSJed Brown   t1128 = t1126 * t1127;
2734*c4762a1bSJed Brown   t1129 = t19 * t13;
2735*c4762a1bSJed Brown   t1130 = t744 * t1129;
2736*c4762a1bSJed Brown   t1133 = t154 * t1125;
2737*c4762a1bSJed Brown   t1134 = t1133 * t9;
2738*c4762a1bSJed Brown   t1135 = t45 * t1129;
2739*c4762a1bSJed Brown   t1138 = t154 * t47;
2740*c4762a1bSJed Brown   t1139 = t25 * t30;
2741*c4762a1bSJed Brown   t1142 = t1126 * t1113;
2742*c4762a1bSJed Brown   t1145 = t125 * t1129;
2743*c4762a1bSJed Brown   t1148 = t1103 * xc;
2744*c4762a1bSJed Brown   t1149 = t3 * t13;
2745*c4762a1bSJed Brown   t1150 = t1149 * t17;
2746*c4762a1bSJed Brown   t1153 = t25 * t78;
2747*c4762a1bSJed Brown   t1156 = -0.8e1 * t1104 * t243 * t17 + 0.4e1 * t187 * t1108 * t9 - 0.2e1 * t1112 * t3 * t1113 * t30 + 0.16e2 * t1119 * t1122 + 0.64e2 * t1128 * t1130 + 0.64e2 * t1134 * t1135 - 0.2e1 * t1138 * t1139 + 0.32e2 * t1142 * t1135 - 0.32e2 * t1142 * t1145 + 0.8e1 * t1148 * t1150 - 0.2e1 * t1138 * t1153;
2748*c4762a1bSJed Brown   t1157 = t25 * t13;
2749*c4762a1bSJed Brown   t1158 = t1157 * t17;
2750*c4762a1bSJed Brown   t1161 = t13 * t17;
2751*c4762a1bSJed Brown   t1162 = t1120 * t1161;
2752*c4762a1bSJed Brown   t1165 = t3 * t78;
2753*c4762a1bSJed Brown   t1170 = t42 * t67 * t1125;
2754*c4762a1bSJed Brown   t1172 = t1108 * t13;
2755*c4762a1bSJed Brown   t1175 = t1 * t157;
2756*c4762a1bSJed Brown   t1176 = t1175 * t1113;
2757*c4762a1bSJed Brown   t1182 = t1120 * t1129;
2758*c4762a1bSJed Brown   t1189 = t110 * t9 * xc;
2759*c4762a1bSJed Brown   t1192 = t1149 * t110;
2760*c4762a1bSJed Brown   t1201 = 0.8e1 * t1103 * t1158 - 0.16e2 * t1119 * t1162 - 0.2e1 * t1112 * t1165 * t1113 + 0.32e2 * t1170 * t44 * t1172 - 0.8e1 * t1176 * t1162 + 0.8e1 * t1104 * t243 * t110 - 0.64e2 * t1134 * t1182 - 0.64e2 * t1134 * t1145 + 0.16e2 * t1118 * t3 * t1189 + 0.16e2 * t1119 * t1192 - 0.4e1 * t187 * t1165 * t9 - 0.4e1 * t187 * t1139 * t9;
2761*c4762a1bSJed Brown   t1209 = t17 * t30;
2762*c4762a1bSJed Brown   t1210 = t125 * t1209;
2763*c4762a1bSJed Brown   t1213 = t1138 * ZA;
2764*c4762a1bSJed Brown   t1214 = ZB * t30;
2765*c4762a1bSJed Brown   t1218 = t1157 * t110;
2766*c4762a1bSJed Brown   t1226 = t3 * t30;
2767*c4762a1bSJed Brown   t1237 = t1170 * t25;
2768*c4762a1bSJed Brown   t1242 = 0.4e1 * t1112 * ZA * t119 * t1113 - 0.16e2 * t1119 * t1150 - 0.8e1 * t1176 * t1210 + 0.4e1 * t1213 * t1214 * t19 - 0.16e2 * t1119 * t1218 - 0.32e2 * t1142 * t1182 - 0.8e1 * t1103 * t1120 * t110 - 0.4e1 * t187 * t1226 * t9 + 0.8e1 * t1103 * t1192 + 0.4e1 * t1112 * ZB * t1113 * t30 * ZA - 0.32e2 * t1237 * xc * t19 * t13;
2769*c4762a1bSJed Brown   t1251 = t125 * t1121;
2770*c4762a1bSJed Brown   t1260 = t1120 * t1209;
2771*c4762a1bSJed Brown   t1263 = t1139 * t19;
2772*c4762a1bSJed Brown   t1282 = 0.8e1 * t1103 * t110 * t3 * xc + 0.8e1 * t1104 * xc * t17 * t30 - 0.8e1 * t1176 * t1251 + 0.16e2 * t1119 * t1158 + 0.4e1 * t1112 * t78 * t1127 * ZB + 0.16e2 * t1119 * t1260 + 0.2e1 * t1138 * t1263 - 0.32e2 * t1170 * xc * t1172 - 0.16e2 * t1213 * t119 * t13 + 0.4e1 * t1138 * t1214 * ZA + 0.32e2 * t1237 * t44 * t19 * t13 - 0.16e2 * t1118 * t25 * t1189;
2773*c4762a1bSJed Brown   t1287 = t188 * t1129;
2774*c4762a1bSJed Brown   t1292 = t25 * t19;
2775*c4762a1bSJed Brown   t1296 = t187 * t9;
2776*c4762a1bSJed Brown   t1297 = t1226 * t19;
2777*c4762a1bSJed Brown   t1311 = t1112 * t1113;
2778*c4762a1bSJed Brown   t1317 = -0.8e1 * t1176 * t1150 + 0.32e2 * t1142 * t1287 - 0.8e1 * t1103 * t1150 + 0.2e1 * t1112 * t1292 * t1113 + 0.4e1 * t1296 * t1297 + 0.8e1 * t1176 * t1192 + 0.4e1 * t1296 * t1263 + 0.8e1 * t1176 * t1158 - 0.8e1 * t1175 * t25 * t1113 * xc * t110 + 0.2e1 * t1311 * t1297 + 0.2e1 * t1112 * t1108 * t1113;
2779*c4762a1bSJed Brown   t1320 = t253 * t1129;
2780*c4762a1bSJed Brown   t1328 = t253 * t30 * t19;
2781*c4762a1bSJed Brown   t1333 = t125 * t1161;
2782*c4762a1bSJed Brown   t1343 = ZB * t44 * t1129;
2783*c4762a1bSJed Brown   t1350 = -0.8e1 * t1176 * t1218 - 0.16e2 * t1311 * t1320 + 0.8e1 * t1176 * t1260 - 0.16e2 * t1119 * t1210 + 0.4e1 * t1311 * t1328 + 0.2e1 * t1311 * t1263 + 0.8e1 * t1176 * t1333 + 0.8e1 * t187 * ZB * t417 * t9 - 0.2e1 * t1138 * t1165 - 0.64e2 * t1128 * t1343 + 0.64e2 * t1134 * t1287 + 0.2e1 * t1138 * t1108;
2784*c4762a1bSJed Brown   t1369 = t1133 * t9 * ZA;
2785*c4762a1bSJed Brown   t1378 = t187 * ZA;
2786*c4762a1bSJed Brown   t1383 = t1170 * ZA;
2787*c4762a1bSJed Brown   t1388 = 0.2e1 * t1138 * t1297 - 0.8e1 * t1148 * t1192 + 0.2e1 * t1138 * t1292 - 0.16e2 * t1119 * t1251 + 0.8e1 * t1175 * xc * t110 * t1113 * t3 - 0.2e1 * t1112 * t1153 * t1113 + 0.128e3 * t1369 * t1130 + 0.16e2 * t1119 * t1333 + 0.4e1 * t1138 * t78 * ZA * ZB + 0.8e1 * t1378 * t78 * t9 * ZB - 0.64e2 * t1383 * t1343 + 0.64e2 * t1383 * t1130;
2788*c4762a1bSJed Brown   t1420 = 0.4e1 * t1138 * t119 * ZA - 0.128e3 * t1369 * t1343 - 0.4e1 * t187 * t1153 * t9 - 0.2e1 * t1138 * t1226 + 0.8e1 * t1296 * t1328 - 0.2e1 * t1112 * t1139 * t1113 - 0.8e1 * t1148 * t3 * t17 * t30 - 0.32e2 * t1296 * t1320 + 0.8e1 * t1176 * t1122 + 0.4e1 * t187 * t1292 * t9 + 0.8e1 * t1378 * t119 * t9 - 0.8e1 * t1103 * t1218;
2789*c4762a1bSJed Brown 
2790*c4762a1bSJed Brown   _PC4B = (-t424 * t508 + 0.8e1 * t412 * t750 - 0.2e1 * t232 * t595 - 0.4e1 * t126 * t323 + t1096 - t76 * t204 + t728 + 0.2e1 * t548 * t827 + 0.2e1 * t150 * t469 + t398 + 0.8e1 * t189 * t146 + t260 - 0.2e1 * t351 * t184 - 0.2e1 * t268 * t673 - 0.4e1 * t319 * t279 + t464 - 0.2e1 * t108 * t461 + 0.16e2 * t740 * t369 + 0.16e2 * t274 * t216 * t754 - 0.16e2 * t70 * t139 * t591 + 0.2e1 * t55 * t56 * t128 - 0.2e1 * t359 * t89 * t111 + 0.2e1 * t734 * t563 * t111 + 0.6e1 * t223 * t224 * t97 + 0.8e1 * t383 * t389 * t103 + 0.4e1 * t606 * ZA * t326 - 0.2e1 * t93 * t18 * t316 - 0.4e1 * t443 * t27 * t128 + 0.8e1 * t197 * t27 * t199 + 0.8e1 * t108 * t109 * t128 - t249 * t604 + 0.16e2 * t70 * t616 - 0.8e1 * t969 * t323 + t845 - t424 * t579 + 0.16e2 * t159 * t162 + t290 * t406 - 0.6e1 * t150 * t864 + t192 * t116 + 0.2e1 * t867 * t326 - 0.4e1 * t658 * t326 - 0.2e1 * t351 * t502 - t76 * t165 + t900 + 0.8e1 * t168 * t323 + t791 + 0.8e1 * t740 * t915 - 0.4e1 * t562 * t750 - 0.4e1 * t278 * t342 + 0.4e1 * t319 * t431 + 0.2e1 * t173 * t175 + t424 * t528 + 0.8e1 * t969 * t129 - 0.8e1 * t347 * t181 + t332 + t530 - 0.2e1 * t108 * t329 - 0.2e1 * t207 * t38 * t37 * t1 * ZA + t1001 + 0.4e1 * t408 * t379 + t76 * t448 + 0.2e1 * t102 * t184 + 0.2e1 * t426 * t329 + 0.16e2 * t740 * t98 - t282 * t127 - 0.16e2 * t1 * t44 * t69 * t552 * t116 + 0.2e1 * t168 * t169 + 0.2e1 * t28 * t134 - t290 * t604 - 0.16e2 * t484 * t485 - 0.8e1 * t740 * t480 + 0.2e1 * t173 * t601 - 0.2e1 * t335 * t336 + t600 + 0.2e1 * t62 * t864 + t952 + 0.8e1 * t347 * t134 - t192 * t355 + t192 * t194 + 0.2e1 * t228 * t461 + t663 + 0.4e1 * t383 * t27 * t417 * t16 + 0.4e1 * t138 * t20 * ZA * t10 - 0.4e1 * t20 * ZB * ZA * t326 + 0.4e1 * t196 * t88 * t77 * t744 - 0.16e2 * t67 * xc * t179 * t181 - 0.8e1 * t95 * t480 - t249 * t488 - t76 * t475 + t1055 - 0.4e1 * t408 * t22 - 0.10e2 * t28 * t379 + 0.2e1 * t335 * t974 + t153 - 0.8e1 * t95 * t1042 - 0.2e1 * t734 * t735) / (t1156 + t1201 + t1242 + t1282 + t1317 + t1350 + t1388 + t1420);
2791*c4762a1bSJed Brown   /****************************************************************************************/
2792*c4762a1bSJed Brown   /****************************************************************************************/
2793*c4762a1bSJed Brown 
2794*c4762a1bSJed Brown   if(x>xc) {
2795*c4762a1bSJed Brown     _PC1=_PC1B; _PC2=_PC2B; _PC3=_PC3B; _PC4=_PC4B; Z=ZB;
2796*c4762a1bSJed Brown   }
2797*c4762a1bSJed Brown   else {
2798*c4762a1bSJed Brown     _PC1=_PC1A; _PC2=_PC2A; _PC3=_PC3A; _PC4=_PC4A; Z=ZA;
2799*c4762a1bSJed Brown   }
2800*c4762a1bSJed Brown   /****************************************************************************************/
2801*c4762a1bSJed Brown   /****************************************************************************************/
2802*c4762a1bSJed Brown   t1 = nz * nz;
2803*c4762a1bSJed Brown   t2 = t1 * t1;
2804*c4762a1bSJed Brown   t3 = t2 * nz;
2805*c4762a1bSJed Brown   t4 = x * t3;
2806*c4762a1bSJed Brown   t5 = 0.3141592654e1 * 0.3141592654e1;
2807*c4762a1bSJed Brown   t6 = t5 * 0.3141592654e1;
2808*c4762a1bSJed Brown   t11 = _PC3 * t6;
2809*c4762a1bSJed Brown   t12 = x * nz;
2810*c4762a1bSJed Brown   t13 = nx * nx;
2811*c4762a1bSJed Brown   t14 = t13 * t13;
2812*c4762a1bSJed Brown   t15 = t12 * t14;
2813*c4762a1bSJed Brown   t19 = PetscExpReal(t12 * 0.3141592654e1);
2814*c4762a1bSJed Brown   t20 = t19 * t19;
2815*c4762a1bSJed Brown   t21 = t4 * t20;
2816*c4762a1bSJed Brown   t24 = _PC1 * t5;
2817*c4762a1bSJed Brown   t25 = Z * t20;
2818*c4762a1bSJed Brown   t29 = _PC1 * t6;
2819*c4762a1bSJed Brown   t30 = t29 * Z;
2820*c4762a1bSJed Brown   t31 = t1 * nz;
2821*c4762a1bSJed Brown   t32 = x * t31;
2822*c4762a1bSJed Brown   t33 = t32 * t13;
2823*c4762a1bSJed Brown   t36 = t11 * x;
2824*c4762a1bSJed Brown   t41 = nz * t20;
2825*c4762a1bSJed Brown   t45 = t6 * _PC4;
2826*c4762a1bSJed Brown   t49 = t20 * t1;
2827*c4762a1bSJed Brown   t51 = _PC2 * Z;
2828*c4762a1bSJed Brown   t55 = -0.2e1 * t4 * t6 * _PC2 * Z - 0.2e1 * t11 * t15 - 0.2e1 * t11 * t21 + 0.2e1 * t24 * t25 * t14 - t13 + 0.4e1 * t30 * t33 - 0.4e1 * t36 * t31 * t20 * t13 - 0.2e1 * t36 * t41 * t14 - 0.2e1 * t4 * t45 * t20 - t49 - 0.2e1 * t4 * t6 * t51 * t20;
2829*c4762a1bSJed Brown   t58 = t32 * t6;
2830*c4762a1bSJed Brown   t59 = _PC4 * t20;
2831*c4762a1bSJed Brown   t63 = t20 * t13;
2832*c4762a1bSJed Brown   t67 = t12 * t6;
2833*c4762a1bSJed Brown   t68 = t20 * t14;
2834*c4762a1bSJed Brown   t87 = t49 * t13;
2835*c4762a1bSJed Brown   t90 = -0.4e1 * t11 * t33 - 0.4e1 * t58 * t59 * t13 - 0.4e1 * t58 * t51 * t63 - 0.2e1 * t67 * t51 * t68 + 0.4e1 * t32 * t45 * t13 - 0.2e1 * t67 * t59 * t14 - 0.2e1 * t30 * t21 + t1 + 0.2e1 * t24 * t25 * t2 + 0.2e1 * t12 * t45 * t14 + 0.4e1 * t24 * Z * t87;
2836*c4762a1bSJed Brown   t106 = _PC3 * t5;
2837*c4762a1bSJed Brown   t120 = -0.4e1 * t30 * t32 * t63 + t63 + 0.4e1 * t24 * Z * t1 * t13 + 0.2e1 * t29 * Z * x * t3 - 0.4e1 * t58 * t51 * t13 - 0.2e1 * t106 * t2 + t32 * 0.3141592654e1 - 0.2e1 * t106 * t14 - 0.2e1 * t30 * t12 * t68 - 0.2e1 * t67 * t51 * t14 + 0.4e1 * t106 * t87;
2838*c4762a1bSJed Brown   t129 = PetscSinReal(nx * 0.3141592654e1 * x);
2839*c4762a1bSJed Brown   t155 = 0.2e1 * t30 * t15 + x * 0.3141592654e1 * t41 * t13 - 0.4e1 * t19 * nx * t129 * nz + t32 * 0.3141592654e1 * t20 + 0.2e1 * t106 * t68 + 0.2e1 * t106 * t20 * t2 - 0.4e1 * t106 * t1 * t13 - 0.2e1 * t11 * t4 + 0.2e1 * t4 * t45 + 0.2e1 * t24 * Z * t2 + 0.2e1 * t24 * Z * t14 + t12 * 0.3141592654e1 * t13;
2840*c4762a1bSJed Brown   t158 = t5 * Z;
2841*c4762a1bSJed Brown 
2842*c4762a1bSJed Brown   u1 = (t55 + t90 + t120 + t155) / (0.4e1 * t158 * t19 * t2 + 0.8e1 * t158 * t19 * t1 * t13 + 0.4e1 * t158 * t19 * t14);
2843*c4762a1bSJed Brown   /****************************************************************************************/
2844*c4762a1bSJed Brown   /****************************************************************************************/
2845*c4762a1bSJed Brown   t1 = nz * nz;
2846*c4762a1bSJed Brown   t2 = t1 * nz;
2847*c4762a1bSJed Brown   t3 = x * t2;
2848*c4762a1bSJed Brown   t4 = 0.3141592654e1 * 0.3141592654e1;
2849*c4762a1bSJed Brown   t5 = t4 * 0.3141592654e1;
2850*c4762a1bSJed Brown   t6 = t3 * t5;
2851*c4762a1bSJed Brown   t7 = _PC2 * Z;
2852*c4762a1bSJed Brown   t8 = nx * nx;
2853*c4762a1bSJed Brown   t12 = t1 * t1;
2854*c4762a1bSJed Brown   t13 = t12 * nz;
2855*c4762a1bSJed Brown   t14 = x * t13;
2856*c4762a1bSJed Brown   t15 = t5 * _PC4;
2857*c4762a1bSJed Brown   t16 = x * nz;
2858*c4762a1bSJed Brown   t18 = PetscExpReal(t16 * 0.3141592654e1);
2859*c4762a1bSJed Brown   t19 = t18 * t18;
2860*c4762a1bSJed Brown   t23 = t16 * t5;
2861*c4762a1bSJed Brown   t24 = t8 * t8;
2862*c4762a1bSJed Brown   t28 = _PC3 * t5;
2863*c4762a1bSJed Brown   t29 = t14 * t19;
2864*c4762a1bSJed Brown   t32 = _PC1 * t5;
2865*c4762a1bSJed Brown   t33 = t32 * Z;
2866*c4762a1bSJed Brown   t34 = t16 * t24;
2867*c4762a1bSJed Brown   t37 = _PC4 * t19;
2868*c4762a1bSJed Brown   t45 = _PC2 * t4;
2869*c4762a1bSJed Brown   t53 = t19 * t8;
2870*c4762a1bSJed Brown   t58 = _PC4 * t4;
2871*c4762a1bSJed Brown   t60 = t1 * t19 * t8;
2872*c4762a1bSJed Brown   t63 = t19 * t24;
2873*c4762a1bSJed Brown   t67 = t3 * t8;
2874*c4762a1bSJed Brown   t73 = nz * t19;
2875*c4762a1bSJed Brown   t86 = t28 * x;
2876*c4762a1bSJed Brown   t91 = 0.4e1 * t58 * t60 + 0.2e1 * t33 * t16 * t63 + 0.4e1 * t33 * t67 + 0.2e1 * t33 * t29 - x * 0.3141592654e1 * t73 * t8 - 0.2e1 * t53 + 0.2e1 * t32 * Z * x * t13 - 0.2e1 * t58 * t12 - 0.2e1 * t58 * t24 + t3 * 0.3141592654e1 + 0.4e1 * t86 * t2 * t19 * t8;
2877*c4762a1bSJed Brown   t94 = Z * t12;
2878*c4762a1bSJed Brown   t121 = -0.2e1 * t8 + 0.2e1 * t45 * t94 * t19 + 0.2e1 * t14 * t5 * t7 * t19 + 0.4e1 * t6 * t7 * t53 + 0.2e1 * t23 * t7 * t63 - 0.4e1 * t28 * t67 + 0.2e1 * t45 * t94 + 0.2e1 * t58 * t12 * t19 + t16 * 0.3141592654e1 * t8 + 0.2e1 * t14 * t15 - 0.2e1 * t28 * t14;
2879*c4762a1bSJed Brown   t146 = PetscCosReal(nx * 0.3141592654e1 * x);
2880*c4762a1bSJed Brown   t156 = -t3 * 0.3141592654e1 * t19 + 0.2e1 * t58 * t63 - 0.4e1 * t58 * t1 * t8 + 0.4e1 * t45 * Z * t1 * t8 - 0.2e1 * t28 * t34 + 0.2e1 * t86 * t73 * t24 + 0.4e1 * t3 * t15 * t8 + 0.4e1 * t45 * Z * t60 + 0.4e1 * t18 * t146 * t8 + 0.2e1 * t45 * Z * t24 + 0.2e1 * t16 * t15 * t24;
2881*c4762a1bSJed Brown   t159 = t4 * Z;
2882*c4762a1bSJed Brown 
2883*c4762a1bSJed Brown   u2 = (-0.4e1 * t6 * t7 * t8 + 0.2e1 * t14 * t15 * t19 - 0.2e1 * t23 * t7 * t24 + 0.2e1 * t28 * t29 + 0.2e1 * t33 * t34 + 0.4e1 * t6 * t37 * t8 - 0.2e1 * t14 * t5 * _PC2 * Z + 0.2e1 * t45 * Z * t19 * t24 + 0.2e1 * t23 * t37 * t24 + 0.4e1 * t33 * t3 * t53 + t91 + t121 + t156) / (0.4e1 * t159 * t18 * t12 + 0.8e1 * t159 * t18 * t1 * t8 + 0.4e1 * t159 * t18 * t24);
2884*c4762a1bSJed Brown   /****************************************************************************************/
2885*c4762a1bSJed Brown   /****************************************************************************************/
2886*c4762a1bSJed Brown   t1 = 0.3141592654e1 * 0.3141592654e1;
2887*c4762a1bSJed Brown   t2 = t1 * 0.3141592654e1;
2888*c4762a1bSJed Brown   t3 = _PC1 * t2;
2889*c4762a1bSJed Brown   t4 = t3 * Z;
2890*c4762a1bSJed Brown   t5 = nz * nz;
2891*c4762a1bSJed Brown   t6 = t5 * t5;
2892*c4762a1bSJed Brown   t7 = t6 * nz;
2893*c4762a1bSJed Brown   t8 = x * t7;
2894*c4762a1bSJed Brown   t9 = x * nz;
2895*c4762a1bSJed Brown   t11 = PetscExpReal(t9 * 0.3141592654e1);
2896*c4762a1bSJed Brown   t12 = t11 * t11;
2897*c4762a1bSJed Brown   t13 = t8 * t12;
2898*c4762a1bSJed Brown   t16 = t5 * nz;
2899*c4762a1bSJed Brown   t17 = x * t16;
2900*c4762a1bSJed Brown   t18 = t17 * t2;
2901*c4762a1bSJed Brown   t19 = _PC4 * t12;
2902*c4762a1bSJed Brown   t20 = nx * nx;
2903*c4762a1bSJed Brown   t24 = t2 * _PC4;
2904*c4762a1bSJed Brown   t28 = _PC3 * t2;
2905*c4762a1bSJed Brown   t29 = t28 * x;
2906*c4762a1bSJed Brown   t30 = t12 * nz;
2907*c4762a1bSJed Brown   t31 = t20 * t20;
2908*c4762a1bSJed Brown   t40 = _PC2 * Z;
2909*c4762a1bSJed Brown   t44 = t9 * t2;
2910*c4762a1bSJed Brown   t48 = t12 * t20;
2911*c4762a1bSJed Brown   t52 = t17 * t20;
2912*c4762a1bSJed Brown   t57 = -0.2e1 * t4 * t13 - 0.4e1 * t18 * t19 * t20 - 0.2e1 * t8 * t24 * t12 - 0.2e1 * t29 * t30 * t31 + 0.2e1 * t8 * t2 * _PC2 * Z - 0.2e1 * t8 * t2 * t40 * t12 - 0.2e1 * t44 * t19 * t31 - 0.4e1 * t18 * t40 * t48 + t20 + 0.4e1 * t28 * t52 + t17 * 0.3141592654e1 * t12;
2913*c4762a1bSJed Brown   t58 = t9 * t31;
2914*c4762a1bSJed Brown   t61 = _PC3 * t1;
2915*c4762a1bSJed Brown   t62 = t12 * t31;
2916*c4762a1bSJed Brown   t73 = t5 * t20;
2917*c4762a1bSJed Brown   t78 = _PC1 * t1;
2918*c4762a1bSJed Brown   t90 = Z * t12;
2919*c4762a1bSJed Brown   t94 = 0.2e1 * t28 * t58 + 0.2e1 * t61 * t62 + 0.2e1 * t61 * t12 * t6 - 0.4e1 * t4 * t17 * t48 + 0.2e1 * t28 * t8 + 0.4e1 * t61 * t73 - 0.2e1 * t8 * t24 - 0.2e1 * t78 * Z * t6 - 0.2e1 * t44 * t40 * t62 - 0.2e1 * t78 * Z * t31 - t9 * 0.3141592654e1 * t20 + 0.2e1 * t78 * t90 * t6;
2920*c4762a1bSJed Brown   t101 = PetscCosReal(nx * 0.3141592654e1 * x);
2921*c4762a1bSJed Brown   t102 = t11 * t101;
2922*c4762a1bSJed Brown   t109 = t12 * t5;
2923*c4762a1bSJed Brown   t110 = t109 * t20;
2924*c4762a1bSJed Brown   t128 = 0.2e1 * t61 * t6 - t17 * 0.3141592654e1 + 0.2e1 * t102 * t5 - 0.4e1 * t17 * t24 * t20 + 0.4e1 * t78 * Z * t110 - 0.2e1 * t9 * t24 * t31 - 0.4e1 * t4 * t52 - 0.2e1 * t4 * t9 * t62 + x * 0.3141592654e1 * t30 * t20 - t5 - 0.4e1 * t78 * Z * t5 * t20;
2925*c4762a1bSJed Brown   t156 = 0.2e1 * t78 * t90 * t31 - 0.2e1 * t3 * Z * x * t7 + t48 + 0.4e1 * t61 * t110 + 0.4e1 * t18 * t40 * t20 - 0.2e1 * t102 * t20 + 0.2e1 * t61 * t31 + 0.2e1 * t44 * t40 * t31 - t109 - 0.2e1 * t4 * t58 - 0.2e1 * t28 * t13 - 0.4e1 * t29 * t16 * t12 * t20;
2926*c4762a1bSJed Brown   t159 = t1 * t11;
2927*c4762a1bSJed Brown 
2928*c4762a1bSJed Brown   u3 = (t57 + t94 + t128 + t156) / (0.4e1 * t159 * t6 + 0.8e1 * t159 * t73 + 0.4e1 * t159 * t31);
2929*c4762a1bSJed Brown   /****************************************************************************************/
2930*c4762a1bSJed Brown   /****************************************************************************************/
2931*c4762a1bSJed Brown   t1 = _PC2 * Z;
2932*c4762a1bSJed Brown   t2 = 0.3141592654e1 * 0.3141592654e1;
2933*c4762a1bSJed Brown   t3 = t2 * 0.3141592654e1;
2934*c4762a1bSJed Brown   t4 = nz * nz;
2935*c4762a1bSJed Brown   t5 = t4 * t4;
2936*c4762a1bSJed Brown   t6 = t5 * t4;
2937*c4762a1bSJed Brown   t8 = t3 * t6 * x;
2938*c4762a1bSJed Brown   t11 = x * t4;
2939*c4762a1bSJed Brown   t12 = t11 * t3;
2940*c4762a1bSJed Brown   t15 = PetscExpReal(x * nz * 0.3141592654e1);
2941*c4762a1bSJed Brown   t16 = t15 * t15;
2942*c4762a1bSJed Brown   t17 = _PC3 * t16;
2943*c4762a1bSJed Brown   t18 = nx * nx;
2944*c4762a1bSJed Brown   t19 = t18 * t18;
2945*c4762a1bSJed Brown   t23 = t5 * nz;
2946*c4762a1bSJed Brown   t24 = t2 * t23;
2947*c4762a1bSJed Brown   t28 = t1 * t3;
2948*c4762a1bSJed Brown   t29 = t6 * x;
2949*c4762a1bSJed Brown   t30 = t29 * t16;
2950*c4762a1bSJed Brown   t33 = _PC4 * t3;
2951*c4762a1bSJed Brown   t34 = t5 * x;
2952*c4762a1bSJed Brown   t35 = t34 * t18;
2953*c4762a1bSJed Brown   t41 = PetscSinReal(nx * 0.3141592654e1 * x);
2954*c4762a1bSJed Brown   t47 = t11 * t19;
2955*c4762a1bSJed Brown   t54 = t3 * _PC3;
2956*c4762a1bSJed Brown   t57 = 0.2e1 * t1 * t8 + 0.2e1 * t12 * t17 * t19 + 0.2e1 * t1 * t24 * t16 + 0.2e1 * t28 * t30 - 0.4e1 * t33 * t35 + 0.2e1 * t15 * nx * t41 * t4 + 0.4e1 * t28 * t35 - 0.2e1 * t33 * t47 - 0.2e1 * t1 * t24 - 0.2e1 * t33 * t29 + 0.2e1 * t29 * t54;
2957*c4762a1bSJed Brown   t58 = 0.3141592654e1 * t16;
2958*c4762a1bSJed Brown   t60 = t2 * _PC4;
2959*c4762a1bSJed Brown   t69 = t4 * nz;
2960*c4762a1bSJed Brown   t73 = t1 * t2;
2961*c4762a1bSJed Brown   t75 = t69 * t16 * t18;
2962*c4762a1bSJed Brown   t79 = x * t16;
2963*c4762a1bSJed Brown   t83 = nz * t16;
2964*c4762a1bSJed Brown   t84 = t83 * t19;
2965*c4762a1bSJed Brown   t95 = -t34 * t58 + 0.2e1 * t60 * t23 * t16 + 0.2e1 * t60 * nz * t19 - t11 * 0.3141592654e1 * t18 + 0.4e1 * t60 * t69 * t18 + 0.4e1 * t73 * t75 + 0.4e1 * t33 * t5 * t79 * t18 + 0.2e1 * t73 * t84 + 0.2e1 * t60 * t84 + 0.2e1 * t33 * t4 * t79 * t19 + 0.4e1 * t60 * t75;
2966*c4762a1bSJed Brown   t97 = t34 * t3;
2967*c4762a1bSJed Brown   t101 = Z * _PC1;
2968*c4762a1bSJed Brown   t102 = t16 * t19;
2969*c4762a1bSJed Brown   t106 = t16 * t18;
2970*c4762a1bSJed Brown   t127 = t2 * t69;
2971*c4762a1bSJed Brown   t131 = t2 * nz;
2972*c4762a1bSJed Brown   t135 = 0.4e1 * t97 * t17 * t18 + 0.2e1 * t12 * t101 * t102 + 0.4e1 * t28 * t34 * t106 + 0.2e1 * t28 * t11 * t102 - 0.2e1 * t29 * t3 * Z * _PC1 - 0.4e1 * t97 * t101 * t18 - 0.2e1 * t12 * t101 * t19 + 0.2e1 * t60 * t23 - 0.2e1 * t83 * t18 - 0.4e1 * t1 * t127 * t18 - 0.2e1 * t1 * t131 * t19;
2973*c4762a1bSJed Brown   t164 = 0.2e1 * t28 * t47 + 0.2e1 * t11 * t54 * t19 + 0.2e1 * t8 * t101 * t16 + 0.2e1 * t33 * t30 - t11 * t58 * t18 + 0.2e1 * t29 * t54 * t16 + 0.4e1 * t34 * t54 * t18 + 0.4e1 * t97 * t101 * t106 - 0.2e1 * t15 * t18 * nx * t41 - t34 * 0.3141592654e1 + 0.2e1 * nz * t18;
2974*c4762a1bSJed Brown 
2975*c4762a1bSJed Brown   u4 = (t57 + t95 + t135 + t164) / (0.4e1 * t24 * t15 + 0.8e1 * t127 * t15 * t18 + 0.4e1 * t131 * t15 * t19);
2976*c4762a1bSJed Brown 
2977*c4762a1bSJed Brown 
2978*c4762a1bSJed Brown   /****************************************************************************************/
2979*c4762a1bSJed Brown   /****************************************************************************************/
2980*c4762a1bSJed Brown 
2981*c4762a1bSJed Brown 
2982*c4762a1bSJed Brown   u5 = (PetscReal)(-2*Z*nz*PETSC_PI*u2-u3*2*nz*PETSC_PI)*PetscCosReal(nz*PETSC_PI*z); /* pressure */
2983*c4762a1bSJed Brown 
2984*c4762a1bSJed Brown   u6 = (PetscReal)(u3*2*nz*PETSC_PI + 4*Z*nz*PETSC_PI*u2)*PetscCosReal(nz*PETSC_PI*z); /* zz stress */
2985*c4762a1bSJed Brown   sum5 +=u5;
2986*c4762a1bSJed Brown   sum6 +=u6;
2987*c4762a1bSJed Brown 
2988*c4762a1bSJed Brown   u1 *= PetscCosReal(nz*PETSC_PI*z); /* x velocity */
2989*c4762a1bSJed Brown   sum1 += u1;
2990*c4762a1bSJed Brown   u2 *= PetscSinReal(nz*PETSC_PI*z); /* z velocity */
2991*c4762a1bSJed Brown   sum2 += u2;
2992*c4762a1bSJed Brown   u3 *= 2*nz*PETSC_PI*PetscCosReal(nz*PETSC_PI*z); /* xx stress */
2993*c4762a1bSJed Brown   sum3 += u3;
2994*c4762a1bSJed Brown   u4 *= 2*nz*PETSC_PI*PetscSinReal(nz*PETSC_PI*z); /* zx stress */
2995*c4762a1bSJed Brown   sum4 += u4;
2996*c4762a1bSJed Brown 
2997*c4762a1bSJed Brown   /* Output */
2998*c4762a1bSJed Brown   if (mu) {
2999*c4762a1bSJed Brown     *mu = Z;
3000*c4762a1bSJed Brown   }
3001*c4762a1bSJed Brown   if (vel) {
3002*c4762a1bSJed Brown     vel[0] = sum1;
3003*c4762a1bSJed Brown     vel[1] = sum2;
3004*c4762a1bSJed Brown   }
3005*c4762a1bSJed Brown   if (p) {
3006*c4762a1bSJed Brown     (*p) = sum5;
3007*c4762a1bSJed Brown   }
3008*c4762a1bSJed Brown   if (s) {
3009*c4762a1bSJed Brown     s[0] = sum3;
3010*c4762a1bSJed Brown     s[1] = sum4;
3011*c4762a1bSJed Brown     s[2] = sum6;
3012*c4762a1bSJed Brown   }
3013*c4762a1bSJed Brown   if (gamma) {
3014*c4762a1bSJed Brown     /* sigma = tau - p, tau = sigma + p, tau[] = 2*eta*gamma[] */
3015*c4762a1bSJed Brown     gamma[0] = (sum3+sum5)/(2.0*Z);
3016*c4762a1bSJed Brown     gamma[1] = (sum4)/(2.0*Z);
3017*c4762a1bSJed Brown     gamma[2] = (sum6+sum5)/(2.0*Z);
3018*c4762a1bSJed Brown   }
3019*c4762a1bSJed Brown   PetscFunctionReturn(0);
3020*c4762a1bSJed Brown }
3021*c4762a1bSJed Brown 
3022*c4762a1bSJed Brown static PetscErrorCode SolCxSolutionVelocity(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar v[], void *ctx)
3023*c4762a1bSJed Brown {
3024*c4762a1bSJed Brown   Parameter     *s = (Parameter *) ctx;
3025*c4762a1bSJed Brown   PetscErrorCode ierr;
3026*c4762a1bSJed Brown 
3027*c4762a1bSJed Brown   PetscFunctionBegin;
3028*c4762a1bSJed Brown   ierr = SolCxSolution(x, s->m, s->n, s->xc, s->etaA, s->etaB, v, NULL, NULL, NULL, NULL);CHKERRQ(ierr);
3029*c4762a1bSJed Brown   PetscFunctionReturn(0);
3030*c4762a1bSJed Brown }
3031*c4762a1bSJed Brown 
3032*c4762a1bSJed Brown static PetscErrorCode SolCxSolutionPressure(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar p[], void *ctx)
3033*c4762a1bSJed Brown {
3034*c4762a1bSJed Brown   Parameter     *s = (Parameter *) ctx;
3035*c4762a1bSJed Brown   PetscErrorCode ierr;
3036*c4762a1bSJed Brown 
3037*c4762a1bSJed Brown   PetscFunctionBegin;
3038*c4762a1bSJed Brown   ierr = SolCxSolution(x, s->m, s->n, s->xc, s->etaA, s->etaB, NULL, p, NULL, NULL, NULL);CHKERRQ(ierr);
3039*c4762a1bSJed Brown   PetscFunctionReturn(0);
3040*c4762a1bSJed Brown }
3041*c4762a1bSJed Brown 
3042*c4762a1bSJed Brown static PetscErrorCode ProcessOptions(MPI_Comm comm, AppCtx *options)
3043*c4762a1bSJed Brown {
3044*c4762a1bSJed Brown   PetscInt       sol;
3045*c4762a1bSJed Brown   PetscErrorCode ierr;
3046*c4762a1bSJed Brown 
3047*c4762a1bSJed Brown   PetscFunctionBeginUser;
3048*c4762a1bSJed Brown   options->debug           = 0;
3049*c4762a1bSJed Brown   options->dim             = 2;
3050*c4762a1bSJed Brown   options->serRef          = 0;
3051*c4762a1bSJed Brown   options->simplex         = PETSC_TRUE;
3052*c4762a1bSJed Brown   options->showSolution    = PETSC_FALSE;
3053*c4762a1bSJed Brown   options->showError       = PETSC_FALSE;
3054*c4762a1bSJed Brown   options->solType         = SOLKX;
3055*c4762a1bSJed Brown 
3056*c4762a1bSJed Brown   ierr = PetscOptionsBegin(comm, "", "Variable-Viscosity Stokes Problem Options", "DMPLEX");CHKERRQ(ierr);
3057*c4762a1bSJed Brown   ierr = PetscOptionsInt("-debug", "The debugging level", "ex69.c", options->debug, &options->debug, NULL);CHKERRQ(ierr);
3058*c4762a1bSJed Brown   ierr = PetscOptionsInt("-dim", "The topological mesh dimension", "ex69.c", options->dim, &options->dim, NULL);CHKERRQ(ierr);
3059*c4762a1bSJed Brown   ierr = PetscOptionsBool("-simplex", "Use simplices or tensor product cells", "ex69.c", options->simplex, &options->simplex, NULL);CHKERRQ(ierr);
3060*c4762a1bSJed Brown   ierr = PetscOptionsInt("-serial_refinements", "Number of serial uniform refinements steps", "ex69.c", options->serRef, &options->serRef, NULL);CHKERRQ(ierr);
3061*c4762a1bSJed Brown   ierr = PetscOptionsBool("-show_solution", "Output the solution for verification", "ex69.c", options->showSolution, &options->showSolution, NULL);CHKERRQ(ierr);
3062*c4762a1bSJed Brown   ierr = PetscOptionsBool("-show_error", "Output the error for verification", "ex69.c", options->showError, &options->showError, NULL);CHKERRQ(ierr);
3063*c4762a1bSJed Brown   sol  = options->solType;
3064*c4762a1bSJed Brown   ierr = PetscOptionsEList("-sol_type", "Type of exact solution", "ex69.c", solTypes, NUM_SOL_TYPES, solTypes[options->solType], &sol, NULL);CHKERRQ(ierr);
3065*c4762a1bSJed Brown   options->solType = (SolutionType) sol;
3066*c4762a1bSJed Brown   ierr = PetscOptionsEnd();
3067*c4762a1bSJed Brown   PetscFunctionReturn(0);
3068*c4762a1bSJed Brown }
3069*c4762a1bSJed Brown 
3070*c4762a1bSJed Brown static PetscErrorCode SetUpParameters(AppCtx *user)
3071*c4762a1bSJed Brown {
3072*c4762a1bSJed Brown   PetscBag       bag;
3073*c4762a1bSJed Brown   Parameter     *p;
3074*c4762a1bSJed Brown   PetscErrorCode ierr;
3075*c4762a1bSJed Brown 
3076*c4762a1bSJed Brown   PetscFunctionBeginUser;
3077*c4762a1bSJed Brown   /* setup PETSc parameter bag */
3078*c4762a1bSJed Brown   ierr = PetscBagGetData(user->bag, (void **) &p);CHKERRQ(ierr);
3079*c4762a1bSJed Brown   ierr = PetscBagSetName(user->bag, "par", "Problem parameters");CHKERRQ(ierr);
3080*c4762a1bSJed Brown   bag  = user->bag;
3081*c4762a1bSJed Brown   switch (user->solType) {
3082*c4762a1bSJed Brown   case SOLKX:
3083*c4762a1bSJed Brown     ierr = PetscBagRegisterInt(bag,  &p->n, 1,   "n", "x-wavelength for forcing variation");CHKERRQ(ierr);
3084*c4762a1bSJed Brown     ierr = PetscBagRegisterInt(bag,  &p->m, 1,   "m", "z-wavelength for forcing variation");CHKERRQ(ierr);
3085*c4762a1bSJed Brown     ierr = PetscBagRegisterReal(bag, &p->B, 1.0, "B", "Exponential scale for viscosity variation");CHKERRQ(ierr);
3086*c4762a1bSJed Brown     break;
3087*c4762a1bSJed Brown   case SOLCX:
3088*c4762a1bSJed Brown     ierr = PetscBagRegisterInt(bag,  &p->n,    1,   "n",    "x-wavelength for forcing variation");CHKERRQ(ierr);
3089*c4762a1bSJed Brown     ierr = PetscBagRegisterInt(bag,  &p->m,    1,   "m",    "z-wavelength for forcing variation");CHKERRQ(ierr);
3090*c4762a1bSJed Brown     ierr = PetscBagRegisterReal(bag, &p->etaA, 1.0, "etaA", "Viscosity for x < xc");CHKERRQ(ierr);
3091*c4762a1bSJed Brown     ierr = PetscBagRegisterReal(bag, &p->etaB, 1.0, "etaB", "Viscosity for x > xc");CHKERRQ(ierr);
3092*c4762a1bSJed Brown     ierr = PetscBagRegisterReal(bag, &p->xc,   0.5, "xc",   "x-coordinate of the viscosity jump");CHKERRQ(ierr);
3093*c4762a1bSJed Brown     break;
3094*c4762a1bSJed Brown   default:
3095*c4762a1bSJed Brown     SETERRQ2(PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "Invalid solution type %d (%s)", (PetscInt) user->solType, solTypes[PetscMin(user->solType, NUM_SOL_TYPES)]);
3096*c4762a1bSJed Brown   }
3097*c4762a1bSJed Brown   PetscFunctionReturn(0);
3098*c4762a1bSJed Brown }
3099*c4762a1bSJed Brown 
3100*c4762a1bSJed Brown static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *user, DM *dm)
3101*c4762a1bSJed Brown {
3102*c4762a1bSJed Brown   DM               dmDist = NULL;
3103*c4762a1bSJed Brown   PetscPartitioner part;
3104*c4762a1bSJed Brown   PetscInt         dim    = user->dim;
3105*c4762a1bSJed Brown   PetscInt         cells[3];
3106*c4762a1bSJed Brown   PetscErrorCode   ierr;
3107*c4762a1bSJed Brown 
3108*c4762a1bSJed Brown   PetscFunctionBeginUser;
3109*c4762a1bSJed Brown   if (dim > 3) SETERRQ1(comm,PETSC_ERR_ARG_OUTOFRANGE,"dim %D is too big, must be <= 3",dim);
3110*c4762a1bSJed Brown   cells[0] = cells[1] = cells[2] = user->simplex ? dim : 3;
3111*c4762a1bSJed Brown   ierr = DMPlexCreateBoxMesh(comm, dim, user->simplex, cells, NULL, NULL, NULL, PETSC_TRUE, dm);CHKERRQ(ierr);
3112*c4762a1bSJed Brown   /* Make split labels so that we can have corners in multiple labels */
3113*c4762a1bSJed Brown   {
3114*c4762a1bSJed Brown     const char *names[4] = {"markerBottom", "markerRight", "markerTop", "markerLeft"};
3115*c4762a1bSJed Brown     PetscInt    ids[4]   = {1, 2, 3, 4};
3116*c4762a1bSJed Brown     DMLabel     label;
3117*c4762a1bSJed Brown     IS          is;
3118*c4762a1bSJed Brown     PetscInt    f;
3119*c4762a1bSJed Brown 
3120*c4762a1bSJed Brown     for (f = 0; f < 4; ++f) {
3121*c4762a1bSJed Brown       ierr = DMGetStratumIS(*dm, "marker", ids[f],  &is);CHKERRQ(ierr);
3122*c4762a1bSJed Brown       if (!is) continue;
3123*c4762a1bSJed Brown       ierr = DMCreateLabel(*dm, names[f]);CHKERRQ(ierr);
3124*c4762a1bSJed Brown       ierr = DMGetLabel(*dm, names[f], &label);CHKERRQ(ierr);
3125*c4762a1bSJed Brown       if (is) {
3126*c4762a1bSJed Brown         ierr = DMLabelInsertIS(label, is, 1);CHKERRQ(ierr);
3127*c4762a1bSJed Brown       }
3128*c4762a1bSJed Brown       ierr = ISDestroy(&is);CHKERRQ(ierr);
3129*c4762a1bSJed Brown     }
3130*c4762a1bSJed Brown   }
3131*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject)(*dm),"Mesh");CHKERRQ(ierr);
3132*c4762a1bSJed Brown   {
3133*c4762a1bSJed Brown     PetscInt r;
3134*c4762a1bSJed Brown 
3135*c4762a1bSJed Brown     for (r = 0; r < user->serRef; ++r) {
3136*c4762a1bSJed Brown       DM dmRefined;
3137*c4762a1bSJed Brown 
3138*c4762a1bSJed Brown       ierr = DMPlexSetRefinementUniform(*dm, PETSC_TRUE);CHKERRQ(ierr);
3139*c4762a1bSJed Brown       ierr = DMRefine(*dm, PetscObjectComm((PetscObject)*dm), &dmRefined);CHKERRQ(ierr);
3140*c4762a1bSJed Brown       if (dmRefined) {
3141*c4762a1bSJed Brown         ierr = DMDestroy(dm);CHKERRQ(ierr);
3142*c4762a1bSJed Brown         *dm  = dmRefined;
3143*c4762a1bSJed Brown       }
3144*c4762a1bSJed Brown     }
3145*c4762a1bSJed Brown   }
3146*c4762a1bSJed Brown   /* Distribute mesh over processes */
3147*c4762a1bSJed Brown   ierr = DMPlexGetPartitioner(*dm, &part);CHKERRQ(ierr);
3148*c4762a1bSJed Brown   ierr = PetscPartitionerSetFromOptions(part);CHKERRQ(ierr);
3149*c4762a1bSJed Brown   ierr = DMPlexDistribute(*dm, 0, NULL, &dmDist);CHKERRQ(ierr);
3150*c4762a1bSJed Brown   if (dmDist) {
3151*c4762a1bSJed Brown     ierr = PetscObjectSetName((PetscObject)dmDist,"Distributed Mesh");CHKERRQ(ierr);
3152*c4762a1bSJed Brown     ierr = DMDestroy(dm);CHKERRQ(ierr);
3153*c4762a1bSJed Brown     *dm  = dmDist;
3154*c4762a1bSJed Brown   }
3155*c4762a1bSJed Brown   ierr = DMSetFromOptions(*dm);CHKERRQ(ierr);
3156*c4762a1bSJed Brown   ierr = DMViewFromOptions(*dm, NULL, "-dm_view");CHKERRQ(ierr);
3157*c4762a1bSJed Brown   PetscFunctionReturn(0);
3158*c4762a1bSJed Brown }
3159*c4762a1bSJed Brown 
3160*c4762a1bSJed Brown static PetscErrorCode SetupProblem(DM dm, AppCtx *user)
3161*c4762a1bSJed Brown {
3162*c4762a1bSJed Brown   PetscDS        prob;
3163*c4762a1bSJed Brown   const PetscInt id  = 1;
3164*c4762a1bSJed Brown   PetscInt       comp;
3165*c4762a1bSJed Brown   Parameter      *ctx;
3166*c4762a1bSJed Brown   PetscErrorCode ierr;
3167*c4762a1bSJed Brown 
3168*c4762a1bSJed Brown   PetscFunctionBeginUser;
3169*c4762a1bSJed Brown   ierr = DMGetDS(dm, &prob);CHKERRQ(ierr);
3170*c4762a1bSJed Brown   switch (user->solType) {
3171*c4762a1bSJed Brown   case SOLKX:
3172*c4762a1bSJed Brown     ierr = PetscDSSetResidual(prob, 0, f0_u, stokes_momentum_kx);CHKERRQ(ierr);
3173*c4762a1bSJed Brown     ierr = PetscDSSetResidual(prob, 1, stokes_mass, f1_zero);CHKERRQ(ierr);
3174*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 0, 0, NULL, NULL,  NULL,  stokes_momentum_vel_J_kx);CHKERRQ(ierr);
3175*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 0, 1, NULL, NULL,  stokes_momentum_pres_J, NULL);CHKERRQ(ierr);
3176*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 1, 0, NULL, stokes_mass_J, NULL,  NULL);CHKERRQ(ierr);
3177*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 0, 0, NULL, NULL, NULL, stokes_momentum_vel_J_kx);CHKERRQ(ierr);
3178*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 0, 1, NULL, NULL, stokes_momentum_pres_J, NULL);CHKERRQ(ierr);
3179*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 1, 0, NULL, stokes_mass_J, NULL, NULL);CHKERRQ(ierr);
3180*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 1, 1, stokes_identity_J_kx, NULL, NULL, NULL);CHKERRQ(ierr);
3181*c4762a1bSJed Brown     break;
3182*c4762a1bSJed Brown   case SOLCX:
3183*c4762a1bSJed Brown     ierr = PetscDSSetResidual(prob, 0, f0_u, stokes_momentum_cx);CHKERRQ(ierr);
3184*c4762a1bSJed Brown     ierr = PetscDSSetResidual(prob, 1, stokes_mass, f1_zero);CHKERRQ(ierr);
3185*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 0, 0, NULL, NULL,  NULL,  stokes_momentum_vel_J_cx);CHKERRQ(ierr);
3186*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 0, 1, NULL, NULL,  stokes_momentum_pres_J, NULL);CHKERRQ(ierr);
3187*c4762a1bSJed Brown     ierr = PetscDSSetJacobian(prob, 1, 0, NULL, stokes_mass_J, NULL,  NULL);CHKERRQ(ierr);
3188*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 0, 0, NULL, NULL, NULL, stokes_momentum_vel_J_kx);CHKERRQ(ierr);
3189*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 0, 1, NULL, NULL, stokes_momentum_pres_J, NULL);CHKERRQ(ierr);
3190*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 1, 0, NULL, stokes_mass_J, NULL, NULL);CHKERRQ(ierr);
3191*c4762a1bSJed Brown     ierr = PetscDSSetJacobianPreconditioner(prob, 1, 1, stokes_identity_J_cx, NULL, NULL, NULL);CHKERRQ(ierr);
3192*c4762a1bSJed Brown     break;
3193*c4762a1bSJed Brown   default:
3194*c4762a1bSJed Brown     SETERRQ2(PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "Invalid solution type %d (%s)", (PetscInt) user->solType, solTypes[PetscMin(user->solType, NUM_SOL_TYPES)]);
3195*c4762a1bSJed Brown   }
3196*c4762a1bSJed Brown   switch (user->dim) {
3197*c4762a1bSJed Brown   case 2:
3198*c4762a1bSJed Brown     switch (user->solType) {
3199*c4762a1bSJed Brown     case SOLKX:
3200*c4762a1bSJed Brown       user->exactFuncs[0] = SolKxSolutionVelocity;
3201*c4762a1bSJed Brown       user->exactFuncs[1] = SolKxSolutionPressure;
3202*c4762a1bSJed Brown       break;
3203*c4762a1bSJed Brown     case SOLCX:
3204*c4762a1bSJed Brown       user->exactFuncs[0] = SolCxSolutionVelocity;
3205*c4762a1bSJed Brown       user->exactFuncs[1] = SolCxSolutionPressure;
3206*c4762a1bSJed Brown       break;
3207*c4762a1bSJed Brown     default:
3208*c4762a1bSJed Brown       SETERRQ2(PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "Invalid solution type %d (%s)", (PetscInt) user->solType, solTypes[PetscMin(user->solType, NUM_SOL_TYPES)]);
3209*c4762a1bSJed Brown     }
3210*c4762a1bSJed Brown     break;
3211*c4762a1bSJed Brown   default:
3212*c4762a1bSJed Brown     SETERRQ1(PETSC_COMM_WORLD, PETSC_ERR_ARG_OUTOFRANGE, "Invalid dimension %D", user->dim);
3213*c4762a1bSJed Brown   }
3214*c4762a1bSJed Brown   /* Setup constants */
3215*c4762a1bSJed Brown   {
3216*c4762a1bSJed Brown     Parameter *param;
3217*c4762a1bSJed Brown 
3218*c4762a1bSJed Brown     ierr = PetscBagGetData(user->bag, (void **) &param);CHKERRQ(ierr);
3219*c4762a1bSJed Brown     switch (user->solType) {
3220*c4762a1bSJed Brown     case SOLKX:
3221*c4762a1bSJed Brown     {
3222*c4762a1bSJed Brown       PetscScalar constants[3];
3223*c4762a1bSJed Brown 
3224*c4762a1bSJed Brown       constants[0] = param->m;
3225*c4762a1bSJed Brown       constants[1] = param->n;
3226*c4762a1bSJed Brown       constants[2] = param->B;
3227*c4762a1bSJed Brown       ierr = PetscDSSetConstants(prob, 3, constants);CHKERRQ(ierr);
3228*c4762a1bSJed Brown     }
3229*c4762a1bSJed Brown     break;
3230*c4762a1bSJed Brown     case SOLCX:
3231*c4762a1bSJed Brown     {
3232*c4762a1bSJed Brown       PetscScalar constants[5];
3233*c4762a1bSJed Brown 
3234*c4762a1bSJed Brown       constants[0] = param->m;
3235*c4762a1bSJed Brown       constants[1] = param->n;
3236*c4762a1bSJed Brown       constants[2] = param->etaA;
3237*c4762a1bSJed Brown       constants[3] = param->etaB;
3238*c4762a1bSJed Brown       constants[4] = param->xc;
3239*c4762a1bSJed Brown       ierr = PetscDSSetConstants(prob, 5, constants);CHKERRQ(ierr);
3240*c4762a1bSJed Brown     }
3241*c4762a1bSJed Brown     break;
3242*c4762a1bSJed Brown     default: SETERRQ1(PETSC_COMM_WORLD, PETSC_ERR_SUP, "No parameter information for solution type %d", user->solType);
3243*c4762a1bSJed Brown     }
3244*c4762a1bSJed Brown   }
3245*c4762a1bSJed Brown   /* Setup Boundary Conditions */
3246*c4762a1bSJed Brown   ierr = PetscBagGetData(user->bag, (void **) &ctx);CHKERRQ(ierr);
3247*c4762a1bSJed Brown   comp = 1;
3248*c4762a1bSJed Brown   ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wallB", "markerBottom", 0, 1, &comp, (void (*)(void)) user->exactFuncs[0], 1, &id, ctx);CHKERRQ(ierr);
3249*c4762a1bSJed Brown   comp = 0;
3250*c4762a1bSJed Brown   ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wallR", "markerRight",  0, 1, &comp, (void (*)(void)) user->exactFuncs[0], 1, &id, ctx);CHKERRQ(ierr);
3251*c4762a1bSJed Brown   comp = 1;
3252*c4762a1bSJed Brown   ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wallT", "markerTop",    0, 1, &comp, (void (*)(void)) user->exactFuncs[0], 1, &id, ctx);CHKERRQ(ierr);
3253*c4762a1bSJed Brown   comp = 0;
3254*c4762a1bSJed Brown   ierr = PetscDSAddBoundary(prob, DM_BC_ESSENTIAL, "wallL", "markerLeft",   0, 1, &comp, (void (*)(void)) user->exactFuncs[0], 1, &id, ctx);CHKERRQ(ierr);
3255*c4762a1bSJed Brown   PetscFunctionReturn(0);
3256*c4762a1bSJed Brown }
3257*c4762a1bSJed Brown 
3258*c4762a1bSJed Brown static PetscErrorCode SetupDiscretization(DM dm, AppCtx *user)
3259*c4762a1bSJed Brown {
3260*c4762a1bSJed Brown   DM              cdm = dm;
3261*c4762a1bSJed Brown   const PetscInt  dim = user->dim;
3262*c4762a1bSJed Brown   PetscFE         fe[2];
3263*c4762a1bSJed Brown   MPI_Comm        comm;
3264*c4762a1bSJed Brown   PetscErrorCode  ierr;
3265*c4762a1bSJed Brown 
3266*c4762a1bSJed Brown   PetscFunctionBeginUser;
3267*c4762a1bSJed Brown   /* Create discretization of solution fields */
3268*c4762a1bSJed Brown   ierr = PetscObjectGetComm((PetscObject) dm, &comm);CHKERRQ(ierr);
3269*c4762a1bSJed Brown   ierr = PetscFECreateDefault(comm, dim, dim, user->simplex, "vel_", PETSC_DEFAULT, &fe[0]);CHKERRQ(ierr);
3270*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) fe[0], "velocity");CHKERRQ(ierr);
3271*c4762a1bSJed Brown   ierr = PetscFECreateDefault(comm, dim, 1, user->simplex, "pres_", PETSC_DEFAULT, &fe[1]);CHKERRQ(ierr);
3272*c4762a1bSJed Brown   ierr = PetscFECopyQuadrature(fe[0], fe[1]);CHKERRQ(ierr);
3273*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) fe[1], "pressure");CHKERRQ(ierr);
3274*c4762a1bSJed Brown   /* Set discretization and boundary conditions for each mesh */
3275*c4762a1bSJed Brown   ierr = DMSetField(dm, 0, NULL, (PetscObject) fe[0]);CHKERRQ(ierr);
3276*c4762a1bSJed Brown   ierr = DMSetField(dm, 1, NULL, (PetscObject) fe[1]);CHKERRQ(ierr);
3277*c4762a1bSJed Brown   ierr = DMCreateDS(dm);CHKERRQ(ierr);
3278*c4762a1bSJed Brown   ierr = SetupProblem(dm, user);CHKERRQ(ierr);
3279*c4762a1bSJed Brown   while (cdm) {
3280*c4762a1bSJed Brown     ierr = DMCopyDisc(dm, cdm);CHKERRQ(ierr);
3281*c4762a1bSJed Brown     ierr = DMGetCoarseDM(cdm, &cdm);CHKERRQ(ierr);
3282*c4762a1bSJed Brown   }
3283*c4762a1bSJed Brown   ierr = PetscFEDestroy(&fe[0]);CHKERRQ(ierr);
3284*c4762a1bSJed Brown   ierr = PetscFEDestroy(&fe[1]);CHKERRQ(ierr);
3285*c4762a1bSJed Brown   {
3286*c4762a1bSJed Brown     PetscObject  pressure;
3287*c4762a1bSJed Brown     MatNullSpace nullSpacePres;
3288*c4762a1bSJed Brown 
3289*c4762a1bSJed Brown     ierr = DMGetField(dm, 1, NULL, &pressure);CHKERRQ(ierr);
3290*c4762a1bSJed Brown     ierr = MatNullSpaceCreate(PetscObjectComm(pressure), PETSC_TRUE, 0, NULL, &nullSpacePres);CHKERRQ(ierr);
3291*c4762a1bSJed Brown     ierr = PetscObjectCompose(pressure, "nullspace", (PetscObject) nullSpacePres);CHKERRQ(ierr);
3292*c4762a1bSJed Brown     ierr = MatNullSpaceDestroy(&nullSpacePres);CHKERRQ(ierr);
3293*c4762a1bSJed Brown   }
3294*c4762a1bSJed Brown   PetscFunctionReturn(0);
3295*c4762a1bSJed Brown }
3296*c4762a1bSJed Brown 
3297*c4762a1bSJed Brown static PetscErrorCode CreatePressureNullSpace(DM dm, AppCtx *user, Vec *v, MatNullSpace *nullSpace)
3298*c4762a1bSJed Brown {
3299*c4762a1bSJed Brown   Vec              vec;
3300*c4762a1bSJed Brown   PetscErrorCode (*funcs[2])(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void* ctx) = {zero_vector, one_scalar};
3301*c4762a1bSJed Brown   PetscErrorCode   ierr;
3302*c4762a1bSJed Brown 
3303*c4762a1bSJed Brown   PetscFunctionBeginUser;
3304*c4762a1bSJed Brown   ierr = DMCreateGlobalVector(dm, &vec);CHKERRQ(ierr);
3305*c4762a1bSJed Brown   ierr = DMProjectFunction(dm, 0.0, funcs, NULL, INSERT_ALL_VALUES, vec);CHKERRQ(ierr);
3306*c4762a1bSJed Brown   ierr = VecNormalize(vec, NULL);CHKERRQ(ierr);
3307*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) vec, "Pressure Null Space");CHKERRQ(ierr);
3308*c4762a1bSJed Brown   ierr = VecViewFromOptions(vec, NULL, "-null_space_vec_view");CHKERRQ(ierr);
3309*c4762a1bSJed Brown   ierr = MatNullSpaceCreate(PetscObjectComm((PetscObject) dm), PETSC_FALSE, 1, &vec, nullSpace);CHKERRQ(ierr);
3310*c4762a1bSJed Brown   if (v) {*v = vec;}
3311*c4762a1bSJed Brown   else   {ierr = VecDestroy(&vec);CHKERRQ(ierr);}
3312*c4762a1bSJed Brown   PetscFunctionReturn(0);
3313*c4762a1bSJed Brown }
3314*c4762a1bSJed Brown 
3315*c4762a1bSJed Brown int main(int argc, char **argv)
3316*c4762a1bSJed Brown {
3317*c4762a1bSJed Brown   SNES            snes;                 /* nonlinear solver */
3318*c4762a1bSJed Brown   DM              dm;                   /* problem definition */
3319*c4762a1bSJed Brown   Vec             u,r;                  /* solution, residual vectors */
3320*c4762a1bSJed Brown   Mat             J, M;                 /* Jacobian matrix */
3321*c4762a1bSJed Brown   MatNullSpace    nullSpace;            /* May be necessary for pressure */
3322*c4762a1bSJed Brown   Vec             nullVec;
3323*c4762a1bSJed Brown   PetscScalar     pint;
3324*c4762a1bSJed Brown   AppCtx          user;                 /* user-defined work context */
3325*c4762a1bSJed Brown   PetscInt        its;                  /* iterations for convergence */
3326*c4762a1bSJed Brown   PetscReal       error = 0.0;          /* L_2 error in the solution */
3327*c4762a1bSJed Brown   PetscReal       ferrors[2];
3328*c4762a1bSJed Brown   PetscErrorCode  (*initialGuess[2])(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nf, PetscScalar *u, void* ctx) = {zero_vector, zero_scalar};
3329*c4762a1bSJed Brown   void            *ctxs[2];
3330*c4762a1bSJed Brown   PetscErrorCode  ierr;
3331*c4762a1bSJed Brown 
3332*c4762a1bSJed Brown   ierr = PetscInitialize(&argc, &argv, NULL,help);if (ierr) return ierr;
3333*c4762a1bSJed Brown   ierr = ProcessOptions(PETSC_COMM_WORLD, &user);CHKERRQ(ierr);
3334*c4762a1bSJed Brown   ierr = SNESCreate(PETSC_COMM_WORLD, &snes);CHKERRQ(ierr);
3335*c4762a1bSJed Brown   ierr = CreateMesh(PETSC_COMM_WORLD, &user, &dm);CHKERRQ(ierr);
3336*c4762a1bSJed Brown   ierr = SNESSetDM(snes, dm);CHKERRQ(ierr);
3337*c4762a1bSJed Brown   ierr = DMSetApplicationContext(dm, &user);CHKERRQ(ierr);
3338*c4762a1bSJed Brown   /* Setup problem parameters */
3339*c4762a1bSJed Brown   ierr = PetscBagCreate(PETSC_COMM_WORLD, sizeof(Parameter), &user.bag);CHKERRQ(ierr);
3340*c4762a1bSJed Brown   ierr = SetUpParameters(&user);CHKERRQ(ierr);
3341*c4762a1bSJed Brown   ierr = PetscBagGetData(user.bag, &ctxs[0]);CHKERRQ(ierr);
3342*c4762a1bSJed Brown   ierr = PetscBagGetData(user.bag, &ctxs[1]);CHKERRQ(ierr);
3343*c4762a1bSJed Brown   /* Setup problem */
3344*c4762a1bSJed Brown   ierr = PetscMalloc(2 * sizeof(void (*)(const PetscReal[], PetscScalar *, void *)), &user.exactFuncs);CHKERRQ(ierr);
3345*c4762a1bSJed Brown   ierr = SetupDiscretization(dm, &user);CHKERRQ(ierr);
3346*c4762a1bSJed Brown   ierr = DMPlexCreateClosureIndex(dm, NULL);CHKERRQ(ierr);
3347*c4762a1bSJed Brown 
3348*c4762a1bSJed Brown   ierr = DMCreateGlobalVector(dm, &u);CHKERRQ(ierr);
3349*c4762a1bSJed Brown   ierr = VecDuplicate(u, &r);CHKERRQ(ierr);
3350*c4762a1bSJed Brown 
3351*c4762a1bSJed Brown   ierr = DMPlexSetSNESLocalFEM(dm,&user,&user,&user);CHKERRQ(ierr);
3352*c4762a1bSJed Brown   ierr = CreatePressureNullSpace(dm, &user, &nullVec, &nullSpace);CHKERRQ(ierr);
3353*c4762a1bSJed Brown 
3354*c4762a1bSJed Brown   { /* set tolerances */
3355*c4762a1bSJed Brown     KSP ksp;
3356*c4762a1bSJed Brown 
3357*c4762a1bSJed Brown     ierr = SNESGetKSP(snes,&ksp);CHKERRQ(ierr);
3358*c4762a1bSJed Brown     ierr = KSPSetTolerances(ksp,1.e-2*PETSC_SMALL,PETSC_SMALL,PETSC_DEFAULT,PETSC_DEFAULT);CHKERRQ(ierr);
3359*c4762a1bSJed Brown   }
3360*c4762a1bSJed Brown 
3361*c4762a1bSJed Brown   ierr = SNESSetFromOptions(snes);CHKERRQ(ierr);
3362*c4762a1bSJed Brown 
3363*c4762a1bSJed Brown   /* There should be a way to express this using the DM */
3364*c4762a1bSJed Brown   ierr = SNESSetUp(snes);CHKERRQ(ierr);
3365*c4762a1bSJed Brown   ierr = SNESGetJacobian(snes, &J, &M, NULL, NULL);CHKERRQ(ierr);
3366*c4762a1bSJed Brown   ierr = MatSetNullSpace(J, nullSpace);CHKERRQ(ierr);
3367*c4762a1bSJed Brown 
3368*c4762a1bSJed Brown   ierr = DMProjectFunction(dm, 0.0, user.exactFuncs, ctxs, INSERT_ALL_VALUES, u);CHKERRQ(ierr);
3369*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) u, "Exact Solution");CHKERRQ(ierr);
3370*c4762a1bSJed Brown   ierr = VecViewFromOptions(u, NULL, "-exact_vec_view");CHKERRQ(ierr);
3371*c4762a1bSJed Brown   ierr = VecDot(nullVec, u, &pint);CHKERRQ(ierr);
3372*c4762a1bSJed Brown   ierr = PetscPrintf(PETSC_COMM_WORLD, "Integral of pressure: %g\n",(double) (PetscAbsScalar(pint) < 1.0e-14 ? 0.0 : PetscRealPart(pint)));CHKERRQ(ierr);
3373*c4762a1bSJed Brown   ierr = DMSNESCheckFromOptions(snes, u, user.exactFuncs, ctxs);CHKERRQ(ierr);
3374*c4762a1bSJed Brown   ierr = DMProjectFunction(dm, 0.0, initialGuess, NULL, INSERT_VALUES, u);CHKERRQ(ierr);
3375*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) u, "Initial Solution");CHKERRQ(ierr);
3376*c4762a1bSJed Brown   ierr = VecViewFromOptions(u, NULL, "-initial_vec_view");CHKERRQ(ierr);
3377*c4762a1bSJed Brown   ierr = PetscObjectSetName((PetscObject) u, "Solution");CHKERRQ(ierr);
3378*c4762a1bSJed Brown   ierr = SNESSolve(snes, NULL, u);CHKERRQ(ierr);
3379*c4762a1bSJed Brown   ierr = SNESGetIterationNumber(snes, &its);CHKERRQ(ierr);
3380*c4762a1bSJed Brown   ierr = PetscPrintf(PETSC_COMM_WORLD, "Number of SNES iterations = %D\n", its);CHKERRQ(ierr);
3381*c4762a1bSJed Brown   ierr = DMComputeL2Diff(dm, 0.0, user.exactFuncs, ctxs, u, &error);CHKERRQ(ierr);
3382*c4762a1bSJed Brown   ierr = DMComputeL2FieldDiff(dm, 0.0, user.exactFuncs, ctxs, u, ferrors);CHKERRQ(ierr);
3383*c4762a1bSJed Brown   ierr = PetscPrintf(PETSC_COMM_WORLD, "L_2 Error: %.3g [%.3g, %.3g]\n", (double)error, (double)ferrors[0], (double)ferrors[1]);CHKERRQ(ierr);
3384*c4762a1bSJed Brown   ierr = VecDot(nullVec, u, &pint);CHKERRQ(ierr);
3385*c4762a1bSJed Brown   ierr = PetscPrintf(PETSC_COMM_WORLD, "Integral of pressure: %g\n", (double) (PetscAbsScalar(pint) < 1.0e-14 ? 0.0 : PetscRealPart(pint)));CHKERRQ(ierr);
3386*c4762a1bSJed Brown   if (user.showError) {
3387*c4762a1bSJed Brown     Vec r;
3388*c4762a1bSJed Brown 
3389*c4762a1bSJed Brown     ierr = DMGetGlobalVector(dm, &r);CHKERRQ(ierr);
3390*c4762a1bSJed Brown     ierr = DMProjectFunction(dm, 0.0, user.exactFuncs, ctxs, INSERT_ALL_VALUES, r);CHKERRQ(ierr);
3391*c4762a1bSJed Brown     ierr = VecAXPY(r, -1.0, u);CHKERRQ(ierr);
3392*c4762a1bSJed Brown     ierr = PetscObjectSetName((PetscObject) r, "Solution Error");CHKERRQ(ierr);
3393*c4762a1bSJed Brown     ierr = VecViewFromOptions(r, NULL, "-error_vec_view");CHKERRQ(ierr);
3394*c4762a1bSJed Brown     ierr = DMRestoreGlobalVector(dm, &r);CHKERRQ(ierr);
3395*c4762a1bSJed Brown   }
3396*c4762a1bSJed Brown   if (user.showSolution) {
3397*c4762a1bSJed Brown     ierr = PetscPrintf(PETSC_COMM_WORLD, "Solution\n");CHKERRQ(ierr);
3398*c4762a1bSJed Brown     ierr = VecChop(u, 3.0e-9);CHKERRQ(ierr);
3399*c4762a1bSJed Brown     ierr = VecView(u, PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
3400*c4762a1bSJed Brown   }
3401*c4762a1bSJed Brown   ierr = VecViewFromOptions(u, NULL, "-sol_vec_view");CHKERRQ(ierr);
3402*c4762a1bSJed Brown 
3403*c4762a1bSJed Brown   ierr = VecDestroy(&nullVec);CHKERRQ(ierr);
3404*c4762a1bSJed Brown   ierr = MatNullSpaceDestroy(&nullSpace);CHKERRQ(ierr);
3405*c4762a1bSJed Brown   ierr = VecDestroy(&u);CHKERRQ(ierr);
3406*c4762a1bSJed Brown   ierr = VecDestroy(&r);CHKERRQ(ierr);
3407*c4762a1bSJed Brown   ierr = SNESDestroy(&snes);CHKERRQ(ierr);
3408*c4762a1bSJed Brown   ierr = DMDestroy(&dm);CHKERRQ(ierr);
3409*c4762a1bSJed Brown   ierr = PetscBagDestroy(&user.bag);CHKERRQ(ierr);
3410*c4762a1bSJed Brown   ierr = PetscFree(user.exactFuncs);CHKERRQ(ierr);
3411*c4762a1bSJed Brown   ierr = PetscFinalize();
3412*c4762a1bSJed Brown   return ierr;
3413*c4762a1bSJed Brown }
3414*c4762a1bSJed Brown 
3415*c4762a1bSJed Brown /*TEST
3416*c4762a1bSJed Brown 
3417*c4762a1bSJed Brown   # 2D serial P2/P1 tests 0-2
3418*c4762a1bSJed Brown   test:
3419*c4762a1bSJed Brown     suffix: 0
3420*c4762a1bSJed Brown     requires: triangle
3421*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3422*c4762a1bSJed Brown     args: -dm_plex_separate_marker -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition full -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type svd -snes_error_if_not_converged -ksp_error_if_not_converged -snes_view -dm_view -dmsnes_check .001 -show_solution
3423*c4762a1bSJed Brown   test:
3424*c4762a1bSJed Brown     suffix: 1
3425*c4762a1bSJed Brown     requires: triangle
3426*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3427*c4762a1bSJed Brown     args: -dm_plex_separate_marker -dm_refine 1 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition full -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type svd -snes_error_if_not_converged -ksp_error_if_not_converged -snes_view -dm_view -dmsnes_check .001 -show_solution
3428*c4762a1bSJed Brown   test:
3429*c4762a1bSJed Brown     suffix: 2
3430*c4762a1bSJed Brown     requires: triangle
3431*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3432*c4762a1bSJed Brown     args: -dm_plex_separate_marker -dm_refine 1 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_use_amat -ksp_rtol 1.0e-9 -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_ksp_rtol 1e-9 -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -ksp_error_if_not_converged -snes_view -dm_view -dmsnes_check .001 -show_solution
3433*c4762a1bSJed Brown   # 2D serial discretization tests
3434*c4762a1bSJed Brown   test:
3435*c4762a1bSJed Brown     suffix: p2p1
3436*c4762a1bSJed Brown     requires: triangle
3437*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3438*c4762a1bSJed Brown     args: -dm_plex_separate_marker -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3439*c4762a1bSJed Brown   test:
3440*c4762a1bSJed Brown     suffix: p2p1ref
3441*c4762a1bSJed Brown     requires: triangle
3442*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3443*c4762a1bSJed Brown     args: -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3444*c4762a1bSJed Brown   test:
3445*c4762a1bSJed Brown     suffix: q2q1
3446*c4762a1bSJed Brown     requires:
3447*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3448*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3449*c4762a1bSJed Brown   test:
3450*c4762a1bSJed Brown     suffix: q2q1ref
3451*c4762a1bSJed Brown     requires: !single
3452*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3453*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3454*c4762a1bSJed Brown   test:
3455*c4762a1bSJed Brown     suffix: q1p0
3456*c4762a1bSJed Brown     requires:
3457*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3458*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -vel_petscspace_degree 1 -pres_petscspace_degree 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3459*c4762a1bSJed Brown   test:
3460*c4762a1bSJed Brown     suffix: q1p0ref
3461*c4762a1bSJed Brown     requires:
3462*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3463*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -dm_refine 2 -vel_petscspace_degree 1 -pres_petscspace_degree 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3464*c4762a1bSJed Brown   test:
3465*c4762a1bSJed Brown     suffix: q2p1
3466*c4762a1bSJed Brown     requires:
3467*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3468*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pres_petscspace_poly_tensor 0 -pres_petscdualspace_lagrange_continuity 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_ksp_rtol 1e-10 -fieldsplit_pressure_pc_type lu -fieldsplit_pressure_pc_factor_shift_type -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3469*c4762a1bSJed Brown   test:
3470*c4762a1bSJed Brown     suffix: q2p1ref
3471*c4762a1bSJed Brown     requires: !single
3472*c4762a1bSJed Brown     filter: sed  -e "s/SNES iterations *= *[123]/SNES iterations=4/g" -e "s/solver iterations *= *[123]/solver iterations=4/g" -e "s/evaluations=2/evaluations=3/g"
3473*c4762a1bSJed Brown     args: -dm_plex_separate_marker -simplex 0 -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pres_petscspace_poly_tensor 0 -pres_petscdualspace_lagrange_continuity 0 -pc_fieldsplit_diag_use_amat -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_schur_factorization_type full -pc_fieldsplit_schur_precondition a11 -fieldsplit_velocity_pc_type lu -fieldsplit_pressure_ksp_rtol 1e-10 -fieldsplit_pressure_pc_type lu -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view
3474*c4762a1bSJed Brown 
3475*c4762a1bSJed Brown   # FETI-DP tests
3476*c4762a1bSJed Brown   testset:
3477*c4762a1bSJed Brown     output_file: output/ex69_q2p1fetidp.out
3478*c4762a1bSJed Brown     suffix: q2p1fetidp
3479*c4762a1bSJed Brown     requires: !single
3480*c4762a1bSJed Brown     nsize: 5
3481*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations=" | sed  -e "s/type: seqaijviennacl/type: seqaij/g" -e "s/type: seqaijcusparse/type: seqaij/g"
3482*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -simplex 0 -dm_refine 1 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pres_petscspace_poly_tensor 0 -pres_petscdualspace_lagrange_continuity 0 -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type svd -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type svd
3483*c4762a1bSJed Brown     test:
3484*c4762a1bSJed Brown       suffix: aij
3485*c4762a1bSJed Brown       args: -matis_localmat_type aij
3486*c4762a1bSJed Brown     test:
3487*c4762a1bSJed Brown       requires: viennacl
3488*c4762a1bSJed Brown       suffix: aijviennacl
3489*c4762a1bSJed Brown       args: -matis_localmat_type aijviennacl
3490*c4762a1bSJed Brown     test:
3491*c4762a1bSJed Brown       requires: cuda
3492*c4762a1bSJed Brown       suffix: aijcusparse
3493*c4762a1bSJed Brown       args: -matis_localmat_type aijcusparse
3494*c4762a1bSJed Brown 
3495*c4762a1bSJed Brown   testset:
3496*c4762a1bSJed Brown     suffix: q2p1fetidp_deluxe
3497*c4762a1bSJed Brown     output_file: output/ex69_q2p1fetidp_deluxe.out
3498*c4762a1bSJed Brown     requires: mumps double
3499*c4762a1bSJed Brown     nsize: 5
3500*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations=" | sed  -e "s/type: seqaijviennacl/type: seqaij/g" -e "s/type: seqaijcusparse/type: seqaij/g"
3501*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -simplex 0 -dm_refine 1 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pres_petscspace_poly_tensor 0 -pres_petscdualspace_lagrange_continuity 0 -snes_error_if_not_converged -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_use_deluxe_scaling -fetidp_bddc_pc_bddc_deluxe_singlemat -fetidp_bddc_pc_bddc_deluxe_zerorows -fetidp_bddc_sub_schurs_mat_solver_type mumps -fetidp_bddc_sub_schurs_mat_mumps_icntl_14 500 -fetidp_bddc_pc_bddc_coarse_redundant_pc_type svd
3502*c4762a1bSJed Brown     test:
3503*c4762a1bSJed Brown       suffix: aij
3504*c4762a1bSJed Brown       args: -matis_localmat_type aij
3505*c4762a1bSJed Brown     test:
3506*c4762a1bSJed Brown       suffix: aij_seqdense
3507*c4762a1bSJed Brown       args: -matis_localmat_type aij -fetidp_bddc_sub_schurs_schur_mat_type seqdense
3508*c4762a1bSJed Brown     test:
3509*c4762a1bSJed Brown       requires: viennacl
3510*c4762a1bSJed Brown       suffix: aijviennacl
3511*c4762a1bSJed Brown       args: -matis_localmat_type aijviennacl
3512*c4762a1bSJed Brown     test:
3513*c4762a1bSJed Brown       requires: cuda
3514*c4762a1bSJed Brown       suffix: aijcusparse
3515*c4762a1bSJed Brown       args: -matis_localmat_type aijcusparse
3516*c4762a1bSJed Brown 
3517*c4762a1bSJed Brown   testset:
3518*c4762a1bSJed Brown     suffix: q2p1fetidp_deluxe_adaptive
3519*c4762a1bSJed Brown     output_file: output/ex69_q2p1fetidp_deluxe_adaptive.out
3520*c4762a1bSJed Brown     requires: mumps double
3521*c4762a1bSJed Brown     nsize: 5
3522*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations=" | sed  -e "s/type: seqaijviennacl/type: seqaij/g" -e "s/type: seqaijcusparse/type: seqaij/g"
3523*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -simplex 0 -dm_refine 1 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -pres_petscspace_poly_tensor 0 -pres_petscdualspace_lagrange_continuity 0 -snes_error_if_not_converged -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_use_deluxe_scaling -fetidp_bddc_pc_bddc_deluxe_singlemat -fetidp_bddc_pc_bddc_adaptive_userdefined -fetidp_bddc_sub_schurs_mat_solver_type mumps -fetidp_bddc_pc_bddc_adaptive_threshold 1.3 -fetidp_bddc_sub_schurs_mat_mumps_icntl_14 500 -fetidp_bddc_pc_bddc_coarse_redundant_pc_type svd
3524*c4762a1bSJed Brown     test:
3525*c4762a1bSJed Brown       suffix: aij
3526*c4762a1bSJed Brown       args: -matis_localmat_type aij
3527*c4762a1bSJed Brown     test:
3528*c4762a1bSJed Brown       suffix: aij_seqdense
3529*c4762a1bSJed Brown       args: -matis_localmat_type aij -fetidp_bddc_sub_schurs_schur_mat_type seqdense
3530*c4762a1bSJed Brown     test:
3531*c4762a1bSJed Brown       requires: viennacl
3532*c4762a1bSJed Brown       suffix: aijviennacl
3533*c4762a1bSJed Brown       args: -matis_localmat_type aijviennacl
3534*c4762a1bSJed Brown     test:
3535*c4762a1bSJed Brown       requires: cuda
3536*c4762a1bSJed Brown       suffix: aijcusparse
3537*c4762a1bSJed Brown       args: -matis_localmat_type aijcusparse
3538*c4762a1bSJed Brown 
3539*c4762a1bSJed Brown   test:
3540*c4762a1bSJed Brown     suffix: p2p1fetidp
3541*c4762a1bSJed Brown     requires: triangle
3542*c4762a1bSJed Brown     nsize: 5
3543*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3544*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type svd -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly
3545*c4762a1bSJed Brown 
3546*c4762a1bSJed Brown   test:
3547*c4762a1bSJed Brown     suffix: p2p1fetidp_allp
3548*c4762a1bSJed Brown     requires: triangle
3549*c4762a1bSJed Brown     nsize: 5
3550*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3551*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type svd -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly -ksp_fetidp_pressure_all
3552*c4762a1bSJed Brown 
3553*c4762a1bSJed Brown   test:
3554*c4762a1bSJed Brown     suffix: p2p1fetidp_discharm
3555*c4762a1bSJed Brown     requires: triangle
3556*c4762a1bSJed Brown     nsize: 5
3557*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3558*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type none -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly -fetidp_pc_discrete_harmonic -fetidp_harmonic_pc_type cholesky
3559*c4762a1bSJed Brown 
3560*c4762a1bSJed Brown   test:
3561*c4762a1bSJed Brown     suffix: p2p1fetidp_lumped
3562*c4762a1bSJed Brown     requires: triangle
3563*c4762a1bSJed Brown     nsize: 5
3564*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3565*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -snes_view -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type none -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly -fetidp_pc_lumped
3566*c4762a1bSJed Brown 
3567*c4762a1bSJed Brown   test:
3568*c4762a1bSJed Brown     suffix: p2p1fetidp_deluxe
3569*c4762a1bSJed Brown     requires: triangle mumps
3570*c4762a1bSJed Brown     nsize: 5
3571*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3572*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly -fetidp_bddc_pc_bddc_use_deluxe_scaling -fetidp_bddc_pc_bddc_deluxe_singlemat -fetidp_bddc_sub_schurs_mat_mumps_icntl_14 500 -fetidp_bddc_sub_schurs_posdef 0
3573*c4762a1bSJed Brown 
3574*c4762a1bSJed Brown   test:
3575*c4762a1bSJed Brown     suffix: p2p1fetidp_deluxe_discharm
3576*c4762a1bSJed Brown     requires: triangle mumps
3577*c4762a1bSJed Brown     nsize: 5
3578*c4762a1bSJed Brown     filter: grep -v "variant HERMITIAN" | grep -v "SNES iterations" | grep -v "solver iterations" | grep -v "evaluations="
3579*c4762a1bSJed Brown     args: -petscpartitioner_type simple -dm_plex_separate_marker -dm_refine 2 -vel_petscspace_degree 2 -pres_petscspace_degree 1 -snes_error_if_not_converged -ksp_error_if_not_converged -dm_view -dm_mat_type is -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_fieldsplit_schur_fact_type diag -fetidp_fieldsplit_p_pc_type jacobi -fetidp_fieldsplit_lag_ksp_type preonly -fetidp_fieldsplit_p_ksp_type preonly -fetidp_bddc_pc_bddc_use_deluxe_scaling -fetidp_bddc_pc_bddc_deluxe_singlemat -fetidp_bddc_sub_schurs_mat_mumps_icntl_14 500 -fetidp_bddc_sub_schurs_posdef 0 -fetidp_bddc_sub_schurs_discrete_harmonic
3580*c4762a1bSJed Brown 
3581*c4762a1bSJed Brown   testset:
3582*c4762a1bSJed Brown     nsize: 3
3583*c4762a1bSJed Brown     requires: triangle
3584*c4762a1bSJed Brown     output_file: output/ex69_p2p1fetidp_olof.out
3585*c4762a1bSJed Brown     args: -dm_view -dm_mat_type is -dm_refine 1 -dm_plex_separate_marker -vel_petscspace_degree 2 -pres_petscspace_degree 1 -petscpartitioner_type simple -snes_error_if_not_converged -ksp_error_if_not_converged -ksp_type fetidp -ksp_fetidp_saddlepoint -ksp_fetidp_saddlepoint_flip -fetidp_ksp_type cg  -fetidp_ksp_norm_type natural -fetidp_bddc_pc_bddc_detect_disconnected -fetidp_bddc_pc_bddc_symmetric -fetidp_bddc_pc_bddc_vertex_size 3 -fetidp_bddc_pc_bddc_graph_maxcount 2 -fetidp_bddc_pc_bddc_dirichlet_pc_type none -fetidp_bddc_pc_bddc_neumann_pc_type svd -fetidp_bddc_pc_bddc_coarse_redundant_pc_type cholesky -fetidp_pc_discrete_harmonic 1 -fetidp_harmonic_pc_type cholesky -fetidp_fieldsplit_lag_ksp_error_if_not_converged 0 -fetidp_fieldsplit_lag_ksp_type chebyshev -fetidp_fieldsplit_lag_ksp_max_it 2 -ksp_fetidp_pressure_schur -fetidp_fieldsplit_p_ksp_type preonly -fetidp_fieldsplit_p_pc_type bddc -fetidp_fieldsplit_p_pc_bddc_dirichlet_pc_type none
3586*c4762a1bSJed Brown     test:
3587*c4762a1bSJed Brown       suffix: p2p1fetidp_olof_full
3588*c4762a1bSJed Brown       args: -fetidp_pc_fieldsplit_schur_fact_type full
3589*c4762a1bSJed Brown     test:
3590*c4762a1bSJed Brown       suffix: p2p1fetidp_olof_diag
3591*c4762a1bSJed Brown       args: -fetidp_pc_fieldsplit_schur_fact_type diag
3592*c4762a1bSJed Brown     test:
3593*c4762a1bSJed Brown       suffix: p2p1fetidp_olof_additive
3594*c4762a1bSJed Brown       args: -fetidp_pc_fieldsplit_type additive
3595*c4762a1bSJed Brown 
3596*c4762a1bSJed Brown TEST*/
3597