Skip to content
Snippets Groups Projects
Commit b089877e authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Refactoring the fast sweepiong method.

parent 7531c6c3
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,14 @@ class tnlDirectEikonalProblem
void bindDofs( const MeshType& mesh,
const DofVectorType& dofs );
bool setInitialData( const tnlParameterContainer& parameters,
const MeshType& mesh,
DofVectorType& dofs,
MeshDependentData& meshdependentData )
bool solve();
bool solve( const MeshType& mesh,
DofVectorType& dosf );
protected:
......
......@@ -68,7 +68,7 @@ setup( const tnlParameterContainer& parameters,
}
cout << " [ OK ]" << endl;
this->dofs.setValue( 0.0 );
this->problem->bindDofs( this->mesh, this->dofs );
this->problem->bindDofs( this->mesh, this->dofs );
/****
* Set mesh dependent data
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment