# Export mesh from Pointwise and then rescale to meters # To be done only once, manually #transformPoints -scale '(0.001 0.001 0.001)' | tee log.transformPoints #checkMesh | tee log.checkMesh # Decompose in parallel # To be done only once, manually #decomposePar # Projection of the full 3D instantaneous computations onto the current mesh TOBEPROJECTED="/home/lmfa/hluo/LocalSoftware/OpenFOAM/hluo-2.3.x/run/test/Cuve_LMFA-SISM.Opt.smalldT" # Loop over time directories echo > log.mapFields for d in `/bin/ls -l -r -d $TOBEPROJECTED/processor0/[0-9]* | awk '{print $NF}'` # Reverse order #for d in `/bin/ls -d $TOBEPROJECTED/processor0/[0-9]*` do # Time value time=`basename $d` # If this time has not already been processed if [ ! -d processor0/$time ]; then # Create empty target directory for processor in `/bin/ls -d processor*` do mkdir $processor/0 done # Run mapFields in parallel time mpirun -np 12 mapFields $TOBEPROJECTED -noFunctionObjects -fields '(U)' -sourceTime $time -parallel >> log.mapFields 2>&1 # Move resulting projection to a time directory of same name as in the source for processor in `/bin/ls -d processor*` do mv $processor/0 $processor/$time done fi done # Reconstruct for all times reconstructPar