[GRASS-dev] New grass pde lib + modules in cvs

Dear developers,
i just committed the grass pde lib "gpde" and two groundwater flow calculation
modules to CVS.
If you want to try out the new lib and the modules then just download the
test-location i have created:

http://www-pool.math.tu-berlin.de/~soeren/grass/modules/grass-pde-lib/gwflow_test.tar.bz2

Start the latest CVS build of grass63 with this location and execute this
little script:

#################### start #########################
g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000

r.mapcalc "phead=if(row() == 1 , 50, 40)"
r.mapcalc "status=if(row() == 1 , 2, 1)"
r.mapcalc "well=if(row() == 20 && col() == 20 , -0.001, 0)"
r.mapcalc "perm=0.00025"
r.mapcalc "reacharge=0"
r.mapcalc "top_conf=70"
r.mapcalc "top_unconf=130"
r.mapcalc "bottom=0"
r.mapcalc "poros=0.15"
r.mapcalc "syield=0.0001"

#confined groundwater flow
r.gwflow --o -s solver=0 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf
dt=8640000 type=confined

#unconfined groundwater flow
r.gwflow --o -s solver=0 top=top_unconf bottom=bottom phead=phead
status=status kf_x=perm kf_y=perm q=well s=poros r=reacharge
output=gwresult_unconf dt=8640000 type=unconfined

r3.mapcalc "phead=if(row() == 1 && depth() == 4, 50, 40)"
r3.mapcalc "status=if(row() == 1 && depth() == 4, 2, 1)"
r3.mapcalc "well=if(row() == 20 && col() == 20 , -0.00025, 0)"
r3.mapcalc "perm=0.00025"
r3.mapcalc "syield=0.0001"

#confined groundwater flow in 3d
r3.gwflow --o -s solver=0 phead=phead status=status kf_x=perm kf_y=perm
kf_z=perm q=well s=syield r=reacharge output=gwresult dt=8640000
####################### end ######################

Now all needed maps are created and the groundwater flow for raster and voxel
maps are calculated.

If you want to compare the implemented linear equation solvers, execute the
following commands:

#sparse matrix and cg (conjugate gradients) method
r.gwflow --o -s solver=0 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

#sparse matrix and bicgstab (biconjugate gradients) method
r.gwflow --o -s solver=1 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

#quadratic matrix and cg (conjugate gradients) method
r.gwflow --o solver=0 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

#quadratic matrix and bicgstab (biconjugate gradients) method
r.gwflow --o solver=1 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

#quadratic matrix and LU decomposition
r.gwflow --o solver=2 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

#quadratic matrix and GAUSS elimination
r.gwflow --o solver=3 top=top_conf bottom=bottom phead=phead status=status
kf_x=perm kf_y=perm q=well s=syield r=reacharge output=gwresult_conf

All solvers work in parallel if you use an OpenMP capable compiler (gcc-4.2,
icc, xlc_r) and if you activate OpenMP support. (normally compiler/linker
flags eg: -fopenmp for gcc-4.2)

I hope everything works, because the lib and the modules are still early beta.

Best regards
Soeren