//Sets new initial conditions and invalidates existing data public void SetState(VectorND newState, double currentTime) { InvalidateData(currentTime); int i = solution.Lookup(currentTime); solution.WriteState(solution.ChunkIndex(i), solution.LocalIndex(i), newState); }
public void DataSet_ChunkIndex_LowerEdge() { //3 dimensional data starting at t=0 and progressing in increments of dt=0.1 DataSet ds = new DataSet(3, 0, 0.1); Assert.AreEqual(ds.ChunkIndex(1000), 1); }
public void DataSet_ChunkIndex_High() { //3 dimensional data starting at t=0 and progressing in increments of dt=0.1 DataSet ds = new DataSet(3, 0, 0.1); Assert.AreEqual(ds.ChunkIndex(6379), 6); }