[PATCH] Random stuff

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Mon Aug 23 15:39:25 UTC 2004


Collected stuff from another repository and icc -strict_ansi checking.

Ok?

Richard.


2004Aug23  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* config/arch/LINUXICC.conf: ignore tail padding warnings,
	specify strict cmdline argument.
	src/Connect/Lux/tests/lux_test2.cpp: fix compiling without
	Lux.
	src/DataBrowser/tests/TestDataBrowser.cpp: fix old Field
	stuff.
	src/Domain/NewDomain.h: avoid comparison warnings.
	src/Layout/LayoutBase.h: likewise.
	src/Engine/Stencil.h: add missing return to assignment
	operator.
	src/Particles/tests/interpolate.cpp: honour two-stage name
	lookup rules.
	src/Particles/tests/particle_tests.h: likewise.
-------------- next part --------------
===== r2/config/arch/LINUXICC.conf 1.4 vs edited =====
--- 1.4/r2/config/arch/LINUXICC.conf	2004-01-07 10:02:17 +01:00
+++ edited/r2/config/arch/LINUXICC.conf	2004-08-23 16:29:37 +02:00
@@ -165,13 +165,13 @@
 $cppnoex    = "";                  # flag to use to turn off exceptions
 $cppverbose = "-v";                # flag for verbose compiler output
 $cpponeper  = "";                  # flag to turn on one-instantance-per-obj
-$cppstrict  = "";                  # flag for ANSI conformance checking
+$cppstrict  = "-strict_ansi";      # flag for ANSI conformance checking
 
 
 ### debug or optimized build settings for C++ applications
 
-$cppdbg_app  = "-g -wd161";
-$cppopt_app  = "-DNOPAssert -DNOCTAssert -O2 -wd161";
+$cppdbg_app  = "-g -wd161,1476";
+$cppopt_app  = "-DNOPAssert -DNOCTAssert -O2 -wd161,1476";
 
 
 ### debug or optimized build settings for C++ libraries
===== r2/src/Connect/Lux/tests/lux_test2.cpp 1.1 vs edited =====
--- 1.1/r2/src/Connect/Lux/tests/lux_test2.cpp	2002-05-13 17:47:28 +02:00
+++ edited/r2/src/Connect/Lux/tests/lux_test2.cpp	2004-08-23 17:16:24 +02:00
@@ -39,7 +39,7 @@
 
 
 // Traits class for Particles object
-template <class EngineTag, class Centering, class MeshType, class FL,
+template <class EngineTag, class MeshType, class FL,
           class InterpolatorTag>
 struct PTraits
 {
@@ -47,7 +47,7 @@
   typedef EngineTag AttributeEngineTag_t;
 
   // The type of particle layout to use
-  typedef SpatialLayout<DiscreteGeometry<Centering,MeshType>,FL> 
+  typedef SpatialLayout<MeshType,FL> 
     ParticleLayout_t;
 
   // The type of interpolator to use
@@ -74,10 +74,10 @@
   ChargedParticles(const ParticleLayout_t &pl)
   : Particles<PT>(pl)
   {
-    addAttribute(R);
-    addAttribute(V);
-    addAttribute(E);
-    addAttribute(qm);
+    this->addAttribute(R);
+    this->addAttribute(V);
+    this->addAttribute(E);
+    this->addAttribute(qm);
   }
 
   // Position and velocity attributes (as public members)
@@ -95,18 +95,12 @@
 typedef MultiPatch<GridTag,Brick> AttrEngineTag_t;
 
 // Mesh type
-typedef UniformRectilinearMesh<PDim,Cartesian<PDim>,double> Mesh_t;
-
-// Centering of Field elements on mesh
-typedef Cell Centering_t;
-
-// Geometry type for Fields
-typedef DiscreteGeometry<Centering_t,Mesh_t> Geometry_t;
+typedef UniformRectilinearMesh<PDim,double> Mesh_t;
 
 // Field types
-typedef Field< Geometry_t, double,
+typedef Field< Mesh_t, double,
                MultiPatch<UniformTag,Brick> > DField_t;
-typedef Field< Geometry_t, Vector<PDim,double>,
+typedef Field< Mesh_t, Vector<PDim,double>,
                MultiPatch<UniformTag,Brick> > VecField_t;
 
 // Field layout type, derived from Engine type
@@ -117,7 +111,7 @@
 typedef NGP InterpolatorTag_t;
 
 // Particle traits class
-typedef PTraits<AttrEngineTag_t,Centering_t,Mesh_t,FLayout_t,
+typedef PTraits<AttrEngineTag_t,Mesh_t,FLayout_t,
                 InterpolatorTag_t> PTraits_t;
 
 // Type of particle layout
===== r2/src/DataBrowser/tests/TestDataBrowser.cpp 1.1 vs edited =====
--- 1.1/r2/src/DataBrowser/tests/TestDataBrowser.cpp	2002-05-13 17:47:29 +02:00
+++ edited/r2/src/DataBrowser/tests/TestDataBrowser.cpp	2004-08-23 17:08:08 +02:00
@@ -76,8 +76,8 @@
 // Global typedefs; useful in making user-defined functions below:
 // 1D
 typedef UniformRectilinearMesh<1> Mesh1_t;
-typedef Field<DiscreteGeometry<Cell, Mesh1_t>, double> ScalarField1_t;
-typedef Field<DiscreteGeometry<Cell, Mesh1_t>, Vector<1> > VectorField1_t;
+typedef Field<Mesh1_t, double> ScalarField1_t;
+typedef Field<Mesh1_t, Vector<1> > VectorField1_t;
 typedef Array<1, double, CompressibleBrick> ScalarArray1_t;
 typedef Array<1, Vector<1>, CompressibleBrick> VectorArray1_t;
 // 2D
@@ -136,17 +136,18 @@
   Mesh1_t mesh(vertDomain);
   
   // Create the 1D geometry:
-  DiscreteGeometry<Cell, Mesh1_t> geomc(mesh, GuardLayers<1>(2));
+  Centering<1> cell = canonicalCentering<1>(CellType, Continuous);
+  DomainLayout<1> layout(vertDomain);
   
   fout << std::endl << "=========== 1D ============" << std::endl;
 
   // Make some 1D fields:
-  ScalarField1_t s1(geomc);
-  VectorField1_t v1(geomc);
+  ScalarField1_t s1(cell, layout, mesh);
+  VectorField1_t v1(cell, layout, mesh);
 
   // Assign to spatially-varying values:
-  s1.all() = s1.xAll().comp(0);
-  v1.all() = v1.xAll();
+  s1.all() = positions(s1).comp(0);
+  v1.all() = positions(v1);
 
   // Create some 1D Arrays:
   ScalarArray1_t sa1(cellDomain);
===== r2/src/Domain/NewDomain.h 1.6 vs edited =====
--- 1.6/r2/src/Domain/NewDomain.h	2003-10-27 11:25:05 +01:00
+++ edited/r2/src/Domain/NewDomain.h	2004-08-23 11:10:02 +02:00
@@ -225,7 +225,7 @@
   static void combine(RT &rt, const UT &u, const CT& ct) {
     CTAssert(DS >= 0 && SliceDS >= 0);
     CTAssert(DRT > (DS + DCT - 1));
-    CTAssert(DUT == DRT);
+    CTAssert((int)DUT == DRT);
     for (int i=0; i < DCT; ++i) {
       DomainTraits<RT>::getDomain(rt, DS + i).setWildcardDomain(
 	DomainTraits<UT>::getPointDomain(u, DS + i),
===== r2/src/Engine/Stencil.h 1.13 vs edited =====
--- 1.13/r2/src/Engine/Stencil.h	2004-08-21 20:44:21 +02:00
+++ edited/r2/src/Engine/Stencil.h	2004-08-23 16:47:27 +02:00
@@ -346,6 +346,7 @@
       domain_m[d] = model.domain()[d];
       offset_m[d] = model.offset(d);
     }
+    return *this;
   }
 
   //============================================================
===== r2/src/Layout/LayoutBase.h 1.7 vs edited =====
--- 1.7/r2/src/Layout/LayoutBase.h	2004-01-17 16:24:21 +01:00
+++ edited/r2/src/Layout/LayoutBase.h	2004-08-23 11:10:31 +02:00
@@ -947,12 +947,12 @@
     // Our dimensionality must be the same as the slice's reduced
     // dimensionality.
 
-    CTAssert(DT::sliceDimensions == Dim);
+    CTAssert((int)DT::sliceDimensions == Dim);
 
     // The slice's dimensionality must match that of the previous
     // view.
 
-    CTAssert(DT::dimensions == LV::dimensions);
+    CTAssert((int)DT::dimensions == LV::dimensions);
 
     // The layout passed in must be initialized.  
 
===== r2/src/Particles/tests/interpolate.cpp 1.3 vs edited =====
--- 1.3/r2/src/Particles/tests/interpolate.cpp	2004-07-15 11:25:53 +02:00
+++ edited/r2/src/Particles/tests/interpolate.cpp	2004-08-23 16:55:45 +02:00
@@ -93,10 +93,10 @@
   MyParticles(const ParticleLayout_t& pl)
     : Particles<PT>(pl)
     {
-      addAttribute(pos);
-      addAttribute(efield);
-      addAttribute(charge);
-      addAttribute(cache);
+      this->addAttribute(pos);
+      this->addAttribute(efield);
+      this->addAttribute(charge);
+      this->addAttribute(cache);
     }
 
   // List of attributes; we'll just make them public data members here,
===== r2/src/Particles/tests/particle_tests.h 1.1 vs edited =====
--- 1.1/r2/src/Particles/tests/particle_tests.h	2002-05-13 17:47:41 +02:00
+++ edited/r2/src/Particles/tests/particle_tests.h	2004-08-23 16:30:54 +02:00
@@ -153,10 +153,10 @@
 
   void addAllAttributes()
     {
-      addAttribute(pos);
-      addAttribute(mom);
-      addAttribute(ad);
-      addAttribute(ai);
+      this->addAttribute(pos);
+      this->addAttribute(mom);
+      this->addAttribute(ad);
+      this->addAttribute(ai);
     }
 };
 


More information about the pooma-dev mailing list