[PATCH] Remaining FieldCentering cleanup
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Thu Nov 20 19:46:15 UTC 2003
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 ¢eringType() const
+ inline CenteringType centeringType() const
{
return centering_type_m;
+ }
+
+ inline ContinuityType continuityType() const
+ {
+ return discontinuous_m;
}
inline bool discontinuous() const
More information about the pooma-dev
mailing list