Utilities: Difference between revisions

From openpipeflow.org
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
* Utilities are used to manipulate or analyse data, either during runtime or in the post-processing phase.
* '''Utilities are used to manipulate or analyse data, either during runtime or in the post-processing phase'''.
* Utilities are kept in <tt>utils/</tt>.
* Avoid editing the contents of the <tt>program/</tt> directory; almost all modifications can be made via a utility, rather than altering the core code.
* Some of the utilities are non-specific to pipe flow, e.g. code for the GMRES algorithm.
* Some of the utilities are non-specific to pipe flow, e.g. code for the GMRES algorithm.
* '''Almost all modifications can/should be made via a utility, rather than altering the core code''' (i.e. avoid editing the contents of the <tt>program/</tt> directory wherever possible).
* Utilities are kept in <tt>utils/</tt>.




Line 13: Line 13:
The penultimate command creates <tt>utilname.out</tt>.   
The penultimate command creates <tt>utilname.out</tt>.   


It is good practice to do a <tt>'make install'</tt> to generate a [[main.info]] file to keep alongside the executable.
=== Record of parameters ===
 
* [[main.info]] is created in the <tt>install/</tt> directory at compile time by '<tt>make install</tt>'.  Keep a copy of this file along side your executables.


=== Pre/post-processing ===
=== Pre/post-processing ===
* [[main.info]] - Record of settings at compiletime
* [[ic.f90]] - '''Pre/Post-processing template'''.
* [[ic.f90]] - Pre/Post-processing '''template'''.
* [[prim2ascii.f90]] - extract state data and write an ascii file.
* [[describe_state.f90]] - check time/parameters; see also [[main.info]] for outputs.
* [[prim2matlab.f90]] - extract data and write in a netcdf format for easy loading into Matlab or VisIt.
* [[describe_state.f90]] - check time/parameters; see also [[main.info]].
* [[changeMp.f90]] - change <tt>i_Mp</tt> value in a state file.
* [[changeMp.f90]] - change <tt>i_Mp</tt> value in a state file.
* [[change_Mp_alpha.f90]] - make copies of a state, or extract modes, dependent on changes in length or azimuthal symmetry.
* [[change_Mp_alpha.f90]] - make copies of a state, e.g. make a state 3x longer using 3 copies of a travelling wave, or insert 2 copies of an m=4 state in an m=2 domain.
* [[prim2matlab.f90]] - convert to matlab/visit-readable netcdf.


=== Runtime processing ===
=== Runtime processing ===
* [[runtime.f90]] - Processing '''template'''.
* [[analyse_runtime.f90]] - '''Runtime processing template'''.
* [[newton.f90]] - Newton-Krylov.
* [[newton.f90]] - Newton-Krylov for pipe flow.


=== Non-problem-specific codes ===
=== Non-problem-specific codes ===
* [[GMRESm.f90|GMRESm.f90, arnoldi.f]] - Krylov-subspace methods.
* These are designed for integration with any pre-existing code.
* [[NewtonHook.f90]] - Newton-hookstep method.
* [[File:arnoldi.f|arnoldi.f]] - Krylov-subspace method for calculating eigenvalues of a matrix.
* [[File:GMRESm.f90]] / [[File:GMRESm.m]] - Krylov-subspace method for solving the linear system Ax=b for x.
* [[File:NewtonHook.f90]] / [[File:NewtonHook.m]] - See [[Newton-Krylov_method]] for finding nonlinear solutions x for F(x)=0.

Latest revision as of 03:10, 5 July 2019

  • Utilities are used to manipulate or analyse data, either during runtime or in the post-processing phase.
  • Utilities are kept in utils/.
  • Avoid editing the contents of the program/ directory; almost all modifications can be made via a utility, rather than altering the core code.
  • Some of the utilities are non-specific to pipe flow, e.g. code for the GMRES algorithm.


Building

To build, in Makefile, set UTIL = utilname (omitting the .f90 extension), then type

> make
> make install
> make util
> mv utilname.out ...

The penultimate command creates utilname.out.

Record of parameters

  • main.info is created in the install/ directory at compile time by 'make install'. Keep a copy of this file along side your executables.

Pre/post-processing

  • ic.f90 - Pre/Post-processing template.
  • prim2ascii.f90 - extract state data and write an ascii file.
  • prim2matlab.f90 - extract data and write in a netcdf format for easy loading into Matlab or VisIt.
  • describe_state.f90 - check time/parameters; see also main.info.
  • changeMp.f90 - change i_Mp value in a state file.
  • change_Mp_alpha.f90 - make copies of a state, e.g. make a state 3x longer using 3 copies of a travelling wave, or insert 2 copies of an m=4 state in an m=2 domain.

Runtime processing

Non-problem-specific codes