vtf-logo

shells/fragmentation/SEdgeRemapElement.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 SEDGEREMAPELEMENT_H
00014 #define SEDGEREMAPELEMENT_H
00015 
00016 #include <vector>
00017 #include <utility>
00018 #include <functional>
00019 #include <algorithm>
00020 
00021 
00022 namespace shells {
00023     struct SElementS;
00024     struct SEdgeS;
00025     class SEdgeRemapElement;
00026 }
00027 
00028 
00029 
00030 class shells::SEdgeRemapElement : 
00031     public std::unary_function<shells::SEdgeS *, void> {
00032 
00033 public:
00034     
00035     typedef std::pair<shells::SElementS*, shells::SElementS*> SElementPair;
00036     typedef std::vector<SElementPair> SElementPairCont; 
00037     typedef std::vector<SElementPair>::iterator SElementPairIter; 
00038     
00039     SEdgeRemapElement(SElementPairCont& oldNewActive) :_oldNewActive(oldNewActive)
00040         {
00041             sortOldNewActiveVector();
00042         }
00043     
00044     void operator()(shells::SEdgeS *) const;
00045     
00046     // helper function defined for avoiding compiler problems
00047     static SElementPair inline makeSElementPair(shells::SElementS *x, shells::SElementS *y)
00048         {
00049             return std::pair<shells::SElementS *, shells::SElementS *>(x, y);
00050         }    
00051     
00052 private:
00053     SElementPairCont&  _oldNewActive;   // mapping between old and new active elem.
00054 
00055     // private function
00056     void sortOldNewActiveVector();
00057 };
00058 
00059 #endif
00060 

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