<file_sep>* A collection of vaarious tools


*** Conteents

   1 Snow

This F90 program will generate a variety of line-fractals including the famous von-Koch Snowflake Curve.
However this is only as a test case. In Reality it is the prototype driver for enhancing [Danfront](https://github.com/dannyk96/danfe), an advancing front based unstructutred triangle mesh generator for finite elemeents.


   2 Stations

An f90 test of data structures

   3 flow
   
Flownet under dams  - used as an Undergraduate teaching example c. 1996   
<file_sep>#!/bin/bash

echo " build the 2 programs:"
echo "   1. flow.f90   the analysis code"
echo "       This INCLUDEs solver.f90"
echo "   2. contour_ps.f90 "
echo "       This takes the .pl mesh file and the flow.out file and produces"
echo "       a postscript file called plotfile.ps"

echo  'To run you need a mesh in a file called <name>.pl'
echo  ' and also a small file with the material properties in called <name>.in'
echo  Note that currently this is hardcode as wall2.pl and wall2.in

gfortran -o contour_ps contour_ps.f90
gfortran -o flow flow.f90

echo
echo
echo " now run ./flow"
echo "the post-process with ./countour_ps"
#echo after running flow and subsequently contour_ps, try
B
#echo 'gs -sDEVICE=pdfwrite -sOutputFile="output.pdf" -dNOPAUSE -dEPSCrop -c "<</Orientation 2>> setpagedevice" -f "plotfile.ps" -c quit'
#echo or
#echo 'gs -dEPSCrop -c "<</Orientation 2>> setpagedevice" -f "plotfile.ps" -c quit'

<file_sep>These are a set of short `Fortran` programs written by __<NAME>__ (_<EMAIL>_).
They were written in support of teaching the second year undergraduate programming course for Civil Enginering Students at the University of Manchester, back in the mid 1990s

They all demenstate features in Fortan 90 that take it beyond the limitations of the ancient FORTRAN77 standard, including
_data structures_, _runtime allocatable arrays_, _recursive functions_, etc.
<file_sep>#!/bin/bash
#
#  Build script for snow.exe  
#  Too small to bother with a makefile :-)
#  <NAME>  31/03/15
#  <EMAIL>
#
rm *.o *.mod
#FCC=$(FC)
F90=gfortran
$F90 -c -g segments.f90
$F90 -cpp -DPGPLOT -c -g plot.f90
$F90 -c -g snow.f90
echo 'note that we do not use afront.f90 (in a future release)'
$F90 -o snow snow.o segments.o plot.o -L$HOME/Documents/danfe/pgplot -lpgplot -lX11

echo try this:
echo 'echo -e "/XWIN\n3\n2\n.4\n3\n\n\n" | ./snow'

# notes on Salford FTN95
# ftn95 segments.f90 & ftn95 /CFPP /DEFINE SALFORD  1 plot.f90 & ftn95 snow.f90 /LINK  




<file_sep>

#  For Open MPI use, e.g., OMPI_FC=gfortran and for MPICH2, e.g., -f90=gfortran
export PATH := /usr/local/gfortran-bin/bin:$(PATH)
export LIBRARY_PATH := /usr/lib/x86_64-linux-gnu


FC= mpif90.mpich -fcoarray=lib
CAFLIB=-L /home/dan/git/opencoarrays/mpi -lcaf_mpi
.PHONY: clean

default: hw-coarray

APPS=  hello hello_s from_g95 hw-coarray
all: $(APPS)
hello_s: hello.f90
	gfortran -fcoarray=single -o $@ $^

hello: hello.f90
	$(FC) $< -o $@  $(CAFLIB) -lmpich

from_g95: from_g95.f90
	$(FC) $< -o $@  $(CAFLIB) -lmpich


hw-coarray: hw-coarray.f90
	$(FC) $< -o $@ $(CAFLIB) -lmpich 


clean:
	-rm $(APPS)
