00001
00002
00003
00004
00005
00006
00007
00008
00009
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
00030
00031
00032
00033 public:
00034 ShellManagerBasic(const std::string& controlFileName);
00035 virtual ~ShellManagerBasic();
00036
00037 enum PressureLocation {
00038 element = 0,
00039 vertex = 1
00040 };
00041
00042
00043 virtual void computeMassPrepareAdvance();
00044
00045
00046 virtual void predict();
00047 virtual void predictAndEnforceBC();
00048 virtual void internalExternalForces();
00049 virtual void correct();
00050
00051
00052 virtual void advance();
00053
00054
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
00061 virtual void decode(double **coordinates,
00062 double **velocities,
00063 int **globalNodeIDs,
00064 int *numNodes,
00065 int **connectivity,
00066 int *numElements);
00067
00068
00069 virtual void encodePressure(double* pressures, unsigned size, PressureLocation loc);
00070
00071
00072 void printIFaceMeshPressure(unsigned myRank=0);
00073
00074
00075 virtual double stableTimeStep() {
00076 return _timeStepSize;
00077 }
00078
00079
00080 private:
00081 ShellManagerBasic(const ShellManagerBasic &);
00082 const ShellManagerBasic & operator=(const ShellManagerBasic &);
00083
00084
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
00104 shells::ELCCoder *_elc;
00105
00106
00107 std::vector<double> _pressures;
00108 PressureLocation _pType;
00109
00110
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