vtf-logo

pico/pico/SubDomain.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 //  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004 //
00005 //                                   Fehmi Cirak
00006 //                        California Institute of Technology
00007 //                           (C) 2003 All Rights Reserved
00008 //
00009 //  <LicenseText>
00010 //
00011 //  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 //
00013 #ifndef _SubDomain_h_
00014 #define _SubDomain_h_
00015 #include "definitions.h"
00016 #include "CBuffer.h"
00017 
00018 
00019 namespace pico {
00020     class SubDomain;
00021     class CBuffer;
00022 }
00023 
00024 
00025 class pico::SubDomain{
00026 
00027 public: 
00028     
00029     SubDomain(const VecD3& lo, const VecD3& up, double maxElemSize=0.0);
00030     ~SubDomain();
00031     
00032     // memory management
00033     void allocateReceiveBuffer(const size_t& size);
00034     void registerSendBuffer(const char * const start, const size_t& size);
00035         
00036     // accessors
00037     VecD3 lowerPoint() const {return _low;}
00038     VecD3 upperPoint() const {return _upp;}
00039     
00040     void setSendMsgSize(const size_t& size) {
00041         _sendMsgSize=size;
00042     }
00043 
00044     int sendMsgSize() const {return _sendMsgSize;}
00045     int recvBufferSize() const {return _rBuf->size();}
00046     
00047     char* sendBuffer() {return _sBuf->start();}
00048     char* recvBuffer() {return _rBuf->start();}
00049     
00050     double maxElemSize() const {return _maxElemSize;}
00051     
00052     // intersection test
00053     bool checkOverlap(const SubDomain * const b) const;
00054 
00055 // copy and equality constructor
00056 private:
00057     SubDomain(const SubDomain &);
00058     const SubDomain & operator=(const SubDomain &);
00059 
00060 private:
00061     bool isIn(const VecD3& point) const;
00062 
00063 private:
00064     // lower and upper corner of bounding box
00065     VecD3        _low;
00066     VecD3        _upp;
00067    
00068     // max size of one finite element
00069     double       _maxElemSize;
00070  
00071     // buffers for mpi
00072     CBuffer      *_rBuf;
00073     CBuffer      *_sBuf;
00074         
00075     int          _sendMsgSize;
00076 };
00077 
00078 #endif
00079 
00080 //  End of file

Generated on Fri Aug 24 13:00:24 2007 for SFC Thin-Shell Finite Element Solver by  doxygen 1.4.7