-
Notifications
You must be signed in to change notification settings - Fork 20
Example Execution
Build ASGarD with -DASGARD_USE_MATLAB=ON
or no output will be displayed!
- 1D Diffusion equation https://github.com/project-asgard/asgard/blob/develop/src/pde/pde_diffusion1.hpp
Example PDE using the 1D Diffusion Equation. This example PDE is time dependent (although not all the terms are time dependent). This implies the need for an initial condition.
PDE:
First, run ASGarD selecting the diffusion_1 PDE and 1 time step.
./asgard -p diffusion_1 -n 1
This matches the analytic solution at t=0.
Next, run for 1000 time-steps. After each calculation the figure will be updated.
./asgard -p diffusion_1 -n 1000
The final figure shows
Lastly, let's increase the precision of this calculation. Increasing the number of legendre basis polynomials (-d
) and the starting (-l
)
and maximum (-m
) hierarchical levels (resolution) results in a denser grid.
./asgard -p diffusion_1 -n 1 -d 3 -l 4 -m 4
./asgard -p diffusion_1 -n 1000 -d 3 -l 4 -m 4
- 2D Continuity Equation
Consider the continuity equation in two dimensions
with analytic solution
Use the -p continuity_2
option to select the 2D continuity equation. Let's start with a higher precision calculation. Notice that in 2 dimensions and the starting (-l
) and maximum (-m
) hierarchical levels (resolution) take a string containing two values.
First, start with -n 1
to get the initial values at t=0.
./asgard -p continuity_2 -n 1 -d 3 -l "4 4" -m "4 4"
We note that the y-axis is multiplied
Next, we run for 627 time steps, which should display the greatest amplitude.
./asgard -p continuity_2 -n 627 -d 3 -l "4 4" -m "4 4"
The slices are slightly offset from 0. At