Minimal Positive Stencils for Partial Differential Equations
This repository provides implementations of the Minimal Positive Stencil (MPS) method for meshfree discretization of linear elliptic partial differential equations in non-divergence form via nonlocal relaxation, developed in the paper:
Ye, Q., Tian, X. Monotone Meshfree Methods for Linear Elliptic Equations in Non-divergence Form via Nonlocal Relaxation. J Sci Comput 96, 85 (2023).
https://doi.org/10.1007/s10915-023-02294-3
The MPS framework constructs monotone meshfree discretizations by enforcing nonnegativity and consistency constraints, enabling provably sparse and convergent schemes for non-divergence form PDEs without requiring a mesh structure. The approach is particularly well-suited for high-dimensional or irregular domains where mesh-based methods are difficult to apply.
The repository contains two main subdirectories:
2d_test— MATLAB implementation for two-dimensional test problems.3d_test— MATLAB implementation for three-dimensional test problems.
Each subdirectory includes scripts and MATLAB classes for defining domains, equations, and coefficient matrices, along with example workflows for testing manufactured solutions and generating error analyses.
- MATLAB R2019b or later (argument validation features are required).
- The code is not fully optimized; some data structures are more efficiently implemented in compiled languages such as C++.
If you are interested in contributing or rewriting the code in other languages (e.g., C++), please contact Qihao Ye (q8ye@ucsd.edu)
Each dimension-specific folder provides a step-by-step pipeline for running test problems.
- Initialize point cloud:
Run
test_step01_initialize_point_cloudwith a specified domain. - Assign stiffness matrices:
Run
test_step02_b_assign_checkpoint, requiring outputs from Step 01, the domain, and matrixA class. - Solve equation and compute errors:
Run
test_step03_solve_equation, requiring Step 02 outputs, the domain, matrixA, and equation. - Plot error graphs:
Run
test_step04_error_graphusing Step 03 outputs to visualize numerical errors.
Each class component is modular:
C_Domain: domain geometry and boundary handling.C_Equation: manufactured solutions and differential operators.C_MatrixA: coefficient matrices defining PDE parameters.C_PointCloud: handles the generation, organization, and management of point cloud data.
If you find this repo useful or use this repo in your research, please cite:
@article{ye2023monotone,
title={Monotone Meshfree Methods for Linear Elliptic Equations in Non-divergence Form via Nonlocal Relaxation},
author={Ye, Qihao and Tian, Xiaochuan},
journal={Journal of Scientific Computing},
volume={96},
number={3},
pages={85},
year={2023},
publisher={Springer}
}Resources:
[Project Website] • [Journal Version] • [Correction] • [arXiv Version]