dune-grid  2.1.1
agrid.hh
Go to the documentation of this file.
00001 #ifndef DUNE_ALBERTAGRID_IMP_HH
00002 #define DUNE_ALBERTAGRID_IMP_HH
00003 
00009 #if HAVE_ALBERTA
00010 
00011 #include <iostream>
00012 #include <fstream>
00013 #include <dune/common/deprecated.hh>
00014 
00015 #include <vector>
00016 #include <assert.h>
00017 #include <algorithm>
00018 
00019 // Dune includes
00020 #include <dune/common/misc.hh>
00021 #include <dune/common/fvector.hh>
00022 #include <dune/common/fmatrix.hh>
00023 #include <dune/common/stdstreams.hh>
00024 #include <dune/common/collectivecommunication.hh>
00025 
00026 #include <dune/grid/common/grid.hh>
00027 #include <dune/grid/common/gridfactory.hh>
00028 #include <dune/grid/common/adaptcallback.hh>
00029 #include <dune/grid/common/sizecache.hh>
00030 
00031 //- Local includes 
00032 // some cpp defines and include of alberta.h
00033 #include "albertaheader.hh"
00034 
00035 // grape data io 
00036 #include <dune/grid/utility/grapedataioformattypes.hh>
00037 
00038 #include <dune/grid/albertagrid/misc.hh>
00039 #include <dune/grid/albertagrid/capabilities.hh>
00040 
00041 #include <dune/grid/albertagrid/coordcache.hh>
00042 #include <dune/grid/albertagrid/gridfamily.hh>
00043 #include <dune/grid/albertagrid/level.hh>
00044 #include <dune/grid/albertagrid/intersection.hh>
00045 #include <dune/grid/albertagrid/intersectioniterator.hh>
00046 #include <dune/grid/albertagrid/datahandle.hh>
00047 #include <dune/grid/albertagrid/entityseed.hh>
00048 
00049 #include "indexsets.hh"
00050 #include "geometry.hh"
00051 #include "entity.hh"
00052 #include "entitypointer.hh"
00053 #include "hierarchiciterator.hh"
00054 #include "treeiterator.hh"
00055 #include "leveliterator.hh"
00056 #include "leafiterator.hh"
00057 
00058 namespace Dune 
00059 {
00060 
00061   // External Forward Declarations
00062   // -----------------------------
00063 
00064   template< class Grid >
00065   class DGFGridFactory;
00066 
00067 
00068 
00069   // AlbertaGrid
00070   // -----------
00071 
00148   template< int dim, int dimworld = Alberta::dimWorld >
00149   class AlbertaGrid
00150   : public GridDefaultImplementation
00151       < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
00152   {
00153     typedef AlbertaGrid< dim, dimworld > This;
00154     typedef GridDefaultImplementation
00155       < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
00156       Base;
00157 
00158     template< int, int, class > friend class AlbertaGridEntity;
00159     template< int, class > friend class AlbertaGridEntityPointer;
00160     template< class, PartitionIteratorType > friend class AlbertaLevelGridView;
00161     template< class, PartitionIteratorType > friend class AlbertaLeafGridView;
00162 
00163     friend class GridFactory< This >;
00164     friend class DGFGridFactory< This >;
00165 
00166     friend class AlbertaGridHierarchicIterator< This >;
00167 
00168     friend class AlbertaGridIntersectionBase< const This >;
00169     friend class AlbertaGridLeafIntersection< const This >;
00170 
00171     friend class AlbertaMarkerVector< dim, dimworld >;
00172 #if (__GNUC__ < 4) && !(defined __ICC)
00173     // add additional friend decls for gcc 3.4
00174     friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
00175     friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
00176 #endif
00177     friend class AlbertaGridIndexSet< dim, dimworld >;
00178     friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;
00179 
00180     template< class, class >
00181     friend class Alberta::AdaptRestrictProlongHandler;
00182 
00183   public: 
00185     typedef AlbertaGridFamily< dim, dimworld > GridFamily;
00186 
00187     typedef typename GridFamily::ctype ctype;
00188 
00189     static const int dimension = GridFamily::dimension;
00190     static const int dimensionworld = GridFamily::dimensionworld;
00191 
00192     // the Traits 
00193     typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;  
00194 
00196     typedef typename Traits::LeafIndexSet LeafIndexSet;
00198     typedef typename Traits::LevelIndexSet LevelIndexSet;
00199 
00201     typedef typename Traits::HierarchicIndexSet HierarchicIndexSet;
00202 
00204     typedef typename Traits::GlobalIdSet GlobalIdSet;
00206     typedef typename Traits::LocalIdSet LocalIdSet;
00207 
00209     typedef typename Traits::CollectiveCommunication CollectiveCommunication;
00210 
00211   private:  
00213     typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
00214 
00216     typedef AlbertaGridIdSet<dim,dimworld> IdSetImp; 
00217 
00219     struct AdaptationState
00220     {
00221       enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
00222       
00223     private:
00224       Phase phase_;
00225       int coarsenMarked_;
00226       int refineMarked_;
00227       
00228     public:
00229       AdaptationState ()
00230       : phase_( ComputationPhase ),
00231         coarsenMarked_( 0 ),
00232         refineMarked_( 0 )
00233       {}
00234 
00235       void mark ( int count )
00236       {
00237         if( count < 0 )
00238           ++coarsenMarked_;
00239         if( count > 0 )
00240           refineMarked_ += (2 << count);
00241       }
00242 
00243       void unmark ( int count )
00244       {
00245         if( count < 0 )
00246           --coarsenMarked_;
00247         if( count > 0 )
00248           refineMarked_ -= (2 << count);
00249       }
00250 
00251       bool coarsen () const
00252       {
00253         return (coarsenMarked_ > 0);
00254       }
00255 
00256       int refineMarked () const
00257       {
00258         return refineMarked_;
00259       }
00260 
00261       void preAdapt ()
00262       {
00263         if( phase_ != ComputationPhase )
00264           error( "preAdapt may only be called in computation phase." );
00265         phase_ = PreAdaptationPhase;
00266       }
00267 
00268       void adapt ()
00269       {
00270         if( phase_ != PreAdaptationPhase )
00271           error( "adapt may only be called in preadapdation phase." );
00272         phase_ = PostAdaptationPhase;
00273       }
00274 
00275       void postAdapt ()
00276       {
00277         if( phase_ != PostAdaptationPhase )
00278           error( "postAdapt may only be called in postadaptation phase." );
00279         phase_ = ComputationPhase;
00280 
00281         coarsenMarked_ = 0;
00282         refineMarked_ = 0;
00283       }
00284 
00285     private:
00286       void error ( const std::string &message )
00287       {
00288         DUNE_THROW( InvalidStateException, message );
00289       }
00290     };
00291 
00292     template< class DataHandler >
00293     struct AdaptationCallback;
00294 
00295     // max number of allowed levels is 64
00296     static const int MAXL = 64;
00297 
00298     typedef Alberta::ElementInfo< dimension > ElementInfo;
00299     typedef Alberta::MeshPointer< dimension > MeshPointer;
00300     typedef Alberta::HierarchyDofNumbering< dimension > DofNumbering;
00301     typedef AlbertaGridLevelProvider< dimension > LevelProvider;
00302 
00303     // forbid copying and assignment
00304     AlbertaGrid ( const This & );
00305     This &operator= ( const This & );
00306  
00307   public:
00309     AlbertaGrid ();
00310 
00316     AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
00317                   const Dune::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
00318                     = Dune::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
00319 
00320     template< class Proj, class Impl >
00321     AlbertaGrid ( const Alberta::MacroData< dimension > &macroData,
00322                   const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
00323 
00328     AlbertaGrid ( const std::string &macroGridFileName );
00329 
00331     ~AlbertaGrid ();
00332    
00335     int maxLevel () const;
00336 
00338     template<int cd, PartitionIteratorType pitype>
00339     typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator 
00340     lbegin (int level) const;
00341 
00343     template<int cd, PartitionIteratorType pitype>
00344     typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator 
00345     lend (int level) const;
00346 
00348     template< int codim >
00349     typename Traits::template Codim< codim >::LevelIterator
00350     lbegin ( int level ) const;
00351 
00353     template< int codim >
00354     typename Traits::template Codim< codim >::LevelIterator
00355     lend ( int level ) const;
00356     
00358     template< int codim, PartitionIteratorType pitype >
00359     typename Traits
00360       ::template Codim< codim >::template Partition< pitype >::LeafIterator
00361     leafbegin () const;
00362 
00364     template< int codim, PartitionIteratorType pitype >
00365     typename Traits
00366       ::template Codim< codim >::template Partition< pitype >::LeafIterator
00367     leafend () const;
00368 
00370     template< int codim >
00371     typename Traits::template Codim< codim >::LeafIterator
00372     leafbegin () const;
00373   
00375     template< int codim >
00376     typename Traits::template Codim< codim >::LeafIterator
00377     leafend () const;
00378 
00383     int size (int level, int codim) const; 
00384 
00386     int size (int level, GeometryType type) const;
00387 
00389     int size (int codim) const; 
00390 
00392     int size (GeometryType type) const;
00393 
00395     size_t numBoundarySegments () const
00396     {
00397       return numBoundarySegments_;
00398     }
00399 
00401     template< PartitionIteratorType pitype >
00402     typename Traits::template Partition< pitype >::LevelGridView
00403     levelView ( int level ) const
00404     {
00405       typedef typename Traits::template Partition< pitype >::LevelGridView View;
00406       typedef typename View::GridViewImp ViewImp;
00407       return View( ViewImp( *this, level ) );
00408     }
00409 
00411     template< PartitionIteratorType pitype >
00412     typename Traits::template Partition< pitype >::LeafGridView leafView () const
00413     {
00414       typedef typename Traits::template Partition< pitype >::LeafGridView View;
00415       typedef typename View::GridViewImp ViewImp;
00416       return View( ViewImp( *this ) );
00417     }
00418 
00420     typename Traits::template Partition< All_Partition >::LevelGridView
00421     levelView ( int level ) const
00422     {
00423       typedef typename Traits::template Partition< All_Partition >::LevelGridView View;
00424       typedef typename View::GridViewImp ViewImp;
00425       return View( ViewImp( *this, level ) );
00426     }
00427 
00429     typename Traits::template Partition< All_Partition >::LeafGridView leafView () const
00430     {
00431       typedef typename Traits::template Partition< All_Partition >::LeafGridView View;
00432       typedef typename View::GridViewImp ViewImp;
00433       return View( ViewImp( *this ) );
00434     }
00435 
00436   public:
00437     //***************************************************************
00438     //  Interface for Adaptation
00439     //***************************************************************
00440     using Base::getMark;
00441     using Base::mark;
00442     
00444     int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const; 
00445 
00447     bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
00448 
00450     void globalRefine ( int refCount );
00451 
00452     template< class DataHandle >
00453     void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
00454   
00456     bool adapt ();
00457 
00459     template< class DataHandle >
00460     bool adapt ( AdaptDataHandleInterface< This, DataHandle > &handle );
00461 
00463     bool preAdapt ();
00464 
00466     void postAdapt();
00467 
00470     const CollectiveCommunication &comm () const
00471     {
00472       return comm_;
00473     }
00474 
00475     static std::string typeName ()
00476     {
00477       std::ostringstream s;
00478       s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
00479       return s.str();
00480     }
00481    
00483     template< class EntitySeed >
00484     typename Traits::template Codim< EntitySeed::codimension >::EntityPointer
00485     entityPointer ( const EntitySeed &seed ) const
00486     {
00487       typedef typename Traits::template Codim< EntitySeed::codimension >::EntityPointerImpl EntityPointerImpl;
00488       return EntityPointerImpl( *this, seed.elementInfo( meshPointer() ), seed.subEntity() );
00489     }
00490 
00491     //**********************************************************
00492     // End of Interface Methods
00493     //**********************************************************
00495     template< GrapeIOFileFormatType ftype >
00496     bool writeGrid( const std::string &filename, ctype time ) const;
00497   
00499     template< GrapeIOFileFormatType ftype >
00500     bool readGrid( const std::string &filename, ctype &time );
00501 
00502     // return hierarchic index set 
00503     const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
00504 
00506     const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
00507 
00509     const typename Traits :: LeafIndexSet & leafIndexSet () const;
00510   
00512     const GlobalIdSet &globalIdSet () const
00513     {
00514       return idSet_;
00515     }
00516  
00518     const LocalIdSet &localIdSet () const
00519     {
00520       return idSet_;
00521     }
00522 
00523     // access to mesh pointer, needed by some methods
00524     ALBERTA MESH* getMesh () const
00525     {
00526       return mesh_;
00527     };
00528 
00529     const MeshPointer &meshPointer () const
00530     {
00531       return mesh_;
00532     }
00533 
00534     const DofNumbering &dofNumbering () const
00535     {
00536       return dofNumbering_;
00537     }
00538 
00539     const LevelProvider &levelProvider () const
00540     {
00541       return levelProvider_;
00542     }
00543 
00544     int dune2alberta ( int codim, int i ) const
00545     {
00546       return numberingMap_.dune2alberta( codim, i );
00547     }
00548 
00549     int alberta2dune ( int codim, int i ) const
00550     {
00551       return numberingMap_.alberta2dune( codim, i );
00552     }
00553 
00554     int generic2alberta ( int codim, int i ) const
00555     {
00556       return genericNumberingMap_.dune2alberta( codim, i );
00557     }
00558 
00559     int alberta2generic ( int codim, int i ) const
00560     {
00561       return genericNumberingMap_.alberta2dune( codim, i );
00562     }
00563 
00564   private:
00565     using Base::getRealImplementation;
00566 
00567     typedef std::vector<int> ArrayType;
00568 
00569     void setup ();
00570     
00571     // make the calculation of indexOnLevel and so on.
00572     // extra method because of Reihenfolge
00573     void calcExtras(); 
00574  
00575     // write ALBERTA mesh file  
00576     bool writeGridXdr ( const std::string &filename, ctype time ) const;
00577 
00579     bool readGridXdr ( const std::string &filename, ctype &time );
00580 
00581 #if 0
00582 
00583     bool readGridAscii ( const std::string &filename, ctype &time );
00584 #endif
00585     
00586     // delete mesh and all vectors 
00587     void removeMesh();
00588 
00589     //***********************************************************************
00590     //  MemoryManagement for Entitys and Geometrys 
00591     //**********************************************************************
00592     typedef MakeableInterfaceObject< typename Traits::template Codim< 0 >::Entity >
00593       EntityObject;
00594   
00595   public:
00596     friend class AlbertaGridLeafIntersectionIterator< const This >;
00597 
00598     template< int codim >
00599     static int
00600     getTwist ( const typename Traits::template Codim< codim >::Entity &entity )
00601     {
00602       return getRealImplementation( entity ).twist();
00603     }
00604 
00605     template< int codim >
00606     static int
00607     getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
00608     {
00609       return getRealImplementation( entity ).template twist< codim >( subEntity );
00610     }
00611 
00612     static int
00613     getTwistInInside ( const typename Traits::LeafIntersection &intersection )
00614     {
00615       return getRealImplementation( intersection ).twistInInside();
00616     }
00617 
00618     static int
00619     getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
00620     {
00621       return getRealImplementation( intersection ).twistInOutside();
00622     }
00623 
00624     const AlbertaGridLeafIntersection< const This > &
00625     getRealIntersection ( const typename Traits::LeafIntersection &intersection ) const
00626     {
00627       return getRealImplementation( intersection );
00628     }
00629     
00630     template< class Intersection >
00631     DUNE_DEPRECATED
00632     const typename Base
00633       ::template ReturnImplementationType< Intersection >::ImplementationType &
00634     getRealIntersection ( const Intersection &intersection ) const
00635     {
00636       return getRealImplementation( intersection );
00637     }
00638    
00639   public:  
00640     // read global element number from elNumbers_  
00641     const Alberta::GlobalVector &
00642     getCoord ( const ElementInfo &elementInfo, int vertex ) const;
00643 
00644   private:
00645     // pointer to an Albert Mesh, which contains the data
00646     MeshPointer mesh_;
00647 
00648     // collective communication
00649     CollectiveCommunication comm_;
00650 
00651     // maximum level of the mesh
00652     int maxlevel_;
00653 
00654     // number of boundary segments within the macro grid
00655     size_t numBoundarySegments_;
00656 
00657     // map between ALBERTA and DUNE numbering
00658     Alberta::NumberingMap< dimension, Alberta::Dune2AlbertaNumbering > numberingMap_;
00659     Alberta::NumberingMap< dimension, Alberta::Generic2AlbertaNumbering > genericNumberingMap_;
00660 
00661     DofNumbering dofNumbering_;
00662 
00663     LevelProvider levelProvider_;
00664 
00665     // hierarchical numbering of AlbertaGrid, unique per codim
00666     HierarchicIndexSet hIndexSet_;
00667 
00668     // the id set of this grid 
00669     IdSetImp idSet_; 
00670 
00671     // the level index set, is generated from the HierarchicIndexSet
00672     // is generated, when accessed 
00673     mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
00674   
00675     // the leaf index set, is generated from the HierarchicIndexSet
00676     // is generated, when accessed 
00677     mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
00678 
00679     typedef SingleTypeSizeCache< This > SizeCacheType;
00680     SizeCacheType * sizeCache_;
00681 
00682     typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
00683 
00684     // needed for VertexIterator, mark on which element a vertex is treated 
00685     mutable MarkerVector leafMarkerVector_; 
00686 
00687     // needed for VertexIterator, mark on which element a vertex is treated 
00688     mutable std::vector< MarkerVector > levelMarkerVector_;
00689 
00690 #if DUNE_ALBERTA_CACHE_COORDINATES
00691     Alberta::CoordCache< dimension > coordCache_;
00692 #endif
00693         
00694     // current state of adaptation
00695     AdaptationState adaptationState_;
00696   };
00697 
00698 } // namespace Dune
00699 
00700 #include "albertagrid.cc"
00701 
00702 // undef all dangerous defines
00703 #undef DIM
00704 #undef DIM_OF_WORLD
00705 
00706 #ifdef _ABS_NOT_DEFINED_
00707 #undef ABS
00708 #endif
00709   
00710 #ifdef _MIN_NOT_DEFINED_
00711 #undef MIN
00712 #endif
00713   
00714 #ifdef _MAX_NOT_DEFINED_
00715 #undef MAX
00716 #endif
00717 
00718 #if DUNE_ALBERTA_VERSION >= 0x300
00719 #ifdef obstack_chunk_alloc
00720 #undef obstack_chunk_alloc
00721 #endif
00722 #ifdef obstack_chunk_free
00723 #undef obstack_chunk_free
00724 #endif
00725 #include <dune/grid/albertagrid/undefine-3.0.hh>
00726 #else
00727 #include <dune/grid/albertagrid/undefine-2.0.hh>
00728 #endif
00729 
00730 // We use MEM_ALLOC, so undefine it here.
00731 #undef MEM_ALLOC
00732 
00733 // We use MEM_REALLOC, so undefine it here.
00734 #undef MEM_REALLOC
00735 
00736 // We use MEM_CALLOC, so undefine it here.
00737 #undef MEM_CALLOC
00738 
00739 // We use MEM_FREE, so undefine it here.
00740 #undef MEM_FREE
00741 
00742 // Macro ERROR may be defined by alberta_util.h. If so, undefine it.
00743 #ifdef ERROR
00744 #undef ERROR
00745 #endif // #ifdef ERROR
00746 
00747 // Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
00748 #ifdef ERROR_EXIT
00749 #undef ERROR_EXIT
00750 #endif // #ifdef ERROR_EXIT
00751 
00752 // Macro WARNING may be defined by alberta_util.h. If so, undefine it.
00753 #ifdef WARNING
00754 #undef WARNING
00755 #endif // #ifdef WARNING
00756 
00757 // Macro TEST may be defined by alberta_util.h. If so, undefine it.
00758 #ifdef TEST
00759 #undef TEST
00760 #endif // #ifdef TEST
00761 
00762 // Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
00763 #ifdef TEST_EXIT
00764 #undef TEST_EXIT
00765 #endif // #ifdef TEST_EXIT
00766 
00767 // Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
00768 #ifdef DEBUG_TEST
00769 #undef DEBUG_TEST
00770 #endif // #ifdef DEBUG_TEST
00771 
00772 // Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
00773 #ifdef DEBUG_TEST_EXIT
00774 #undef DEBUG_TEST_EXIT
00775 #endif // #ifdef DEBUG_TEST_EXIT
00776 
00777 // Macro INFO may be defined by alberta_util.h. If so, undefine it.
00778 #ifdef INFO
00779 #undef INFO
00780 #endif // #ifdef INFO
00781 
00782 // Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
00783 #ifdef PRINT_INFO
00784 #undef PRINT_INFO
00785 #endif // #ifdef PRINT_INFO
00786 
00787 // Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
00788 #ifdef PRINT_INT_VEC
00789 #undef PRINT_INT_VEC
00790 #endif // #ifdef PRINT_INT_VEC
00791 
00792 // Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
00793 #ifdef PRINT_REAL_VEC
00794 #undef PRINT_REAL_VEC
00795 #endif // #ifdef PRINT_REAL_VEC
00796 
00797 // Macro WAIT may be defined by alberta_util.h. If so, undefine it.
00798 #ifdef WAIT
00799 #undef WAIT
00800 #endif // #ifdef WAIT
00801 
00802 // Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
00803 #ifdef WAIT_REALLY
00804 #undef WAIT_REALLY
00805 #endif // #ifdef WAIT_REALLY
00806 
00807 // Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
00808 #ifdef GET_WORKSPACE
00809 #undef GET_WORKSPACE
00810 #endif // #ifdef GET_WORKSPACE
00811 
00812 // Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
00813 #ifdef FREE_WORKSPACE
00814 #undef FREE_WORKSPACE
00815 #endif // #ifdef FREE_WORKSPACE
00816 
00817 // Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
00818 #ifdef MAT_ALLOC
00819 #undef MAT_ALLOC
00820 #endif // #ifdef MAT_ALLOC
00821 
00822 // Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
00823 #ifdef MAT_FREE
00824 #undef MAT_FREE
00825 #endif // #ifdef MAT_FREE
00826 
00827 // Macro NAME may be defined by alberta_util.h. If so, undefine it.
00828 #ifdef NAME
00829 #undef NAME
00830 #endif // #ifdef NAME
00831 
00832 // Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
00833 #ifdef GET_STRUCT
00834 #undef GET_STRUCT
00835 #endif // #ifdef GET_STRUCT
00836 
00837 // Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
00838 #ifdef ADD_PARAMETER
00839 #undef ADD_PARAMETER
00840 #endif // #ifdef ADD_PARAMETER
00841 
00842 // Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
00843 #ifdef GET_PARAMETER
00844 #undef GET_PARAMETER
00845 #endif // #ifdef GET_PARAMETER
00846 
00847 #define _ALBERTA_H_
00848 
00849 #endif // HAVE_ALBERTA
00850 
00851 #endif