Merge_Notes_August_2014

Click here to return to top level Jetstream Merge Notes page.

Summary of Changes

 * DB: Added ability to calculate eigenvalues directly in Diablo. The new routines are in Partition_Mod and pKISlib. The new codes use ARPACK and PARPACK which are now included with Jetstream and will need to be compiled for jetstream to work. Fortunately this is very easy and only needs to be done once. You can do this simply by typing "./make_jetstream" when in jetstream directory. However, if you don't want to compile all of jetstream, you can just go into jetstream/ARPACK and type "make all". It should only take a few seconds to compile. Then go up to jetstream level and type "make clean", then "make".
 * DB: Monolithic Homotopy now bug-free, used with diablo%nk_global=-1.
 * DB: Added a few more grid utilities by various authors.
 * DB: Can now output Jacobian to file in sparse 'matlab' format for post-processing using opt_method='output_pmat' or 'output_jmat'.


 * NH: High-order optimization possible for Euler and viscous laminar flows using jtstrm% adj_matv = 'reverse'. This matvec technique is slower than 'jacbn' but doesn't require the storage of the Jacobian matrix (see N.Holt thesis (coming soon) for memory/CPU cost comparison).
 * NH: Upgraded all of the viscous objective calculations to include the diagonal-norm integration rule; did the same to the objective derivatives (including moment and inverse design).
 * NH: Added complex-step test for objective derivative: jtstrm% opt_method = 'test_djdq'. This serves as a useful test before the directional derivative, since the directional derivative tests many things at once. Currently the only objective that doesn't pass this complex-step test is 'mmnt' with viscous flows; this could just be a problem with the complex version of the function.
 * NH: L2-norm of metric invariant equations are computed whenever the grid metrics are computed (each function evaluation). They should give something close to machine zero. If they don't it means you have unwanted source terms in your governing equations.
 * NH: I made a big change to the way the inverse design case is handled. Previously it was required that the surface_*.dat were provided to define the pressure target. Now, a flow analysis is performed on the baseline geometry and the surface_*.dat are generated, then the inverse design is initiated with randomly perturbed design variables.
 * NH: New second-derivative operators have been included; these have been derived by DRF and implement by me (N.Holt). Derived type SBP2 defines the compact second-derivative SBP operator. It has a very similar usage to the first derivative operator with a row offset added, I've created a simple one dimensional example here; more details to come soon.
 * NH: I restructured some of the loops in EulerRHS_Mod.f90 to use column major ordering. A lot of the loops in diablo use a variable loop ordering structure (which is general for xi, eta, zeta). The variable loop ordering keeps thing compact and readable, but I suspect there are a lot of cache misses as a result. The variable ordered loops also use extra indices to only increment in direction di, which also increments the indices in direction it1,it2 by 0 (wasteful). In general none of this is a big deal, probably a small cost on many functions, however the RHS is constructed at least 2*nkits (krylov iterations), so its used a lot. Small improvements to the RHS evaluation time could improve the overall run time measurably. Preliminary experiments with some JSTS cases show a ~30% reduction in RHS evaluation time, and ~5% overall reduction in runtime, and identical convergence histories.

New Input Parameters

 * DB: diablo%bkup_frq: backup Q to file with specified frequency
 * DB: jtstrm%read_q_from_file: Set to true to use Q from file instead of freestream after failed flow solve during optimization.

Changes To Modules

 * NH: significant changed to ViscousdRdQ_Mod.f90 and ViscousdRdG_Mod.f90 to include high-order terms.
 * NH: some functions added to Boundary_Mod.f90 and Partition_Mod.f90 for high-order integration of some objectives and their derivatives. I usually copied the original function and added _HO to the end of the name of the high-order version.