Commit 57de7d61 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing PDE solver.

parent 8ba02696
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ bool tnlGrid< 2, Real, Device, Index> :: write( const MeshFunction& function,
         for( IndexType i = 0; i < getDimensions(). x(); i++ )
         {
            const RealType x = this -> getLowerCorner(). x() + i * hx;
            const RealType y = this -> getLowerCorner(). y() + i * hy;
            const RealType y = this -> getLowerCorner(). y() + j * hy;
            file << x << " " << " " << y << " " << function[ this -> getNodeIndex( j, i ) ] << endl;
         }
         file << endl;
+6 −1
Original line number Diff line number Diff line
@@ -90,11 +90,16 @@ bool tnlPDESolver< Problem, TimeStepper > :: solve()
   IndexType step( 0 );
   IndexType allSteps = ceil( this -> finalTime / this -> snapshotTau );
   this -> timeStepper -> setProblem( * ( this -> problem ) );
   if( ! this -> problem -> makeSnapshot( t, step ) )
   {
      cerr << "Making the snapshot failed." << endl;
      return false;
   }
   while( step < allSteps )
   {
      RealType tau = Min( this -> snapshotTau,
                          this -> finalTime - t );
      this -> timeStepper -> setTau( tau );
      //this -> timeStepper -> setTau( tau );
      if( ! this -> timeStepper -> solve( t, t + tau ) )
         return false;
      step ++;