Epetra_Map.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_Map.h"
00031 
00032 
00033 //==============================================================================
00034 // Epetra_Map constructor for a Epetra-defined uniform linear distribution of elements.
00035 Epetra_Map::Epetra_Map(int NumGlobalElements, int IndexBase, const Epetra_Comm& Comm)
00036   : Epetra_BlockMap(NumGlobalElements, 1, IndexBase, Comm) // Map is just a special case of BlockMap
00037 {
00038   SetLabel("Epetra::Map");
00039 }
00040 //==============================================================================
00041 // Epetra_Map constructor for a user-defined linear distribution of constant block size elements.
00042 Epetra_Map::Epetra_Map(int NumGlobalElements, int NumMyElements, int IndexBase, const Epetra_Comm& Comm)
00043   : Epetra_BlockMap(NumGlobalElements, NumMyElements, 1, IndexBase, Comm) // Map is just a special case of BlockMap
00044 {
00045   SetLabel("Epetra::Map");
00046 }
00047 //==============================================================================
00048 // Epetra_Map constructor for a user-defined arbitrary distribution of constant block size elements.
00049 Epetra_Map::Epetra_Map(int NumGlobalElements, int NumMyElements,
00050                        const int * MyGlobalElements,
00051                        int IndexBase, const Epetra_Comm& Comm)
00052   : Epetra_BlockMap(NumGlobalElements, NumMyElements, MyGlobalElements, 1, IndexBase, Comm) // Map is just a special case of BlockMap
00053 {
00054   SetLabel("Epetra::Map");
00055 }
00056 //==============================================================================
00057 Epetra_Map::Epetra_Map(const Epetra_Map& map)
00058   : Epetra_BlockMap(map) // Map is just a special case of BlockMap
00059 {
00060 }
00061 
00062 //==============================================================================
00063 Epetra_Map::~Epetra_Map(void)
00064 {
00065 }
00066 
00067 //=============================================================================
00068 Epetra_Map & Epetra_Map::operator= (const Epetra_Map& map)
00069 {
00070   if(this != &map) {
00071     Epetra_BlockMap::operator=(map); // call this->Epetra_BlockMap::operator=
00072   }
00073   return(*this);
00074 }

Generated on Wed May 12 21:41:05 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7