LifeV
|
A matrix class for interfacing with fortran. More...
#include <FortranWrapper.hpp>
Data Fields | |
size_t | M_arrayDimensions [7] |
ScalarType * | M_cppRepresentation |
ScalarType * | M_fortranRepresentation |
const size_t | M_numDimensions |
Public typedefs | |
typedef ScalarType | scalar_Type |
Constructors and destructor | |
FortranMatrix () | |
FortranMatrix (size_t dim1, size_t dim2=1) | |
FortranMatrix (ScalarType *cppArray, size_t dim1, size_t dim2=1) | |
virtual | ~FortranMatrix () |
Operators | |
operator ScalarType * () | |
ScalarType & | operator() (size_t index1, size_t index2=0) |
A matrix class for interfacing with fortran.
A minimal class used when passing multi-dimensional array arguments from C++ to FORTRAN 77 (received as FORTRAN arrays), and subsequently returned back to C++ as properly aranged C++ arrays.
FORTRAN organises data in a "column-first" order, while C++ organises data in a "row-first" order.
(1) The FortranMatrix class can take a C++ array as a constructor parameter. A FORTRAN compatible copy of the array is then made. The destructor will then copy the result back to the original c++ array.
(2) The FortranMatrix class provides "subscript operators" allowing the programmer to read and write from the array, using FORTRAN-like syntax and indexing semantics.
/author Carsten A. Arnholm, 04-MAR-1996 (Modified by L. Formaggia MAR 2002)
Definition at line 95 of file FortranWrapper.hpp.
typedef ScalarType scalar_Type |
Definition at line 100 of file FortranWrapper.hpp.
|
inline |
Definition at line 103 of file FortranWrapper.hpp.
FortranMatrix | ( | size_t | dim1, |
size_t | dim2 = 1 |
||
) |
Definition at line 189 of file FortranWrapper.hpp.
FortranMatrix | ( | ScalarType * | cppArray, |
size_t | dim1, | ||
size_t | dim2 = 1 |
||
) |
Definition at line 204 of file FortranWrapper.hpp.
|
virtual |
Definition at line 231 of file FortranWrapper.hpp.
operator ScalarType * | ( | ) |
Definition at line 257 of file FortranWrapper.hpp.
ScalarType & operator() | ( | size_t | index1, |
size_t | index2 = 0 |
||
) |
Definition at line 264 of file FortranWrapper.hpp.
size_t M_arrayDimensions[7] |
Definition at line 116 of file FortranWrapper.hpp.
ScalarType* M_cppRepresentation |
Definition at line 117 of file FortranWrapper.hpp.
ScalarType* M_fortranRepresentation |
Definition at line 118 of file FortranWrapper.hpp.
const size_t M_numDimensions |
Definition at line 119 of file FortranWrapper.hpp.