22class TimeSteppingTools {
25 typedef default_sc SC;
26 typedef default_lo LO;
27 typedef default_go GO;
28 typedef default_no NO;
31 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
32 typedef typename Matrix_Type::MapConstPtr_Type MapConstPtr_Type;
35 typedef Teuchos::RCP<BlockMatrix_Type> BlockMatrixPtr_Type;
38 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
39 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
42 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
43 typedef Teuchos::Array<BlockMultiVectorPtr_Type> BlockMultiVectorPtrArray_Type;
46 typedef Teuchos::RCP<ExporterTxt_Type> ExporterTxtPtr_Type;
48 typedef typename Matrix_Type::CommConstPtr_Type CommConstPtr_Type;
50 enum timeSteppingType {NON_ADAPTIVE, ADAPTIVE} ;
51 enum errorType {EUCLIDIAN, L2} ;
53 CommConstPtr_Type comm_;
54 ParameterListPtr_Type parameterList_;
57 timeSteppingType tsType_;
69 errorType adaptiveError_;
70 int adaptiveCalculation_;
76 bool stifflyAccEmbedded_;
77 vec2D_dbl_ptr_Type butcherTable_;
78 vec_dbl_ptr_Type BDFInformation_;
79 vec_dbl_ptr_Type b_embedded_;
80 vec_dbl_ptr_Type gamma_vec_;
82 ExporterTxtPtr_Type exporterTxtTime_;
83 ExporterTxtPtr_Type exporterTxtDt_;
84 ExporterTxtPtr_Type exporterTxtError_;
95 TimeSteppingTools(ParameterListPtr_Type parameterList , CommConstPtr_Type comm);
99 void setTableInformationRK();
101 void setInformationBDF();
103 double getInformationBDF(
int i);
105 void correctPressure(MultiVectorPtr_Type &newP, MultiVectorConstPtr_Type lastP);
109 double currentTime();
111 bool continueTimeStepping();
113 void calculateSolution(BlockMultiVectorPtr_Type &sol, BlockMultiVectorPtrArray_Type &rkSolVec, BlockMatrixPtr_Type massSystem, BlockMultiVectorPtr_Type solShort = Teuchos::null);
115 void adaptiveTimestep(BlockMultiVectorPtr_Type &sol, BlockMultiVectorPtrArray_Type &rkSolVec, BlockMatrixPtr_Type massSystem, BlockMultiVectorPtr_Type solShort);
117 void calculateNewDt(BlockMultiVectorPtr_Type &solDiff, BlockMatrixPtr_Type massSystem);
119 void advanceTime(
bool printInfo=
false);
125 double getButcherTableCoefficient(
int row ,
int col);
127 double getButcherTableC(
int row);
131 double get_dt_prev();
133 void setupTxtExporter();