Skip to content

Conversation

@FilipovicLado
Copy link
Member

This pull request includes:

  • Fix material interface: reduced time stepping for thin layer etching
  • Strong-Stability Preserving Runge Kutta 3rd order time integration scheme: The scheme averages the gradient solver during time integration without updating the velocity
  • Renaming to SpatialScheme from IntegrationScheme with legacy naming depreciation warning

FilipovicLado and others added 30 commits December 6, 2025 21:28
… in 3D. Added VoidEtching python example. Removed redundant prepareLS(); call in computeRates during advection. Updated RK3 substepping.
…l scheme. The scheme uses a constant velocity during the entire time step, while the gradient is averaged according to SSP-RK3.
@FilipovicLado FilipovicLado requested a review from tobre1 December 28, 2025 22:52
}

/// Set which time integration scheme should be used.
void setTemporalScheme(TemporalSchemeEnum scheme) { temporalScheme = scheme; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temporal scheme can be set here, but is never accessed. I would either remove this setter or implement some logic to call the corresponding method, since this could be a bit misleading.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I missed this, as I tried different implementations before settling on this one. However, your comment sent me back in my thought process and I have refactored Advect once again to use TemporalSchemeEnum and consolidate time integration into the single class without the need for inherited classes for each additional scheme.

The new commit refactors the Advect class to handle multiple time integration schemes internally, replacing the need for derived classes like AdvectForwardEuler and AdvectRungeKutta3. I have now:

  • Actually used TemporalSchemeEnum with support for:
    • Forward Euler
    • Runge-Kutta 2nd Order (TVD)
    • Runge-Kutta 3rd Order (TVD)
  • Moved time integration logic into a new internal helper struct lsInternal::AdvectTimeIntegration in lsAdvectTimeIntegration.hpp.
  • Updated Advect to dispatch advect() calls based on the selected temporalScheme.
  • Moved shared utilities (e.g., combineLevelSets) into the base Advect class.
  • Removed lsAdvectForwardEuler.hpp and lsAdvectRungeKutta3.hpp as they are now redundant.
  • Updated Python bindings.
  • Updated C++ tests and C++/Python example (AirGapDeposition, TimeIntegrationComparison) to use the new unified API.

} else if (spatialScheme == SpatialSchemeEnum::WENO_5TH_ORDER) {
// WENO5 requires a stencil radius of 3 (template parameter 3)
lsInternal::WENO5<T, D, 3>::prepareLS(levelSets.back());
} else if (spatialScheme == SpatialSchemeEnum::WENO_5TH_ORDER) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WENO5 case is doubled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed in new commit

@tobre1 tobre1 merged commit 48b134d into master Jan 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants