/*! \file fortranshape.cc * \brief prepare information to pass to Fortran subroutines (implementation) * * ---------------------------------------------------------------------------- * * $Id: fortranshape.cc,v 1.1 2002-12-23 13:54:58 forbrig Exp $ * \author Thomas Forbriger * \date 23/12/2002 * * prepare information to pass to Fortran subroutines (implementation) * * Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) * * REVISIONS and CHANGES * - 23/12/2002 V1.0 Thomas Forbriger * * ============================================================================ */ #define AFF_FORTRANSHAPE_CC_VERSION \ "AFF_FORTRANSHAPE_CC V1.0 " #define AFF_FORTRANSHAPE_CC_CVSID \ "$Id: fortranshape.cc,v 1.1 2002-12-23 13:54:58 forbrig Exp $" #include #include namespace aff { namespace util { //! all calculations are done herein FortranShape::FortranShape(const Tshape& inshape, const bool& BaseOne) { // create a local copy of the shape Tshape shape(inshape); // set first index as required if (BaseOne) shape.setfirst(TIndexVec(1)); // extract first and last index Mfirst=shape.first(); Mlast=shape.last(); // extract offset to first element Moffset=shape.first_offset(); // first test for Fortran memory layout for (Tdim i=1; i