mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
working on adding examples to doxygen
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4392 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
b7317dda11
commit
d478c050a3
19
doc/examples/DestroyIPhreeqc.c
Normal file
19
doc/examples/DestroyIPhreeqc.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include <stdlib.h>
|
||||
#include <IPhreeqc.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int id;
|
||||
|
||||
id = CreateIPhreeqc();
|
||||
if (id < 0) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (DestroyIPhreeqc(id) != IPQ_OK) {
|
||||
OutputError(id);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
15
doc/examples/F90DestroyIPhreeqc.f90
Normal file
15
doc/examples/F90DestroyIPhreeqc.f90
Normal file
@ -0,0 +1,15 @@
|
||||
PROGRAM example
|
||||
INCLUDE "IPhreeqc.f90.inc"
|
||||
INTEGER(KIND=4) :: id
|
||||
|
||||
id = CreateIPhreeqc()
|
||||
IF (id.LT.0) THEN
|
||||
STOP
|
||||
ENDIF
|
||||
|
||||
IF (DestroyIPhreeqc(id).NE.IPQ_OK) THEN
|
||||
CALL OutputError(id)
|
||||
STOP
|
||||
ENDIF
|
||||
|
||||
END PROGRAM example
|
||||
@ -11,7 +11,16 @@ LIBTOOL = /bin/sh ../../_build/libtool
|
||||
LDFLAGS =
|
||||
IPHREEQC_LA = ../../_build/src/libiphreeqc.la
|
||||
|
||||
all: AccumulateLine F90AccumulateLine CreateIPhreeqc F90CreateIPhreeqc
|
||||
TARGETS = \
|
||||
AccumulateLine \
|
||||
F90AccumulateLine \
|
||||
CreateIPhreeqc \
|
||||
F90CreateIPhreeqc \
|
||||
DestroyIPhreeqc \
|
||||
F90DestroyIPhreeqc
|
||||
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
AccumulateLine: AccumulateLine.lo $(IPHREEQC_LA)
|
||||
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $< $(IPHREEQC_LA)
|
||||
@ -25,6 +34,13 @@ CreateIPhreeqc: CreateIPhreeqc.lo $(IPHREEQC_LA)
|
||||
F90CreateIPhreeqc: F90CreateIPhreeqc.lo $(IPHREEQC_LA)
|
||||
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $< $(IPHREEQC_LA) $(FCLIBS)
|
||||
|
||||
DestroyIPhreeqc: DestroyIPhreeqc.lo $(IPHREEQC_LA)
|
||||
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $< $(IPHREEQC_LA)
|
||||
|
||||
F90DestroyIPhreeqc: F90DestroyIPhreeqc.lo $(IPHREEQC_LA)
|
||||
$(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $< $(IPHREEQC_LA) $(FCLIBS)
|
||||
|
||||
|
||||
.SUFFIXES: .c .cxx .f .f90 .lo
|
||||
|
||||
|
||||
@ -40,6 +56,13 @@ F90CreateIPhreeqc: F90CreateIPhreeqc.lo $(IPHREEQC_LA)
|
||||
.f90.lo:
|
||||
$(LIBTOOL) --mode=compile $(FC) $(FFLAGS) -c -o $@ $<
|
||||
|
||||
LO_FILES = \
|
||||
AccumulateLine.lo \
|
||||
F90AccumulateLine.lo \
|
||||
CreateIPhreeqc.lo \
|
||||
F90CreateIPhreeqc.lo \
|
||||
DestroyIPhreeqc.lo \
|
||||
F90DestroyIPhreeqc.lo
|
||||
|
||||
clean:
|
||||
$(LIBTOOL) --mode=clean rm -f AccumulateLine AccumulateLine.lo F90AccumulateLine F90AccumulateLine.lo
|
||||
$(LIBTOOL) --mode=clean rm -f *~ $(TARGETS) $(LO_FILES)
|
||||
|
||||
15
doc/examples/ex2
Normal file
15
doc/examples/ex2
Normal file
@ -0,0 +1,15 @@
|
||||
TITLE Example 2.--Temperature dependence of solubility
|
||||
of gypsum and anhydrite
|
||||
SOLUTION 1 Pure water
|
||||
pH 7.0
|
||||
temp 25.0
|
||||
EQUILIBRIUM_PHASES 1
|
||||
Gypsum 0.0 1.0
|
||||
Anhydrite 0.0 1.0
|
||||
REACTION_TEMPERATURE 1
|
||||
25.0 75.0 in 51 steps
|
||||
SELECTED_OUTPUT
|
||||
-file ex2.sel
|
||||
-temperature
|
||||
-si anhydrite gypsum
|
||||
END
|
||||
@ -112,6 +112,12 @@ extern "C" {
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*
|
||||
* @par C Example:
|
||||
* \include DestroyIPhreeqc.c
|
||||
*
|
||||
* @par Fortran90 Example:
|
||||
* \include F90DestroyIPhreeqc.f90
|
||||
*/
|
||||
DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user