Skip to content

Collection of scripts I use when working with ReFRESCO

License

Notifications You must be signed in to change notification settings

Nanoseb/refresco-tools

Repository files navigation

refresco-tools

Collection of scripts I use when working with ReFRESCO

residisp

Python script to display ReFRESCO residuals (steady or not). A help page is available via residisp -h.

Example usage:

residisp 3729365          # slurm job ID
residisp ~/path/to/computation/folder
residisp --very-end -l2
residisp --max-it 20000   # to reduce the memory consumption: limit the number of iteration loaded
residisp --follow         # to automatically refresh the output

rdiff

Very small script to run vimdiff between a branch and the trunk of an svn repository (hence not limited to refresco)

Usage:

# use full path
rdiff ~/ReFRESCO/Dev/branches/overset/Code/src/refresco.F90

# or any relative path works too
rdiff src/refresco.F90

Small vimdiff cheat sheet:

]c                    go to the next difference
[c                    go to the previous difference
do                    get the diff from the other file (diff obtain)
dp                    send the diff to the other file  (diff put)
zr                    unfold the entire file
:diffupdate           re-scan the files for differences
:set diffopt+=iwhite  ignore white space comparison (can be added in .vimrc)
ctrl-w w              switch between windows

check_import

Check if a module that has been imported is actually used. This also generates a script called check_impot_cleanup.sh that will comment out all the useless USE statements.

Dependencies: ctags

module-graph

This script generates a graph made of ReFRESCO's module, module are linked based on they USE statements.

Dependencies: pyvis

latex-trim

This script returns trim parameters for the image given in argument using mouse selection.

$ latex-trim graph.png
trim={0.00cm 1.80cm 8.37cm 0.00cm}, clip

Dependencies: imagemagick (for pdf images only)

refresco-cmake

Helper script to compile ReFRESCO using cmake

check_declar

Script to detect non declared variables of a fortran subroutine

$ check_declar file.F90 subroutineName

report2metadata

Script that extracts metadata from marin reports

$ report2metadata report.pdf

BCstatus

Script to get the method used by ReFRESCO to handle each boundary condition, needs $REFRESCO_CODE_DIR to be defined correctly. The output is an html table that can be put directly on mods.

$ BCstatus

xmldiff

Print to stdout a 'functional' diff between 2 xml files.

$ xmldiff file1.xml file2.xml

# or to use vimdiff
$ xmldiff file1.xml file2.xml --vim

slice.py

Paraview script to slice cgns files with minimal interaction

# to slice in the x direction at x=3 and display the Pressure field
pvbatch slice.py --field Pressure -x --loc 0.2 solution.cgns

# help page
pvbatch slice.py -h

num_uncertainty.py

Python wrapper for Eca's numerical uncertainty tool

uncertainty, p, fit_function = get_uncertainty(ncell_list, value_list)

export.py

Paraview script to export to png from a state file and cgns data

pvpython export.py state_file.pvsm solution.cgns

About

Collection of scripts I use when working with ReFRESCO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published