RFA: Miscellaneous src Changes

Jeffrey Oldham oldham at codesourcery.com
Wed Jun 27 02:29:13 UTC 2001


OK to commit this patch?

This patch fixes minor spelling errors and rorders member initializers
according to class declarations.

2001-06-26  Jeffrey D. Oldham  <oldham at codesourcery.com>

	* Domain/DomainArithOpsTraits.h: Fix spelling mistake.
	* Domain/DomainBlockIterator.h
	(DomainBlockIterator::DomainBlockIterator): Reorder initializers
	according to declaration order.
	* Layout/GridLayout.cpp (GridLayout::GridLayout): Likewise.
	* NewField/FieldEngine/FieldEngineBase.h: Fix spelling mistake.
	* Partition/GridPartition.h (GridPartition::GridPartition):
	Reorder initializers according to declaration order.
	(GridPartition::partition): Remove unused variable.
	* Utilities/Tester.h: Fix subject-verb agreement.

Tested on	sequential Linux using gcc3.0 by compiling Pooma library
Approved by	???you???

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: Domain/DomainArithOpsTraits.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/DomainArithOpsTraits.h,v
retrieving revision 1.5
diff -c -p -r1.5 DomainArithOpsTraits.h
*** Domain/DomainArithOpsTraits.h	2000/03/07 13:16:33	1.5
--- Domain/DomainArithOpsTraits.h	2001/06/27 02:07:44
***************
*** 40,46 ****
  //-----------------------------------------------------------------------------
  // Overview: 
  // DomainArithOpsTraits is intended to be used to select the return type of 
! // arithmatic operations between domains and pseudo-domains comprising the following
  // list:
  
  // Loc<1> Loc<N> Interval<N> Range<N> IndirectionList<int> Grid<N>
--- 40,46 ----
  //-----------------------------------------------------------------------------
  // Overview: 
  // DomainArithOpsTraits is intended to be used to select the return type of 
! // arithmetic operations between domains and pseudo-domains comprising the following
  // list:
  
  // Loc<1> Loc<N> Interval<N> Range<N> IndirectionList<int> Grid<N>
Index: Domain/DomainBlockIterator.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/DomainBlockIterator.h,v
retrieving revision 1.7
diff -c -p -r1.7 DomainBlockIterator.h
*** Domain/DomainBlockIterator.h	2001/04/13 02:12:59	1.7
--- Domain/DomainBlockIterator.h	2001/06/27 02:07:45
*************** private:
*** 292,298 ****
  
  template<class Dom>
  DomainBlockIterator<Dom>::DomainBlockIterator(const Dom &d)
!   : domain_m(d), index_m(0), loc_m(0)
  {
    for (int i=0; i < dimensions; ++i)
      {
--- 292,298 ----
  
  template<class Dom>
  DomainBlockIterator<Dom>::DomainBlockIterator(const Dom &d)
!   : domain_m(d), loc_m(0), index_m(0)
  {
    for (int i=0; i < dimensions; ++i)
      {
*************** DomainBlockIterator<Dom>::DomainBlockIte
*** 332,339 ****
  
  template<class Dom>
  DomainBlockIterator<Dom>::DomainBlockIterator(const This_t &model)
!   : domain_m(model.domain_m), block_m(model.block_m),
!     loc_m(model.loc_m), index_m(model.index_m)
  {
    for (int i=0; i < dimensions; ++i)
      current_m[i] = model.current_m[i];
--- 332,339 ----
  
  template<class Dom>
  DomainBlockIterator<Dom>::DomainBlockIterator(const This_t &model)
!   : domain_m(model.domain_m), loc_m(model.loc_m),
!     block_m(model.block_m), index_m(model.index_m)
  {
    for (int i=0; i < dimensions; ++i)
      current_m[i] = model.current_m[i];
Index: Layout/GridLayout.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Layout/GridLayout.cpp,v
retrieving revision 1.85
diff -c -p -r1.85 GridLayout.cpp
*** Layout/GridLayout.cpp	2001/04/18 02:15:33	1.85
--- Layout/GridLayout.cpp	2001/06/27 02:07:47
*************** GridLayout<Dim>::GridLayout(const Domain
*** 1071,1082 ****
  template <int Dim>
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid,
  			    const DistributedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >( 
        new LayoutData_t( grid, 
  			GridPartition<Dim>(grid),
! 			DistributedMapper<Dim>(GridPartition<Dim>(grid))))
! 
  {
    pdata_m->attach(*this);
  }
--- 1071,1081 ----
  template <int Dim>
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid,
  			    const DistributedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >( 
        new LayoutData_t( grid, 
  			GridPartition<Dim>(grid),
! 			DistributedMapper<Dim>(GridPartition<Dim>(grid)))),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** GridLayout<Dim>::GridLayout(const Grid<D
*** 1084,1095 ****
  template <int Dim>
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid,
  			    const ReplicatedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >( 
        new LayoutData_t( grid, 
  			GridPartition<Dim>(grid),
! 			LocalMapper<Dim>()))
! 
  {
    pdata_m->attach(*this);
  }
--- 1083,1093 ----
  template <int Dim>
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid,
  			    const ReplicatedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >( 
        new LayoutData_t( grid, 
  			GridPartition<Dim>(grid),
! 			LocalMapper<Dim>())),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** template <int Dim>
*** 1098,1108 ****
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid, 
  			    const GuardLayers_t &gcs,
  			    const DistributedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
  ( new LayoutData_t( grid, 
  		    GridPartition<Dim>(grid,gcs),
! 		    DistributedMapper<Dim>(GridPartition<Dim>(grid,gcs) )) )
  {
    pdata_m->attach(*this);
  }
--- 1096,1106 ----
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid, 
  			    const GuardLayers_t &gcs,
  			    const DistributedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
  ( new LayoutData_t( grid, 
  		    GridPartition<Dim>(grid,gcs),
! 		    DistributedMapper<Dim>(GridPartition<Dim>(grid,gcs) )) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** template <int Dim>
*** 1111,1121 ****
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid, 
  			    const GuardLayers_t &gcs,
  			    const ReplicatedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
  ( new LayoutData_t( grid, 
  		    GridPartition<Dim>(grid,gcs),
! 		    LocalMapper<Dim>()) )
  {
    pdata_m->attach(*this);
  }
--- 1109,1119 ----
  GridLayout<Dim>::GridLayout(const Grid<Dim> &grid, 
  			    const GuardLayers_t &gcs,
  			    const ReplicatedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
  ( new LayoutData_t( grid, 
  		    GridPartition<Dim>(grid,gcs),
! 		    LocalMapper<Dim>()) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** GridLayout<Dim>::GridLayout(const Grid<D
*** 1126,1136 ****
  			    const GuardLayers_t &igcs, 
  			    const GuardLayers_t &egcs,
  			    const DistributedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t(grid, 
  		  GridPartition<Dim>(grid,igcs,egcs),
! 		  DistributedMapper<Dim>(GridPartition<Dim>(grid,igcs,egcs))))
  {
    pdata_m->attach(*this);
  }
--- 1124,1134 ----
  			    const GuardLayers_t &igcs, 
  			    const GuardLayers_t &egcs,
  			    const DistributedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t(grid, 
  		  GridPartition<Dim>(grid,igcs,egcs),
! 		  DistributedMapper<Dim>(GridPartition<Dim>(grid,igcs,egcs)))),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** GridLayout<Dim>::GridLayout(const Grid<D
*** 1141,1151 ****
  			    const GuardLayers_t &igcs, 
  			    const GuardLayers_t &egcs,
  			    const ReplicatedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t( grid, 
  		   GridPartition<Dim>(grid,igcs,egcs),
! 		   LocalMapper<Dim>() ) )
  {
    pdata_m->attach(*this);
  }
--- 1139,1149 ----
  			    const GuardLayers_t &igcs, 
  			    const GuardLayers_t &egcs,
  			    const ReplicatedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t( grid, 
  		   GridPartition<Dim>(grid,igcs,egcs),
! 		   LocalMapper<Dim>() ) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** template <class Partitioner>
*** 1155,1165 ****
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const DistributedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t(gdom, 
  		  gpar,
! 		  DistributedMapper<Dim>(gpar)) )
  {
    pdata_m->attach(*this);
  }
--- 1153,1163 ----
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const DistributedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
  (new LayoutData_t(gdom, 
  		  gpar,
! 		  DistributedMapper<Dim>(gpar)) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** template <class Partitioner>
*** 1169,1179 ****
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const ReplicatedTag &)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >
! (new LayoutData_t(gdom, 
! 		  gpar,
! 		  LocalMapper<Dim>()) )
  {
    pdata_m->attach(*this);
  }
--- 1167,1177 ----
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const ReplicatedTag &)
!   : LayoutBase<Dim,GridLayoutData<Dim> >
!       (new LayoutData_t(gdom, 
!        		  	gpar,
! 			LocalMapper<Dim>()) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
*************** template <class Partitioner>
*** 1183,1198 ****
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const ContextMapper<Dim> &cmap)
!   : Observable<This_t>(*this), 
!     LayoutBase<Dim,GridLayoutData<Dim> >(new LayoutData_t(gdom, gpar, cmap) )
  {
    pdata_m->attach(*this);
  }
  
  template <int Dim>
  GridLayout<Dim>::GridLayout(const This_t &model) 
!   : Observable<This_t>(*this),
!     LayoutBase<Dim,GridLayoutData<Dim> >(model.pdata_m)
  { 
     pdata_m->attach(*this);
  }
--- 1181,1196 ----
  GridLayout<Dim>::GridLayout(const Domain_t &gdom, 
  			    const Partitioner &gpar,
  			    const ContextMapper<Dim> &cmap)
!   : LayoutBase<Dim,GridLayoutData<Dim> >(new LayoutData_t(gdom, gpar, cmap) ),
!     Observable<This_t>(*this)
  {
    pdata_m->attach(*this);
  }
  
  template <int Dim>
  GridLayout<Dim>::GridLayout(const This_t &model) 
!   : LayoutBase<Dim,GridLayoutData<Dim> >(model.pdata_m),
!     Observable<This_t>(*this)
  { 
     pdata_m->attach(*this);
  }
Index: NewField/FieldEngine/FieldEngineBase.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/NewField/FieldEngine/FieldEngineBase.h,v
retrieving revision 1.12
diff -c -p -r1.12 FieldEngineBase.h
*** NewField/FieldEngine/FieldEngineBase.h	2001/05/14 21:11:24	1.12
--- NewField/FieldEngine/FieldEngineBase.h	2001/06/27 02:07:47
***************
*** 39,45 ****
  // 
  // FieldEngineBase and related classes. POOMA supports a flexible form 
  // of "centering" that allows a hierarchy of multiple centering points per 
! // cell. The centering information, managemed by the FieldEngineBase
  // class, is initialized using a flexible set of functors.
  //-----------------------------------------------------------------------------
  
--- 39,45 ----
  // 
  // FieldEngineBase and related classes. POOMA supports a flexible form 
  // of "centering" that allows a hierarchy of multiple centering points per 
! // cell. The centering information, managed by the FieldEngineBase
  // class, is initialized using a flexible set of functors.
  //-----------------------------------------------------------------------------
  
Index: Partition/GridPartition.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Partition/GridPartition.h,v
retrieving revision 1.27
diff -c -p -r1.27 GridPartition.h
*** Partition/GridPartition.h	2001/04/18 02:17:11	1.27
--- Partition/GridPartition.h	2001/06/27 02:20:26
*************** public:
*** 153,163 ****
  
  
    GridPartition(const Grid<Dim> &g)
!     : grid_m(g), 
!       hasInternalGuards_m(false), 
        hasExternalGuards_m(false),
        internalGuards_m(0),
!       externalGuards_m(0)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
--- 153,163 ----
  
  
    GridPartition(const Grid<Dim> &g)
!     : hasInternalGuards_m(false), 
        hasExternalGuards_m(false),
        internalGuards_m(0),
!       externalGuards_m(0),
!       grid_m(g)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
*************** public:
*** 170,180 ****
    
    GridPartition(const Grid<Dim> &g, 
  		const GuardLayers<Dim> &gcs)
!     : grid_m(g), 
!       hasInternalGuards_m(true),
        hasExternalGuards_m(true),
        internalGuards_m(gcs),
!       externalGuards_m(gcs)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
--- 170,180 ----
    
    GridPartition(const Grid<Dim> &g, 
  		const GuardLayers<Dim> &gcs)
!     : hasInternalGuards_m(true),
        hasExternalGuards_m(true),
        internalGuards_m(gcs),
!       externalGuards_m(gcs),
!       grid_m(g)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
*************** public:
*** 187,197 ****
    GridPartition(const Grid<Dim> &g, 
  		const GuardLayers<Dim> &igcs,
  		const GuardLayers<Dim> &egcs)
!     : grid_m(g),
!       hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(igcs), 
!       externalGuards_m(egcs)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
--- 187,197 ----
    GridPartition(const Grid<Dim> &g, 
  		const GuardLayers<Dim> &igcs,
  		const GuardLayers<Dim> &egcs)
!     : hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(igcs), 
!       externalGuards_m(egcs),
!       grid_m(g)
    {
      num_m=1;
      for (int i=0;i<Dim;i++)
*************** public:
*** 205,224 ****
    GridPartition() 
      : hasInternalGuards_m(false), 
        hasExternalGuards_m(false),
-       num_m(1),
        internalGuards_m(0),
!       externalGuards_m(0)
    {  
      for (int i=0;i<Dim;++i)
        blocks_m[i]=Loc<1>(1);
    }
  
    GridPartition(const Loc<Dim> &a)
!     : hasInternalGuards_m(false), 
        hasExternalGuards_m(false),
        internalGuards_m(0),
!       externalGuards_m(0),
!       blocks_m(a)
    {
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d)
--- 205,224 ----
    GridPartition() 
      : hasInternalGuards_m(false), 
        hasExternalGuards_m(false),
        internalGuards_m(0),
!       externalGuards_m(0),
!       num_m(1)
    {  
      for (int i=0;i<Dim;++i)
        blocks_m[i]=Loc<1>(1);
    }
  
    GridPartition(const Loc<Dim> &a)
!     : blocks_m(a),
!       hasInternalGuards_m(false),
        hasExternalGuards_m(false),
        internalGuards_m(0),
!       externalGuards_m(0)
    {
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d)
*************** public:
*** 227,237 ****
   
    GridPartition(const Loc<Dim> &a,
  		const GuardLayers<Dim> &gcs)
!     : hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(gcs), 
!       externalGuards_m(gcs),
!       blocks_m(a) 
    { 
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d) 
--- 227,237 ----
   
    GridPartition(const Loc<Dim> &a,
  		const GuardLayers<Dim> &gcs)
!     : blocks_m(a),
!       hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(gcs), 
!       externalGuards_m(gcs)
    { 
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d) 
*************** public:
*** 241,251 ****
    GridPartition(const Loc<Dim> &a,
  		const GuardLayers<Dim> &igcs, 
  		const GuardLayers<Dim> &egcs)
!     : hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(igcs), 
!       externalGuards_m(egcs),
!       blocks_m(a) 
    {
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d) 
--- 241,251 ----
    GridPartition(const Loc<Dim> &a,
  		const GuardLayers<Dim> &igcs, 
  		const GuardLayers<Dim> &egcs)
!     : blocks_m(a),
!       hasInternalGuards_m(true), 
        hasExternalGuards_m(true), 
        internalGuards_m(igcs), 
!       externalGuards_m(egcs)
    {
      num_m = blocks_m[0].first();
      for (int d=1; d < Dim; ++d) 
*************** public:
*** 255,265 ****
    // copy constructor
  
    GridPartition(const GridPartition<Dim> & b)
!     : hasInternalGuards_m(b.hasInternalGuards_m),
        hasExternalGuards_m(b.hasExternalGuards_m),
        internalGuards_m(b.internalGuards_m),
        externalGuards_m(b.externalGuards_m),
-       blocks_m(b.blocks_m),
        num_m(b.num_m),
        grid_m(b.grid_m)
    {
--- 255,265 ----
    // copy constructor
  
    GridPartition(const GridPartition<Dim> & b)
!     : blocks_m(b.blocks_m),
!       hasInternalGuards_m(b.hasInternalGuards_m),
        hasExternalGuards_m(b.hasExternalGuards_m),
        internalGuards_m(b.internalGuards_m),
        externalGuards_m(b.externalGuards_m),
        num_m(b.num_m),
        grid_m(b.grid_m)
    {
*************** public:
*** 268,278 ****
    // copy from a GP
    
   GridPartition(const UniformGridPartition<Dim> & b)
!    : hasInternalGuards_m(b.hasInternalGuards_m),
       hasExternalGuards_m(b.hasExternalGuards_m),
       internalGuards_m(b.internalGuards_m),
       externalGuards_m(b.externalGuards_m),
-      blocks_m(b.blocks_m),
       num_m(b.num_m)
    {}
  
--- 268,278 ----
    // copy from a GP
    
   GridPartition(const UniformGridPartition<Dim> & b)
!    : blocks_m(b.blocks_m),
!      hasInternalGuards_m(b.hasInternalGuards_m),
       hasExternalGuards_m(b.hasExternalGuards_m),
       internalGuards_m(b.internalGuards_m),
       externalGuards_m(b.externalGuards_m),
       num_m(b.num_m)
    {}
  
*************** public:
*** 408,414 ****
  
  	// Calculate the guard cell specification for this domain.
  	
- 	GuardLayers<Dim> gcs(0); // No guards by default.
  	if (hasInternalGuards()||hasExternalGuards())
  	  {
  	    for (int i=0;i<Dim;i++)
--- 408,413 ----
Index: Utilities/Tester.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Utilities/Tester.h,v
retrieving revision 1.10
diff -c -p -r1.10 Tester.h
*** Utilities/Tester.h	2000/03/28 01:10:57	1.10
--- Utilities/Tester.h	2001/06/27 02:07:48
***************
*** 88,94 ****
  //        PASSED ..... message
  //    or
  //        FAILED ..... message
! //    depending on the current value of the OK flag.  It return an exit
  //    code value, 1 if the test FAILED, 0 if the test PASSED, that you can
  //    use to return from main.  For example:
  //
--- 88,94 ----
  //        PASSED ..... message
  //    or
  //        FAILED ..... message
! //    depending on the current value of the OK flag.  It returns an exit
  //    code value, 1 if the test FAILED, 0 if the test PASSED, that you can
  //    use to return from main.  For example:
  //


More information about the pooma-dev mailing list