freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Remaining FieldCentering cleanup


From: Richard Guenther
Subject: [PATCH] Remaining FieldCentering cleanup
Date: Thu, 20 Nov 2003 20:46:15 +0100 (CET)

Hi!

The following is the remaining cleanup of the FieldCentering class.

Tested together with all other changes.

Ok?

Richard.


Index: FieldCentering.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/FieldCentering.h,v
retrieving revision 1.8
diff -u -u -r1.8 FieldCentering.h
--- FieldCentering.h    20 Nov 2003 19:19:28 -0000      1.8
+++ FieldCentering.h    20 Nov 2003 19:41:17 -0000
@@ -250,15 +250,13 @@
   /// Sub-centering creation function.  This is not really meant to be
   /// called by users.
   /// Return a centering with one specified value.
-  const Centering<Dim> operator[](int iSubField) const
+  Centering<Dim> operator[](int iSubField) const
   {
 #if POOMA_BOUNDS_CHECK
     PInsist(iSubField >= 0 && iSubField < size(),
            "Illegal attempt to extract a non-existent centering.");
 #endif
-    return Centering<Dim>(centering_type_m, discontinuous_m,
-                         Orientations(1, orientations_m[iSubField]),
-                         Positions(1, positions_m[iSubField]));
+    return Centering<Dim>(*this, iSubField);
   }


@@ -271,9 +269,14 @@
   //@name Accessors.
   //@{

-  inline const CenteringType &centeringType() const
+  inline CenteringType centeringType() const
     {
       return centering_type_m;
+    }
+
+  inline ContinuityType continuityType() const
+    {
+      return discontinuous_m;
     }

   inline bool discontinuous() const

reply via email to

[Prev in Thread] Current Thread [Next in Thread]