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