vtf-logo

shells/parallel/MShellParallelizer.h

Go to the documentation of this file.
00001 // -*- C++ -*- 
00002 //
00003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004 //
00005 //                                   Fehmi Cirak
00006 //                        California Institute of Technology
00007 //                           (C) 2004 All Rights Reserved
00008 //
00009 // <LicenseText>
00010 //
00011 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 //
00013 #ifndef MSHELLPARALLELIZER_H
00014 #define MSHELLPARALLELIZER_H
00015 #include "../driverCC/MShell.h"
00016 
00017 #include "mpi.h"
00018 
00019 
00020 namespace parallel {
00021     class MShellParallelizer; 
00022     class PointSetPartitioner;
00023 }
00024 
00025 namespace shells {
00026     class MShell;
00027     struct SVertexS;
00028 }
00029 
00030 namespace pico {
00031     class DomainCoupler;
00032     class FieldExchanger;
00033 }
00034 
00035 
00036 
00037 class parallel::MShellParallelizer {
00038 public:
00039     MShellParallelizer(MPI_Comm communicator, shells::MShell *mshell);
00040     ~MShellParallelizer();
00041 
00042     enum VarType {
00043         mass = 0,          // lumped mass
00044         residual = 1       // internal force
00045     };
00046     
00047     void initializeCommunication();
00048 
00049     void exchange(const VarType& var);
00050 
00051     double commonTimeStepSize(double dt);
00052 
00053 // copy and equality constructor
00054 private:
00055     MShellParallelizer(const MShellParallelizer &);
00056     const MShellParallelizer & operator=(const MShellParallelizer &);
00057     
00058 // private data members
00059 private:
00060     typedef std::vector<double>               _BufferCont;
00061     typedef _BufferCont::iterator             _BufferIt;
00062     typedef std::vector<shells::SVertexS*>    _VertexCont;
00063     typedef _VertexCont::iterator             _VertexIt;
00064 
00065     MPI_Comm                                  _communicator;
00066     shells::MShell                           *_mshell;
00067 
00068     PointSetPartitioner                      *_psetPartitioner;
00069 
00070     pico::DomainCoupler                      *_coupler; 
00071     pico::FieldExchanger                     *_exchanger; 
00072 
00073     _VertexCont                               _verticesConnected;
00074 };
00075 
00076 #endif
00077 
00078 /* End of file */

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