ENH: Update FreeFOAM contributions to GPL v3
[freefoam.git] / data / shellFunctions / bashCompletion / freefoam
blob4f6e143f0a009613b3bcda9d7a0b4ee90e8c5822
1 #!/bin/bash
2 #-------------------------------------------------------------------------------
3 # ______ _ ____ __ __
4 # | ____| _| |_ / __ \ /\ | \/ |
5 # | |__ _ __ ___ ___ / \| | | | / \ | \ / |
6 # | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
7 # | | | | | __/ __/\_ _/| |__| / ____ \| | | |
8 # |_| |_| \___|\___| |_| \____/_/ \_\_| |_|
10 # FreeFOAM: The Cross-Platform CFD Toolkit
12 # Copyright (C) 2008-2012 Michael Wild <themiwi@users.sf.net>
13 # Gerber van der Graaf <gerber_graaf@users.sf.net>
14 #-------------------------------------------------------------------------------
15 # License
16 # This file is part of FreeFOAM.
18 # FreeFOAM is free software: you can redistribute it and/or modify it
19 # under the terms of the GNU General Public License as published by the
20 # Free Software Foundation, either version 3 of the License, or (at your
21 # option) any later version.
23 # FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
24 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 # for more details.
28 # You should have received a copy of the GNU General Public License
29 # along with FreeFOAM. If not, see <http://www.gnu.org/licenses/>.
31 # Description
32 # Bash completion script for FreeFOAM.
34 #------------------------------------------------------------------------------
36 # TODO this is very simplistic and always just offers the names of the
37 # applications. Patches are welcome!
39 _freefoam_all() {
40 local solvers utils
41 # set solvers
42 solvers=( \
43 'boundary' 'bubble' 'buoyantBoussinesqPimple' 'buoyantBoussinesqSimple' \
44 'buoyantPimple' 'buoyantSimple' 'buoyantSimpleRadiation' 'cavitating' \
45 'channel' 'chtMultiRegion' 'chtMultiRegionSimple' 'coalChemistry' \
46 'coldEngine' 'compressibleInter' 'compressibleInterDyM' 'diesel' \
47 'dieselEngine' 'dns' 'dsmc' 'electrostatic' 'engine' 'financial' 'fire' \
48 'ico' 'inter' 'interDyM' 'interMixing' 'interPhaseChange' 'laplacian' \
49 'md' 'mdEquilibration' 'mhd' 'MRFInter' 'MRFMultiphaseInter' \
50 'multiphaseInter' 'nonNewtonianIco' 'PDR' 'PDRAutoRefine' 'pimple' \
51 'pimpleDyM' 'piso' 'porousExplicitSourceReactingParcel' 'porousInter' \
52 'porousSimple' 'potential' 'reacting' 'reactingParcel' 'rhoCentral' \
53 'rhoCentralDyM' 'rhoPimple' 'rhoPiso' 'rhoPorousMRFPimple' \
54 'rhoPorousSimple' 'rhoReacting' 'rhoSimple' 'scalarTransport' 'settling'\
55 'shallowWater' 'simple' 'solidDisplacement' \
56 'solidEquilibriumDisplacement' 'sonic' 'sonicDyM' 'sonicLiquid' \
57 'twoLiquidMixing' 'twoPhaseEuler' 'uncoupledKinematicParcel' 'Xi' \
60 # set utilities
61 utils=( \
62 'adiabaticFlameT' 'ansysToFoam' 'applyBoundaryLayer' \
63 'applyWallFunctionBoundaryConditions' 'attachMesh' 'autoPatch' \
64 'autoRefineMesh' 'blockMesh' 'boxTurb' 'calc' 'ccm26ToFoam' 'cellSet' \
65 'cfx4ToFoam' 'changeDictionary' 'checkMesh' 'chemkinToFoam' \
66 'clearPolyMesh' 'Co' 'collapseEdges' 'combinePatchFaces' 'copySettings' \
67 'createBaffles' 'createPatch' 'createTurbulenceFields' 'debugSwitches' \
68 'decomposePar' 'deformedGeom' 'dsmcFieldsCalc' 'dsmcInitialise' \
69 'engineCompRatio' 'engineSwirl' 'enstrophy' 'equilibriumCO' \
70 'equilibriumFlameT' 'estimateScalarError' 'execFlowFunctionObjects' \
71 'expandDictionary' 'extrude2DMesh' 'extrudeMesh' 'faceSet' 'flattenMesh'\
72 'flowType' 'fluent3DMeshToFoam' 'fluentMeshToFoam' 'foamDataToFluent' \
73 'foamMeshToFluent' 'foamToEnsight' 'foamToEnsightParts' \
74 'foamToFieldview9' 'foamToGMV' 'foamToStarMesh' 'foamToVTK' \
75 'formatConvert' 'gambitToFoam' 'gmshToFoam' 'graphExecTime' 'graphResKE'\
76 'graphResUVWP' 'icoErrorEstimate' 'icoMomentError' 'ideasUnvToFoam' \
77 'IFCLookUpTableGen' 'infoExec' 'insideCells' 'job' 'kivaToFoam' \
78 'Lambda2' 'log' 'Mach' 'mapFields' 'mdInitialise' 'mergeMeshes' \
79 'mergeOrSplitBaffles' 'mirrorMesh' 'mixtureAdiabaticFlameT' 'modifyMesh'\
80 'momentScalarError' 'moveDynamicMesh' 'moveEngineMesh' 'moveMesh' \
81 'mshToFoam' 'netgenNeutralToFoam' 'objToVTK' 'para' 'particleTracks' \
82 'patchAverage' 'patchIntegrate' 'patchSummary' 'pdfPlot' 'Pe' \
83 'plot3dToFoam' 'pointSet' 'polyDualMesh' 'postChannel' 'pPrime2' \
84 'probeLocations' 'ptot' 'Q' 'R' 'reconstructPar' 'reconstructParMesh' \
85 'redistributeMeshPar' 'refineHexMesh' 'refinementLevel' 'refineMesh' \
86 'refineWallLayer' 'removeFaces' 'renumberMesh' 'rotateMesh' 'sammToFoam'\
87 'sample' 'selectCells' 'setFields' 'setSet' 'setsToZones' 'smapToFoam' \
88 'snappyHexMesh' 'solverSweeps' 'splitCells' 'splitMesh' \
89 'splitMeshRegions' 'star4ToFoam' 'starToFoam' 'stitchMesh' \
90 'streamFunction' 'stressComponents' 'subsetMesh' 'surfaceAdd' \
91 'surfaceAutoPatch' 'surfaceCheck' 'surfaceClean' 'surfaceCoarsen' \
92 'surfaceConvert' 'surfaceFeatureConvert' 'surfaceFeatureExtract' \
93 'surfaceFind' 'surfaceMeshConvert' 'surfaceMeshConvertTesting' \
94 'surfaceMeshExport' 'surfaceMeshImport' 'surfaceMeshTriangulate' \
95 'surfaceOrient' 'surfacePointMerge' 'surfaceRedistributePar' \
96 'surfaceRefineRedGreen' 'surfaceSmooth' 'surfaceSplitByPatch' \
97 'surfaceSplitNonManifolds' 'surfaceSubset' 'surfaceToPatch' \
98 'surfaceTransformPoints' 'tetgenToFoam' 'transformPoints' \
99 'upgradeFvSolution' 'uprime' 'vorticity' 'wallGradU' 'wallHeatFlux' \
100 'wallShearStress' 'wdot' 'writeCellCentres' 'writeMeshObj' 'yPlusLES' \
101 'yPlusRAS' 'zipUpMesh' \
103 echo "${solvers[*]} ${utils[*]}"
106 _freefoam()
108 local cur prev opts base
109 COMPREPLY=()
110 base="${COMP_WORDS[0]}"
111 cur="${COMP_WORDS[COMP_CWORD]}"
112 prev="${COMP_WORDS[COMP_CWORD-1]}"
115 # The basic commands we'll complete.
118 cmds="$(_freefoam_all)"
119 compl=""
121 case "$(basename ${base})" in
122 freefoam|job)
123 compl="${cmds}"
125 esac
127 COMPREPLY=($(compgen -W "${compl}" -- ${cur}))
128 return 0
130 complete -F _freefoam freefoam
133 # ------------------------- vim: set sw=3 sts=3 et: --------------- end-of-file