Epetra_BlockMapData.cpp

Go to the documentation of this file.
00001 
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright (2001) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ************************************************************************
00028 //@HEADER
00029 
00030 #include "Epetra_BlockMapData.h"
00031 #include "Epetra_HashTable.h"
00032 #include "Epetra_Comm.h"
00033 #include "Epetra_Directory.h"
00034 //#include "Epetra_ConfigDefs.h" //DATA_DEBUG
00035 // Use the new LID hash table approach by default
00036 #define EPETRA_BLOCKMAP_NEW_LID
00037 
00038 //=============================================================================
00039 Epetra_BlockMapData::Epetra_BlockMapData(int NumGlobalElements, int ElementSize, int IndexBase, const Epetra_Comm & Comm) 
00040   : Comm_(Comm.Clone()),
00041     Directory_(0),
00042     LID_(0),
00043     MyGlobalElements_(0),
00044     FirstPointInElementList_(0),
00045     ElementSizeList_(0),
00046     PointToElementList_(0),
00047     NumGlobalElements_(NumGlobalElements),
00048     NumMyElements_(0),
00049     IndexBase_(IndexBase),
00050     ElementSize_(ElementSize),
00051     MinMyElementSize_(0),
00052     MaxMyElementSize_(0),
00053     MinElementSize_(0),
00054     MaxElementSize_(0),
00055     MinAllGID_(0),
00056     MaxAllGID_(0),
00057     MinMyGID_(0),
00058     MaxMyGID_(-1),
00059     MinLID_(0),
00060     MaxLID_(0),
00061     NumGlobalPoints_(0),
00062     NumMyPoints_(0),
00063     ConstantElementSize_(false),
00064     LinearMap_(false),
00065     DistributedGlobal_(false),
00066     OneToOne_(false),
00067     LastContiguousGID_(0),
00068     LastContiguousGIDLoc_(0),
00069     LIDHash_(0)
00070 {
00071   //cout << "--BMD created, addr: " << this << endl; //DATA_DEBUG
00072 }
00073 
00074 //=============================================================================
00075 Epetra_BlockMapData::~Epetra_BlockMapData()
00076 {
00077   if(LIDHash_ != 0) {
00078     delete LIDHash_;
00079     LIDHash_ = 0;
00080   }
00081 
00082   if (Directory_ != 0) {
00083     delete Directory_;
00084     Directory_ = 0;
00085   }
00086 
00087   if(Comm_ != 0) {
00088     delete Comm_;
00089     Comm_ = 0;
00090   }
00091   //cout << "--BMD destroyed, addr: " << this << endl; //DATA_DEBUG
00092 }

Generated on Thu Sep 18 12:37:57 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1