vtf-logo

shells/fragmentation/MShellFragmented.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 MSHELLFRAGMENTED_H
00014 #define MSHELLFRAGMENTED_H
00015 #include "../driverCC/MShell.h"
00016 
00017 #include <vector>
00018 #include <algorithm>
00019 
00020 
00021 namespace shells {
00022     class MShellFragmented;
00023     struct SElementS;
00024 }
00025 
00026 namespace fragment {
00027     class CElement;
00028 }
00029 
00030 
00031 class shells::MShellFragmented : public shells::MShell {
00032 public:
00033     MShellFragmented(std::istream& is);
00034     virtual ~MShellFragmented();
00035 
00036     // virtual functions
00037     virtual void initializeComputation();
00038     virtual void resetActiveElements(const std::vector<unsigned>& newActiveID);
00039     virtual void verticesToBeCoupled(std::vector<shells::SVertexS *>& vertices);
00040     
00041     // generic functions for iteration over elements
00042     template <typename T>
00043     void iterateOverCElements(const T& op);    
00044     
00045 private:
00046     MShellFragmented(const MShellFragmented &);
00047     const MShellFragmented & operator=(const MShellFragmented &);
00048     
00049 private:
00050     typedef std::vector<fragment::CElement* >  _CElementCont;
00051     typedef _CElementCont::iterator            _CElementIt;
00052     
00053     // cohesive elements
00054     _CElementCont                              _celements;
00055 };
00056 
00057 
00058 // templated methods
00059 namespace shells {
00060 
00061     template <typename T>
00062     void MShellFragmented::iterateOverCElements(const T& op) {
00063         _CElementIt begin = _celements.begin();
00064         _CElementIt end = _celements.end();
00065         
00066         std::for_each(begin, end, op);
00067     }  
00068 
00069 }
00070 
00071 #endif
00072 
00073 /* End of file */

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