Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Automatic interpolations

Automatic interpolations · Changes

Page history
Update Automatic interpolations authored Feb 20, 2026 by Gabriel Wlazłowski's avatar Gabriel Wlazłowski
Hide whitespace changes
Inline Side-by-side
Automatic-interpolations.md
View page @ cb1df449
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
[[_TOC_]] [[_TOC_]]
# Introduction # Introduction
The number of self-consistent iterations till convergence strongly depends on the quality of the starting point: the closer the initial state to the solution, the fewer iterations there are to converge. W-SLDA Toolkit implements a mechanism supporting the derivation of good-quality initial states. Namely, one can use a lattice of lower resolution to generate an approximation of the solution and next interpolate to a larger/target lattice and use it as a starting point. The idea is presented in the figure below. The same mechanism can be used for testing the stability of results with respect to the lattice resolution. The number of self-consistent iterations till convergence strongly depends on the quality of the starting point: the closer the initial state is to the solution, the fewer iterations it takes to converge. The W-SLDA Toolkit implements a mechanism for deriving high-quality initial states. Namely, one can use a lower-resolution lattice to generate an approximation of the solution, then interpolate onto a larger/target lattice and use it as a starting point. The idea is presented in the figure below. The same mechanism can be used to test the stability of results with respect to lattice resolution.
![automatic-interpolation](uploads/d24e5124cfc0bd36df87937f9ac3d3c8/automatic-interpolation.png) ![automatic-interpolation](uploads/d24e5124cfc0bd36df87937f9ac3d3c8/automatic-interpolation.png)
# Automatic interpolations # Automatic interpolations
_Step 1_: Generate solution with initial lattice. For example: _Step 1_: Generate a solution with an initial lattice. For example:
`predefines.h` `predefines.h`
```c ```c
/** /**
...@@ -28,7 +28,7 @@ outprefix l-32 ...@@ -28,7 +28,7 @@ outprefix l-32
checkpoint 1 # do checkpoints after each iteration checkpoint 1 # do checkpoints after each iteration
``` ```
_Step 2_: Run the code compiled for the lattice with larger resolution: _Step 2_: Run the code compiled for the lattice with a larger resolution:
`predefines.h` `predefines.h`
```c ```c
/** /**
...@@ -63,13 +63,13 @@ Once running the code, you should see this type of message on `stdout`: ...@@ -63,13 +63,13 @@ Once running the code, you should see this type of message on `stdout`:
``` ```
# Changing the volume # Changing the volume
Automatic interpolations were designed to work correctly if the spatial extent has not changed. It means that `[LX,LY,LZ]` is the same for the input lattice and target lattice. However, if this criterion is not satisfied, the code will make an attempt to load the checkpoint data, squeeze/stretch it accordingly, and then interpolate to the new lattice. Note that the result of this operation may be unpredictable. The code will provide the following warning: Automatic interpolations were designed to work correctly if the spatial extent has not changed. It means that `[LX,LY,LZ]` is the same for the input lattice and target lattice. However, if this criterion is not satisfied, the code will attempt to load the checkpoint data, squeeze/stretch it as needed, and then interpolate onto the new lattice. Note that the result of this operation may be unpredictable. The code will provide the following warning:
``` ```
# !!! --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- !!! # !!! --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- WARNING --- !!!
# Checkpoint files is incompatible with code settings! # Checkpoint file is incompatible with code settings!
# The code will upload the data however the result of this operation may be unpredictable! # The code will upload the data; however, the result of this operation may be unpredictable!
# Make sure you understand what you are doing! # Make sure you understand what you are doing!
# !!! --- ------- --- ------- --- ------- --- ------- --- ------- --- ------- --- !!! # !!! --- ------- --- ------- --- ------- --- ------- --- ------- --- ------- --- !!!
``` ```
# Disable mixing in the first iteration # Disable mixing in the first iteration
For advanced functionals that have a dependence on quantities that are cut-off dependent, it is recommended to [disable mixing in the first iteration](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/wikis/Convergence-control#disabling-mixing-in-the-first-iteration). For advanced functionals that have a dependence on quantities that are cut-off dependent, it is recommended to [disable mixing in the first iteration](Convergence-control#disabling-mixing-in-the-first-iteration).
Clone repository

Content of Documentation
Official webpage
W-BSK Toolkit