Commit e940b7a6 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

create base files for source code

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3910
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 596f11b3
......@@ -54,10 +54,13 @@ $(call CHECKVARS,TF_BROWSER TF_WWWBASEDIR)
LIBHEADERS=$(filter-out none,$(wildcard *.h))
LIBSRC=$(filter-out none,$(wildcard *.cc))
LIBCCSRC=$(filter-out none,$(wildcard *.cc))
LIBCSRC=$(filter-out none,$(wildcard *.c))
TESTHEADERS=$(wildcard tests/*.h)
TESTSRC=$(wildcard tests/*.cc)
TESTCCSRC=$(wildcard tests/*.cc)
TESTCSRC=$(wildcard tests/*.c)
INCINSTALLPATH=$(LOCINCLUDEDIR)/stfinv
LIBINSTALLPATH=$(LOCLIBDIR)
......@@ -88,7 +91,7 @@ CXXFLAGS+=-Wall $(FLAGS)
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
EDITFILES=Makefile README $(wildcard *.cfg *.h *.cc)
EDITFILES=Makefile README $(wildcard *.cfg *.h *.cc *.c)
flist: $(EDITFILES)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -115,19 +118,24 @@ clean: ;
> $@; \
[ -s $@ ] || rm -f $@'
%.d: %.c
$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \
| sed '\''s,\($(notdir $*)\)\.o[ :]*,$(dir $@)\1.o $@ : ,g'\'' \
> $@; \
[ -s $@ ] || rm -f $@'
#======================================================================
# library part
# ------------
include $(patsubst %.cc,%.d,$(LIBSRC) $(TESTSRC))
include $(patsubst %.cc,%.d,$(LIBCCSRC) $(TESTCCSRC)) \
$(patsubst %.c,%.d,$(LIBCSRC) $(TESTCSRC))
libstfinv.a: $(patsubst %.cc,%.o,$(LIBSRC))
libstfinv.a: $(patsubst %.cc,%.o,$(LIBCCSRC)) \
$(patsubst %.c,%.o,$(LIBCSRC))
ar rcv $@ $^
ranlib $@
libstfinv.so: $(patsubst %.cc,%.o,$(LIBSRC))
$(CXX) $(CXXFLAGS) -shared -o $@ $^
#----------------------------------------------------------------------
# comment stripping
......@@ -195,7 +203,7 @@ DOXYWWWPATH=$(TF_WWWBASEDIR)/libstfinv
doxyclean: ;/bin/rm -rfv $(DOXYWWWPATH) doxydoc.xxx
DOXYSRC=$(LIBSRC) $(LIBHEADERS) README $(TESTSRC)
DOXYSRC=$(LIBCCSRC) $(LIBCSRC) $(LIBHEADERS) README $(TESTCCSRC) $(TESTCSRC)
PWD=$(shell env pwd)
# create doxygen intermediate configuration
......
/*! \file stfinv.c
* \brief C API to library (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id$
*
* ----
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
* \author Thomas Forbriger
* \date 06/05/2011
*
* C API to library (implementation)
*
* Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define STFINV_STFINV_C_VERSION \
"STFINV_STFINV_C V1.0 "
#define STFINV_STFINV_C_CVSID \
"$Id$"
#include <stfinv/stfinv.h>
/* ----- END OF stfinv.c ----- */
/*! \file stfinv.h
* \brief C API to library (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 06/05/2011
*
* C API to library (implementation)
*
* Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
*
* REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef STFINV_STFINV__H_VERSION
#define STFINV_STFINV__H_VERSION \
"STFINV_STFINV__H V1.0 "
#define STFINV_STFINV__H_CVSID \
"$Id$"
#include <stfinv/waveformheader.h>
/*! A struct to store the time series for a waveform triple.
*/
struct WaveformTriple {
/*! The header is expected to be the same for all three time series.
* In particular the number of samples must be appropriate for the memory
* allocated for all three time series arrays.
*/
struct TripleHeader header;
/*! Time series of recorded data.
*/
float* data;
/*! Time series of synthetic data.
* This is understood as the impulse response of the subsurface.
*/
float* synthetics;
/*! Time series of convolved synthetic data.
* This will contain the synthetic data convolved with the obtained source
* time function as a result of a call to the library functions.
*/
float* convolvedsynthetics;
}; // struct WaveformTriple
/*----------------------------------------------------------------------*/
/*! A struct to store a single waveform.
* This will be used to pass the source time function.
*/
struct Waveform {
/*! Temporal sampling
*/
struct WaveformHeader sampling;
/*! Time series of waveform.
*/
float* series;
}; // struct Waveform
/*----------------------------------------------------------------------*/
/*! Array of waveform triples.
* This is used to pass data for a complete profile.
*/
struct Triples {
/*! Number of triples in the array.
*/
int n;
/*! Pointer to array of waveform tripples.
*/
struct WaveformTriple* triples;
}; // struct Triples
#endif // STFINV_STFINV__H_VERSION (includeguard)
/* ----- END OF stfinv.h ----- */
/*! \file stfinvbase.cc
* \brief C++ interface and abstract base class (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 06/05/2011
*
* C++ interface and abstract base class (implementation)
*
* Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
*
* REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define STFINV_STFINVBASE_CC_VERSION \
"STFINV_STFINVBASE_CC V1.0 "
#define STFINV_STFINVBASE_CC_CVSID \
"$Id$"
#include <stfinv/stfinvbase.h>
namespace stfinv {
} // namespace stfinv
/* ----- END OF stfinvbase.cc ----- */
/*! \file stfinvbase.h
* \brief C++ interface and abstract base class (prototypes)
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 06/05/2011
*
* C++ interface and abstract base class (prototypes)
*
* Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
*
* REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef STFINV_STFINVBASE_H_VERSION
#define STFINV_STFINVBASE_H_VERSION \
"STFINV_STFINVBASE_H V1.0 "
#define STFINV_STFINVBASE_H_CVSID \
"$Id$"
namespace stfinv {
} // namespace stfinv
#endif // STFINV_STFINVBASE_H_VERSION (includeguard)
/* ----- END OF stfinvbase.h ----- */
/*! \file waveformheader.h
* \brief definition of waveform header to be used in C and C++ (prototypes)
*
* ----------------------------------------------------------------------------
*
* $Id$
* \author Thomas Forbriger
* \date 06/05/2011
*
* definition of waveform header to be used in C and C++ (prototypes)
*
* Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
*
* ----
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----
*
*
* REVISIONS and CHANGES
* - 06/05/2011 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef STFINV_WAVEFORMHEADER_H_VERSION
#define STFINV_WAVEFORMHEADER_H_VERSION \
"STFINV_WAVEFORMHEADER_H V1.0 "
#define STFINV_WAVEFORMHEADER_H_CVSID \
"$Id$"
#ifdef __cplusplus
extern "C" {
#endif
/*! Structure to hold header information for a time series array
*/
struct WaveformHeader {
/*! Sampling interval in seconds.
*/
double dt;
/*! Number of samples in time series array.
*/
int n;
}; // struct WaveformHeader
/*----------------------------------------------------------------------*/
/*! Structure to hold header information for a triple of waveforms
*/
struct TripleHeader {
/*! Source coordinates in meters.
*
* - \c sx: x-coordinate
* - \c sy: y-coordinate
* - \c sz: z-coordinate
*/
double sx, sy, sz;
/*! Receiver coordinates in meters.
*
* - \c rx: x-coordinate
* - \c ry: y-coordinate
* - \c rz: z-coordinate
*/
double rx, ry, rz;
/*! Temporal sampling of all three waveforms.
*/
struct WaveformHeader sampling;
}; // struct TripleHeader
#ifdef __cplusplus
} // extern "C"
#endif
#endif // STFINV_WAVEFORMHEADER_H_VERSION (includeguard)
/* ----- END OF waveformheader.h ----- */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment