This repository contains the source code to implement the enriched Higher Order Localized Orthogonal Decomposition (eho-LOD) method discussed in (Kalyanaraman B., Krumbeigel F., Maier R., and Wang S.). The code can be used to generate the results presented in the manuscript. In the manuscript, we consider solving the heat equation:
where
The README.md file is divided into two sections, with the first and second sections discussing the minimum working examples in 1D and 2D, respectively.
We assume
and the right hand side
The code for the 1D example is located in HigherOrderMS_1d/examples/. There are three main scripts:
1d_Poisson.jl: Julia code to solve the Poisson problem using the higher-order multiscale method.1d_Heat.jl: Code to solve the heat equation using higher-order multiscale method (HMM).1d_Heat_Corrected.jl: Code to solve the heat equation using the enriched-higher-order multiscale method (eho-HMM).
To run the code, open a terminal, change the directory to HigherOrderMS_1d/ and run
>> cd /path/to/package/HigherOrderMS_1d/
>> julia --project=.Once in the Julian prompt, type:
julia> include("examples/1d_Poisson.jl");
(1/h) (1/H) p l ||e||₀ √(a(e,e))
2048 8 1 8 1.4678662504791758e-5 0.000754588781498337Similarly for the heat equation:
julia> include("examples/1d_Heat.jl");
(1/h) (1/H) p l j ||e||₀ √(a(e,e))
2048 16 1 16 0 1.2198995337457969e-7 1.7556893929137127e-5
julia> include("examples/1d_Heat_Corrected.jl");
(1/h) (1/H) p l j ||e||₀ √(a(e,e))
2048 16 1 16 1 1.2708506354990224e-8 2.8928773641723775e-6We observe that in the case of the enriched-higher-order multiscale method (1d_Heat_Corrected.jl), the error is almost an order of magnitude better! For larger values of 1d_Heat_Corrected.jl, we can set the data type of the problem globally by assigning the variable T₁ (line 17). We have an interface to export \ for solving linear systems for two implementations of high-precision arithmetic: Float128 from Quadmath.jl and Double64 from DoubleFloats.jl.
One of the most important features of high-order multiscale methods is that the basis functions on the coarse scale can be precomputed and saved for testing multiple forcing functions. The main motivation for this is that in applications where the diffusion coefficient is treated as a material property, the basis functions do not need to be recomputed every time. For 2D, it is especially desirable to separate the computation into different modules and use files to read/write the basis functions. Following are scripts in HigherOrderMS_2d/examples folder:
-
2d_Heat_Params.jl: Write all the problem parameters into a directory. -
2d_Heat_Ref_Sol.jl: Compute the reference solution using the classical finite element method on the fine-scale discretization$h$ . -
2d_Heat_Basis.jl: Compute the multiscale basis functions on the coarse scale and write the solution to the working directory. -
2d_Heat_MS_Solve.jland2d_Heat_MS_Solve_No_Corr.jl: Solve the heat equation using the multiscale basis generated in Step 3.
The code should be run in the same order as shown above. The workflow is also illustrated in HigherOrderMS_2d/run_2d.sh. Open terminal and run the script with the following arguments:
>> cd /path/to/package/HigherOrderMS_2d/
>> PROJECT_NAME=TEST
>> ./run_2d.sh 256 2 1 2 1 $PROJECT_NAME
# :
# SOME PROGRESS BARS
# :
256 2 1 2 1 0.0012284297879164758 0.024945601525605033-
Kalyanaraman, B., Krumbiegel, F., Maier, R., & Wang, S. (2025). Optimal higher-order convergence rates for parabolic multiscale problems. arXiv [Math.NA]. Retrieved from http://arxiv.org/abs/2510.09514
-
Felix Krumbiegel, Roland Maier, A higher order multiscale method for the wave equation, IMA Journal of Numerical Analysis, Volume 45, Issue 4, July 2025, Pages 2248–2273.
-
Maier R. A high-order approach to elliptic multiscale problems with general unstructured coefficients. SIAM Journal on Numerical Analysis. 2021;59(2):1067-89.