Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/gsi/GasSurfaceInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,20 @@ void GasSurfaceInteraction::setIterationsSurfaceBalance(const int& iter)

//==============================================================================

void GasSurfaceInteraction::setWriteConvergenceSurfaceBalance(const bool flag)
{
mp_surf->setWriteConvergenceSurfaceBalance(flag);
}

//==============================================================================

void GasSurfaceInteraction::setConvergenceToleranceSurfaceBalance(const double& tol)
{
mp_surf->setConvergenceToleranceSurfaceBalance(tol);
}

//==============================================================================

void GasSurfaceInteraction::getMassBlowingRate(double& mdot){
mdot = mp_surf->massBlowingRate();
}
Expand Down
12 changes: 12 additions & 0 deletions src/gsi/GasSurfaceInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ class GasSurfaceInteraction
*/
void setIterationsSurfaceBalance(const int& iter);

/**
* Function which allows to report convergence history for Newton solves.
* Default is false.
*/
void setWriteConvergenceSurfaceBalance(const bool flag);

/**
* Function which allows to set convergence tolerance for Newton solves.
* Default value is 1e-8.
*/
void setConvergenceToleranceSurfaceBalance(const double& tol);

/**
* Function which return the total mass blowing flux.
*
Expand Down
26 changes: 26 additions & 0 deletions src/gsi/Surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,32 @@ class Surface
<< "the surface energy balance!";
}

//==============================================================================

/**
* Purely virtual function to be called to set the flag to output
* convergence history for the Newton solver.
*/
virtual void setWriteConvergenceSurfaceBalance(const bool flag)
{
throw LogicError()
<< "setWriteConvergenceSurfaceBalance can be called only when solving "
<< "the surface energy balance!";
}

//==============================================================================

/**
* Purely virtual function to be called to set the tolerance
* parameter for the Newton solver.
*/
virtual void setConvergenceToleranceSurfaceBalance(const double& tol)
{
throw LogicError()
<< "setConvergenceToleranceSurfaceBalance can be called only when solving "
<< "the surface energy balance!";
}

//==============================================================================

/**
Expand Down
14 changes: 14 additions & 0 deletions src/gsi/SurfaceBalanceSolverMass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ class SurfaceBalanceSolverMass :

void setIterationsSurfaceBalance(const int& iter){ setMaxIterations(iter); }

//==============================================================================

void setWriteConvergenceSurfaceBalance(const bool flag)
{
setWriteConvergenceHistory(flag);
}

//==============================================================================

void setConvergenceToleranceSurfaceBalance(const double& tol)
{
setEpsilon(tol);
}

//==============================================================================

double massBlowingRate() {
Expand Down
14 changes: 14 additions & 0 deletions src/gsi/SurfaceBalanceSolverMassEnergy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@ class SurfaceBalanceSolverMassEnergy :

void setIterationsSurfaceBalance(const int& iter){ setMaxIterations(iter); }

//==============================================================================

void setWriteConvergenceSurfaceBalance(const bool flag)
{
setWriteConvergenceHistory(flag);
}

//==============================================================================

void setConvergenceToleranceSurfaceBalance(const double& tol)
{
setEpsilon(tol);
}

//==============================================================================

double massBlowingRate()
Expand Down
Loading