00001 /*************************************************************************** 00002 * * 00003 * LBflow - an extensible lattice Boltzmann simulation framework * 00004 * * 00005 * Copyright (C) 2007 by Ed Llewellin * 00006 * * 00007 * This file may not be copied or shared without permission * 00008 * Contact ed@lbflow.co.uk or visit www.lbflow.co.uk * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef NODEGROUP_H 00013 #define NODEGROUP_H 00014 00015 #include <map> 00016 00017 #ifdef HAVE_CONFIG_H 00018 #include <config.h> 00019 #endif 00020 00021 #include "variableuser.h" 00022 00023 //forward declarations 00024 class Simulation; 00025 class Node; 00026 class Lattice; 00027 00028 using namespace std; 00029 00038 class Nodegroup : public VariableUser { 00039 00040 protected: 00041 map<int, Node*> nodes; 00042 #ifdef ENABLE_MPI 00043 map<int, Node*> mpi_boundarynodes; //boundary nodes 00044 #endif /*ENABLE_MPI*/ 00045 string label; 00046 Lattice* lattice; 00047 00048 public: 00049 //constructor 00050 Nodegroup(Simulation*); 00051 //public methods 00052 //setters 00053 //TODO: if mpi, add node to correct map based on boundary map in lattice 00054 void addNode(int, Node*); 00055 //getters 00056 //Node* getNode(int); obsolete? 00057 map<int, Node*>* getNodes(map<int, Node*>*); 00058 string getLabel() {return label;}; 00059 Lattice* getLattice() {return lattice;}; 00060 //other methods 00061 void removeNode(int); 00062 00063 }; 00064 00065 #endif