From 5c527135bacd9e9a8c59cf510ae65951feece89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Kl=C3=B6fkorn?= <robertk@mathematik.uni-stuttgart.de> Date: Wed, 23 Mar 2005 11:36:06 +0000 Subject: [PATCH] removed BSGridVecType, which is double * now. git-svn-id: https://dune.mathematik.uni-freiburg.de/svn/alugrid/trunk@144 0d966ed9-3843-0410-af09-ebfb50bd7c74 --- src/gitter_geo.cc | 7 +++++-- src/gitter_impl.h | 8 ++++---- src/gitter_sti.h | 22 +++++++++++----------- src/mapp_tetra_3d_ext.h | 8 ++++---- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/gitter_geo.cc b/src/gitter_geo.cc index 75651ab84..89d327016 100644 --- a/src/gitter_geo.cc +++ b/src/gitter_geo.cc @@ -9,6 +9,9 @@ /* $Id$ * $Log$ + * Revision 1.7 2005/03/23 11:36:06 robertk + * removed BSGridVecType, which is double * now. + * * Revision 1.6 2004/12/21 17:36:45 robertk * removed some warnings. * @@ -277,7 +280,7 @@ int Gitter :: Geometric :: Tetra :: tagForBallRefinement (const double (¢er) : (request (myrule_t :: nosplit), 0)) : (request (myrule_t :: crs), 1) ; } -void Gitter :: Geometric :: Tetra :: outerNormal (int face , BSGridVecType & normal ) +void Gitter :: Geometric :: Tetra :: outerNormal (int face , double * normal ) { BSGridLinearSurfaceMapping LSM(this->myvertex(face,0)->Point(), @@ -288,7 +291,7 @@ void Gitter :: Geometric :: Tetra :: outerNormal (int face , BSGridVecType & no return; } -void Gitter :: Geometric :: Tetra :: neighOuterNormal (int face , BSGridVecType & normal ) +void Gitter :: Geometric :: Tetra :: neighOuterNormal (int face , double * normal ) { // just use with other twist to minus normal BSGridLinearSurfaceMapping diff --git a/src/gitter_impl.h b/src/gitter_impl.h index c9b805b36..83acf3ea0 100644 --- a/src/gitter_impl.h +++ b/src/gitter_impl.h @@ -93,7 +93,7 @@ class GitterBasis : public virtual Gitter, public Gitter :: Geometric { virtual helement_STI * getGhost () { return 0; } // points inside ghosts - void faceNormal( BSGridVecType & normal) const; + void faceNormal( double * normal) const; }; typedef Hbnd3Top < Hbnd3Default > hbndseg3_IMPL ; @@ -115,7 +115,7 @@ class GitterBasis : public virtual Gitter, public Gitter :: Geometric { virtual helement_STI * getGhost () { return 0; } // points inside ghosts - void faceNormal( BSGridVecType & normal) const; + void faceNormal( double * normal) const; }; typedef Hbnd4Top < Hbnd4Default > hbndseg4_IMPL ; @@ -377,7 +377,7 @@ inline int GitterBasis :: Objects :: Hbnd3Default :: ghostLevel () const { return level() ; } -inline void GitterBasis :: Objects :: Hbnd3Default :: faceNormal( BSGridVecType & normal) const { +inline void GitterBasis :: Objects :: Hbnd3Default :: faceNormal( double * normal) const { hface3_GEO * face = this->myhface3(0); int tw = this->twist(0); @@ -403,7 +403,7 @@ inline int GitterBasis :: Objects :: Hbnd4Default :: ghostLevel () const { return level() ; } -inline void GitterBasis :: Objects :: Hbnd4Default :: faceNormal( BSGridVecType & normal) const { +inline void GitterBasis :: Objects :: Hbnd4Default :: faceNormal( double * normal) const { cerr << "ERORR: Hbnd4Default :: faceNormal not implemented! " << __FILE__ << __LINE__ << endl; return ; } diff --git a/src/gitter_sti.h b/src/gitter_sti.h index 4313d9297..f1d548068 100644 --- a/src/gitter_sti.h +++ b/src/gitter_sti.h @@ -28,13 +28,13 @@ // if DUNE uses this grid the _DUNE_USES_BSGRID_ variable should be defined // otherwise some dummy are set -#ifndef _DUNE_USES_BSGRID_ -#include "dummyindexstack.h" - +#include "indexstack.h" +#ifdef _DUNE_USES_BSGRID_ +enum { lengthOfFiniteStack = 10000 }; +typedef IndexStack<int,lengthOfFiniteStack> IndexManagerType; +#else typedef DummyIndexStack<int> IndexManagerType; - -typedef double BSGridVec [3]; -typedef BSGridVec BSGridVecType; +typedef BSGridVec double; #endif // number of different index manager that exists @@ -325,14 +325,14 @@ class Gitter { // the Dune extentions // calculate outer normal of face face - virtual void outerNormal(int face, BSGridVecType & normal) + virtual void outerNormal(int face, double * normal) { cerr << "helement :: outerNormal(..) : in " << __FILE__ << " " << __LINE__ << " not overloaded! \n"; abort(); } // calculate outer normal of face face - virtual void neighOuterNormal(int faceInNeigh, BSGridVecType & normal) + virtual void neighOuterNormal(int faceInNeigh, double * normal) { cerr << "helement :: neighOuterNormal(..) : in " << __FILE__ << " " << __LINE__ << " not overloaded! \n"; abort(); @@ -408,7 +408,7 @@ class Gitter { // default return 0 means we have no ghost element on this boundary // segment, because we only have ghost on interior boundary virtual helement * getGhost () = 0; // should return 0 for not interior boundaries - virtual void faceNormal (BSGridVecType & normal) const = 0 ; + virtual void faceNormal (double * normal) const = 0 ; public : virtual void restoreFollowFace () = 0 ; } ; @@ -855,8 +855,8 @@ class Gitter { // Dune extentions // calculate outer normal of face face - virtual void outerNormal (int face , BSGridVecType & normal ); - virtual void neighOuterNormal (int faceInNeigh , BSGridVecType & normal ); + virtual void outerNormal (int face , double * normal ); + virtual void neighOuterNormal (int faceInNeigh , double * normal ); private : myhface3_t * f [4] ; diff --git a/src/mapp_tetra_3d_ext.h b/src/mapp_tetra_3d_ext.h index 96272f6bd..f952d5da2 100644 --- a/src/mapp_tetra_3d_ext.h +++ b/src/mapp_tetra_3d_ext.h @@ -1,5 +1,5 @@ -#ifndef __DUNE_MAPP_TETRA_3D_EXT_HH__ -#define __DUNE_MAPP_TETRA_3D_EXT_HH__ +#ifndef __MAPP_TETRA_3D_EXT_HH__ +#define __MAPP_TETRA_3D_EXT_HH__ // BSGridVecType is defined in BSGrid interface to dune or in gitter_sti.hh class BSGridLinearSurfaceMapping : public LinearSurfaceMapping @@ -9,7 +9,7 @@ public: (const double (&)[3], const double (&)[3], const double (&)[3]); // same as method normal of LinearSurfaceMapping, just for Dune Vecs - inline void normal(BSGridVecType &normal) const; + inline void normal(double * normal) const; }; @@ -19,7 +19,7 @@ const double (&x1)[3], const double (&x2)[3]) { } -inline void BSGridLinearSurfaceMapping :: normal (BSGridVecType & normal) const +inline void BSGridLinearSurfaceMapping :: normal (double * normal) const { normal[0] = this->_n[0]; normal[1] = this->_n[1]; -- GitLab