? LINUXgcc ? LINUXgcc-opt ? tests/LINUXgcc ? tests/LINUXgcc-opt Index: Interpolation.h =================================================================== RCS file: /cvsroot/freepooma/freepooma/src/Particles/Interpolation.h,v retrieving revision 1.10 diff -u -r1.10 Interpolation.h --- Interpolation.h 1 Nov 2004 18:16:59 -0000 1.10 +++ Interpolation.h 11 Apr 2005 12:56:24 -0000 @@ -220,6 +220,25 @@ void setExternalGuards(const Field&, typename Field::Element_t); +/// getMaximumStencilWidth returns the maximum extent a stencil may +/// have if operating on the physical domain. + +template +GuardLayers getMaximumStencilWidth(const Layout& l) +{ + GuardLayers gl = l.externalGuards(); + if (l.sizeGlobal() > 1) { + for (int i=0; i& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -188,7 +188,7 @@ "Field and Particle Position must have same number of patches!"); // Check that the Field has adequate guard layers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -231,7 +231,7 @@ "Field and Particle Position must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -281,7 +281,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -320,7 +320,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -365,7 +365,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -412,7 +412,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -449,7 +449,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -492,7 +492,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for CIC - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, Index: InterpolatorSUDS.h =================================================================== RCS file: /cvsroot/freepooma/freepooma/src/Particles/InterpolatorSUDS.h,v retrieving revision 1.12 diff -u -r1.12 InterpolatorSUDS.h --- InterpolatorSUDS.h 1 Nov 2004 18:16:59 -0000 1.12 +++ InterpolatorSUDS.h 11 Apr 2005 12:56:24 -0000 @@ -153,7 +153,7 @@ "Field and Particle Position must have same number of patches!"); // Check that the Field has adequate guard layers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -189,7 +189,7 @@ "Field and Particle Position must have same number of patches!"); // Check that the Field has adequate guard layers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -232,7 +232,7 @@ "Field and Particle Position must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -282,7 +282,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -321,7 +321,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -366,7 +366,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -413,7 +413,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -450,7 +450,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1, @@ -493,7 +493,7 @@ "Field and Particle CacheData must have same number of patches!"); // Check that the Field has adequate GuardLayers for SUDS - const GuardLayers& gl = field.layout().internalGuards(); + GuardLayers gl = getMaximumStencilWidth(field.layout()); for (int d=0; d=1 && gl.upper(d)>=1,