Compare commits

..

8 Commits

Author SHA1 Message Date
57e315fe43
Update data 2024-01-01 15:58:31 +01:00
dc89f3abe7
Update images 2024-01-01 15:58:19 +01:00
8bdb861a71
Make changes 2024-01-01 15:57:40 +01:00
45cf14018e
Remove profiling rules 2024-01-01 15:57:16 +01:00
eb8b8566c6
Make some changes 2024-01-01 15:57:03 +01:00
80cd9b9a65
Stuff 2024-01-01 15:56:51 +01:00
5afd263c16
Add Doxygen awesome theme 2024-01-01 15:56:23 +01:00
c10b9d5697
Make changes 2024-01-01 15:55:59 +01:00
54 changed files with 7732 additions and 391 deletions

View File

@ -511,7 +511,7 @@ EXTRACT_PRIVATE = YES
# methods of a class will be included in the documentation. # methods of a class will be included in the documentation.
# The default value is: NO. # The default value is: NO.
EXTRACT_PRIV_VIRTUAL = NO EXTRACT_PRIV_VIRTUAL = YES
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation. # scope will be included in the documentation.

View File

@ -3,22 +3,18 @@ CC=g++
# Flags # Flags
CFLAGS=-Wall -larmadillo -std=c++11 -O3 -fopenmp CFLAGS=-Wall -larmadillo -std=c++11 -O3 -fopenmp
PROFFLAGS=-fno-inline-functions
DBGFLAGS=-DDBG -g DBGFLAGS=-DDBG -g
MKDIR=mkdir -p MKDIR=mkdir -p
RMDIR=rm -rf RMDIR=rm -rf
INSTRUMENT=scorep
# Directories for binaries # Directories for binaries
BINDIR=./bin BINDIR=./bin
PROFDIR=./prof
DEBUGDIR=./debug DEBUGDIR=./debug
# Directories for object files # Directories for object files
BUILDDIR=./build BUILDDIR=./build
BINOBJDIR=$(BUILDDIR)/objs BINOBJDIR=$(BUILDDIR)/objs
PROFOBJDIR=$(BUILDDIR)/prof
DEBUGOBJDIR=$(BUILDDIR)/debug DEBUGOBJDIR=$(BUILDDIR)/debug
# Directory for latex source # Directory for latex source
@ -29,23 +25,14 @@ SRC=./src
LIB=./lib LIB=./lib
INCLUDE=./include INCLUDE=./include
# Source files and object file locations
#SRCFILES=utils.cpp testlib.cpp
#SRCS=$(addprefix $(SRC)/, $(SRCS))
#BINOBJS=$(addprefix $(BINOBJDIR)/, $(SRCFILES:.cpp=.o))
#PROFOBJS=$(addprefix $(PROFOBJDIR)/, $(SRCFILES:.cpp=.o))
#DEBUGOBJS=$(addprefix $(DEBUGOBJDIR)/, $(SRCFILES:.cpp=.o))
# Lib files # Lib files
LIBSRCS=$(notdir $(shell find $(LIB) -type f)) LIBSRCS=$(notdir $(shell find $(LIB) -type f))
LIBBINOBJS=$(addprefix $(BINOBJDIR)/, $(LIBSRCS:.cpp=.o)) LIBBINOBJS=$(addprefix $(BINOBJDIR)/, $(LIBSRCS:.cpp=.o))
LIBPROFOBJS=$(addprefix $(PROFOBJDIR)/, $(LIBSRCS:.cpp=.o))
LIBDEBUGOBJS=$(addprefix $(DEBUGOBJDIR)/, $(LIBSRCS:.cpp=.o)) LIBDEBUGOBJS=$(addprefix $(DEBUGOBJDIR)/, $(LIBSRCS:.cpp=.o))
# Location for Binaries # Location for Binaries
EXEC=$(basename $(notdir $(shell find $(SRC) -type f))) EXEC=$(basename $(notdir $(shell find $(SRC) -type f)))
BINS=$(addprefix $(BINDIR)/, $(EXEC)) BINS=$(addprefix $(BINDIR)/, $(EXEC))
PROFBINS=$(addprefix $(PROFDIR)/, $(EXEC))
DEBUGBINS=$(addprefix $(DEBUGDIR)/, $(EXEC)) DEBUGBINS=$(addprefix $(DEBUGDIR)/, $(EXEC))
# List phony targets # List phony targets
@ -54,8 +41,6 @@ DEBUGBINS=$(addprefix $(DEBUGDIR)/, $(EXEC))
# "Commands" # "Commands"
all: $(BINS) all: $(BINS)
profile: $(PROFBINS)
debug: $(DEBUGBINS) debug: $(DEBUGBINS)
# build latex file # build latex file
@ -67,11 +52,6 @@ $(BINDIR)/%: $(BINOBJDIR)/%.o $(LIBBINOBJS)
$(MKDIR) $(BINDIR) $(MKDIR) $(BINDIR)
$(CC) $^ -o $@ $(CFLAGS) -I$(INCLUDE) $(CC) $^ -o $@ $(CFLAGS) -I$(INCLUDE)
# Rule for profiling binaries
$(PROFDIR)/%: $(PROFOBJDIR)/%.o $(LIBPROFOBJS)
$(MKDIR) $(PROFDIR)
$(INSTRUMENT) $(CC) $^ -o $@ $(CFLAGS) $(PROFFLAGS) -I$(INCLUDE)
# Rule for debug binaries # Rule for debug binaries
$(DEBUGDIR)/%: $(DEBUGOBJDIR)/%.o $(LIBDEBUGOBJS) $(DEBUGDIR)/%: $(DEBUGOBJDIR)/%.o $(LIBDEBUGOBJS)
$(MKDIR) $(DEBUGDIR) $(MKDIR) $(DEBUGDIR)
@ -83,11 +63,6 @@ $(BINOBJDIR)/%.o: $(SRC)/%.cpp
echo $(LIBBINOBJS) echo $(LIBBINOBJS)
$(CC) -c $^ -o $@ $(CFLAGS) -I$(INCLUDE) $(CC) -c $^ -o $@ $(CFLAGS) -I$(INCLUDE)
# Rule for instrumented object files
$(PROFOBJDIR)/%.o: $(SRC)/%.cpp
$(MKDIR) $(PROFOBJDIR)
$(INSTRUMENT) $(CC) -c $^ -o $@ $(CFLAGS) $(PROFFLAGS) -I$(INCLUDE)
# Rule for debug object files # Rule for debug object files
$(DEBUGOBJDIR)/%.o: $(SRC)/%.cpp $(DEBUGOBJDIR)/%.o: $(SRC)/%.cpp
$(MKDIR) $(DEBUGOBJDIR) $(MKDIR) $(DEBUGOBJDIR)
@ -98,11 +73,6 @@ $(BINOBJDIR)/%.o: $(LIB)/%.cpp
$(MKDIR) $(BINOBJDIR) $(MKDIR) $(BINOBJDIR)
$(CC) -c $^ -o $@ $(CFLAGS) -I$(INCLUDE) $(CC) -c $^ -o $@ $(CFLAGS) -I$(INCLUDE)
# Rule for instrumented object files
$(PROFOBJDIR)/%.o: $(LIB)/%.cpp
$(MKDIR) $(PROFOBJDIR)
$(INSTRUMENT) $(CC) -c $^ -o $@ $(CFLAGS) $(PROFFLAGS) -I$(INCLUDE)
# Rule for debug object files # Rule for debug object files
$(DEBUGOBJDIR)/%.o: $(LIB)/%.cpp $(DEBUGOBJDIR)/%.o: $(LIB)/%.cpp
$(MKDIR) $(DEBUGOBJDIR) $(MKDIR) $(DEBUGOBJDIR)
@ -118,4 +88,4 @@ objclean:
$(RMDIR) $(BUILDDIR) $(RMDIR) $(BUILDDIR)
binclean: binclean:
$(RMDIR) $(BINDIR) $(PROFDIR) $(DEBUGDIR) $(RMDIR) $(BINDIR) $(DEBUGDIR)

View File

@ -1,3 +1,100 @@
# Simulating the Schrödinger wave equation using the Crank-Nicolson method in 2+1 dimensions # Simulating the Schrödinger wave equation using the Crank-Nicolson method in 2+1 dimensions
[Repo](https://github.uio.no/FYS3150-G2-2023/Project-5)
[Documentation](https://pages.github.uio.no/FYS3150-G2-2023/Project-5/)
## Requirements
### Operating systems
- Linux
- Has been tested on [Fedora 38](https://fedoraproject.org/)
- Will most likely work on other Linux distributions
- macOS
- Will most likely not work due to the use of getopt, which is GNU specific.
- Windows
- Will most likely not work
### Libraries
- Python
- [matplotlib](https://matplotlib.org/)
- [numpy](https://numpy.org/)
- [seaborn](https://seaborn.pydata.org/)
- C++
- [Armadillo](https://arma.sourceforge.net/)
## Compiling
The commands shown here should be run from the root of this project.
### Normal binaries
Compiling regular binaries is as easy as running this command:
```shell
make
```
The binaries will then be inside the **bin** directory.
### Debugging binaries
If you want to debug the code, then use this command:
```shell
make debug
```
The binaries will then be inside the **debug** directory.
## Running programs
### C++ binaries
To run any of the programs, just use the following command:
```shell
./<bin|debug>/<program-name> <args>
```
If you need help with any of the programs, you can use the **-h** or **--help**
flag to show you how to use the programs. Here is an example:
```shell
./bin/main --help
```
### Python scripts
#### Install libraries
Before running the scripts, make sure that all libraries are installed.
Using pip, you can install all requirements like this:
```shell
pip install -r requirements.txt
```
This recursively install all the packages that are listed in **requirements.txt**.
#### Running scripts
For the Python scripts, run them from the root of the project:
```shell
python python_scripts/<script-name>
```
If you have any problems running the scripts, you might have to run this instead:
```shell
python3 python_scripts/<script-name>
```
## Credits
The Doxygen theme used here is
[doxygen-awesome-css](https://github.com/jothepro/doxygen-awesome-css).

View File

@ -1,321 +0,0 @@
0 -1.33227e-14
2.5e-05 -1.37668e-14
5e-05 -1.24345e-14
7.5e-05 -1.15463e-14
0.0001 -1.17684e-14
0.000125 -1.06581e-14
0.00015 -1.02141e-14
0.000175 -1.02141e-14
0.0002 -1.02141e-14
0.000225 -9.76996e-15
0.00025 -9.76996e-15
0.000275 -1.15463e-14
0.0003 -7.99361e-15
0.000325 -1.08802e-14
0.00035 -9.10383e-15
0.000375 -9.32587e-15
0.0004 -1.06581e-14
0.000425 -9.32587e-15
0.00045 -1.26565e-14
0.000475 -1.19904e-14
0.0005 -1.15463e-14
0.000525 -9.54792e-15
0.00055 -1.37668e-14
0.000575 -1.26565e-14
0.0006 -9.76996e-15
0.000625 -7.99361e-15
0.00065 -9.76996e-15
0.000675 -1.02141e-14
0.0007 -1.24345e-14
0.000725 -1.02141e-14
0.00075 -8.88178e-15
0.000775 -1.15463e-14
0.0008 -7.99361e-15
0.000825 -8.21565e-15
0.00085 -8.43769e-15
0.000875 -7.10543e-15
0.0009 -1.15463e-14
0.000925 -1.19904e-14
0.00095 -7.77156e-15
0.000975 -6.43929e-15
0.001 -7.99361e-15
0.001025 -8.21565e-15
0.00105 -9.76996e-15
0.001075 -8.88178e-15
0.0011 -1.06581e-14
0.001125 -9.32587e-15
0.00115 -1.19904e-14
0.001175 -9.54792e-15
0.0012 -7.54952e-15
0.001225 -9.54792e-15
0.00125 -1.06581e-14
0.001275 -8.43769e-15
0.0013 -8.88178e-15
0.001325 -7.99361e-15
0.00135 -7.10543e-15
0.001375 -1.08802e-14
0.0014 -8.88178e-15
0.001425 -7.10543e-15
0.00145 -9.32587e-15
0.001475 -7.54952e-15
0.0015 -1.11022e-14
0.001525 -1.19904e-14
0.00155 -1.19904e-14
0.001575 -9.76996e-15
0.0016 -1.26565e-14
0.001625 -9.76996e-15
0.00165 -1.19904e-14
0.001675 -9.32587e-15
0.0017 -1.46549e-14
0.001725 -1.46549e-14
0.00175 -1.11022e-14
0.001775 -1.04361e-14
0.0018 -1.5099e-14
0.001825 -9.99201e-15
0.00185 -1.19904e-14
0.001875 -9.99201e-15
0.0019 -1.46549e-14
0.001925 -1.19904e-14
0.00195 -1.33227e-14
0.001975 -1.37668e-14
0.002 -1.28786e-14
0.002025 -1.28786e-14
0.00205 -1.28786e-14
0.002075 -8.43769e-15
0.0021 -9.32587e-15
0.002125 -1.24345e-14
0.00215 -1.33227e-14
0.002175 -1.31006e-14
0.0022 -1.37668e-14
0.002225 -1.59872e-14
0.00225 -1.37668e-14
0.002275 -1.4877e-14
0.0023 -1.55431e-14
0.002325 -1.37668e-14
0.00235 -1.55431e-14
0.002375 -1.35447e-14
0.0024 -1.46549e-14
0.002425 -1.55431e-14
0.00245 -1.55431e-14
0.002475 -1.42109e-14
0.0025 -1.64313e-14
0.002525 -1.46549e-14
0.00255 -1.37668e-14
0.002575 -1.39888e-14
0.0026 -1.59872e-14
0.002625 -1.39888e-14
0.00265 -1.55431e-14
0.002675 -1.44329e-14
0.0027 -1.5099e-14
0.002725 -1.42109e-14
0.00275 -1.39888e-14
0.002775 -1.37668e-14
0.0028 -1.37668e-14
0.002825 -1.5099e-14
0.00285 -1.55431e-14
0.002875 -1.35447e-14
0.0029 -1.55431e-14
0.002925 -1.5099e-14
0.00295 -1.46549e-14
0.002975 -1.42109e-14
0.003 -1.55431e-14
0.003025 -1.42109e-14
0.00305 -1.62093e-14
0.003075 -1.70974e-14
0.0031 -1.33227e-14
0.003125 -1.64313e-14
0.00315 -1.68754e-14
0.003175 -1.68754e-14
0.0032 -1.19904e-14
0.003225 -1.37668e-14
0.00325 -1.5099e-14
0.003275 -1.37668e-14
0.0033 -1.5099e-14
0.003325 -1.55431e-14
0.00335 -1.19904e-14
0.003375 -1.5099e-14
0.0034 -1.79856e-14
0.003425 -1.39888e-14
0.00345 -1.37668e-14
0.003475 -1.46549e-14
0.0035 -1.46549e-14
0.003525 -1.5099e-14
0.00355 -1.46549e-14
0.003575 -1.55431e-14
0.0036 -1.35447e-14
0.003625 -1.53211e-14
0.00365 -1.33227e-14
0.003675 -1.37668e-14
0.0037 -1.33227e-14
0.003725 -1.37668e-14
0.00375 -1.46549e-14
0.003775 -1.33227e-14
0.0038 -1.73195e-14
0.003825 -1.73195e-14
0.00385 -1.35447e-14
0.003875 -1.68754e-14
0.0039 -1.64313e-14
0.003925 -1.42109e-14
0.00395 -1.82077e-14
0.003975 -1.26565e-14
0.004 -1.86517e-14
0.004025 -1.46549e-14
0.00405 -1.5099e-14
0.004075 -1.68754e-14
0.0041 -1.46549e-14
0.004125 -1.64313e-14
0.00415 -1.19904e-14
0.004175 -1.17684e-14
0.0042 -1.73195e-14
0.004225 -1.28786e-14
0.00425 -1.28786e-14
0.004275 -1.4877e-14
0.0043 -1.24345e-14
0.004325 -1.19904e-14
0.00435 -7.54952e-15
0.004375 -9.10383e-15
0.0044 -1.46549e-14
0.004425 -8.21565e-15
0.00445 -7.10543e-15
0.004475 -4.21885e-15
0.0045 -1.15463e-14
0.004525 -6.21725e-15
0.00455 -3.9968e-15
0.004575 -7.54952e-15
0.0046 -1.77636e-15
0.004625 -3.55271e-15
0.00465 -4.44089e-15
0.004675 -4.88498e-15
0.0047 -1.33227e-15
0.004725 -6.21725e-15
0.00475 -5.32907e-15
0.004775 -4.88498e-15
0.0048 0
0.004825 2.66454e-15
0.00485 -2.66454e-15
0.004875 3.10862e-15
0.0049 -3.77476e-15
0.004925 1.9984e-15
0.00495 -2.66454e-15
0.004975 9.99201e-16
0.005 1.0103e-14
0.005025 -4.44089e-16
0.00505 0
0.005075 3.55271e-15
0.0051 1.88738e-15
0.005125 1.55431e-15
0.00515 8.88178e-16
0.005175 3.9968e-15
0.0052 6.21725e-15
0.005225 0
0.00525 7.10543e-15
0.005275 1.77636e-15
0.0053 1.36557e-14
0.005325 1.42109e-14
0.00535 3.77476e-15
0.005375 7.32747e-15
0.0054 1.27676e-14
0.005425 1.4877e-14
0.00545 7.77156e-15
0.005475 9.54792e-15
0.0055 1.5099e-14
0.005525 9.10383e-15
0.00555 1.79856e-14
0.005575 1.84297e-14
0.0056 1.62093e-14
0.005625 9.10383e-15
0.00565 1.59872e-14
0.005675 1.33227e-14
0.0057 9.54792e-15
0.005725 1.42109e-14
0.00575 9.32587e-15
0.005775 1.53211e-14
0.0058 1.82077e-14
0.005825 1.59872e-14
0.00585 2.10942e-14
0.005875 1.22125e-14
0.0059 2.07612e-14
0.005925 1.95399e-14
0.00595 1.69864e-14
0.005975 2.02061e-14
0.006 2.35367e-14
0.006025 1.9984e-14
0.00605 1.60982e-14
0.006075 1.77636e-14
0.0061 1.67644e-14
0.006125 2.53131e-14
0.00615 2.5091e-14
0.006175 2.35367e-14
0.0062 2.68674e-14
0.006225 3.17524e-14
0.00625 2.75335e-14
0.006275 1.9984e-14
0.0063 2.4869e-14
0.006325 2.57572e-14
0.00635 2.62013e-14
0.006375 2.40918e-14
0.0064 2.44249e-14
0.006425 2.62013e-14
0.00645 2.75335e-14
0.006475 3.44169e-14
0.0065 2.08722e-14
0.006525 2.62013e-14
0.00655 3.15303e-14
0.006575 3.04201e-14
0.0066 2.55351e-14
0.006625 3.53051e-14
0.00665 3.19744e-14
0.006675 2.78666e-14
0.0067 3.61933e-14
0.006725 3.03091e-14
0.00675 3.21965e-14
0.006775 3.17524e-14
0.0068 3.88578e-14
0.006825 3.64153e-14
0.00685 2.77556e-14
0.006875 2.52021e-14
0.0069 2.83107e-14
0.006925 2.17604e-14
0.00695 2.22045e-14
0.006975 2.38698e-14
0.007 1.9762e-14
0.007025 1.84297e-14
0.00705 1.74305e-14
0.007075 1.14353e-14
0.0071 1.60982e-14
0.007125 9.99201e-15
0.00715 1.39888e-14
0.007175 1.31006e-14
0.0072 1.36557e-14
0.007225 1.23235e-14
0.00725 1.11022e-14
0.007275 1.07692e-14
0.0073 1.0103e-14
0.007325 1.34337e-14
0.00735 9.65894e-15
0.007375 8.88178e-15
0.0074 5.77316e-15
0.007425 5.55112e-15
0.00745 5.9952e-15
0.007475 6.88338e-15
0.0075 2.22045e-15
0.007525 2.22045e-15
0.00755 -6.66134e-16
0.007575 1.77636e-15
0.0076 4.44089e-15
0.007625 1.33227e-15
0.00765 4.32987e-15
0.007675 4.88498e-15
0.0077 1.22125e-15
0.007725 4.44089e-16
0.00775 -2.22045e-15
0.007775 -8.88178e-16
0.0078 -3.55271e-15
0.007825 0
0.00785 -2.22045e-15
0.007875 -3.77476e-15
0.0079 -6.88338e-15
0.007925 -3.55271e-15
0.00795 -4.44089e-15
0.007975 -2.88658e-15
0.008 -7.54952e-15

View File

@ -0,0 +1,22 @@
name: publish
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set version
run: echo "PROJECT_NUMBER = `git describe --tags`" >> Doxyfile
- name: Generate Documentation
uses: mattnotmitt/doxygen-action@edge
- name: Publish generated content to GitHub Pages
uses: tsunematsu21/actions-publish-gh-pages@v1.0.2
with:
dir: docs/html
branch: gh-pages
token: ${{ secrets.ACCESS_TOKEN }}

6
doxygen-awesome/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
docs/html
.DS_Store
.idea
node_modules
*.tgz

View File

@ -0,0 +1,3 @@
*
!doxygen-awesome*

2793
doxygen-awesome/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

21
doxygen-awesome/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

38
doxygen-awesome/Makefile Normal file
View File

@ -0,0 +1,38 @@
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
# SPDX-License-Identifier: MIT
.POSIX:
PROJECT = doxygen-awesome-css
# Paths
PREFIX = /usr/local
DATADIR = share
INSTALLDIR = $(DESTDIR)$(PREFIX)/$(DATADIR)/$(PROJECT)
# Utilities
INSTALL = install -m 644
MKDIR = mkdir -p
RM = rm -f
# Files to be installed
FILES = doxygen-awesome-darkmode-toggle.js \
doxygen-awesome-fragment-copy-button.js \
doxygen-awesome-interactive-toc.js \
doxygen-awesome-paragraph-link.js \
doxygen-awesome-sidebar-only-darkmode-toggle.css \
doxygen-awesome-sidebar-only.css \
doxygen-awesome.css
# Empty targets so that `make` and `make clean` do not cause errors
all:
clean:
install:
$(MKDIR) $(INSTALLDIR)
$(INSTALL) $(FILES) $(INSTALLDIR)/
uninstall:
$(RM) -r $(INSTALLDIR)/
.PHONY: all clean install uninstall

166
doxygen-awesome/README.md Normal file
View File

@ -0,0 +1,166 @@
# Doxygen Awesome
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/jothepro/doxygen-awesome-css)](https://github.com/jothepro/doxygen-awesome-css/releases/latest)
[![GitHub](https://img.shields.io/github/license/jothepro/doxygen-awesome-css)](https://github.com/jothepro/doxygen-awesome-css/blob/main/LICENSE)
![GitHub Repo stars](https://img.shields.io/github/stars/jothepro/doxygen-awesome-css)
<div class="title_screenshot">
![Screenshot of Doxygen Awesome CSS](img/screenshot.png)
</div>
**Doxygen Awesome** is a custom **CSS theme for Doxygen HTML-documentation** with lots of customization parameters.
## Motivation
I really like how the Doxygen HTML-documentation is structured! But IMHO it looks a bit outdated.
This theme is an attempt to update the visuals of Doxygen without changing its overall layout too much.
## Features
- 🌈 Clean, modern design
- 🚀 Heavily customizable by adjusting CSS-variables
- 🧩 No changes to the HTML structure of Doxygen required
- 📱 Improved mobile usability
- 🌘 Dark mode support!
- 🥇 Works best with **doxygen 1.9.1** - **1.9.4** and **1.9.6** - **1.9.7**
## Examples
Some websites using this theme:
- [Documentation of this repository](https://jothepro.github.io/doxygen-awesome-css/)
- [wxWidgets](https://docs.wxwidgets.org/3.2/)
- [OpenCV 5.x](https://docs.opencv.org/5.x/)
- [Zephyr](https://docs.zephyrproject.org/latest/doxygen/html/index.html)
- [FELTOR](https://mwiesenberger.github.io/feltor/dg/html/modules.html)
- [Spatial Audio Framework (SAF)](https://leomccormack.github.io/Spatial_Audio_Framework/index.html)
- [libCloudSync](https://jothepro.github.io/libCloudSync/)
- [libsl3](https://a4z.github.io/libsl3/)
## Installation
To use the theme when generating your documentation, bring the required CSS and JS files from this repository into your project.
This can be done in several ways:
- manually copying the files
- adding the project as a Git submodule
- adding the project as a npm/xpm dependency
- installing the theme system wide
All theme files are located in the root of this repository and start with the prefix `doxygen-awesome-`. You may not need all of them. Follow the install instructions to figure out what files are required for your setup.
### Git submodule
For projects which use git, add the repository as a submodule and check out the desired release:
```sh
git submodule add https://github.com/jothepro/doxygen-awesome-css.git
cd doxygen-awesome-css
git checkout v2.2.1
```
### npm/xpm dependency
In the npm ecosystem, this project can be added as a development dependency
to your project:
```sh
cd your-project
npm install https://github.com/jothepro/doxygen-awesome-css#v2.2.1 --save-dev
ls -l node_module/@jothepro/doxygen-awesome-css
```
Similarly, in the [xPack](https://xpack.github.io) ecosystem, this project can be added
as a development dependency to an [`xpm`](https://xpack.github.io/xpm/)
managed project.
### System-wide
You can even install the theme system-wide by running `make install`. The files will be installed to `/usr/local/share/` by default, but you can customize the install location with `make PREFIX=/my/custom/path install`.
### Choosing a layout
There is two layout options. Choose one of them and configure Doxygen accordingly:
<div class="darkmode_inverted_image">
![Available theme variants](img/theme-variants.drawio.svg)
</div>
<div class="tabbed">
- <b class="tab-title">1⃣ Base Theme </b>
Comes with the typical Doxygen titlebar. Optionally the treeview in the sidebar can be enabled.
Required files: `doxygen-awesome.css`
Required `Doxyfile` configuration:
```
GENERATE_TREEVIEW = YES # optional. Also works without treeview
DISABLE_INDEX = NO
FULL_SIDEBAR = NO
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
```
- <b class="tab-title">2⃣ Sidebar-Only Theme </b>
Hides the top titlebar to give more space to the content. The treeview must be enabled in order for this theme to work.
Required files: `doxygen-awesome.css`, `doxygen-awesome-sidebar-only.css`
Required `Doxyfile` configuration:
```
GENERATE_TREEVIEW = YES # required!
DISABLE_INDEX = NO
FULL_SIDEBAR = NO
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \
doxygen-awesome-css/doxygen-awesome-sidebar-only.css
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
```
</div>
**Caution**:
- This theme is not compatible with the `FULL_SIDEBAR = YES` option provided by Doxygen!
- `HTML_COLORSTYLE` must be set to `LIGHT` since Doxygen 1.9.5!
### Further installation instructions:
- [Installing extensions](docs/extensions.md)
- [Customizing the theme (colors, spacing, border-radius, ...)](docs/customization.md)
- [Tips and Tricks for further configuration](docs/tricks.md)
## Browser support
Tested with
- Chrome 110, Chrome 109 for Android, Chrome 110 for iOS
- Safari 16, Safari for iOS 16
- Firefox 110, Firefox 110 for Android, Firefox 109 for iOS
- Edge 110
The theme does not strive to be backwards compatible to (significantly) older browser versions.
## Credits
Thanks for all the bug reports and inspiring feedback on github!
Special thanks to all the contributors:
<br><br>
<a href="https://github.com/jothepro/doxygen-awesome-css/graphs/contributors">
<img src="https://contrib.rocks/image?repo=jothepro/doxygen-awesome-css" />
</a>
<span class="next_section_button">
Read Next: [Extensions](docs/extensions.md)
</span>

View File

@ -0,0 +1,115 @@
# Customization
[TOC]
## CSS-Variables
This theme is highly customizable because a lot of things are parameterized with CSS variables.
Just to give you an idea on how flexible the styling is, click this button:
<div class="alter-theme-button" onclick="toggle_alternative_theme()" onkeypress="if (event.keyCode == 13) toggle_alternative_theme()" tabindex=0>Alter theme</div>
### Setup
It is recommended to add your own `custom.css` and overwrite the variables there:
```
HTML_EXTRA_STYLESHEET = doxygen-awesome.css custom.css
```
Make sure to override the variables in the correct spot. All variables should be customized where they have been defined, in the `html` tag selector:
```css
html {
/* override light-mode variables here */
}
```
For dark-mode overrides you have to choose where to put them, depending on whether the dark-mode toggle extension is installed or not:
<div class="tabbed">
- <b class="tab-title">dark-mode toggle is installed</b>
```css
html.dark-mode {
/* define dark-mode variable overrides here if you DO use doxygen-awesome-darkmode-toggle.js */
}
```
- <b class="tab-title">dark-mode toggle is **NOT** installed</b>
The dark-mode is enabled automatically depending on the system preference:
```css
@media (prefers-color-scheme: dark) {
html:not(.light-mode) {
/* define dark-mode variable overrides here if you DON'T use doxygen-awesome-darkmode-toggle.js */
}
}
```
</div>
### Available variables
The following list gives an overview of the variables defined in [`doxygen-awesome.css`](https://github.com/jothepro/doxygen-awesome-css/blob/main/doxygen-awesome.css).
The list is not complete. To explore all available variables, have a look at the CSS starting from [here](https://github.com/jothepro/doxygen-awesome-css/blob/main/doxygen-awesome.css#L30).
All variables are defined at the beginning of the stylesheet.
| Parameter | Default (Light) | Default (Dark) |
| :---------------------------------- | :---------------------------------------------------------- | :---------------------------------------------------------- |
| **Color Scheme**:<br>primary theme colors. This will affect the entire websites color scheme: links, arrows, labels, ... |||
| `--primary-color` | <code style="background:#1779c4;color:white">#1779c4</code> | <code style="background:#1982d2;color:white">#1982d2</code> |
| `--primary-dark-color` | <code style="background:#335c80;color:white">#335c80</code> | <code style="background:#5ca8e2;color:black">#5ca8e2</code> |
| `--primary-light-color` | <code style="background:#70b1e9;color:black">#70b1e9</code> | <code style="background:#4779ac;color:white">#4779ac</code> |
| **Page Colors**:<br>background and foreground (text-color) of the documentation. |||
| `--page-background-color` | <code style="background:#ffffff;color:black">#ffffff</code> | <code style="background:#1C1D1F;color:white">#1C1D1F</code> |
| `--page-foreground-color` | <code style="background:#2f4153;color:white">#2f4153</code> | <code style="background:#d2dbde;color:black">#d2dbde</code> |
| `--page-secondary-foreground-color` | <code style="background:#6f7e8e;color:white">#6f7e8e</code> | <code style="background:#859399;color:white">#859399</code> |
| **Spacing:**<br>default spacings. Most ui components reference these values for spacing, to provide uniform spacing on the page. |||
| `--spacing-small` | `5px` | |
| `--spacing-medium` | `10px` | |
| `--spacing-large` | `16px` | |
| **Border Radius**:<br>border radius for all rounded ui components. Will affect many components, like dropdowns, memitems, codeblocks, ... |||
| `--border-radius-small` | `4px` | |
| `--border-radius-medium` | `6px` | |
| `--border-radius-large` | `8px` | |
| **Content Width**:<br>The content is centered and constrained in its width. To make the content fill the whole page, set the following variable to `auto`. |||
| `--content-maxwidth` | `1000px` | |
| **Code Fragment Colors**:<br>Color-Scheme of multiline codeblocks |||
| `--fragment-background` | <code style="background:#F8F9FA;color:black">#F8F9FA</code> | <code style="background:#282c34;color:white">#282c34</code> |
| `--fragment-foreground` | <code style="background:#37474F;color:white">#37474F</code> | <code style="background:#dbe4eb;color:black">#dbe4eb</code> |
| **Arrow Opacity**:<br>By default the arrows in the sidebar are only visible on hover. You can override this behavior so they are visible all the time. |||
| `--side-nav-arrow-opacity` | `0` | |
| `--side-nav-arrow-hover-opacity` | `0.9` | |
| ...and many more |||
If you miss a configuration option or find a bug, please consider [opening an issue](https://github.com/jothepro/doxygen-awesome-css/issues)!
## Doxygen generator
The theme overrides most colors with the `--primary-color-*` variables.
But there is a few small images and graphics that the theme cannot adjust or replace. To make these blend in better with
the rest, it is recommended to adjust the [doxygen color settings](https://www.doxygen.nl/manual/customize.html#minor_tweaks_colors)
to something that matches the chosen color-scheme.
For the default color-scheme, these values work out quite well:
```
# Doxyfile
HTML_COLORSTYLE_HUE = 209
HTML_COLORSTYLE_SAT = 255
HTML_COLORSTYLE_GAMMA = 113
```
## Share your customizations
If you customized the theme with custom colors, spacings, font-sizes, etc. and you want to share your creation with others, you can to this [here](https://github.com/jothepro/doxygen-awesome-css/discussions/13).
I am always curious to learn about how you made the theme look even better!
<span class="next_section_button">
Read Next: [Tips & Tricks](tricks.md)
</span>

View File

@ -0,0 +1,236 @@
# Extensions
[TOC]
On top of the base theme provided by `doxygen-awesome.css`, this repository comes with Javascript extensions that require additional setup steps to get them running.
The extensions require customizations in the header HTML-template.
This is how you can create the default template with Doxygen:
1. Create default header template:
```sh
doxygen -w html header.html delete_me.html delete_me.css
```
2. Reference the template in your `Doxyfile`:
```
HTML_HEADER = header.html
```
[More details on header customization](https://www.doxygen.nl/manual/customize.html#minor_tweaks_header_css)
## Dark Mode Toggle {#extension-dark-mode-toggle}
Adds a button next to the search bar to enable and disable the dark theme variant manually:
<div class="darkmode_inverted_image bordered_image">
<img width=250 src="darkmode_toggle.png" />
</div>
### Installation
1. Add the required resources in your `Doxyfile`:
- **HTML_EXTRA_FILES:** `doxygen-awesome-darkmode-toggle.js`
- **HTML_EXTRA_STYLESHEET:** `doxygen-awesome-sidebar-only-darkmode-toggle.css`
<em>(ONLY required for the sidebar-only theme variant!)</em>
2. In the `header.html` template, include `doxygen-awesome-darkmode-toggle.js` at the end of the `<head>` and then initialize it:
```html
<html>
<head>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
</head>
<body>
```
### Customizing
Changing the tooltip of the button:
```js
DoxygenAwesomeDarkModeToggle.title = "Zwischen hellem/dunklem Modus wechseln"
```
Changing Icons. Both Emoji or SVG icons are supported:
```js
DoxygenAwesomeDarkModeToggle.lightModeIcon = '🌞'
// icon from https://fonts.google.com/icons
DoxygenAwesomeDarkModeToggle.darkModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#009793"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M8.1,14.15C9.77,14.63,11,16.17,11,18c0,0.68-0.19,1.31-0.48,1.87c0.48,0.09,0.97,0.14,1.48,0.14 c1.48,0,2.9-0.41,4.13-1.15c-2.62-0.92-5.23-2.82-6.8-5.86C7.74,9.94,7.78,7.09,8.29,4.9c-2.57,1.33-4.3,4.01-4.3,7.1c0,0,0,0,0,0 c0.01,0,0.01,0,0.02,0C5.66,12,7.18,12.83,8.1,14.15z" opacity=".3"/><path d="M19.78,17.51c-2.47,0-6.57-1.33-8.68-5.43C8.77,7.57,10.6,3.6,11.63,2.01C6.27,2.2,1.98,6.59,1.98,12 c0,0.14,0.02,0.28,0.02,0.42C2.61,12.16,3.28,12,3.98,12c0,0,0,0,0,0c0-3.09,1.73-5.77,4.3-7.1C7.78,7.09,7.74,9.94,9.32,13 c1.57,3.04,4.18,4.95,6.8,5.86c-1.23,0.74-2.65,1.15-4.13,1.15c-0.5,0-1-0.05-1.48-0.14c-0.37,0.7-0.94,1.27-1.64,1.64 c0.98,0.32,2.03,0.5,3.11,0.5c3.5,0,6.58-1.8,8.37-4.52C20.18,17.5,19.98,17.51,19.78,17.51z"/><path d="M7,16l-0.18,0C6.4,14.84,5.3,14,4,14c-1.66,0-3,1.34-3,3s1.34,3,3,3c0.62,0,2.49,0,3,0c1.1,0,2-0.9,2-2 C9,16.9,8.1,16,7,16z"/></g></g></svg>`
```
All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`!
## Fragment Copy Button {#extension-copy-button}
Shows a copy button when the user hovers over a code fragment:
<div class="darkmode_inverted_image bordered_image">
<img width=490 src="fragment_copy_button.png"/>
</div>
### Installation
1. Add the required resources in your `Doxyfile`:
- **HTML_EXTRA_FILES:** `doxygen-awesome-fragment-copy-button.js`
2. In the `header.html` template, include `doxygen-awesome-fragment-copy-button.js` at the end of the `<head>` and then initialize it:
```html
<html>
<head>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
<script type="text/javascript">
DoxygenAwesomeFragmentCopyButton.init()
</script>
</head>
<body>
```
### Customizing
The tooltip of the button can be changed:
```js
DoxygenAwesomeFragmentCopyButton.title = "In die Zwischenablage kopieren"
```
The icon can be changed. It must be an SVG:
```js
DoxygenAwesomeFragmentCopyButton.copyIcon = `<svg ...>`
DoxygenAwesomeFragmentCopyButton.successIcon = `<svg ...>`
```
All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`!
## Paragraph Linking {#extension-para}
Provides a button on hover behind every headline to allow easy creation of a permanent link to the headline:
<div class="darkmode_inverted_image bordered_image">
<img width=220 src="paragraph_link.png"/>
</div>
Works for all headlines and for many documentation section titles.
### Installation
1. Add the required resources in your `Doxyfile`:
- **HTML_EXTRA_FILES:** `doxygen-awesome-paragraph-link.js`
2. In the `header.html` template, include `doxygen-awesome-paragraph-link.js` at the end of the `<head>` and then initialize it:
```html
<html>
<head>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
<script type="text/javascript">
DoxygenAwesomeParagraphLink.init()
</script>
</head>
<body>
```
### Customizing
The button tooltip can be changed:
```js
DoxygenAwesomeParagraphLink.title = "Abschnitt verknüpfen"
```
The icon of the button can be changed. Both plain characters or SVG icons are supported:
```js
DoxygenAwesomeParagraphLink.icon = "¶"
```
All customizations must be applied before calling `DoxygenAwesomeParagraphLink.init()`!
## Interactive TOC {#extension-toc}
On large screens the Table of Contents (TOC) is anchored on the top right of the page. This extension visualizes the reading progress by dynamically highlighting the currently active section.
On small screens the extension hides the TOC by default. The user can open it manually when needed:
<div class="darkmode_inverted_image bordered_image">
<img width=380 src="interactive_toc_mobile.png" />
</div>
### Installation
1. Add the required resources in your `Doxyfile`:
- **HTML_EXTRA_FILES:** `doxygen-awesome-interactive-toc.js`
2. In the `header.html` template, include `doxygen-awesome-interactive-toc.js` at the end of the `<head>` and then initialize it:
```html
<html>
<head>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
<script type="text/javascript">
DoxygenAwesomeInteractiveToc.init()
</script>
</head>
<body>
```
### Customizing
The offset for when a headline is considered active can be changed. A smaller value means that the headline of the section must be closer to the top of the viewport before it is highlighted in the TOC:
```js
DoxygenAwesomeInteractiveToc.topOffset = 45
```
Hiding the TOC on small screens can be disabled. It is still interactive and can be hidden by the user but will now be open by default:
```js
DoxygenAwesomeInteractiveToc.hideMobileMenu = false
```
## Tabs {#extension-tabs}
@note Experimental feature! Please report bugs [here](https://github.com/jothepro/doxygen-awesome-css/issues).
This extension allows to arrange list content in tabs:
<div class="tabbed">
- <span class="tab-title">Tab 1</span> This is the content of tab 1
- <span class="tab-title">Tab 2</span> This is the content of tab 2
</div>
### Installation
1. Add the required resources in your `Doxyfile`:
- **HTML_EXTRA_FILES:** `doxygen-awesome-tabs.js`
2. In the `header.html` template, include `doxygen-awesome-tabs.js` at the end of the `<head>` and then initialize it:
```html
<html>
<head>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
<script type="text/javascript">
DoxygenAwesomeTabs.init()
</script>
</head>
<body>
```
### Usage
Each list that is supposed to be displayed as tabs has to be wrapped with the `tabbed` CSS class.
Each item in the list must start with an element that has the class `tab-title`. It will then be used as tab title.
```md
<div class="tabbed">
- <span class="tab-title">Tab 1</span> This is the content of tab 1
- <span class="tab-title">Tab 2</span> This is the content of tab 2
</div>
```
<span class="next_section_button">
Read Next: [Customization](customization.md)
</span>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,124 @@
# Tips & Tricks
[TOC]
## Diagrams with Graphviz {#tricks-graphviz}
To get the best looking class diagrams for your documentation, generate them with Graphviz as vector graphics with transparent background:
```
# Doxyfile
HAVE_DOT = YES
DOT_IMAGE_FORMAT = svg
DOT_TRANSPARENT = YES
```
In case `INTERACTIVE_SVG = YES` is set in the Doxyfile, all user-defined dotgraphs must be wrapped with the `interactive_dotgraph` CSS class in order for them to be rendered correctly:
```md
<div class="interactive_dotgraph">
\dotfile graph.dot
</div>
```
@note Both the default overflow scrolling behavior in this theme and the interactive editor enabled by `INTERACTIVE_SVG` are unsatisfying workarounds IMHO. Consider designing your graphs to be narrow enough to fit the page to avoid scrolling.
## Disable Dark Mode {#tricks-darkmode}
If you don't want the theme to automatically switch to dark mode depending on the browser preference,
you can disable dark mode by adding the `light-mode` class to the html-tag in the header template:
```html
<html xmlns="http://www.w3.org/1999/xhtml" class="light-mode">
```
The same can be done to always enable dark-mode:
```html
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
```
@warning This only works if you don't use the dark-mode toggle extension.
## Choosing Sidebar Width {#tricks-sidebar}
If you have enabled the sidebar-only theme variant, make sure to carefully choose a proper width for your sidebar.
It should be wide enough to hold the icon, project title and version number. If the content is too wide, it will be
cut off.
```css
html {
/* Make sure sidebar is wide enough to contain the page title (logo + title + version) */
--side-nav-fixed-width: 335px;
}
```
The chosen width should also be set in the Doxyfile:
```
# Doxyfile
TREEVIEW_WIDTH = 335
```
## Formatting Tables {#tricks-tables}
By default tables in this theme are left-aligned and as wide as required to fit their content.
Those properties can be changed for individual tables.
### Centering
Tables can be centered by wrapping them in the `<center>` HTML-tag.
<div class="tabbed">
- <span class="tab-title">Code</span>
```md
<center>
| This table | is centered |
|------------|----------------------|
| test 1 | test 2 |
</center>
```
- <span class="tab-title">Result</span>
<center>
| This table | is centered |
|------------|----------------------|
| test 1 | test 2 |
</center>
</div>
### Full Width
To make tables span the full width of the page, no matter how wide the content is, wrap the table in the `full_width_table` CSS class.
@warning Apply with caution! This breaks the overflow scrolling of the table. Content might be cut of on small screens!
<div class="tabbed">
- <span class="tab-title">Code</span>
```md
<div class="full_width_table">
| This table | spans the full width |
|------------|----------------------|
| test 1 | test 2 |
</div>
```
- <span class="tab-title">Result</span>
<div class="full_width_table">
| This table | spans the full width |
|------------|----------------------|
| test 1 | test 2 |
</div>
</div>
<span class="next_section_button">
Read Next: [Example](https://jothepro.github.io/doxygen-awesome-css/class_my_library_1_1_example.html)
</span>

View File

@ -0,0 +1,157 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2021 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
class DoxygenAwesomeDarkModeToggle extends HTMLElement {
// SVG icons from https://fonts.google.com/icons
// Licensed under the Apache 2.0 license:
// https://www.apache.org/licenses/LICENSE-2.0.html
static lightModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FCBF00"><rect fill="none" height="24" width="24"/><circle cx="12" cy="12" opacity=".3" r="3"/><path d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg>`
static darkModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FE9700"><rect fill="none" height="24" width="24"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27 C17.45,17.19,14.93,19,12,19c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z" opacity=".3"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg>`
static title = "Toggle Light/Dark Mode"
static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode"
static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode"
static _staticConstructor = function() {
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.userPreference)
// Update the color scheme when the browsers preference changes
// without user interaction on the website.
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
})
// Update the color scheme when the tab is made visible again.
// It is possible that the appearance was changed in another tab
// while this tab was in the background.
document.addEventListener("visibilitychange", visibilityState => {
if (document.visibilityState === 'visible') {
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
}
});
}()
static init() {
$(function() {
$(document).ready(function() {
const toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
toggleButton.title = DoxygenAwesomeDarkModeToggle.title
toggleButton.updateIcon()
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
toggleButton.updateIcon()
})
document.addEventListener("visibilitychange", visibilityState => {
if (document.visibilityState === 'visible') {
toggleButton.updateIcon()
}
});
$(document).ready(function(){
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
})
$(window).resize(function(){
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
})
})
})
}
constructor() {
super();
this.onclick=this.toggleDarkMode
}
/**
* @returns `true` for dark-mode, `false` for light-mode system preference
*/
static get systemPreference() {
return window.matchMedia('(prefers-color-scheme: dark)').matches
}
/**
* @returns `true` for dark-mode, `false` for light-mode user preference
*/
static get userPreference() {
return (!DoxygenAwesomeDarkModeToggle.systemPreference && localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)) ||
(DoxygenAwesomeDarkModeToggle.systemPreference && !localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey))
}
static set userPreference(userPreference) {
DoxygenAwesomeDarkModeToggle.darkModeEnabled = userPreference
if(!userPreference) {
if(DoxygenAwesomeDarkModeToggle.systemPreference) {
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey, true)
} else {
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)
}
} else {
if(!DoxygenAwesomeDarkModeToggle.systemPreference) {
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey, true)
} else {
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey)
}
}
DoxygenAwesomeDarkModeToggle.onUserPreferenceChanged()
}
static enableDarkMode(enable) {
if(enable) {
DoxygenAwesomeDarkModeToggle.darkModeEnabled = true
document.documentElement.classList.add("dark-mode")
document.documentElement.classList.remove("light-mode")
} else {
DoxygenAwesomeDarkModeToggle.darkModeEnabled = false
document.documentElement.classList.remove("dark-mode")
document.documentElement.classList.add("light-mode")
}
}
static onSystemPreferenceChanged() {
DoxygenAwesomeDarkModeToggle.darkModeEnabled = DoxygenAwesomeDarkModeToggle.userPreference
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
}
static onUserPreferenceChanged() {
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
}
toggleDarkMode() {
DoxygenAwesomeDarkModeToggle.userPreference = !DoxygenAwesomeDarkModeToggle.userPreference
this.updateIcon()
}
updateIcon() {
if(DoxygenAwesomeDarkModeToggle.darkModeEnabled) {
this.innerHTML = DoxygenAwesomeDarkModeToggle.darkModeIcon
} else {
this.innerHTML = DoxygenAwesomeDarkModeToggle.lightModeIcon
}
}
}
customElements.define("doxygen-awesome-dark-mode-toggle", DoxygenAwesomeDarkModeToggle);

View File

@ -0,0 +1,85 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2022 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
class DoxygenAwesomeFragmentCopyButton extends HTMLElement {
constructor() {
super();
this.onclick=this.copyContent
}
static title = "Copy to clipboard"
static copyIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>`
static successIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`
static successDuration = 980
static init() {
$(function() {
$(document).ready(function() {
if(navigator.clipboard) {
const fragments = document.getElementsByClassName("fragment")
for(const fragment of fragments) {
const fragmentWrapper = document.createElement("div")
fragmentWrapper.className = "doxygen-awesome-fragment-wrapper"
const fragmentCopyButton = document.createElement("doxygen-awesome-fragment-copy-button")
fragmentCopyButton.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
fragmentCopyButton.title = DoxygenAwesomeFragmentCopyButton.title
fragment.parentNode.replaceChild(fragmentWrapper, fragment)
fragmentWrapper.appendChild(fragment)
fragmentWrapper.appendChild(fragmentCopyButton)
}
}
})
})
}
copyContent() {
const content = this.previousSibling.cloneNode(true)
// filter out line number from file listings
content.querySelectorAll(".lineno, .ttc").forEach((node) => {
node.remove()
})
let textContent = content.textContent
// remove trailing newlines that appear in file listings
let numberOfTrailingNewlines = 0
while(textContent.charAt(textContent.length - (numberOfTrailingNewlines + 1)) == '\n') {
numberOfTrailingNewlines++;
}
textContent = textContent.substring(0, textContent.length - numberOfTrailingNewlines)
navigator.clipboard.writeText(textContent);
this.classList.add("success")
this.innerHTML = DoxygenAwesomeFragmentCopyButton.successIcon
window.setTimeout(() => {
this.classList.remove("success")
this.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
}, DoxygenAwesomeFragmentCopyButton.successDuration);
}
}
customElements.define("doxygen-awesome-fragment-copy-button", DoxygenAwesomeFragmentCopyButton)

View File

@ -0,0 +1,81 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2022 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
class DoxygenAwesomeInteractiveToc {
static topOffset = 38
static hideMobileMenu = true
static headers = []
static init() {
window.addEventListener("load", () => {
let toc = document.querySelector(".contents > .toc")
if(toc) {
toc.classList.add("interactive")
if(!DoxygenAwesomeInteractiveToc.hideMobileMenu) {
toc.classList.add("open")
}
document.querySelector(".contents > .toc > h3")?.addEventListener("click", () => {
if(toc.classList.contains("open")) {
toc.classList.remove("open")
} else {
toc.classList.add("open")
}
})
document.querySelectorAll(".contents > .toc > ul a").forEach((node) => {
let id = node.getAttribute("href").substring(1)
DoxygenAwesomeInteractiveToc.headers.push({
node: node,
headerNode: document.getElementById(id)
})
document.getElementById("doc-content")?.addEventListener("scroll", () => {
DoxygenAwesomeInteractiveToc.update()
})
})
DoxygenAwesomeInteractiveToc.update()
}
})
}
static update() {
let active = DoxygenAwesomeInteractiveToc.headers[0]?.node
DoxygenAwesomeInteractiveToc.headers.forEach((header) => {
let position = header.headerNode.getBoundingClientRect().top
header.node.classList.remove("active")
header.node.classList.remove("aboveActive")
if(position < DoxygenAwesomeInteractiveToc.topOffset) {
active = header.node
active?.classList.add("aboveActive")
}
})
active?.classList.add("active")
active?.classList.remove("aboveActive")
}
}

View File

@ -0,0 +1,51 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2022 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
class DoxygenAwesomeParagraphLink {
// Icon from https://fonts.google.com/icons
// Licensed under the Apache 2.0 license:
// https://www.apache.org/licenses/LICENSE-2.0.html
static icon = `<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"/></svg>`
static title = "Permanent Link"
static init() {
$(function() {
$(document).ready(function() {
document.querySelectorAll(".contents a.anchor[id], .contents .groupheader > a[id]").forEach((node) => {
let anchorlink = document.createElement("a")
anchorlink.setAttribute("href", `#${node.getAttribute("id")}`)
anchorlink.setAttribute("title", DoxygenAwesomeParagraphLink.title)
anchorlink.classList.add("anchorlink")
node.classList.add("anchor")
anchorlink.innerHTML = DoxygenAwesomeParagraphLink.icon
node.parentElement.appendChild(anchorlink)
})
})
})
}
}

View File

@ -0,0 +1,40 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2021 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
@media screen and (min-width: 768px) {
#MSearchBox {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - var(--searchbar-height) - 1px);
}
#MSearchField {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 66px - var(--searchbar-height));
}
}

View File

@ -0,0 +1,116 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2021 - 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
html {
/* side nav width. MUST be = `TREEVIEW_WIDTH`.
* Make sure it is wide enough to contain the page title (logo + title + version)
*/
--side-nav-fixed-width: 335px;
--menu-display: none;
--top-height: 120px;
--toc-sticky-top: -25px;
--toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 25px);
}
#projectname {
white-space: nowrap;
}
@media screen and (min-width: 768px) {
html {
--searchbar-background: var(--page-background-color);
}
#side-nav {
min-width: var(--side-nav-fixed-width);
max-width: var(--side-nav-fixed-width);
top: var(--top-height);
overflow: visible;
}
#nav-tree, #side-nav {
height: calc(100vh - var(--top-height)) !important;
}
#nav-tree {
padding: 0;
}
#top {
display: block;
border-bottom: none;
height: var(--top-height);
margin-bottom: calc(0px - var(--top-height));
max-width: var(--side-nav-fixed-width);
overflow: hidden;
background: var(--side-nav-background);
}
#main-nav {
float: left;
padding-right: 0;
}
.ui-resizable-handle {
cursor: default;
width: 1px !important;
background: var(--separator-color);
box-shadow: 0 calc(-2 * var(--top-height)) 0 0 var(--separator-color);
}
#nav-path {
position: fixed;
right: 0;
left: var(--side-nav-fixed-width);
bottom: 0;
width: auto;
}
#doc-content {
height: calc(100vh - 31px) !important;
padding-bottom: calc(3 * var(--spacing-large));
padding-top: calc(var(--top-height) - 80px);
box-sizing: border-box;
margin-left: var(--side-nav-fixed-width) !important;
}
#MSearchBox {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)));
}
#MSearchField {
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 65px);
}
#MSearchResultsWindow {
left: var(--spacing-medium) !important;
right: auto;
}
}

View File

@ -0,0 +1,70 @@
/**
Doxygen Awesome
https://github.com/jothepro/doxygen-awesome-css
MIT License
Copyright (c) 2023 jothepro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
class DoxygenAwesomeTabs {
static init() {
window.addEventListener("load", () => {
document.querySelectorAll(".tabbed:not(:empty)").forEach((tabbed, tabbedIndex) => {
let tabLinkList = []
tabbed.querySelectorAll("li").forEach((tab, tabIndex) => {
tab.id = "tab_" + tabbedIndex + "_" + tabIndex
let header = tab.querySelector(".tab-title")
let tabLink = document.createElement("button")
tabLink.classList.add("tab-button")
tabLink.appendChild(header)
tabLink.addEventListener("click", () => {
tabbed.querySelectorAll("li").forEach((tab) => {
tab.classList.remove("selected")
})
tabLinkList.forEach((tabLink) => {
tabLink.classList.remove("active")
})
tab.classList.add("selected")
tabLink.classList.add("active")
})
tabLinkList.push(tabLink)
if(tabIndex == 0) {
tab.classList.add("selected")
tabLink.classList.add("active")
}
})
let tabsOverview = document.createElement("div")
tabsOverview.classList.add("tabs-overview")
let tabsOverviewContainer = document.createElement("div")
tabsOverviewContainer.classList.add("tabs-overview-container")
tabLinkList.forEach((tabLink) => {
tabsOverview.appendChild(tabLink)
})
tabsOverviewContainer.appendChild(tabsOverview)
tabbed.before(tabsOverviewContainer)
})
})
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
html.alternative {
/* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */
--primary-color: #AF7FE4;
--primary-dark-color: #9270E4;
--primary-light-color: #7aabd6;
--primary-lighter-color: #cae1f1;
--primary-lightest-color: #e9f1f8;
/* page base colors */
--page-background-color: white;
--page-foreground-color: #2c3e50;
--page-secondary-foreground-color: #67727e;
--border-radius-large: 22px;
--border-radius-small: 9px;
--border-radius-medium: 14px;
--spacing-small: 8px;
--spacing-medium: 14px;
--spacing-large: 19px;
--top-height: 125px;
--side-nav-background: #324067;
--side-nav-foreground: #F1FDFF;
--header-foreground: var(--side-nav-foreground);
--searchbar-background: var(--side-nav-foreground);
--searchbar-border-radius: var(--border-radius-medium);
--header-background: var(--side-nav-background);
--header-foreground: var(--side-nav-foreground);
--toc-background: rgb(243, 240, 252);
--toc-foreground: var(--page-foreground-color);
}
html.alternative.dark-mode {
color-scheme: dark;
--primary-color: #AF7FE4;
--primary-dark-color: #9270E4;
--primary-light-color: #4779ac;
--primary-lighter-color: #191e21;
--primary-lightest-color: #191a1c;
--page-background-color: #1C1D1F;
--page-foreground-color: #d2dbde;
--page-secondary-foreground-color: #859399;
--separator-color: #3a3246;
--side-nav-background: #171D32;
--side-nav-foreground: #F1FDFF;
--toc-background: #20142C;
--searchbar-background: var(--page-background-color);
}

View File

@ -0,0 +1,101 @@
.github-corner svg {
fill: var(--primary-light-color);
color: var(--page-background-color);
width: 72px;
height: 72px;
}
@media screen and (max-width: 767px) {
.github-corner svg {
width: 50px;
height: 50px;
}
#projectnumber {
margin-right: 22px;
}
}
.alter-theme-button {
display: inline-block;
cursor: pointer;
background: var(--primary-color);
color: var(--page-background-color) !important;
border-radius: var(--border-radius-medium);
padding: var(--spacing-small) var(--spacing-medium);
text-decoration: none;
}
.next_section_button {
display: block;
padding: var(--spacing-large) 0 var(--spacing-small) 0;
color: var(--page-background-color);
user-select: none;
}
.next_section_button::after {
/* clearfix */
content: "";
clear: both;
display: table;
}
.next_section_button a {
overflow: hidden;
float: right;
border: 1px solid var(--separator-color);
padding: var(--spacing-medium) calc(var(--spacing-large) / 2) var(--spacing-medium) var(--spacing-large);
border-radius: var(--border-radius-medium);
color: var(--page-secondary-foreground-color) !important;
text-decoration: none;
background-color: var(--page-background-color);
transition: color .08s ease-in-out, background-color .1s ease-in-out;
}
.next_section_button a:hover {
color: var(--page-foreground-color) !important;
background-color: var(--odd-color);
}
.next_section_button a::after {
content: '〉';
color: var(--page-secondary-foreground-color) !important;
padding-left: var(--spacing-large);
display: inline-block;
transition: color .08s ease-in-out, transform .09s ease-in-out;
}
.next_section_button a:hover::after {
color: var(--page-foreground-color) !important;
transform: translateX(3px);
}
.alter-theme-button:hover {
background: var(--primary-dark-color);
}
html.dark-mode .darkmode_inverted_image img, /* < doxygen 1.9.3 */
html.dark-mode .darkmode_inverted_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
filter: brightness(89%) hue-rotate(180deg) invert();
}
.bordered_image {
border-radius: var(--border-radius-small);
border: 1px solid var(--separator-color);
display: inline-block;
overflow: hidden;
}
html.dark-mode .bordered_image img, /* < doxygen 1.9.3 */
html.dark-mode .bordered_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
border-radius: var(--border-radius-small);
}
.title_screenshot {
filter: drop-shadow(0px 3px 10px rgba(0,0,0,0.22));
max-width: 500px;
margin: var(--spacing-large) 0;
}
.title_screenshot .caption {
display: none;
}

View File

@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- BEGIN opengraph metadata -->
<meta property="og:title" content="Doxygen Awesome" />
<meta property="og:image" content="https://repository-images.githubusercontent.com/348492097/4f16df80-88fb-11eb-9d31-4015ff22c452" />
<meta property="og:description" content="Custom CSS theme for doxygen html-documentation with lots of customization parameters." />
<meta property="og:url" content="https://jothepro.github.io/doxygen-awesome-css/" />
<!-- END opengraph metadata -->
<!-- BEGIN twitter metadata -->
<meta name="twitter:image:src" content="https://repository-images.githubusercontent.com/348492097/4f16df80-88fb-11eb-9d31-4015ff22c452" />
<meta name="twitter:title" content="Doxygen Awesome" />
<meta name="twitter:description" content="Custom CSS theme for doxygen html-documentation with lots of customization parameters." />
<!-- END twitter metadata -->
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<link rel="icon" type="image/svg+xml" href="logo.drawio.svg"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
<script type="text/javascript" src="$relpath^toggle-alternative-theme.js"></script>
<script type="text/javascript">
DoxygenAwesomeFragmentCopyButton.init()
DoxygenAwesomeDarkModeToggle.init()
DoxygenAwesomeParagraphLink.init()
DoxygenAwesomeInteractiveToc.init()
DoxygenAwesomeTabs.init()
</script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<!-- https://tholman.com/github-corners/ -->
<a href="https://github.com/jothepro/doxygen-awesome-css" class="github-corner" title="View source on GitHub" target="_blank">
<svg viewBox="0 0 250 250" width="40" height="40" style="position: absolute; top: 0; border: 0; right: 0; z-index: 99;" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

View File

@ -0,0 +1,12 @@
let original_theme_active = true;
function toggle_alternative_theme() {
if(original_theme_active) {
document.documentElement.classList.add("alternative")
original_theme_active = false;
} else {
document.documentElement.classList.remove("alternative")
original_theme_active = true;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,250 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1001px" height="312px" viewBox="-0.5 -0.5 1001 312" content="&lt;mxfile&gt;&lt;diagram id=&quot;6E4AiNPWWr3a8GvC3Ypl&quot; name=&quot;Page-1&quot;&gt;7VnLkps6EP0aqiaLUEgCGZbjV+4muYtJVdYakA11BfKV8diTr48E4imY2GPszCJQZUM3ep0+3TrYFlqkpy+C7OKvPKLMgk50stDSgtDFSH4qw6s2QLc0bEUSlSbQGJ6Sn1QbHW09JBHddx7MOWd5susaQ55lNMw7NiIEP3Yf23DWHXVHttQwPIWEmdYfSZTHpdX3nMb+D022cTUycLQnJdXD2rCPScSPLRNaWWghOM/Lq/S0oExhV+FStluPeOuJCZrlZzXwyhYvhB304iyImWw73+9IpmaYv+pl4/8PalrzDc/yzxuSJkyG71E+8pVmjFtwoS55RkJ9LVuQdCcb6HYLfhAJFdLzjR77zrJJyjMuxw1pYXGKkY4aSTVSxkVKWOHEdUO81d+smt34tPcFl1RXAO9Ogx0Ba7W25r7lr60VtHxkPaKqb4lj2X13SGkuwarN5dKy5736mpM9lQN+j2lKddTrycGcnlSbOE/lspZAXhKWbDN5HcoQSrTQ/IWKPJHke9SONIki1Xx+jJOcPpVwLY8y06RN8EMW0Uj3pWar00dGWt/rwQt/wtiCMy6KyaCNp079XMteHooTueD/0cqT8UxNg4hQj4Fgsfw+BTUr1TroqWXSlPxCeUpz8SofqbxYp4euD9DX98cm20CVbXEr05C2EZ3g27rrJgfkhU6DkZTw/6ZEryM4dUo8yfr9TMTnfzP2ekFqDNPvnvkykhdjedRKDTRNamDv96kBnVulRjCQGr2obSWiu/MXWm/S5LnqwXkTAA+YC3aDgQVDPMGKz1hwwyBnhGOjDJZUwSt1DnMjGMHMxOYuWFTAt8BYyHxQ850Wk1VxXotJ5Q1824NBc8w6+QOwjWdmBoHAxngAR4RshCaAEhhQ6pJYbhJFDX0WVfl8+J7kjBYutQd8Iy/JluQJzz5dh3yvbK1n6rwLSwHE9gzeiqjQQHctFXWxzz7MBSVRKA7pbn8lejdC6dRGyAVoFiDgINdD3bov3bhzGCRGGNlw5vkYOtgPsOcNbAqKzu0DT4A+MrlN5UYYv4E2uAbt3qYMsToni4IsD60o+N3q4YJuEMxKAhxgV41dX4YjMKMA+qH0J4iCO7BzdeRgWEPWyL0KPEMB6gI0ovneJ9za1aen5Rjd5O9Xck5XyUHnPmQAYDiM7ZREdpsLPh7IyVuwAZpbtxG1Urj1cWwUrH+RgD1f191Fu+Dfr3+i2r9lZL/XnUgIcpJk6q1kOUzCOjAfROOZVePuEu8CSNoSr7s9uq7tny/rgO/ZYAJZZ+qOom6Wsu6hkW21kis3xmlV3HK1Wq7XF+qTCXlYQA9mgVt9Xo/rgKKo1fLDh1LDF+D4JlML9Ydux1TzZ98/rZAvR86QwIEB4yBBbyF6ZyZDP4jmvbycohnovnl0VU4/vaFJ3j+kecd/uP0red+7tWK7eHUEFSHgpWS4k+SVt82/ZoWv9dcjWv0C&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<rect x="160" y="280" width="150" height="30" rx="9.6" ry="9.6" fill="#f5f5f5" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 295px; margin-left: 161px;">
<div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
<span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-weight: normal;">
<font style="font-size: 16px;">
1
</font>
</span>
Base Theme
</div>
</div>
</div>
</foreignObject>
<text x="235" y="300" fill="#333333" font-family="Helvetica" font-size="15px" text-anchor="middle" font-weight="bold">
1 Base Theme
</text>
</switch>
</g>
<rect x="650" y="280" width="200" height="30" rx="9.9" ry="9.9" fill="#f5f5f5" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 198px; height: 1px; padding-top: 295px; margin-left: 651px;">
<div data-drawio-colors="color: #333333; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(51, 51, 51); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
<span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-weight: normal;">
<font style="font-size: 16px;">
2
</font>
</span>
Sidebar-Only Theme
</div>
</div>
</div>
</foreignObject>
<text x="750" y="300" fill="#333333" font-family="Helvetica" font-size="15px" text-anchor="middle" font-weight="bold">
2 Sidebar-Only Theme
</text>
</switch>
</g>
<rect x="510" y="0" width="490" height="260" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<rect x="708.53" y="16.67" width="219.66" height="233.33" fill="rgb(255, 255, 255)" stroke="#e3e3e3" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 133px; margin-left: 710px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Content
</div>
</div>
</div>
</foreignObject>
<text x="818" y="137" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Content
</text>
</switch>
</g>
<rect x="510" y="0" width="126.72" height="260" fill="#f7f7f7" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 125px; height: 1px; padding-top: 130px; margin-left: 511px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Sidebar
<br/>
(Title + Navigation)
</div>
</div>
</div>
</foreignObject>
<text x="573" y="134" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Sidebar...
</text>
</switch>
</g>
<rect x="636.72" y="226.67" width="363.28" height="33.33" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 361px; height: 1px; padding-top: 243px; margin-left: 638px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Footer (Breadcrumps)
</div>
</div>
</div>
</foreignObject>
<text x="818" y="247" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Footer (Breadcrumps)
</text>
</switch>
</g>
<rect x="522.67" y="41.67" width="101.38" height="16.67" rx="2.5" ry="2.5" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 99px; height: 1px; padding-top: 50px; margin-left: 524px;">
<div data-drawio-colors="color: #262626; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(38, 38, 38); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Search
</div>
</div>
</div>
</foreignObject>
<text x="573" y="54" fill="#262626" font-family="Helvetica" font-size="12px" text-anchor="middle">
Search
</text>
</switch>
</g>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 32px; height: 1px; padding-top: 20px; margin-left: 525px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
<div style="display: inline-block; font-size: 20px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
<font color="#262626">
Title
</font>
</div>
</div>
</div>
</foreignObject>
<text x="525" y="26" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="20px">
Tit...
</text>
</switch>
</g>
<rect x="0" y="0" width="490" height="260" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<rect x="198.53" y="44.87" width="219.66" height="185.13" fill="rgb(255, 255, 255)" stroke="#e3e3e3" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 137px; margin-left: 200px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Content
</div>
</div>
</div>
</foreignObject>
<text x="308" y="141" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Content
</text>
</switch>
</g>
<rect x="0" y="0" width="490" height="44.87" fill="#deedff" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 488px; height: 1px; padding-top: 22px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Titlebar (Navigation + Search)
</div>
</div>
</div>
</foreignObject>
<text x="245" y="26" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Titlebar (Navigation + Search)
</text>
</switch>
</g>
<rect x="0" y="44.87" width="126.73" height="185.13" fill="#f7f7f7" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 125px; height: 1px; padding-top: 137px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Sidebar (Navigation)
</div>
</div>
</div>
</foreignObject>
<text x="63" y="141" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Sidebar (Navigation)
</text>
</switch>
</g>
<rect x="0" y="226.67" width="490" height="33.33" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 488px; height: 1px; padding-top: 243px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Footer (Breadcrumps)
</div>
</div>
</div>
</foreignObject>
<text x="245" y="247" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
Footer (Breadcrumps)
</text>
</switch>
</g>
<rect x="371.72" y="14.87" width="101.38" height="16.67" rx="2.5" ry="2.5" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 99px; height: 1px; padding-top: 23px; margin-left: 373px;">
<div data-drawio-colors="color: #262626; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(38, 38, 38); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
Search
</div>
</div>
</div>
</foreignObject>
<text x="422" y="27" fill="#262626" font-family="Helvetica" font-size="12px" text-anchor="middle">
Search
</text>
</switch>
</g>
<g transform="translate(-0.5 -0.5)scale(0.9999999999999999)">
<switch>
<foreignObject pointer-events="none" width="101%" height="101%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 32px; height: 1px; padding-top: 23px; margin-left: 19px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
<div style="display: inline-block; font-size: 20px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
<font color="#262626">
Title
</font>
</div>
</div>
</div>
</foreignObject>
<text x="19" y="29" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="20px">
Tit...
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Text is not SVG - cannot display
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,156 @@
#pragma once
#include <string>
namespace MyLibrary {
enum Color { red, green, blue };
/**
* @brief Example class to demonstrate the features of the custom CSS.
*
* @author jothepro
*
*/
class Example {
public:
/**
* @brief brief summary
*
* doxygen test documentation
*
* @param test this is the only parameter of this test function. It does nothing!
*
* # Supported elements
*
* These elements have been tested with the custom CSS.
*
* ## Tables
*
* The table content is scrollable if the table gets too wide.
*
* | first_column | second_column | third_column | fourth_column | fifth_column | sixth_column | seventh_column | eighth_column | ninth_column |
* |--------------|---------------|--------------|---------------|--------------|--------------|----------------|---------------|--------------|
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
*
* A table can contain images:
*
* | Column 1 | Column 2 |
* |---------------------------|-------------------------------------------------|
* | ![doxygen](testimage.png) | the image should not be inverted in dark-mode |
*
* Complex [Doxygen tables](https://www.doxygen.nl/manual/tables.html) are also supported as seen in @ref multi_row "this example":
*
* <table>
* <caption id="multi_row">Complex table</caption>
* <tr><th>Column 1 <th>Column 2 <th>Column 3
* <tr><td rowspan="2">cell row=1+2,col=1<td>cell row=1,col=2<td>cell row=1,col=3
* <tr><td rowspan="2">cell row=2+3,col=2 <td>cell row=2,col=3
* <tr><td>cell row=3,col=1 <td rowspan="2">cell row=3+4,col=3
* <tr><td colspan="2">cell row=4,col=1+2
* <tr><td>cell row=5,col=1 <td colspan="2">cell row=5,col=2+3
* <tr><td colspan="2" rowspan="2">cell row=6+7,col=1+2 <td>cell row=6,col=3
* <tr> <td>cell row=7,col=3
* <tr><td>cell row=8,col=1 <td>cell row=8,col=2\n
* <table>
* <tr><td>Inner cell row=1,col=1<td>Inner cell row=1,col=2
* <tr><td>Inner cell row=2,col=1<td>Inner cell row=2,col=2
* </table>
* <td>cell row=8,col=3
* <ul>
* <li>Item 1
* <li>Item 2
* </ul>
* </table>
*
* A table can be centered with the `<center>` html tag:
* <center>
* | Foo | Bar | Baz | FooBar |
* |-------------|----------------|---------------------------|-------------|
* | Lorem imsum | dolor sit amet | cenectetur adipisici elit | At vero eos |
* </center>
*
* Embedded Graphviz graphs support dark mode and can be scrolled once they get too wide:
* \dot Graphviz with a caption
* digraph example {
* node [fontsize="12"];
* rankdir="LR"
* a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k;
* }
* \enddot
*
* ## Lists
*
* - element 1
* - element 2
*
* 1. element 1
* ```
* code in lists
* ```
* 2. element 2
*
* ## Quotes
*
* > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
* > ut labore et dolore magna aliqua. Vitae proin sagittis nisl rhoncus mattis rhoncus urna neque viverra.
* > Velit sed ullamcorper morbi tincidunt ornare.
* >
* > Lorem ipsum dolor sit amet consectetur adipiscing elit duis.
* *- jothepro*
*
* ## Code block
*
* ```cpp
* auto x = "code within md fences";
* ```
*
* @code{.cpp}
* // code within @code block
* while(true) {
* auto example = std::make_shared<Example>(5);
* example->test("test");
* }
* @endcode
*
* // code within indented code block
* auto test = std::shared_ptr<Example(5);
*
*
* Inline `code` elements in a text. *Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.* This also works within multiline text and does not break the `layout`.
*
*
* ## Special hints
*
* @warning this is a warning only for demonstration purposes
*
* @note this is a note to show that notes work. They can also include `code`:
* @code{.c}
* void this_looks_awesome();
* @endcode
*
* @bug example bug
*
* @deprecated None of this will be deprecated, because it's beautiful!
*
* @invariant This is an invariant
*
* @pre This is a precondition
*
* @post This is a postcondition
*
* @todo This theme is never finished!
*
* @remark This is awesome!
*
*/
std::string test(const std::string& test);
virtual int virtualfunc() = 0;
static bool staticfunc();
};
}

View File

@ -0,0 +1,46 @@
#pragma once
#include <string>
#include "example.hpp"
#include <iostream>
namespace MyLibrary {
/**
* @brief some subclass
*/
template<typename TemplatedClass>
class SubclassExample : public Example {
public:
/**
* @bug second bug
* @return
*/
int virtualfunc() override;
/**
* @brief Template function function
*/
template <typename T>
std::shared_ptr<std::string> function_template_test(std::shared_ptr<T>& param);
/**
* @brief Extra long function with lots of parameters and many template types.
*
* Also has a long return type.
*
* @param param1 first parameter
* @param param2 second parameter
* @param parameter3 third parameter
*/
template <typename T, typename Foo, typename Bar, typename Alice, typename Bob, typename Charlie, typename Hello, typename World>
std::pair<std::string, std::string> long_function_with_many_parameters(std::shared_ptr<T>& param1, std::shared_ptr<std::string>& param2, bool parameter3, Alice paramater4 Bob parameter 5) {
if(true) {
std::cout << "this even has some code." << std::endl;
}
}
};
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="61px" height="74px" viewBox="-0.5 -0.5 61 74" content="&lt;mxfile host=&quot;drawio-plugin&quot; modified=&quot;2021-03-16T23:58:23.462Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36&quot; version=&quot;13.7.9&quot; etag=&quot;JoeaGLJ54FcERO7YrWLQ&quot; type=&quot;embed&quot;&gt;&lt;diagram id=&quot;JMB9aH8b_oZ7EWDuqJgx&quot; name=&quot;Page-1&quot;&gt;7VdNc5swEP01HDsjkGPDsSVJe+lMZnzoWYENaAwsI8ux6a+vCCtA4KSu62kmSS+M9LT7tB9P0uDxuDx8VaLOv2MKhRew9ODxay8Igigy3xZoCOC8AzIl0w7yB2AtfwKBjNCdTGHrGGrEQsvaBROsKki0gwmlcO+aPWDh7lqLDGbAOhHFHP0hU513aHjFBvwbyCy3O/uMVkphjQnY5iLF/QjiNx6PFaLuRuUhhqKtna1L53f7zGofmIJKn+RAcTyKYkfJUWC6sdlmCnc1mYHScDhWY3Fvzdk8Br/PzCgCsAStGmNCRJy2JDH4pIV8VMG+edS4rCcZcjMDSu+ZVP3fpwpV+rnVh5ndF5hsPP4l16VhvPbN8AErTWI0re7mMRaonpw5Y8tlHBvcsNzKwnpttVDaslZYgcXIhj3NFW56LS1bbrM44l6m4Wq5MLhxzEDfgZKmAKDWtUhklRFNgqVM7LYb0Enu8I9j9dkVC80KtgS6Lb3fGnYVgXSm/1Ez2fFu7oeTYA/CuIUWU1AILR9d/mN9pR3uUJqde7F88leOWhYLl2GLO5UAOY2FP+GxMm3c6CwNlXlKY9oompFZ3Rps59EOkuw8BoH2BTtNs8EfaZbUdYZkXQGuXhDgR9DYRBycXURj00D+UmMT2ktJLnr9B8HG0IzFcPkHYfUe3oPZqfOjMEiDs1+KEw5n9P/+/1f3f/gq1394lt7erqQ+0HVvpsPPRWc+/KHxm18=&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><path d="M 13 57 L 13.01 57.01 L 15.87 50.14 L 18.37 43.14 L 20.91 36.15 L 23.67 29.25 L 26.4 22.33 Q 30 13 33.71 22.28 L 33.55 22.22 L 35.48 26.91 L 37.49 31.64 L 39.48 36.36 L 41.2 40.97 L 43.05 45.63" fill="none" stroke="#010508" stroke-opacity="0.1" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 47.51 56.77 L 47.65 56.93 L 45.43 54.91 L 43.41 53.11 L 41.43 51.35 L 39.63 49.8 L 37.48 47.86 L 37.39 47.64 L 39.79 47.17 L 41.9 45.98 L 44.24 45.37 L 46.48 44.52 L 48.62 43.4 L 48.54 43.39 L 48.58 46.09 L 48.04 48.74 L 48.04 51.43 L 47.8 54.1 L 47.51 56.77 Z Z" fill-opacity="0.1" fill="#010508" stroke="#010508" stroke-opacity="0.1" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="all"/><path d="M 10 43 L 9.94 42.88 L 12.16 41.98 L 14.31 40.96 L 16.51 40.01 L 18.62 38.89 L 20.88 38.1 Q 30 34 40 34 L 40 33.75 L 42 33.83 L 44 33.8 L 46 33.79 L 48 34.05 L 50 34" fill="none" stroke="#010508" stroke-opacity="0.1" stroke-width="7" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 10 54 L 9.97 53.99 L 12.69 47.07 L 15.43 40.16 L 18.07 33.21 L 20.65 26.24 L 23.4 19.33 Q 27 10 30.71 19.28 L 30.66 19.26 L 32.46 23.91 L 34.55 28.66 L 36.26 33.27 L 38.35 38.03 L 40.05 42.63" fill="none" stroke="#1982d2" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 44.51 53.77 L 44.56 53.83 L 42.48 51.97 L 40.5 50.21 L 38.48 48.41 L 36.41 46.56 L 34.48 44.86 L 34.55 45.02 L 36.72 44 L 39 43.24 L 41.21 42.28 L 43.48 41.51 L 45.62 40.4 L 45.78 40.42 L 45.51 43.09 L 45.01 45.74 L 44.87 48.42 L 44.94 51.12 L 44.51 53.77 Z Z" fill="#1982d2" stroke="#1982d2" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="all"/><path d="M 7 40 L 7.02 40.05 L 9.28 39.25 L 11.33 38 L 13.48 36.96 L 15.73 36.14 L 17.88 35.1 Q 27 31 37 31 L 37 30.79 L 39 31.11 L 41 30.85 L 43 30.78 L 45 30.89 L 47 31" fill="none" stroke="#1982d2" stroke-width="8" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,34 @@
{
"name": "@jothepro/doxygen-awesome-css",
"version": "2.2.1",
"description": "Custom CSS theme for doxygen html-documentation with lots of customization parameters.",
"main": "",
"scripts": {
"npm-pack": "npm pack",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/jothepro/doxygen-awesome-css.git"
},
"homepage": "https://jothepro.github.io/doxygen-awesome-css/",
"bugs": {
"url": "https://github.com/jothepro/doxygen-awesome-css/issues"
},
"keywords": [
"doxygen",
"css",
"theme",
"awesome"
],
"author": {
"name": "jothepro",
"url": "https://github.com/jothepro",
"git": "https://github.com/jothepro/doxygen-awesome-css"
},
"license": "MIT",
"config": {},
"dependencies": {},
"devDependencies": {},
"xpack": {}
}

View File

@ -18,19 +18,20 @@
#include <armadillo> #include <armadillo>
#include <cstdint> #include <cstdint>
/** @brief Simulate the evolution of a wave packet in 2 + 1 domensions.*/
class WaveSimulation { class WaveSimulation {
protected: private:
uint32_t M; int32_t M; ///< The size
int32_t N; int32_t N; ///< The size of the inner part
arma::cx_mat V; arma::cx_mat V; ///< The potential matrix
arma::cx_mat U; arma::cx_mat U; ///< The particle wave matrix
arma::sp_cx_mat B; arma::sp_cx_mat B; ///< The B matrix
arma::sp_cx_mat A; arma::sp_cx_mat A; ///< The A matrix
double h; double h; ///< The step size in both x and y direction
double dt; double dt; ///< The step size int the time direction
double T; double T; ///< The end time
/* @brief Initialize the U matrix using an unormalized Gaussian wave /** @brief Initialize the U matrix using an unormalized Gaussian wave
* packet. * packet.
* *
* @param x_c The center of the packet in the x direction. * @param x_c The center of the packet in the x direction.
@ -39,36 +40,41 @@ protected:
* @param sigma_y The The initial width in the y direction. * @param sigma_y The The initial width in the y direction.
* @param p_x The wave packet momentum in the x direction. * @param p_x The wave packet momentum in the x direction.
* @param p_y The wave packet momentum in the y direction. * @param p_y The wave packet momentum in the y direction.
* **/ * */
void initialize_U(double x_c, double y_c, double sigma_x, double sigma_y, void initialize_U(double x_c, double y_c, double sigma_x, double sigma_y,
double p_x, double p_y); double p_x, double p_y);
/* @brief Initialize the V matrix. /** @brief Initialize the V matrix.
* *
* @param thickness The thickness of the wall in the x direction. * @param thickness The thickness of the wall in the x direction.
* @param pos_x The center of the wall in the x direction. * @param pos_x The center of the wall in the x direction.
* @param ap_sep The separation between each aperture. * @param ap_sep The separation between each aperture.
* @param ap The aperture width. * @param ap The aperture width.
* @param slits The number of slits. * @param slits The number of slits.
* **/ * */
void initialize_V(double thickness, double pos_x, void initialize_V(double thickness, double pos_x,
double aperture_separation, double aperture, double aperture_separation, double aperture,
uint32_t slits); uint32_t slits);
/* @brief Initialize the V matrix with no wall. /** @brief Initialize the V matrix with no wall.
* **/ * */
void initialize_V(); void initialize_V();
/* @brief Initialize the A matrix according to the Crank-Nicolson method /** @brief Initialize the A matrix according to the Crank-Nicolson method
* **/ * */
void initialize_A(); void initialize_A();
/* @brief Initialize the B matrix according to the Crank-Nicolson method /** @brief Initialize the B matrix according to the Crank-Nicolson method
* **/ * */
void initialize_B(); void initialize_B();
/** @brief Write the U matrix in a single line to the file buffer given
*
* @param ofile The file buffer to write to
* */
void write_U(std::ofstream &ofile);
public: public:
/* @brief Constructor for the WaveSimulation class. /** @brief Constructor for the WaveSimulation class.
* *
* @param h The step size in the x and y direction. * @param h The step size in the x and y direction.
* @param dt The step size in the temporal dimension. * @param dt The step size in the temporal dimension.
@ -84,13 +90,13 @@ public:
* @param ap_sep The separation between each aperture. * @param ap_sep The separation between each aperture.
* @param ap The aperture width. * @param ap The aperture width.
* @param slits The number of slits. * @param slits The number of slits.
* **/ * */
WaveSimulation(double h, double dt, double T, double x_c, double y_c, WaveSimulation(double h, double dt, double T, double x_c, double y_c,
double sigma_x, double sigma_y, double p_x, double p_y, double sigma_x, double sigma_y, double p_x, double p_y,
double thickness, double pos_x, double ap_sep, double ap, double thickness, double pos_x, double ap_sep, double ap,
uint32_t slits); uint32_t slits);
/* @brief Constructor for the WaveSimulation class with no wall. /** @brief Constructor for the WaveSimulation class with no wall.
* *
* @param h The step size in the x and y direction. * @param h The step size in the x and y direction.
* @param dt The step size in the temporal dimension. * @param dt The step size in the temporal dimension.
@ -101,16 +107,37 @@ public:
* @param sigma_y The The initial width in the y direction. * @param sigma_y The The initial width in the y direction.
* @param p_x The wave packet momentum in the x direction. * @param p_x The wave packet momentum in the x direction.
* @param p_y The wave packet momentum in the y direction. * @param p_y The wave packet momentum in the y direction.
* **/ * */
WaveSimulation(double h, double dt, double T, double x_c, double y_c, WaveSimulation(double h, double dt, double T, double x_c, double y_c,
double sigma_x, double sigma_y, double p_x, double p_y); double sigma_x, double sigma_y, double p_x, double p_y);
/** @brief Evolve a step forward in time
* */
void step(); void step();
void solve(std::string outfile, bool write_each_step = false);
void solve(std::string outfile, std::vector<double> &steps); /** @brief Evolve the wave packet until the time T has been reached and
* write U to file.
*
* @param outfile The name of the file to write to
* @param write_each_step Boolean for deciding to write each step to file
* or just the last step
* */
void simulate(std::string outfile, bool write_each_step = false);
/** @brief Evolve the wave packet and write U to fileto file at each time step in
* the vector given.
*
* @param outfile The name of the file to write to
* @param steps What time steps to write U to file.
* */
void simulate(std::string outfile, std::vector<double> &steps);
/** @brief Write the deviation of the sum of the probability of U from 1
*
* @param outfile The name of the file to write to
* to file*/
void probability_deviation(std::string outfile, void probability_deviation(std::string outfile,
bool write_each_step = false); bool write_each_step = false);
void write_U(std::ofstream &ofile);
}; };
#endif #endif

View File

@ -131,6 +131,26 @@ std::string concatpath(const std::string &left, const std::string &right);
// A function that prints the structure of a sparse matrix to screen. // A function that prints the structure of a sparse matrix to screen.
void print_sp_matrix_structure(const arma::sp_cx_mat &A); void print_sp_matrix_structure(const arma::sp_cx_mat &A);
// A function that splits a string using a delimiter
std::vector<std::string> split(const std::string &s, char delim);
// trim from left
std::string &ltrim(std::string &s, const char *t = " \t\n\r\f\v");
// trim from right
std::string &rtrim(std::string &s, const char *t = " \t\n\r\f\v");
// trim from left & right
std::string &trim(std::string &s, const char *t = " \t\n\r\f\v");
// copying versions
std::string ltrim_copy(std::string s, const char *t = " \t\n\r\f\v");
std::string rtrim_copy(std::string s, const char *t = " \t\n\r\f\v");
std::string trim_copy(std::string s, const char *t = " \t\n\r\f\v");
} // namespace utils } // namespace utils
#endif #endif

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -27,10 +27,10 @@ void WaveSimulation::initialize_U(double x_c, double y_c, double sigma_x,
double x, y, diff_x, diff_y; double x, y, diff_x, diff_y;
std::complex<double> sum = 0.; std::complex<double> sum = 0.;
for (size_t j = 0; j < this->U.n_cols; j++) { for (size_t j = 0; j < this->U.n_cols; j++) {
x = j * h; x = (j+1) * h;
diff_x = x - x_c; diff_x = x - x_c;
for (size_t i = 0; i < this->U.n_rows; i++) { for (size_t i = 0; i < this->U.n_rows; i++) {
y = i * h; y = (i+1) * h;
diff_y = y - y_c; diff_y = y - y_c;
this->U(i, j) = this->U(i, j) =
std::exp(-(diff_x * diff_x) / (2. * sigma_x * sigma_x) std::exp(-(diff_x * diff_x) / (2. * sigma_x * sigma_x)
@ -117,7 +117,8 @@ void WaveSimulation::initialize_V(double thickness, double pos_x, double ap_sep,
res = arma::join_cols(res, arma::cx_vec(fill + ((this->N - res.size()) % 2), res = arma::join_cols(res, arma::cx_vec(fill + ((this->N - res.size()) % 2),
arma::fill::value(1e10))); arma::fill::value(1e10)));
uint32_t start = pos_x / this->h - thickness / this->h / 2; // Subtract one to compensate for the border being gone
uint32_t start = (pos_x / this->h - 1) - thickness / this->h / 2;
for (size_t i = 0; i < thickness / this->h; i++) { for (size_t i = 0; i < thickness / this->h; i++) {
this->V.col(start + i) = res; this->V.col(start + i) = res;
} }
@ -125,32 +126,40 @@ void WaveSimulation::initialize_V(double thickness, double pos_x, double ap_sep,
void WaveSimulation::initialize_A() void WaveSimulation::initialize_A()
{ {
DEBUG("Inside initialize_A");
// Create the diagonal // Create the diagonal
arma::cx_vec diagonal(this->N * this->N); arma::cx_vec diagonal(this->N * this->N);
DEBUG("Before setting diagonal values");
// Set diagonal values // Set diagonal values
std::complex<double> r = (1._i * this->dt) / (2 * h * h); std::complex<double> r = (1._i * this->dt) / (2 * h * h);
for (size_t i = 0; i < diagonal.size(); i++) { for (size_t i = 0; i < diagonal.size(); i++) {
diagonal(i) = 1. + 4. * r + (1._i * this->dt / 2.) * this->V(i); diagonal(i) = 1. + 4. * r + (1._i * this->dt / 2.) * this->V(i);
} }
DEBUG("Create submatrix");
// Create the submatrix // Create the submatrix
arma::cx_mat sub_matrix(this->N, this->N, arma::fill::zeros); arma::cx_mat sub_matrix(this->N, this->N, arma::fill::zeros);
sub_matrix.diag(-1).fill(-r); sub_matrix.diag(-1).fill(-r);
sub_matrix.diag(1).fill(-r); sub_matrix.diag(1).fill(-r);
DEBUG("Set the size of A");
// Set the size of A // Set the size of A
this->A.set_size(this->N * this->N, this->N * this->N); this->A.set_size(this->N * this->N, this->N * this->N);
DEBUG("Fill in values");
// Fill in the values in the submatrix diagonal // Fill in the values in the submatrix diagonal
for (size_t i = 0; i < this->A.n_cols; i += this->N) { for (size_t i = 0; i < this->A.n_cols; i += this->N) {
this->A.submat(i, i, i + this->N - 1, i + this->N - 1) = sub_matrix; this->A.submat(i, i, i + this->N - 1, i + this->N - 1) = sub_matrix;
} }
DEBUG("Fill in diagonals");
// Fill the last sub/sup-diagonals // Fill the last sub/sup-diagonals
this->A.diag() = diagonal; this->A.diag() = diagonal;
this->A.diag(-this->N).fill(-r); this->A.diag(-this->N).fill(-r);
DEBUG("After diagonal");
this->A.diag(this->N).fill(-r); this->A.diag(this->N).fill(-r);
DEBUG("After");
} }
void WaveSimulation::initialize_B() void WaveSimulation::initialize_B()
@ -205,15 +214,21 @@ WaveSimulation::WaveSimulation(double h, double dt, double T, double x_c,
double y_c, double sigma_x, double sigma_y, double y_c, double sigma_x, double sigma_y,
double p_x, double p_y) double p_x, double p_y)
{ {
DEBUG("Inside constructor");
this->dt = dt; this->dt = dt;
this->h = h; this->h = h;
this->T = T; this->T = T;
this->M = 1. / h; this->M = 1. / h;
this->N = M - 2; this->N = M - 2;
DEBUG("Before V");
this->initialize_V(); this->initialize_V();
DEBUG("Before U");
this->initialize_U(x_c, y_c, sigma_x, sigma_y, p_x, p_y); this->initialize_U(x_c, y_c, sigma_x, sigma_y, p_x, p_y);
DEBUG("Before A");
this->initialize_A(); this->initialize_A();
DEBUG("Before B");
this->initialize_B(); this->initialize_B();
DEBUG("After B");
} }
// Public methods // Public methods
@ -226,7 +241,7 @@ void WaveSimulation::step()
arma::spsolve(this->U, this->A, tmp); arma::spsolve(this->U, this->A, tmp);
} }
void WaveSimulation::solve(std::string outfile, bool write_each_step) void WaveSimulation::simulate(std::string outfile, bool write_each_step)
{ {
// Create path and proceed if successful. // Create path and proceed if successful.
if (!utils::mkpath(utils::dirname(outfile))) { if (!utils::mkpath(utils::dirname(outfile))) {
@ -256,7 +271,7 @@ void WaveSimulation::solve(std::string outfile, bool write_each_step)
this->write_U(ofile); this->write_U(ofile);
ofile.close(); ofile.close();
} }
void WaveSimulation::solve(std::string outfile, std::vector<double> &steps) void WaveSimulation::simulate(std::string outfile, std::vector<double> &steps)
{ {
// Create path and proceed if successful. // Create path and proceed if successful.
if (!utils::mkpath(utils::dirname(outfile))) { if (!utils::mkpath(utils::dirname(outfile))) {

View File

@ -113,4 +113,47 @@ void print_sp_matrix_structure(const arma::sp_cx_mat &A)
cout << endl; cout << endl;
} }
std::vector<std::string> split(const std::string &s, char delim) {
std::vector<std::string> result;
std::stringstream ss(s);
std::string item;
while (getline(ss, item, delim)) {
result.push_back(trim(item));
}
return result;
}
inline std::string& ltrim(std::string& s, const char* t)
{
s.erase(0, s.find_first_not_of(t));
return s;
}
inline std::string& rtrim(std::string& s, const char* t)
{
s.erase(s.find_last_not_of(t) + 1);
return s;
}
inline std::string& trim(std::string& s, const char* t)
{
return ltrim(rtrim(s, t), t);
}
inline std::string ltrim_copy(std::string s, const char* t)
{
return ltrim(s, t);
}
inline std::string rtrim_copy(std::string s, const char* t)
{
return rtrim(s, t);
}
inline std::string trim_copy(std::string s, const char* t)
{
return trim(s, t);
}
} // namespace utils } // namespace utils

View File

@ -5,7 +5,7 @@
* *
* @version 1.0 * @version 1.0
* *
* @brief Implementation of the testing library * @brief The main program
* *
* @bug No known bugs * @bug No known bugs
* */ * */
@ -16,14 +16,18 @@
void probability_deviation() void probability_deviation()
{ {
DEBUG("Sim no slits");
WaveSimulation sim_no_slits(.005, 2.5e-5, .008, .25, .5, .05, .05, 200., WaveSimulation sim_no_slits(.005, 2.5e-5, .008, .25, .5, .05, .05, 200.,
0.); 0.);
DEBUG("Sim with slits");
WaveSimulation sim_slits(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0., WaveSimulation sim_slits(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0.,
0.02, .5, .05, .05, 2); 0.02, .5, .05, .05, 2);
DEBUG("Probability deviation");
sim_no_slits.probability_deviation( sim_no_slits.probability_deviation(
"data/probability_deviation_no_slits.txt", true); "data/probability_deviation_no_slits.txt", true);
DEBUG("Probability deviation with slits");
sim_slits.probability_deviation("data/probability_deviation_slits.txt", true); sim_slits.probability_deviation("data/probability_deviation_slits.txt", true);
} }
@ -33,7 +37,7 @@ void color_map()
.5, .05, .05, 2); .5, .05, .05, 2);
std::vector<double> times{0., .001, .002}; std::vector<double> times{0., .001, .002};
sim.solve("data/color_map.txt", times); sim.simulate("data/color_map.txt", times);
} }
void detector_screen() void detector_screen()
@ -41,19 +45,19 @@ void detector_screen()
WaveSimulation *sim = new WaveSimulation( WaveSimulation *sim = new WaveSimulation(
.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., 0.02, .5, .05, .05, 1); .005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., 0.02, .5, .05, .05, 1);
sim->solve("data/screen/single_slit.txt"); sim->simulate("data/screen/single_slit.txt");
delete sim; delete sim;
sim = new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., sim = new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0.,
0.02, .5, .05, .05, 2); 0.02, .5, .05, .05, 2);
sim->solve("data/screen/double_slit.txt"); sim->simulate("data/screen/double_slit.txt");
delete sim; delete sim;
sim = new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0., sim = new WaveSimulation(.005, 2.5e-5, .002, .25, .5, .05, .20, 200., 0.,
0.02, .5, .05, .05, 3); 0.02, .5, .05, .05, 3);
sim->solve("data/screen/triple_slit.txt"); sim->simulate("data/screen/triple_slit.txt");
} }
int main() int main()
@ -69,7 +73,7 @@ int main()
// ofile.open("test.txt"); // ofile.open("test.txt");
// WaveSimulation sim(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0., // WaveSimulation sim(.005, 2.5e-5, .008, .25, .5, .05, .10, 200., 0.,
// 0.02, .5, .05, .05, 2); // 0.02, .5, .05, .05, 2);
// sim.solve(ofile); // sim.simulate(ofile);
return 0; return 0;
} }

88
src/wave_simulation.cpp Normal file
View File

@ -0,0 +1,88 @@
#include "WaveSimulation.hpp"
#include "utils.hpp"
#include <fstream>
#include <string>
void execute_simulation(std::vector<std::string> &args)
{
DEBUG("Inside execute sim");
if (args.size() < 11) {
return;
}
DEBUG("Declare sim");
WaveSimulation *sim;
if (args.size() >= 11 && args.size() < 16) {
sim = new WaveSimulation(
std::stod(args[2]), std::stod(args[3]), std::stod(args[4]),
std::stod(args[5]), std::stod(args[6]), std::stod(args[7]),
std::stod(args[8]), std::stod(args[9]), std::stod(args[10]));
}
else if (args.size() >= 16) {
sim = new WaveSimulation(
std::stod(args[2]), std::stod(args[3]), std::stod(args[4]),
std::stod(args[5]), std::stod(args[6]), std::stod(args[7]),
std::stod(args[8]), std::stod(args[9]), std::stod(args[10]),
std::stod(args[11]), std::stod(args[12]), std::stod(args[13]),
std::stod(args[14]), std::stoi(args[15]));
}
DEBUG("After instantiating sim");
if (args[0].compare("deviation") == 0) {
DEBUG("Deviation");
if (args.size() == 17) {
sim->probability_deviation(args[1], args[16].compare("false"));
}
else if (args.size() == 12) {
sim->probability_deviation(args[1], args[11].compare("false"));
}
else {
sim->probability_deviation(args[1]);
}
}
else if (args[0].compare("simulate") == 0) {
DEBUG("Simulate");
if (args.size() == 17) {
sim->simulate(args[1], args[16].compare("false"));
}
else if (args.size() == 12) {
sim->simulate(args[1], args[11].compare("false"));
}
else if (args.size() > 17) {
std::vector<double> arr;
for (size_t i = 16; i < args.size(); i++) {
arr.push_back(std::stod(args[i]));
}
sim->simulate(args[1], arr);
}
else {
sim->simulate(args[1]);
}
}
delete sim;
}
int main(int argc, char **argv)
{
DEBUG("Start of main");
if (argc < 2) {
abort();
}
DEBUG("After arg check");
std::string filename = argv[1];
DEBUG("Open file");
std::ifstream infile;
infile.open(filename);
DEBUG("For line in lines");
for (std::string line; std::getline(infile, line);) {
std::vector<std::string> arr = utils::split(line, ';');
execute_simulation(arr);
}
DEBUG("Close file");
infile.close();
}