Saved in:
Bibliographic Details
Main Author: Amaro, Mário B.
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.05598
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911092478836736
author Amaro, Mário B.
author_facet Amaro, Mário B.
contents We describe a short, reproducible workflow for applying finite differences on nonuniform grids determined by a positive weight function g. The grid is obtained by equidistribution, mapping uniform computational coordinates $ξ\in[0,1]$ to physical space by the cumulative integral $S(x)=\int_a^x\!1/g(s)\,ds$ and its inverse, and in multiple dimensions by the corresponding variable-diffusion (harmonic) mapping with tensor $P=(1/g)I$. We then use the standard three-point central stencils on uneven spacing for first and second derivatives. We collect the formulas, state the mild constraints on g (positivity, boundedness, integrability), and provide a small reference implementation. Finally, we solve the 2D time-independent Schrödinger equation for a harmonic oscillator on uniform vs. variable meshes, showing the expected improvement in resolving localized eigenfunctions without increasing matrix size. We intend this note as a how-to reference rather than a new method, consolidating widely used ideas into a single, ready-to-use recipe, claiming no novelty.
format Preprint
id arxiv_https___arxiv_org_abs_2412_05598
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A practical recipe for variable-step finite differences via equidistribution
Amaro, Mário B.
Numerical Analysis
Computational Physics
We describe a short, reproducible workflow for applying finite differences on nonuniform grids determined by a positive weight function g. The grid is obtained by equidistribution, mapping uniform computational coordinates $ξ\in[0,1]$ to physical space by the cumulative integral $S(x)=\int_a^x\!1/g(s)\,ds$ and its inverse, and in multiple dimensions by the corresponding variable-diffusion (harmonic) mapping with tensor $P=(1/g)I$. We then use the standard three-point central stencils on uneven spacing for first and second derivatives. We collect the formulas, state the mild constraints on g (positivity, boundedness, integrability), and provide a small reference implementation. Finally, we solve the 2D time-independent Schrödinger equation for a harmonic oscillator on uniform vs. variable meshes, showing the expected improvement in resolving localized eigenfunctions without increasing matrix size. We intend this note as a how-to reference rather than a new method, consolidating widely used ideas into a single, ready-to-use recipe, claiming no novelty.
title A practical recipe for variable-step finite differences via equidistribution
topic Numerical Analysis
Computational Physics
url https://arxiv.org/abs/2412.05598