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

Refactoring the fast sweepiong method.

parent 7531c6c3
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -56,7 +56,13 @@ class tnlDirectEikonalProblem
      void bindDofs( const MeshType& mesh,
                     const DofVectorType& dofs );
      
      bool solve();
      bool setInitialData( const tnlParameterContainer& parameters,
                           const MeshType& mesh,
                           DofVectorType& dofs,
                           MeshDependentData& meshdependentData )

      bool solve( const MeshType& mesh,
                  DofVectorType& dosf );


      protected:
+16 −2
Original line number Diff line number Diff line
@@ -76,6 +76,16 @@ setup( const tnlParameterContainer& parameters,
   this->problem->setMeshDependentData( this->mesh, this->meshDependentData );
   this->problem->bindMeshDependentData( this->mesh, this->meshDependentData );
   
   /***
    * Set-up the initial condition
    */
   cout << "Setting up the initial condition ... ";
   typedef typename Problem :: DofVectorType DofVectorType;
   if( ! this->problem->setInitialData( parameters, this->mesh, this->dofs, this->meshDependentData ) )
      return false;
   cout << " [ OK ]" << endl;
   
   
   return true;
}

@@ -144,7 +154,11 @@ solve()

   this->computeTimer->reset();
   this->computeTimer->start();
   this->problem->solve();
   if( ! this->problem->solve( this->mesh, this->dofs ) )
   {
      this->computeTimer->stop();
      return false;
   }
   this->computeTimer->stop();
   return true;
}