CommNodeSet.cpp

00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #include <fei_macros.hpp>
00010 #include <fei_defs.h>
00011 #include <test_utils/CommNodeSet.hpp>
00012 #include <cstdlib>
00013 
00014 //==============================================================================
00015 CommNodeSet::CommNodeSet()
00016  : numNodes_(0),
00017    nodeIDs_(NULL),
00018    procs_(NULL),
00019    procsPerNode_(NULL)
00020 {
00021 }
00022 
00023 //==============================================================================
00024 CommNodeSet::~CommNodeSet() {
00025    deleteMemory();
00026 }
00027 
00028 //==============================================================================
00029 void CommNodeSet::deleteMemory() {
00030    for(int i=0; i<numNodes_; i++) {
00031       delete [] procs_[i];
00032    }
00033 
00034    delete [] procs_;
00035    delete [] procsPerNode_;
00036    delete [] nodeIDs_;
00037    numNodes_ = 0;
00038 }
00039 

Generated on Wed May 12 21:30:40 2010 for FEI by  doxygen 1.4.7