vtf-logo

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

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