This repository contains the code for the paper
There are five test problems: static nonlocal diffusion(converge to nonlocal limit), static nonlocal diffusion(converge to local limit), dynamic nonlocal diffusion, static bond-based peridynamics, and Kalthoff-Winkler experiment. The first four problems focus on heterogeneous materials. For KW experiment we're interested in homogeneous case. All the problems are in two-dimensional physical space.
- gcc 7.5.0 or newer
- Install BLAS and LAPACK packages, you may need to change Makefile to direct to BLAS and LAPACK libraries.
- nonlocaldiff_static.cpp is the code for the static nonlocal diffusion problem with Dirichlet boundary condition.
- nonlocaldiff.cpp is the code for the dynamic nonlocal diffusion problem with Dirichlet boundary condition and backward Euler scheme.
- PMB_2Dweight.cpp is the code for the static bond-based peridynamics with Dirichlet boundary condition.
- KW_2Dweight_dynamic.cpp is the code for the Kalthoff-Winkler experiment simulation.
compile the run code with the following command:
- make Nldiff
- ./nldiff.ex <number of particles><ratio of delta/h><poly_order><case>
Example:
./nldiff.ex 20 3.5 3 1
compile the run code with the following command:
- make Nldiffd
- ./nldiffd.ex <number of particles><ratio of delta/h><poly_order><dt><timestep>
Example:
./nldiffd.ex 20 3.5 3 0.01 10
compile the run code with the following command:
- make PD
- ./PMB_2d.ex <number of particles><ratio of delta/h><poly_order><random perturbation coefficient>
Example:
./PMB_2d.ex 20 3.5 3 0.0
compile the run code with the following command:
- make KW
- ./KW.ex <number of particles><ratio of delta/h><poly_order><dt><timestep>
Example:
./KW.ex 32 3.0 3 2e-4 1000
If you find this code or method useful for your project, please cite
- An asymptotically compatible meshfree quadrature rule for nonlocal problems with applications to peridynamics
- An asymptotically compatible approach for Neumann-type boundary condition on nonlocal problems
- An asymptotically compatible formulation for local-to-nonlocal coupling problems without overlapping regions