Skip to content

Commit bd2881c

Browse files
committed
updated docs and website
1 parent ad3442a commit bd2881c

38 files changed

+50360
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ The physical organization is as follows.
5454
A test file `test_install.c` can be used for usage examples. This
5555
directory's internal README also contains best practices when calling
5656
Fortran from C/C++.
57+
* `docs` contains the html source for generating the DelaunaySparse website.
5758
* `USAGE` provides additional detailed user information.
5859
* DelaunaySparse is shared under the MIT Software License, in the `LICENSE`
5960
file.

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage Information for using DELAUNAYSPARSE.
1+
# Usage Information for DELAUNAYSPARSE.
22

33
DELAUNAYSPARSE solves the multivariate interpolation problem:
44

c_binding/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Tyler H. Chang, Layne T. Watson, Thomas C. H. Lux,
4+
Ali R. Butt, Kirk W. Cameron, and Yili Hong.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

c_binding/Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FORT = gfortran
2+
CC = gcc
3+
CFLAGS = -c
4+
OPTS = -fopenmp
5+
LIBS = blas.f lapack.f
6+
LEGACY = -std=legacy
7+
8+
all: test_install.o delsparse_bind_c.o delsparse.o slatec.o delsparse.h
9+
$(FORT) $(OPTS) test_install.o delsparse_bind_c.o delsparse.o slatec.o $(LIBS) -o test_install
10+
./test_install
11+
12+
test_install.o: test_install.c
13+
$(CC) $(CFLAGS) test_install.c -o test_install.o
14+
15+
delsparse_bind_c.o: delsparse_bind_c.f90 delsparse.o
16+
$(FORT) $(CFLAGS) $(OPTS) delsparse_bind_c.f90 -o delsparse_bind_c.o
17+
18+
delsparse.o: delsparse.f90
19+
$(FORT) $(CFLAGS) $(OPTS) delsparse.f90 -o delsparse.o
20+
21+
slatec.o : slatec.f
22+
$(FORT) $(CFLAGS) $(OPTS) $(LEGACY) slatec.f -o slatec.o
23+
24+
clean:
25+
rm -f *.o *.mod test_install

c_binding/README

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
C bindings for the DELAUNAYSPARSE Fortran package.
2+
3+
4+
REQUIREMENTS:
5+
6+
A Fortran compiler that supports BIND(C).
7+
8+
USAGE:
9+
10+
Use the C bindings in delsparse_bind_c.f90 to call DELAUNAYSPARSE from
11+
inside a C/C++ program.
12+
13+
Because C does not support optional arguments, there are 4 variations of
14+
DELAUNAYSPARSE{S|P}:
15+
* c_delaunaysparse{s|p} accepts none of the optional arguments;
16+
* c_delaunaysparse{s|p}_interp accepts an integer ir for specifying the
17+
dimension of the response variables, plus the two variables needed
18+
for computing the value of the interpolant, interp_in and interp_out;
19+
* c_delaunaysparse{s|p}_opts accepts all of the optional arguments
20+
EXCEPT interp_in and interp_out;
21+
* c_delaunaysparse{s|p}_interp_opts accepts all of the optional arguments,
22+
plus the response dimension ir, which cannot be inferred as it is by
23+
the Fortran subroutines.
24+
25+
When using the 4 subroutines above, keep in mind the following:
26+
* C passes by copy and Fortran passes by reference. Therefore, any non-array
27+
type variable must be manually passed by address (i.e., by using the `&`
28+
character);
29+
* C matrices are stored in row major ordering, while Fortran stores in
30+
column major ordering. Therefore, your data may need to be transposed
31+
before calling any of the above subroutines;
32+
* In C, a double-indexed array is treated as an array of pointers, whereas
33+
Fortran expects a contiguous chunk of memory. Often, it is better to
34+
allocate a one-dimensional array and manually index it, then pass this
35+
"flat" array to the Fortran subroutine.
36+
37+
Usage examples are provided in the sample file, test_install.c.
38+
39+
CONTRIBUTORS:
40+
41+
Tyler Chang, [email protected]
42+

0 commit comments

Comments
 (0)