* Move source code to src directory.
* Add autotools build system for opmtransport library.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
SUBDIRS = src
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
@@ -0,0 +1,36 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
AC_INIT([opmtransport], [0.1], [Jostein.R.Natvig@sintef.no])
|
||||
|
||||
AM_INIT_AUTOMAKE([foreign -Wall])
|
||||
|
||||
LT_INIT
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_SRCDIR([src/spu_explicit.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([assert.h stdlib.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_REALLOC
|
||||
AC_CHECK_FUNCS([floor memmove memset])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,10 @@
|
||||
libopmtransportdir = $(includedir)/opm/transport
|
||||
|
||||
lib_LTLIBRARIES = libopmtransport.la
|
||||
|
||||
libopmtransport_HEADERS = \
|
||||
spu_explicit.h \
|
||||
grid.h
|
||||
|
||||
libopmtransport_la_SOURCES = \
|
||||
spu_explicit.c
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
Copyright 2010 SINTEF ICT, Applied Mathematics.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_GRID_HEADER_INCLUDED
|
||||
#define OPM_GRID_HEADER_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* GRID_TOPOLOGY and GRID_GEOMETRY must be at the beginning of every
|
||||
* grid type.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define GRID_TOPOLOGY \
|
||||
int dimensions; \
|
||||
\
|
||||
int number_of_cells; \
|
||||
int number_of_faces; \
|
||||
int number_of_nodes; \
|
||||
\
|
||||
int *face_nodes; \
|
||||
int *face_nodepos; \
|
||||
int *face_cells; \
|
||||
\
|
||||
int *cell_faces; \
|
||||
int *cell_facepos; \
|
||||
|
||||
#define GRID_GEOMETRY \
|
||||
double *node_coordinates; \
|
||||
\
|
||||
double *face_centroids; \
|
||||
double *face_areas; \
|
||||
double *face_normals; \
|
||||
\
|
||||
double *cell_centroids; \
|
||||
double *cell_volumes; \
|
||||
|
||||
|
||||
typedef struct {
|
||||
GRID_TOPOLOGY
|
||||
GRID_GEOMETRY
|
||||
} grid_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OPM_GRID_HEADER_INCLUDED */
|
||||
Reference in New Issue
Block a user