f77proto.h 2.65 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
/*! \file f77proto.h
 * \brief prototypes for Fortran interface (prototypes)
 * 
 * ----------------------------------------------------------------------------
 * 
6
 * $Id: f77proto.h,v 1.4 2002-12-27 16:18:08 forbrig Exp $
thomas.forbriger's avatar
thomas.forbriger committed
7
8
9
10
 * \author Thomas Forbriger
 * \date 22/12/2002
 * 
 * prototypes for Fortran interface (prototypes)
11
12
13
 *
 * \sa \ref page_fortran
 * \sa f77interface
thomas.forbriger's avatar
thomas.forbriger committed
14
15
16
17
18
 * 
 * Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) 
 * 
 * REVISIONS and CHANGES 
 *  - 22/12/2002   V1.0   Thomas Forbriger
19
20
 *  - 27/12/2002   V1.1   (thof)
 *                        - now provides some documentation
thomas.forbriger's avatar
thomas.forbriger committed
21
22
23
24
25
 * 
 * ============================================================================
 */

// include guard
26
#ifndef AFF_F77PROTO_H_VERSION
thomas.forbriger's avatar
thomas.forbriger committed
27

28
#define AFF_F77PROTO_H_VERSION \
29
  "AFF_F77PROTO_H   V1.1"
30
#define AFF_F77PROTO_H_CVSID \
31
  "$Id: f77proto.h,v 1.4 2002-12-27 16:18:08 forbrig Exp $"
thomas.forbriger's avatar
thomas.forbriger committed
32

33
#include<aff/array.h>
thomas.forbriger's avatar
thomas.forbriger committed
34

35
36
#include<complex>

37
38
39
40
41
42
/*! \brief This namespace collects all test functions for interfacing Fortran 77
 * 
 * \sa \ref page_fortran
 * \sa tests/f77test.cc
 * \sa tests/f77interface.cc
 */
43
namespace f77interface {
thomas.forbriger's avatar
thomas.forbriger committed
44

45
46
47
typedef aff::Array<std::complex<float> > Tcarray;
typedef aff::Array<std::complex<double> > Tzarray;

48
49
50
51
52
53
/*! \brief fill an AFF array thorugh a Fortran subroutine
 *
 * An aff::Array<int> object is passed to the Fortran subroutine fill and is
 * filled with values there. 
 * The concept is discussed on page "\ref page_fortran".
 */
54
int fill(const aff::Array<int>& fa);
55
56
57
58
59
60
61
62
63
64

/*! \brief fill the Fortran common-block array
 *
 * Two aff::Array<float> objects are passed to the Fortran subroutine
 * fillarray which calculates complex values from the elements of these arrays
 * and fills the array in common-block \c f77common which is defined in
 * tests/f77common.inc.
 *
 * The concept is discussed on page "\ref page_fortran".
 */
65
66
int fillarray(const aff::Array<float>& v1,
              const aff::Array<float>& v2);
67
68
69
70
71
72
73
74
75

/*! \brief returns results from Fortran subroutine sums
 *
 * The Fortran subroutine sums calculates column-sums from the array in the
 * common block. These values are return in an 
 * \code aff::Array<std::complex<float> > \endcode object.
 *
 * The concept is discussed on page "\ref page_fortran".
 */
76
Tcarray sums();
77
78
79
80
81
82
83
84
85
86

/*! \brief returns direct access to Fortran common block
 *
 * This function returns a 
 * \code aff::Array<std::complex<double> > \endcode object, which offers
 * direct read/write access to the array in the Fortran common block
 * f77common.
 *
 * The concept is discussed on page "\ref page_fortran".
 */
87
Tzarray viewcommon();
88
89
90
91
92

} // namespace f77interface


#endif // AFF_F77PROTO_H_VERSION (includeguard)
thomas.forbriger's avatar
thomas.forbriger committed
93
94

/* ----- END OF f77proto.h ----- */