vtf-logo

shells/fragmentation/ShellManagerFragmented.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004 // 
00005 //                                   Fehmi Cirak
00006 //                        California Institute of Technology
00007 //                           (C) 2005 All Rights Reserved
00008 //
00009 // <LicenseText>
00010 //
00011 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 //
00013 #ifndef SHELLMANAGERFRAGMENTED_H
00014 #define SHELLMANAGERFRAGMENTED_H
00015 #include <string>
00016 #include <vector>
00017 
00018 
00019 namespace shells {
00020     class MShell;
00021     class ELCCoder;
00022     class CheckpointData; 
00023     class ShellManagerFragmented;
00024 }
00025 
00026 namespace fragment {
00027     class CCheckpointData;
00028 }
00029 
00030 
00031 class shells::ShellManagerFragmented {
00032     //
00033     // Facet class for serial fragmenting shells 
00034     // Provides a basic interface (with limited functionality) for shells library    
00035     // 
00036     
00037 public:
00038     ShellManagerFragmented(const std::string& controlFileName);
00039     virtual ~ShellManagerFragmented();
00040     
00041     enum PressureLocation {
00042         element = 0,           // apply pressure to the elements
00043         vertex = 1             // apply pressure to the vertices 
00044     };
00045 
00046     // initialization 
00047     virtual void computeMassPrepareAdvance();
00048 
00049     // time integration primitives
00050     virtual void predictAndEnforceBC();
00051     virtual void internalExternalForces();
00052     virtual void correct();
00053 
00054     // time integration primitives combined
00055     virtual void advance();
00056 
00057     virtual void printData(bool flush=false, unsigned myRank=0);    
00058 
00059     virtual void checkPointing(unsigned fileIDFirst=0, unsigned fileIDSecond=0);
00060     virtual void restart(unsigned fileIDFirst=0, unsigned fileIDSecond=0);
00061     
00062     // decode shell data structure
00063     virtual void decode(double **coordinates,
00064                         double **velocities,
00065                         int **globalNodeIDs,
00066                         int *numNodes,
00067                         int **connectivity,
00068                         int *numElements);
00069 
00070     // encode pressures
00071     virtual void encodePressure(double* pressures, unsigned size, PressureLocation loc); 
00072 
00073     // print interface mesh and pressure for debugging purposes
00074     void printIFaceMeshPressure(unsigned myRank=0);
00075 
00076     // accessors
00077     virtual double stableTimeStep() {
00078         return _timeStepSize;
00079     }
00080         
00081 // copy and assignment constructors - not implemented
00082 private:
00083     ShellManagerFragmented(const ShellManagerFragmented &);
00084     const ShellManagerFragmented & operator=(const ShellManagerFragmented &);
00085     
00086 // accessors for derived classes
00087 protected:
00088     shells::MShell*& mShell(){return _mshell;} 
00089     int getCurrentStepNum(){return _currentStepNum;}
00090     void incrementCurrentTimeAndStep(){
00091         _currentStepNum++;
00092         _currentTime += _timeStepSize;
00093     }
00094 
00095     void setTimeStep(double timeStepSize){_timeStepSize=timeStepSize;}
00096     double getTimeStep(){return _timeStepSize;}
00097     
00098     double getCurrentTime(){return _currentTime;}
00099     double Thickness() {return _thickness;}
00100 
00101 private:
00102     shells::MShell                   *_mshell;
00103 
00104     shells::CheckpointData           *_checkPointerS;
00105     fragment::CCheckpointData        *_checkPointerC;
00106 
00107     // coder/decoder used for eulerian lagrangian coupling
00108     shells::ELCCoder                 *_elc;
00109 
00110     // vector of vertex/element pressures - temporary vector
00111     std::vector<double>     _pressures;
00112     PressureLocation        _pType;                  
00113 
00114     // control variables
00115     unsigned int    _numSurfIntgPoints;
00116     unsigned int    _numThickIntgPoints;
00117     unsigned int    _printAtEach;
00118 
00119     unsigned int    _currentStepNum;
00120     double          _currentTime;
00121 
00122     double          _newmarkGamma; 
00123     double          _newmarkDamping;
00124     double          _timeStepSize;
00125     double          _thickness;
00126     
00127     std::string     _outputFileName;
00128     std::string     _checkPointFileName;
00129 };
00130 
00131 #endif

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