Rearranging IPhreeqc

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4108 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2010-02-23 05:05:42 +00:00
parent 44b93e6a6e
commit 6546b94c28
10 changed files with 4211 additions and 0 deletions

19
test2/CO2test Normal file
View File

@ -0,0 +1,19 @@
SELECTED_OUTPUT
-reset false
pH true
SOLUTION 1
units mol/kgw
Na 0.1
Cl 0.1
USER_PUNCH
-headings Ca name type conc etc
## -headings Ca name type conc etc etc1 etc2 etc3 etc4 etc5 etc6 etc7 etc8 etc9 etc10 #etc11
10 PUNCH TOT("Ca")
20 totelt=SYS("Ca",n,n$,t$,c)
30 FOR i=1 to n
40 PUNCH n$(i),t$(i),c(i)
50 NEXT i
EQUILIBRIUM_PHASES
CO2(g) -3.5 10
Calcite 0 10
END

20
test2/Makefile Normal file
View File

@ -0,0 +1,20 @@
include makelist
CXX = g++
CPPFLAGS = -Wall -DNDEBUG -DSWIG_SHARED_OBJ
LDFLAGS = -L../lib
FC = f95
FLDFLAGS = -lgfortranbegin -lgfortran
%.o: %.f
$(FC) $(FFLAGS) $(TARGET_ARCH) -g -c -o $@ $<
all: test2
clean:
$(RM) test2 test2.o test2.exe sel1 sel2 phreeqc.log phreeqc.out phreeqc.err error.inp
test2: test2.o ../lib/libiphreeqc.a
$(CXX) $(LDFLAGS) -o test2 test2.o -liphreeqc $(FLDFLAGS)
test2.o: test2.f

50
test2/makelist Normal file
View File

@ -0,0 +1,50 @@
CC = gcc -fno-second-underscore
FC = g77 -fno-second-underscore
ARC = CYGWIN
RM = rm -f
MV = mv -f
CP = cp
RANLIB = ls
MAKE = make
LN = ln -s
CD = cd
AR = ar ruv
COMPILE_FLAGS = -DUSE_DIRENT
LDFLAGS =
PRINTFLAGS = -DUSE_LPR_PRINT_CMD
XCFLAGS =
XLDFLAGS =
XINCPATH = -I/usr/X11R6/include
XBAEINCPATH = -I/mms/src/include -I/usr/X11R6/include/Xbae
XMINCPATH = -I/usr/X11R6/include
XLIBPATH = -L/usr/X11R6/lib
XTLIBPATH = -L/usr/X11R6/lib
XMLIBPATH = -L/usr/X11R6/lib
XLIB = -lX11
XTLIB = -lXt
XMLIB = -lXm
XEXTRALIBS = -lcygipc -lSM -lICE -lnetcdf -lf2c
MATHLIB = -lm
GISFLAG = -D_GIS
GISLIB = -lgis
######################################################################
# local macros for model building
######################################################################
MMSDIR = /mms
MSRCDIR = /mms/src/mms
MINCDIR = /mms/src/include
MLIBDIR = /mms/lib
MOBJDIR = /mms/obj
OBJDIR = /mms/obj
MBINDIR = /mms/bin
CFLAGS = -g -DUSE_DIRENT -I. -I/mms/src/include -I/usr/X11R6/include -DHAVE_NETCDF -I/usr/include -I/usr/local/include
FFLAGS = -g
# CFLAGS = -O3 -DNDEBUG -DUSE_DIRENT -I. -I/mms/src/include -I/usr/X11R6/include -DHAVE_NETCDF -I/usr/include -I/usr/local/include
# FFLAGS = -O3
FLIBS = -lm -lc
GLIBS = -L/usr/X11R6/lib -lXm -lXt -lX11 $(XEXTRALIBS)

140
test2/test2.dsp Normal file
View File

@ -0,0 +1,140 @@
# Microsoft Developer Studio Project File - Name="test2" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=test2 - Win32 Profile
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "test2.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "test2.mak" CFG="test2 - Win32 Profile"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "test2 - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "test2 - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "test2 - Win32 Profile" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
F90=df.exe
RSC=rc.exe
!IF "$(CFG)" == "test2 - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE F90 /compile_only /nologo /warn:nofileopt
# ADD F90 /compile_only /nologo /warn:nofileopt
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 iphreeqc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../lib"
!ELSEIF "$(CFG)" == "test2 - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
# ADD F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 iphreeqcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../lib"
# SUBTRACT LINK32 /incremental:no
!ELSEIF "$(CFG)" == "test2 - Win32 Profile"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "test2___Win32_Profile"
# PROP BASE Intermediate_Dir "test2___Win32_Profile"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Profile"
# PROP Intermediate_Dir "Profile"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
# ADD F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 iphreeqcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"../lib"
# ADD LINK32 iphreeqcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /debug /machine:I386 /libpath:"../lib"
!ENDIF
# Begin Target
# Name "test2 - Win32 Release"
# Name "test2 - Win32 Debug"
# Name "test2 - Win32 Profile"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp"
# Begin Source File
SOURCE=.\test2.for
DEP_F90_TEST2=\
"..\include\IPhreeqc.f90.inc"\
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

29
test2/test2.dsw Normal file
View File

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "test2"=.\test2.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

33
test2/test2.f Normal file
View File

@ -0,0 +1,33 @@
PROGRAM DRIVER
IMPLICIT NONE
INCLUDE '../include/IPhreeqc.f.inc'
INTEGER iresult
INTEGER rows, cols
iresult = LoadDatabase
&('wateq4f.dat')
IF (iresult.NE.VR_OK) THEN
CALL OutputLastError
STOP 'Failed to load database'
ENDIF
!! iresult= Runfile('CO2test',
!! & .true.,.true.,.true.,.true.)
iresult= Runfile('tester',
& .true.,.true.,.true.,.true.)
IF (iresult.NE.VR_OK) THEN
CALL OutputLastError
STOP 'Failed to run'
ENDIF
rows = GetSelectedOutputRowCount()
cols = GetSelectedOutputColumnCount()
PRINT*,'Rows= ',rows
PRINT*,'Cols= ',cols
STOP 'Ok'
END

33
test2/test2.for Normal file
View File

@ -0,0 +1,33 @@
PROGRAM DRIVER
IMPLICIT NONE
INCLUDE '..\include\IPhreeqc.f90.inc'
INTEGER iresult
INTEGER rows, cols
iresult = LoadDatabase
&('wateq4f.dat')
IF (iresult.NE.VR_OK) THEN
CALL OutputLastError
STOP 'Failed to load database'
ENDIF
!! iresult= Runfile('CO2test',
!! & .true.,.true.,.true.,.true.)
iresult= Runfile('tester',
& .true.,.true.,.true.,.true.)
IF (iresult.NE.VR_OK) THEN
CALL OutputLastError
STOP 'Failed to run'
ENDIF
rows = GetSelectedOutputRowCount()
cols = GetSelectedOutputColumnCount()
PRINT*,'Rows= ',rows
PRINT*,'Cols= ',cols
STOP 'Ok'
END

38
test2/test2.vfproj Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application - Converted from CVF" Version="11.0" ProjectIdGuid="{0BF09B12-56BE-42FC-B39E-61AE515D8858}">
<Platforms>
<Platform Name="Win32"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" CallingConvention="callConventionCVF" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" AssemblerListingLocation="$(INTDIR)/" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug" WarnArgMismatch="true"/>
<Tool Name="VFLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile="$(OUTDIR)/test2.exe" LinkIncremental="linkIncrementalYes" SuppressStartupBanner="true" AdditionalLibraryDirectories="../lib" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/test2.pdb" SubSystem="subSystemConsole" AdditionalDependencies="iphreeqcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
<Tool Name="VFResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="rcEnglishUS" ResourceOutputFileName="$(INTDIR)/$(InputName).res"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(OUTDIR)/test2.tlb"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="Release|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" CallingConvention="callConventionCVF" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" AssemblerListingLocation="$(INTDIR)/"/>
<Tool Name="VFLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile="$(OUTDIR)/test2.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="../lib" ProgramDatabaseFile="$(OUTDIR)/test2.pdb" SubSystem="subSystemConsole" AdditionalDependencies="iphreeqc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
<Tool Name="VFResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="rcEnglishUS" ResourceOutputFileName="$(INTDIR)/$(InputName).res"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(OUTDIR)/test2.tlb"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration>
<Configuration Name="MemDebug|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" Preprocess="preprocessYes" CallingConvention="callConventionCVF" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" AssemblerListingLocation="$(INTDIR)/" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug" WarnArgMismatch="true"/>
<Tool Name="VFLinkerTool" AdditionalOptions="/MACHINE:I386" OutputFile="$(OUTDIR)/test2.exe" LinkIncremental="linkIncrementalYes" SuppressStartupBanner="true" AdditionalLibraryDirectories="../lib" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/test2.pdb" SubSystem="subSystemConsole" AdditionalDependencies="IPhreeqcmd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
<Tool Name="VFResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="rcEnglishUS" ResourceOutputFileName="$(INTDIR)/$(InputName).res"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(OUTDIR)/test2.tlb"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;fi;fd"/>
<Filter Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp">
<File RelativePath="test2.for"/></Filter></Files>
<Globals/></VisualStudioProject>

11
test2/tester Normal file
View File

@ -0,0 +1,11 @@
SOLUTION 1
pH 7
Na 1
PHASES
Fix_H+
H+ = H+
log_k 0
EQUILIBRIUM_PHASES
Fix_H+ -10 HCl 10
##SELECTED_OUTPUT
END

3838
test2/wateq4f.dat Normal file

File diff suppressed because it is too large Load Diff