Skip to content

Commit

Permalink
Fixed an error in solvePoisson.m. Added a new folder documentation/fi…
Browse files Browse the repository at this point in the history
…gures_from_the_paper, with live scripts for a few figures. Updated the readme with a new section explaining where to find code to produce each figure created using QGLAB.
  • Loading branch information
manroygood committed Jan 17, 2024
1 parent 91731f6 commit 75b58e2
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 8 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified documentation/templateGallery.mlx
Binary file not shown.
31 changes: 27 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,41 @@ This will open up a project window. This does three things that allow you to run

In December, 2023, we submitted a paper describing the algorithms underlying QGLAB to a journal for publication. A slightly-modified version has been posted to the [arXiv](https://arxiv.org/abs/2401.00561).


#### Documentation

Basic instructions are in a matlab live script `quantumGraphRoutines.mlx`, which has also been saved as an [html file](quantumGraphRoutines.html).
Basic instructions are in a Matlab live script quantumGraphRoutines.mlx, which has also been saved as an HTML file](quantumGraphRoutines.html).

Many additional examples are presented in live scripts in directories `source/examples` and its subdirectories, and in `documentation`.

A wide variety of graphs are implemented in `source/templates`. These are demonstrated in `source/templates/templateGallery.mlx`.

If it doesn't make sense, just ask me.

#### QGLAB in action
#### Reproducibility

There is a live script to reproduce every figure in the preprint that was produced using QGLAB. Some of the figures were edited interactively for clarity after being created by a script so that formatting may differ slightly. The following table lists the figures (numbered as on the arXiV while the paper remains under review).

| Figure | Description | file |
| ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| 2.2 | Layout and Laplacian matrix ($\mathbf{L}_{\mathrm{VC}}$) nonzero pattern for lollipop graph | `documentation/figures_from_the_paper/figure2p2.mlx` |
| 2.4 | Same as 2.2 but for Chebyshev and includes interpolation matrix $\mathbf{V}_0$ | `documentation/figures_from_the_paper/figure2p4.mlx` |
| 2.5 and A.1 | Four eigenfunctions and spectral determinant for a Y-shaped graph | `documentation/figures_from_the_paper/figure2p5.mlx` |
| 2.6 | Stationary NLS solutions on dumbbell and spiderweb graphs | `documentation/figures_from_the_paper/figure2p6.mlx` |
| 2.7 & A.6 | Continuation study of NLS solutions on the necklace graph and two eigenfunctions | `source/examples/stationary/necklaceBifurcationDiagram.mlx` |
| 2.8 and A.9 | Soliton solutions colliding with a vertex on balanced and unbalanced star graphs. | `source/examples/evolution/NLSOnBalancedStar23t.mlx` and `source/examples/evolution/NLSOnUnbalancedStar23t.mlx` |
| 2.9 | KPP equation on a honeycomb | `source/examples/evolution/KPPonHoneycomb.mlx` |
| 3.1 | Function plotting on graphs with 2D and 3D layout | `documentation/figures_from_the_paper/figure3p1.mlx` |
| A.2 | QGLAB log (ground state of L-shaped quantum graph) | In `/documentation/templateGallery.mlx` |
| A.3 | Solution of Poisson equation on a 3-node graph | `source/examples/stationary/poissonExample.mlx` and `source/examples/chebyshev/poissonExampleChebyshev.mlx` |
| A.4 | Cubic NLS continuation study on a dumbbell graph | `documentation/continuationInstructions.mlx` contains these images and many more useful plotting routines for continuation studies |
| A.5 | Cubic-Quintic NLS continuation on a dumbbell graph | `source/examples/stationary/dumbbellContinuation35.mlx` |
| A.7 | Heat equation solution on dumbbell | `source/examples/evolution/heatOnDumbbell.mlx` also see `source/examples/evolution/heatOnDumbbellTestOrder.mlx` for convergence study |
| A.8 | sine-Gordon equation on tetrahedron (flattened to Mercedes-Benz logo for plotting) | `source/examples/evolution/sineGordonOnTetra.mlx` |
| B.2 | Visualization of a function defined on a random graph using `plot` and `pcolor` | Code in text |
| B.3 | The "bubble tower" graph | Code in text |

#### QGLAB in action

This package (or earlier versions) has been used in the following papers:

* Goodman, R. H., [NLS bifurcations on the bowtie combinatorial graph and the dumbbell metric graph](http://doi.org/10.3934/dcds.2019093). *Discrete & Continuous Dynamical Systems - A*, *39*(4), 2203–2232, (2019).
Expand All @@ -53,7 +76,7 @@ and in the [2022 doctoral dissertation](https://cdr.lib.unc.edu/concern/disserta
* More advanced IMEX time-steppers
* More general vertex conditions

We are happy to consider adding features and/or to merge in contributions.
We are happy to consider adding features and/or merging contributions.

If you use the package for published work, please cite it as

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="documentation/figures_from_the_paper" Type="Relative"/>
2 changes: 1 addition & 1 deletion source/@quantumGraph/applyFunctionsToAllEdges.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
for k=1:G.numedges
G.applyFunctionToInteriorEdge(functionArray{k},k);
end
rhs = G.graphInterior2column;
rhs = G.graphInterior2column + (G.nonhomogeneousVCMatrix) * G.nodeData;
PVC = G.extendWithVC(G.interpolationMatrix);

f = PVC\rhs;
Expand Down
2 changes: 1 addition & 1 deletion source/@quantumGraph/solvePoisson.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
% The actual function

rhs=(G.interpolationMatrixWithZeros) * opts.edgeData + ...
(G.nonhomogenousVCMatrix) * G.nodeData;
(G.nonhomogeneousVCMatrix) * G.nodeData;

solution = G.laplacianMatrixWithVC \ rhs;
2 changes: 1 addition & 1 deletion source/continuation/continuerSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
end

% Set the default value of each field either to its value in optionsIn or
% to the rightmost value in the parentheses
% to the rightmost value in the parentheses blue
defaultMaxTheta=setDefault(optionsIn,'maxTheta',2);
defaultBeta=setDefault(optionsIn,'beta',0.1);
defaultNThresh=setDefault(optionsIn,'NThresh',4);
Expand Down
1 change: 0 additions & 1 deletion source/continuation/makeContinuationDirectory.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
fclose(fid);

fprintf('Created directory %s.\n',dataDir)
fprintf('Run number is %i.\n',diagramNumber);
Binary file modified source/examples/chebyshev/poissonExampleChebyshev.mlx
Binary file not shown.
Binary file modified source/examples/stationary/poissonExample.mlx
Binary file not shown.
Binary file modified source/examples/stationary/starEigenfuctionDemo.mlx
Binary file not shown.

0 comments on commit 75b58e2

Please sign in to comment.