├── .gitignore ├── img ├── SAFD.gif └── logo.svg ├── .valgrindrc ├── CITATION.cff ├── scripts ├── install_dependencies.sh ├── update.sh └── debug.sh ├── LICENSE ├── doc ├── Extra-scripts.md ├── Contributing.md └── Algorithm-explanation.md ├── .github └── workflows │ ├── DocGenerator.yml │ └── codeql-analysis.yml ├── .all-contributorsrc ├── include ├── utils.hpp └── functions.hpp ├── Makefile ├── .clang-format ├── src ├── main.cpp ├── utils.cpp └── functions.cpp ├── test ├── test_utils.cpp └── test_functions.cpp ├── README.md └── Doxyfile /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | bin 3 | obj 4 | pdf 5 | *out* -------------------------------------------------------------------------------- /img/SAFD.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JustWhit3/SAFD-algorithm/HEAD/img/SAFD.gif -------------------------------------------------------------------------------- /.valgrindrc: -------------------------------------------------------------------------------- 1 | --memcheck:leak-check=full 2 | --memcheck:show-leak-kinds=all 3 | --memcheck:gen-suppressions=yes 4 | --memcheck:track-origins=yes 5 | --memcheck:gen-suppressions=all 6 | --memcheck:error-limit=no 7 | --memcheck:log-file=valgrind.log 8 | --callgrind:show-perc=yes -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | message: "If you use this software, please cite it as below." 3 | authors: 4 | - family-names: "Gianluca" 5 | given-names: "Bianco" 6 | title: "SAFD-algorithm" 7 | version: 1.1.2 8 | doi: https://zenodo.org/badge/latestdoi/445794125 9 | date-released: 2022-01-17 10 | url: "https://github.com/JustWhit3/SAFD-algorithm" 11 | -------------------------------------------------------------------------------- /scripts/install_dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Installing dependencies..." 4 | sudo apt install build-essential g++ wget unzip 5 | echo "" 6 | echo "Installing arsenalgear and osmanip library..." 7 | wget https://github.com/JustWhit3/osmanip/archive/main.zip 8 | mv main.zip osmanip-main.zip 9 | unzip osmanip-main.zip 10 | cd osmanip-main || exit 11 | ./scripts/install.sh 12 | cd .. 13 | rm -rf osmanip-* 14 | -------------------------------------------------------------------------------- /scripts/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #==================================================== 4 | # UPDATING THE REPOSITORY 5 | #==================================================== 6 | echo "" 7 | echo "Updating the repository..." 8 | echo "" 9 | 10 | #Deleting old files and downloading the new repo: 11 | cd .. 12 | rm -rf SAFD-algorithm* 13 | 14 | #Downloading new ones: 15 | wget https://github.com/JustWhit3/SAFD-algorithm/archive/main.zip 16 | mv main.zip SAFD-algorithm-main.zip 17 | unzip SAFD-algorithm-main.zip 18 | rm SAFD-algorithm-main.zip 19 | mv SAFD-algorithm-main SAFD-algorithm 20 | echo "" 21 | echo "Repository is up-to-date!" 22 | echo "" 23 | echo "Enter the following commands:" 24 | echo "1. cd .." 25 | echo "2. cd SAFD-algorithm" 26 | echo "" -------------------------------------------------------------------------------- /scripts/debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #==================================================== 4 | # TOOL FUNCTION 5 | #==================================================== 6 | tool() { 7 | if [ "$1" == "cppcheck" ] ; then 8 | cppcheck $2 9 | else 10 | valgrind --tool=$1 -s --log-fd=9 $2 9>&1 1>/dev/null 2>/dev/null 11 | fi 12 | } 13 | 14 | #==================================================== 15 | # VALGRIND EXECUTION COMMAND 16 | #==================================================== 17 | if [ "$2" == "all" ] ; then 18 | for exec in bin/* 19 | do 20 | echo "" 21 | echo "Running $1 tool on $exec..." 22 | echo "" 23 | tool $1 $exec 24 | done 25 | else 26 | echo "" 27 | echo "Running $1 tool on $2..." 28 | echo "" 29 | tool $1 $2 30 | fi -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Gianluca Bianco 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /doc/Extra-scripts.md: -------------------------------------------------------------------------------- 1 | # Extra scripts 2 | 3 | ## Table of contents 4 | 5 | - [debug.sh](#debugsh) 6 | - [update.sh](#updatesh) 7 | 8 | ## debug.sh 9 | 10 | This script is used to run [Valgrind](https://valgrind.org/) and [Cppcheck](https://github.com/danmar/cppcheck) debugging tools on the whole code. 11 | 12 | You can run Valgrind debugging tools with a specific executable: 13 | ```shell 14 | ./scripts/debug.sh [valgrind-tool-name] [executable-name] 15 | ``` 16 | > **NOTE**: where `[tool-name]` is the Valgrind tool name and `[executable-name]` is the executable name (you have to indicate also the path to it). 17 | 18 | Or you can run them for all the executables of the repository: 19 | ```shell 20 | ./scripts/debug.sh [valgrind-tool-name] all 21 | ``` 22 | You can also run Cppcheck tool for a specific source code directory: 23 | ```shell 24 | ./scripts/debug.sh cppcheck [source-code-dir] 25 | ``` 26 | Or for a .cpp file only: 27 | ```shell 28 | ./scripts/debug.sh cppcheck [file.cpp] 29 | ``` 30 | 31 | > **NOTE**: pay attention when running this script with `memcheck` tool, since it may produce fake errors related to the included libraries. In this case you should prepare a suppression file before running it. 32 | 33 | ## update.sh 34 | 35 | In case you want to update the source code from the latest improvements of the repository, you can use the updater script, called [update.sh](https://github.com/JustWhit3/SAFD-algorithm/blob/main/scripts/update.sh). 36 | 37 | From the repository folder type this command on the shell: 38 | ```shell 39 | ./scripts/update.sh 40 | ``` -------------------------------------------------------------------------------- /.github/workflows/DocGenerator.yml: -------------------------------------------------------------------------------- 1 | # Automatic generation of doxygen and javadoc files for C, C++, and Java code 2 | # in myBranch which will be copied and checked into the gh-pages branch. 3 | name: Documentation generation CI 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | # checkout myBranch 16 | - uses: actions/checkout@v2 17 | 18 | # generate the C++ doxygen files 19 | - name: Doxygen Action C++ 20 | uses: mattnotmitt/doxygen-action@v1.3.1 21 | with: 22 | working-directory: '.' 23 | doxyfile-path: 'Doxyfile' 24 | 25 | # store the doc files 26 | - name: Upload Output Directory 27 | uses: actions/upload-artifact@v2 28 | with: 29 | name: doc-files 30 | path: docs 31 | retention-days: 1 32 | 33 | copy: 34 | 35 | runs-on: ubuntu-latest 36 | needs: build 37 | 38 | steps: 39 | 40 | # checkout the gh-pages branch 41 | - uses: actions/checkout@v2 42 | with: 43 | ref: gh-pages 44 | 45 | # download the doc files, most of which are generated above 46 | - name: Download Output Directory 47 | uses: actions/download-artifact@v2 48 | with: 49 | name: doc-files 50 | path: docs 51 | 52 | # add, commit and push to gh-pages 53 | - name: Commit changes 54 | uses: EndBug/add-and-commit@v7 55 | with: 56 | author_name: Carl Timmer 57 | author_email: timmer@jlab.org 58 | message: 'Update docs' 59 | branch: gh-pages 60 | add: '["docs/*"]' -------------------------------------------------------------------------------- /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "contributorsPerLine": 7, 7 | "contributorsSortAlphabetically": false, 8 | "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)", 9 | "contributorTemplate": "\">\" width=\"<%= options.imageSize %>px;\" alt=\"\"/>
<%= contributor.name %>
", 10 | "types": { 11 | "custom": { 12 | "symbol": "🔭", 13 | "description": "A custom contribution type.", 14 | "link": "[<%= symbol %>](<%= url %> \"<%= description %>\")," 15 | } 16 | }, 17 | "skipCi": true, 18 | "contributors": [ 19 | { 20 | "login": "AdamTas", 21 | "name": "Adam_T", 22 | "avatar_url": "https://avatars.githubusercontent.com/u/17808974?v=4", 23 | "profile": "https://github.com/AdamTas", 24 | "contributions": [ 25 | "doc", 26 | "review" 27 | ] 28 | }, 29 | { 30 | "login": "patlefort", 31 | "name": "patlefort", 32 | "avatar_url": "https://avatars.githubusercontent.com/u/3423714?v=4", 33 | "profile": "https://github.com/patlefort", 34 | "contributions": [ 35 | "code", 36 | "ideas" 37 | ] 38 | }, 39 | { 40 | "login": "myermo", 41 | "name": "myermo", 42 | "avatar_url": "https://avatars.githubusercontent.com/u/93035284?v=4", 43 | "profile": "https://github.com/myermo", 44 | "contributions": [ 45 | "bug" 46 | ] 47 | } 48 | ], 49 | "projectName": "SAFD-algorithm", 50 | "projectOwner": "JustWhit3", 51 | "repoType": "github", 52 | "repoHost": "https://github.com" 53 | } 54 | -------------------------------------------------------------------------------- /include/utils.hpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Preprocessor directives 3 | //============================================ 4 | #ifndef UTILS_HPP 5 | #define UTILS_HPP 6 | 7 | //============================================ 8 | // Headers 9 | //============================================ 10 | 11 | //STD headers 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | namespace safd 18 | { 19 | //============================================ 20 | // Type aliases definition 21 | //============================================ 22 | using two_param_func = std::function; 23 | using four_param_func = std::function; 24 | 25 | //============================================ 26 | // Global variables declaration 27 | //============================================ 28 | 29 | //Constants: 30 | inline const double STEP_SIZE = 2 * cbrt( __DBL_EPSILON__ ); 31 | inline constexpr double x_in = 0; 32 | inline constexpr double x_fin = M_PI; 33 | inline constexpr double h_x = 0.07; 34 | inline constexpr double y_in = 0; 35 | inline constexpr double y_fin = M_PI*2; 36 | inline constexpr double h_y = 0.15; 37 | 38 | //============================================ 39 | // Functions declaration 40 | //============================================ 41 | 42 | //N-th derivative function: 43 | extern double n_derivative( const two_param_func& f, const double& x_0, const int& a, const int& n ); 44 | 45 | //Step-size function: 46 | extern double h( const int& n, const double& x_0 ); 47 | 48 | //Function to calculate the 2-dim integral: 49 | extern double integral( const four_param_func& f, const std::string& expr, const int& m, const int& l ); 50 | 51 | //Function used to initialize values of main program input: 52 | extern void initializer( std::string& equation, int& m, int& l); 53 | 54 | //Function to modify an input and return it: 55 | extern char abort_this( char letter ); 56 | } 57 | 58 | #endif -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #==================================================== 2 | # Variables 3 | #==================================================== 4 | TARGET_EXEC := main 5 | TEST_EXEC := tests 6 | CC := g++ 7 | BUILD_DIR := bin 8 | SRC_DIR := src 9 | TEST_DIR := test 10 | OBJ_DIR := obj 11 | 12 | #==================================================== 13 | # Source files 14 | #==================================================== 15 | SRC := $(shell find $(SRC_DIR) -name '*.cpp') 16 | TEST := $(shell find $(SRC_DIR) -type f | grep -v 'main.cpp') $(shell find $(TEST_DIR) -name '*.cpp') 17 | OBJ := $(SRC:%=$(OBJ_DIR)/%.o) 18 | TEST_OBJ := $(TEST:%=$(OBJ_DIR)/%.o) 19 | 20 | #==================================================== 21 | # Dependencies and flags 22 | #==================================================== 23 | DEPS := $(OBJ:.o=.d) 24 | INC_DIR := $(shell find $(SRC_DIR) -type d) 25 | INC_FLAGS := $(addprefix -I,$(INC_DIR)) 26 | WFLAGS := -Wall -Wextra -Wno-unused 27 | CPPFLAGS := -std=c++17 -g $(LDFLAGS) $(INC_FLAGS) -MMD -MP $(WFLAGS) 28 | LDFLAGS := -losmanip -larsenalgear 29 | 30 | #==================================================== 31 | # Aliases 32 | #==================================================== 33 | .PHONY: clean all 34 | 35 | #==================================================== 36 | # Building 37 | #==================================================== 38 | 39 | #Building all: 40 | all: $(BUILD_DIR)/$(TARGET_EXEC) $(BUILD_DIR)/$(TEST_EXEC) 41 | main: $(BUILD_DIR)/$(TARGET_EXEC) 42 | tests: $(BUILD_DIR)/$(TEST_EXEC) 43 | 44 | #Building main executable: 45 | $(BUILD_DIR)/$(TARGET_EXEC): $(OBJ) 46 | @ mkdir -p $(dir $@) 47 | $(CC) $(OBJ) -o $@ $(LDFLAGS) 48 | 49 | #Building test executable: 50 | $(BUILD_DIR)/$(TEST_EXEC): $(TEST_OBJ) 51 | @ mkdir -p $(dir $@) 52 | $(CC) $(TEST_OBJ) -o $@ $(LDFLAGS) 53 | 54 | #Put object files into the object dir: 55 | $(OBJ_DIR)/%.cpp.o: %.cpp 56 | @ mkdir -p $(dir $@) 57 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ 58 | 59 | #==================================================== 60 | # Clean 61 | #==================================================== 62 | clean: 63 | rm -r $(OBJ_DIR) $(BUILD_DIR) 64 | 65 | #==================================================== 66 | # Include 67 | #==================================================== 68 | -include $(DEPS) -------------------------------------------------------------------------------- /img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /include/functions.hpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Preprocessor directives 3 | //============================================ 4 | #ifndef FUNCTIONS_HPP 5 | #define FUNCTIONS_HPP 6 | 7 | //============================================ 8 | // Headers 9 | //============================================ 10 | 11 | //STD headers 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | namespace safd 18 | { 19 | //============================================ 20 | // Type aliases definition 21 | //============================================ 22 | using two_param_func = std::function; 23 | using four_param_func = std::function; 24 | 25 | //============================================ 26 | // Global variables declaration 27 | //============================================ 28 | inline const double reciprocalPi = sqrt(1 / ( M_PI*4 ) ); 29 | 30 | //============================================ 31 | // Functions declaration 32 | //============================================ 33 | 34 | //Legendre polynomials function: 35 | extern double Leg_pol( const int& a, const double& x ); 36 | 37 | //Legendre associated function function: 38 | extern double Leg_func( const int& b, const int& a, const double& x ); 39 | 40 | //Spherical harmonics function: 41 | extern std::complex sph_arm( const int& m, const int& l, const double& theta, const double& phi ); 42 | 43 | //Parsed function: 44 | extern double parsed_f( const std::string& expr, double theta, double phi ); 45 | 46 | //f(theta,phi) final function (which will be integrated), real part: 47 | extern double f_theta_phi_real( const std::string& expr, const int& m, const int& l, const double& theta, const double& phi ); 48 | 49 | //f(theta,phi) final function (which will be integrated), imaginary part: 50 | extern double f_theta_phi_imag( const std::string& expr, const int& m, const int& l, const double& theta, const double& phi ); 51 | 52 | //f_m_l coefficients representation: 53 | extern std::complex f_m_l( const std::string& expr, const int& m, const int& l ); 54 | 55 | //Function used to display the final result of the main program: 56 | extern void displayer( const std::string& equation, const int& m, const int& l ); 57 | 58 | // Function used to plot the user-inserted function is input: 59 | extern void plotter( const std::string& func ); 60 | } 61 | 62 | #endif -------------------------------------------------------------------------------- /doc/Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Table of contents 4 | 5 | - [Introduction](#introduction) 6 | - [How to contribute](#how-to-contribute) 7 | - [How to raise an issue](#how-to-raise-an-issue) 8 | 9 | ## Introduction 10 | 11 | Thank you very much for being here! First of all, I want to let you know that contributions are more than welcome and really appreciated. 12 | 13 | In case you want to contribute, even with a small bug fix, you will be featured into the [credits](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc/CREDITS.md) file. 14 | 15 | ## How to contribute 16 | 17 | To add your contribution, please follow these guidelines: 18 | 19 | 1) Fork your own copy of the repository. 20 | 2) Work on your changes / improvements in the forked repo. 21 | 3) **Test** if your changes / improvements are correctly implemented and all the other features are not compromised. For this latter requirement, please run the main and tests executables and check if you find something different from before. 22 | 4) Before submitting the code, reformat it using the [`.clang-format`](https://github.com/JustWhit3/arsenalgear/blob/main/cpp/.clang-format.md) file. Simply do: 23 | 24 | ```bash 25 | .clang-format -i /path/to/file 26 | ``` 27 | 5) Optional, but really appreciated: update the [documentation](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc) or the main [README](https://github.com/JustWhit3/SAFD-algorithm/blob/main/README.md) with the new features you added. 28 | 6) Finally, make the pull request. 29 | 30 | Once your pull request will be submitted, I will carefully review it and, if it will be considered as an improvement, I will confirm it. 31 | 32 | ## How to raise an issue 33 | 34 | If you find any bug or something you think doesn't work correctly in the code, you are free to open an issue, but before carefully read this passages: 35 | 36 | 1) If this issue is due to download, compilation or installation of the software, be sure to have read [this](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc/download_and_run.md) document, in which all the passages are explained in detail. 37 | 2) If this issue is due to a code feature, be sure to have run the main and the tests executables before, in order to see if your machine has all the necessary [prerequisites](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc/download_and_run.md#:~:text=source%20code%20link-,Prerequisites,-To%20correclty%20compile) installed. 38 | 39 | Once the issue is received, I will analyze it and once is solved I will respond asking confirmation about my fixing. In this case, if any answer is received in 7 days, the issue will be automatically closed. 40 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | schedule: 9 | - cron: '45 22 * * 0' 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ${{ matrix.os }} 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | os: [ubuntu-latest, macos-latest] 24 | language: [ 'cpp' ] 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v2 29 | 30 | - name: Initialize CodeQL 31 | uses: github/codeql-action/init@v2 32 | with: 33 | languages: ${{ matrix.language }} 34 | 35 | - name: Installing extra dependencies and compiling (Ubuntu) 36 | if: matrix.os == 'ubuntu-latest' 37 | run: | 38 | sudo apt install build-essential g++ libboost-all-dev wget unzip doctest-dev 39 | 40 | exprtk_sha1=ca5c577917646ddba3f71ce6d5dd7d01f351ee80 41 | wget https://github.com/ArashPartow/exprtk/archive/$exprtk_sha1.zip 42 | mv $exprtk_sha1.zip exprtk-$exprtk_sha1.zip 43 | unzip exprtk-$exprtk_sha1.zip 44 | sudo cp exprtk-$exprtk_sha1/exprtk.hpp /usr/include/ 45 | rm -rf exprtk-* 46 | 47 | wget https://github.com/JustWhit3/arsenalgear-cpp/archive/main.zip 48 | mv main.zip arsenalgear-cpp-main.zip 49 | unzip arsenalgear-cpp-main.zip 50 | cd arsenalgear-cpp-main || exit 51 | make 52 | sudo mkdir -p /usr/include/arsenalgear 53 | sudo cp -r include/* /usr/include/arsenalgear 54 | sudo cp lib/* /usr/lib 55 | cd .. 56 | rm -rf arsenalgear-* 57 | 58 | wget https://github.com/JustWhit3/osmanip/archive/main.zip 59 | mv main.zip osmanip-main.zip 60 | unzip osmanip-main.zip 61 | cd osmanip-main || exit 62 | make 63 | sudo mkdir -p /usr/include/osmanip 64 | sudo cp -r include/* /usr/include/osmanip 65 | sudo cp lib/* /usr/lib 66 | cd .. 67 | rm -rf osmanip-* 68 | 69 | make 70 | - name: Installing extra dependencies and compiling (MacOS) 71 | if: matrix.os == 'macos-latest' 72 | run: | 73 | brew install boost doctest 74 | 75 | exprtk_sha1=ca5c577917646ddba3f71ce6d5dd7d01f351ee80 76 | wget https://github.com/ArashPartow/exprtk/archive/$exprtk_sha1.zip 77 | mv $exprtk_sha1.zip exprtk-$exprtk_sha1.zip 78 | unzip exprtk-$exprtk_sha1.zip 79 | sudo cp exprtk-$exprtk_sha1/exprtk.hpp /usr/local/include 80 | rm -rf exprtk-* 81 | 82 | wget https://github.com/JustWhit3/arsenalgear-cpp/archive/main.zip 83 | mv main.zip arsenalgear-cpp-main.zip 84 | unzip arsenalgear-cpp-main.zip 85 | cd arsenalgear-cpp-main || exit 86 | make 87 | sudo mkdir -p /usr/local/include/arsenalgear 88 | sudo cp include/* /usr/local/include/arsenalgear 89 | sudo cp lib/* /usr/local/lib 90 | cd .. 91 | rm -rf arsenalgear-* 92 | 93 | wget https://github.com/JustWhit3/osmanip/archive/main.zip 94 | mv main.zip osmanip-main.zip 95 | unzip osmanip-main.zip 96 | cd osmanip-main || exit 97 | make 98 | sudo mkdir -p /usr/local/include/osmanip 99 | sudo cp -r include/* /usr/local/include/osmanip 100 | sudo cp lib/* /usr/local/lib 101 | cd .. 102 | rm -rf osmanip-* 103 | 104 | make 105 | - name: Perform CodeQL Analysis 106 | uses: github/codeql-action/analyze@v2 -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | AccessModifierOffset: -5 3 | AlignAfterOpenBracket: AlwaysBreak 4 | AlignConsecutiveAssignments: false 5 | AlignConsecutiveDeclarations: false 6 | AlignConsecutiveMacros: false 7 | AlignEscapedNewlines: Right 8 | AlignOperands: false 9 | AlignTrailingComments: true 10 | AllowAllArgumentsOnNextLine: false 11 | AllowAllConstructorInitializersOnNextLine: true 12 | AllowAllParametersOfDeclarationOnNextLine: true 13 | AllowShortBlocksOnASingleLine: Never 14 | AllowShortCaseLabelsOnASingleLine: true 15 | AllowShortFunctionsOnASingleLine: Inline 16 | AllowShortIfStatementsOnASingleLine: WithoutElse 17 | AllowShortLambdasOnASingleLine: All 18 | AllowShortLoopsOnASingleLine: true 19 | AlwaysBreakAfterDefinitionReturnType: None 20 | AlwaysBreakAfterReturnType: None 21 | AlwaysBreakBeforeMultilineStrings: false 22 | AlwaysBreakTemplateDeclarations: MultiLine 23 | BinPackArguments: true 24 | BinPackParameters: false 25 | BraceWrapping: 26 | AfterCaseLabel: false 27 | AfterClass: false 28 | AfterControlStatement: false 29 | AfterEnum: false 30 | AfterExternBlock: false 31 | AfterFunction: true 32 | AfterNamespace: false 33 | AfterObjCDeclaration: false 34 | AfterStruct: false 35 | AfterUnion: false 36 | BeforeCatch: false 37 | BeforeElse: false 38 | IndentBraces: false 39 | SplitEmptyFunction: true 40 | SplitEmptyNamespace: true 41 | SplitEmptyRecord: true 42 | BreakAfterJavaFieldAnnotations: false 43 | BreakBeforeBinaryOperators: None 44 | BreakBeforeBraces: Allman 45 | BreakBeforeInheritanceComma: true 46 | BreakBeforeTernaryOperators: true 47 | BreakConstructorInitializers: AfterColon 48 | BreakConstructorInitializersBeforeComma: false 49 | BreakInheritanceList: BeforeColon 50 | BreakStringLiterals: false 51 | ColumnLimit: 0 52 | CommentPragmas: '^ IWYU pragma:' 53 | CompactNamespaces: true 54 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 55 | ConstructorInitializerIndentWidth: 1 56 | ContinuationIndentWidth: 3 57 | Cpp11BracedListStyle: false 58 | DeriveLineEnding: false 59 | DerivePointerAlignment: false 60 | DisableFormat: false 61 | ExperimentalAutoDetectBinPacking: true 62 | FixNamespaceComments: true 63 | ForEachMacros: 64 | - foreach 65 | - Q_FOREACH 66 | - BOOST_FOREACH 67 | IncludeBlocks: Preserve 68 | IncludeCategories: 69 | - Priority: 2 70 | Regex: ^"(llvm|llvm-c|clang|clang-c)/ 71 | SortPriority: 0 72 | - Priority: 3 73 | Regex: ^(<|"(gtest|gmock|isl|json)/) 74 | SortPriority: 0 75 | - Priority: 1 76 | Regex: .* 77 | SortPriority: 0 78 | IncludeIsMainRegex: (Test)?$ 79 | IncludeIsMainSourceRegex: '' 80 | IndentCaseLabels: true 81 | IndentGotoLabels: false 82 | IndentPPDirectives: AfterHash 83 | IndentWidth: 2 84 | IndentWrappedFunctionNames: false 85 | JavaScriptQuotes: Leave 86 | JavaScriptWrapImports: true 87 | KeepEmptyLinesAtTheStartOfBlocks: true 88 | Language: Cpp 89 | MacroBlockBegin: '' 90 | MacroBlockEnd: '' 91 | MaxEmptyLinesToKeep: 1 92 | NamespaceIndentation: All 93 | ObjCBinPackProtocolList: Auto 94 | ObjCBlockIndentWidth: 7 95 | ObjCSpaceAfterProperty: false 96 | ObjCSpaceBeforeProtocolList: false 97 | PenaltyBreakAssignment: 4 98 | PenaltyBreakBeforeFirstCallParameter: 19 99 | PenaltyBreakComment: 370 100 | PenaltyBreakFirstLessLess: 75 101 | PenaltyBreakString: 934 102 | PenaltyBreakTemplateDeclaration: 10 103 | PenaltyExcessCharacter: 130163 104 | PenaltyReturnTypeOnItsOwnLine: 153 105 | PointerAlignment: Middle 106 | ReflowComments: true 107 | SortIncludes: false 108 | SortUsingDeclarations: true 109 | SpaceAfterCStyleCast: false 110 | SpaceAfterLogicalNot: false 111 | SpaceAfterTemplateKeyword: true 112 | SpaceBeforeAssignmentOperators: true 113 | SpaceBeforeCpp11BracedList: true 114 | SpaceBeforeCtorInitializerColon: false 115 | SpaceBeforeInheritanceColon: true 116 | SpaceBeforeParens: Never 117 | SpaceBeforeRangeBasedForLoopColon: false 118 | SpaceBeforeSquareBrackets: false 119 | SpaceInEmptyBlock: false 120 | SpaceInEmptyParentheses: false 121 | SpacesBeforeTrailingComments: 6 122 | SpacesInAngles: false 123 | SpacesInCStyleCastParentheses: true 124 | SpacesInConditionalStatement: false 125 | SpacesInContainerLiterals: true 126 | SpacesInParentheses: true 127 | SpacesInSquareBrackets: true 128 | Standard: Auto 129 | StatementMacros: 130 | - Q_UNUSED 131 | - QT_REQUIRE_VERSION 132 | TabWidth: 4 133 | UseCRLF: false 134 | UseTab: Never -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Headers 3 | //============================================ 4 | 5 | //My headers 6 | #include "../include/functions.hpp" 7 | #include "../include/utils.hpp" 8 | 9 | //Extra headers 10 | #include 11 | #include 12 | #include 13 | 14 | //STD headers 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | //============================================ 21 | // "main" function 22 | //============================================ 23 | int main() 24 | { 25 | int choice, m, l; 26 | char letter = ' ', letter_r; 27 | std::string equation; 28 | const std::string spaces = agr::empty_space * 5; 29 | 30 | std::cout << "\n" 31 | << spaces << osm::feat( osm::col, "green" ) << " _____ ______ _____ " 32 | << osm::feat( osm::rst, "color" ) << "\n" 33 | << spaces << osm::feat( osm::col, "green" ) << " / ____| /\\ | ____| __ \\ " 34 | << osm::feat( osm::rst, "color" ) << "\n" 35 | << spaces << osm::feat( osm::col, "green" ) << " | (___ / \\ | |__ | | | | " 36 | << osm::feat( osm::rst, "color" ) << "\n" 37 | << spaces << osm::feat( osm::col, "green" ) << " \\___ \\ / /\\ \\ | __| | | | | " 38 | << osm::feat( osm::rst, "color" ) << "\n" 39 | << spaces << osm::feat( osm::col, "green" ) << " ____) / ____ \\| | | |__| | " 40 | << osm::feat( osm::rst, "color" ) << "\n" 41 | << spaces << osm::feat( osm::col, "green" ) << " |_____/_/ \\_\\_| |_____/ " 42 | << osm::feat( osm::rst, "color" ) << "\n\n\n" 43 | << osm::feat( osm::col, "cyan" ) << osm::feat( osm::sty, "italics" ) 44 | << "Welcome to SAFD: a program to compute the coefficients f(m,l) of a " 45 | << "\nfunction f(th,phi) development in a spherical harmonics convergent series. " 46 | << osm::feat( osm::rst, "all" ) << "\n\n"; 47 | 48 | while( true ) 49 | { 50 | std::cout << "Available options:" << "\n" 51 | << " 1. Display the single value of a f(m,l) coefficient." << "\n" 52 | << " 2. Display all the values of f(m,l) coefficients from m to 0 and from l to 0." << "\n" 53 | << " 3. Quit the program. " << "\n\n" 54 | << "Option choice: "; 55 | 56 | std::cin >> choice; 57 | std::cout << "\n"; 58 | 59 | if( choice == 3 ) 60 | { 61 | std::cout << osm::feat( osm::col, "green" ) << "Program exited successfully." << osm::feat( osm::rst, "color" ) 62 | << "\n\n"; 63 | break; 64 | } 65 | else if( choice == 1 ) 66 | { 67 | safd::initializer( equation, m, l ); 68 | std::cout << "Chosen function is: " << osm::feat( osm::col, "orange" ) << "f(th,phi) = " << equation << osm::feat( osm::rst, "color" ) << "\n"; 69 | safd::plotter( equation ); 70 | std::cout << "\nValue of the coefficient is (real + imaginary part):" << "\n\n"; 71 | safd::displayer( equation, m, l ); 72 | std::cout << "\n"; 73 | 74 | letter_r = safd::abort_this( letter ); 75 | if ( letter_r == 'n' ) 76 | { 77 | std::cout << osm::feat( osm::col, "green" ) << "Program exited successfully." << osm::feat( osm::rst, "color" ) 78 | << "\n\n"; 79 | break; 80 | } 81 | else if( letter_r == 'y' ) { continue; } 82 | else 83 | { 84 | std::cerr << osm::feat( osm::col, "red" ) << "Inserted answer is not correct. Automatically aborting the program!" 85 | << osm::feat( osm::rst, "color" ) << "\n\n"; 86 | break; 87 | } 88 | } 89 | else if( choice == 2 ) 90 | { 91 | safd::initializer( equation, m, l ); 92 | std::cout << "Chosen function is: " << osm::feat( osm::col, "orange" ) << "f(th,phi) = " << equation << osm::feat( osm::rst, "color" ) << "\n\n"; 93 | safd::plotter( equation ); 94 | std::cout << "\nValue of the coefficients is (real + imaginary part):" << "\n\n"; 95 | for( int a = 0; a < m + 1; a++ ) 96 | { 97 | for( int b = 0; b < l + 1; b++ ) 98 | { 99 | if( a > b ) continue; 100 | safd::displayer( equation, a, b ); std::cout << "\n"; 101 | } 102 | } 103 | 104 | letter_r = safd::abort_this( letter ); 105 | if ( letter_r == 'n' ) 106 | { 107 | std::cout << osm::feat( osm::col, "green" ) << "Program exited successfully." << osm::feat( osm::rst, "color" ) 108 | << "\n\n"; 109 | break; 110 | } 111 | else if( letter_r == 'y' ) { continue; } 112 | else 113 | { 114 | std::cerr << osm::feat( osm::col, "red" ) << "Inserted answer is not correct. Automatically aborting the program!" 115 | << osm::feat( osm::rst, "color" ) << "\n\n"; 116 | break; 117 | } 118 | } 119 | else 120 | { 121 | std::cin.clear(); 122 | std::cin.ignore( std::numeric_limits::max(), '\n'); 123 | 124 | std::cerr << osm::feat( osm::col, "red" ) << "Invalid option!" << osm::feat( osm::rst, "color" ) 125 | << "\n\n"; 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /test/test_utils.cpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Preprocessor directives 3 | //============================================ 4 | #define DOCTEST_CONFIG_SUPER_FAST_ASSERTS 5 | 6 | //============================================ 7 | // Headers 8 | //============================================ 9 | 10 | //My headers 11 | #include "../include/functions.hpp" 12 | #include "../include/utils.hpp" 13 | 14 | //Extra headers 15 | #include 16 | #include 17 | 18 | //STD headers 19 | #include 20 | #include 21 | #include 22 | 23 | //============================================ 24 | // Global variables 25 | //============================================ 26 | inline constexpr double rda = 3.456234; 27 | 28 | //============================================ 29 | // "h" function testing 30 | //============================================ 31 | TEST_CASE( "Testing the h function" ) // 100% working 32 | { 33 | CHECK_EQ( safd::h( 2, 0.5 ), safd::STEP_SIZE * 0.5 ); 34 | CHECK_EQ( safd::h( 7, 0.5 ), 7 * 0.09 ); 35 | } 36 | 37 | //============================================ 38 | // "n_derivative" function testing 39 | //============================================ 40 | inline double func( const int& a, const double& x ) { return sin( x ) - cos( x ); } 41 | inline double gunc( const int& a, const double& x ) { return 5*pow( x, 5 ) + pow( x, 4 ); } 42 | 43 | TEST_CASE( "Testing the n_derivative function" ) 44 | { 45 | SUBCASE( "Testing the 1-derivative" ) 46 | { 47 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, 1, 1, 1 ) * 100.0 ) / 100.0, 1); 48 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, 1, 0, 1 ) * 100.0 ) / 100.0, 0); 49 | } 50 | SUBCASE( "Testing the 2-derivative" ) 51 | { 52 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, 2, 3, 2 ) * 100.0 ) / 100.0, 30 ); 53 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, -2, 3, 2 ) * 100.0 ) / 100.0, -30 ); 54 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, 0.3, 3, 2 ) * 100.0 ) / 100.0, 4.5 ); 55 | } 56 | SUBCASE( "Testing the 3-derivative" ) 57 | { 58 | CHECK_EQ( round( safd::n_derivative( safd::Leg_pol, 1, 3, 3 ) * 1.0 ) / 1.0, 15 ); 59 | CHECK_EQ( round( safd::n_derivative( func, M_PI/3, 4, 3 ) * 10.0 ) / 10.0, -1.4 ); 60 | CHECK_EQ( round( safd::n_derivative( gunc, 3, 4, 3 ) * 1.0 ) / 1.0, 2772 - 1 ); 61 | } 62 | SUBCASE( "Testing higher orders derivatives" ) 63 | { 64 | CHECK_EQ( round( safd::n_derivative( gunc, 3, 4, 4 ) * 100.0 ) / 100.0, 1825.41 ); 65 | } 66 | SUBCASE( "Testing exceptions" ) 67 | { 68 | CHECK_THROWS_AS( round( safd::n_derivative( safd::Leg_pol, 1, 1, -1 ) * 100.0 ) / 100.0, std::runtime_error ); 69 | } 70 | } 71 | 72 | //============================================ 73 | // "integral" function testing 74 | //============================================ 75 | inline double huncx( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 76 | { return sin( x ) - cos( x ); } 77 | inline double huncx_2( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 78 | { return pow( sin( x ), 2 ) - cos( x ); } 79 | inline double huncx_3( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 80 | { return pow( sin( x ), 3 ) - cos( x ); } 81 | inline double huncy( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 82 | { return sin( y ) - cos( y ); } 83 | inline double huncy_2( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 84 | { return pow( sin( y ), 2 ) - cos( y ); } 85 | inline double huncy_3( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 86 | { return pow( sin( y ), 8 ) - pow( cos( y ), 3 ); } 87 | inline double huncy_4( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 88 | { return pow( sin( y ), 4 ) + pow( cos( y ), 9 ) - pow( cos( y ), 3 ); } 89 | 90 | inline double hunc( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 91 | { return pow( cos( x ), 5 ) + pow( sin( y ), 4 ); } 92 | inline double hunc_2( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 93 | { return pow( cos( x ), 5 ) + pow( sin( y ), 4 ) + pow( cos( x ), 2 ); } 94 | inline double hunc_3( const std::string& s, const int& m, const int& l, const double& x, const double& y ) 95 | { return pow( cos( x + y ), 3 ) + cos( x ) * pow( sin( x ), 5 ) + 5 + sin( y - x ); } 96 | 97 | TEST_CASE( "Testing the integral function" ) // 100% working 98 | { 99 | SUBCASE( "Testing for x variable only" ) 100 | { 101 | CHECK( agr::IsInBounds( safd::integral( huncx, "", 0, 0 ), 12.0, 13.1 ) ); 102 | CHECK( agr::IsInBounds( safd::integral( huncx_2, "", 0, 0 ), 9.2, 10.5 ) ); 103 | CHECK( agr::IsInBounds( safd::integral( huncx_3, "", 0, 0 ), 8.30, 8.90 ) ); 104 | } 105 | SUBCASE( "Testing for y variable only" ) 106 | { 107 | CHECK( agr::IsInBounds( safd::integral( huncy, "", 0, 0 ), -0.3, 0.3 ) ); 108 | CHECK( agr::IsInBounds( safd::integral( huncy_2, "", 0, 0 ), 9.80, 9.90 ) ); 109 | CHECK( agr::IsInBounds( safd::integral( huncy_3, "", 0, 0 ), 5.2, 5.4 ) ); 110 | CHECK( agr::IsInBounds( safd::integral( huncy_4, "", 0, 0 ), 7.30, 7.60 ) ); 111 | } 112 | SUBCASE( "Testing for 2 variables" ) 113 | { 114 | CHECK( agr::IsInBounds( safd::integral( hunc, "", 0, 0 ), 7.00, 7.20 ) ); 115 | CHECK( agr::IsInBounds( safd::integral( hunc_2, "", 0, 0 ), 17.2, 17.6 ) ); 116 | CHECK( agr::IsInBounds( safd::integral( hunc_3, "", 0, 0 ), 96.5, 101.5 ) ); 117 | } 118 | } -------------------------------------------------------------------------------- /src/utils.cpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Headers 3 | //============================================ 4 | 5 | //My headers 6 | #include "../include/utils.hpp" 7 | 8 | //STD headers 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | namespace safd 19 | { 20 | //============================================ 21 | // h step size 22 | //============================================ 23 | /** 24 | * @brief Function used to return the derivative step-size. 25 | * 26 | * @param n The derivative order. 27 | * @param x_0 The point in which the derivative is computed. 28 | * @return double The step size. 29 | */ 30 | double h( const int& n, const double& x_0 ) 31 | { 32 | if ( n < 4 && n > 0 ) return STEP_SIZE * x_0; 33 | else return n * 0.09; 34 | } 35 | 36 | //============================================ 37 | // n_derivative 38 | //============================================ 39 | /** 40 | * @brief Function used to compute the "n"-th derivative of a function "f" in a point "x_0", which depends on an index "a". NB: Works well until n = 3/4. 41 | * 42 | * @param f The given function. 43 | * @param x_0 The point in which the derivative is computed. 44 | * @param a An index used in the function operations. 45 | * @param n The derivative order. 46 | * @return double 47 | */ 48 | double n_derivative( const two_param_func& f, const double& x_0, const int& a, const int& n ) 49 | { 50 | if( n == 0 ) return f( a, x_0 ); 51 | else if( n < 0 ) 52 | { 53 | throw std::runtime_error( "\033[31mDerivative cannot be calculated for order less than 0!\033[0m" ); 54 | } 55 | else 56 | { 57 | if ( fabs( x_0 ) >= __DBL_MIN__ && std::isfinite( x_0 ) ) 58 | { 59 | const double x_1 = x_0 - h( n, x_0 ); 60 | const double x_2 = x_0 + h( n, x_0 ); 61 | const double first_term = n_derivative( f, x_2, a, n - 1 ); 62 | const double second_term = n_derivative( f, x_1, a, n - 1); 63 | 64 | return ( first_term - second_term ) / ( x_2 - x_1 ); 65 | } 66 | else 67 | { 68 | throw std::runtime_error( "\033[31mDerivative cannot be calculated in this x_0 value (too much small or big)!\033[0m" ); 69 | } 70 | } 71 | } 72 | 73 | //============================================ 74 | // integral 75 | //============================================ 76 | /** 77 | * @brief Function used to integrate a function f(x,y), depending on two indexes m and l, in x = theta and y = phi. 78 | * 79 | * @param f The function to be integrated. 80 | * @param expr The expression used for the function. 81 | * @param m A function parameter. 82 | * @param l A function parameter. 83 | * @return double The integrated function 84 | */ 85 | double integral( const four_param_func& f, const std::string& expr, const int& m, const int& l ) 86 | { 87 | //Calculating the number of points in x and y integral: 88 | const double nx = ( x_fin - x_in ) / h_x + 1; 89 | const double ny = ( y_fin - y_in ) / h_y + 1; 90 | 91 | //Integral variables: 92 | double res{}; 93 | std::vector> tab( std::ceil( nx ), std::vector( std::ceil( ny ), 0.0 ) ); 94 | std::vector ax( std::ceil( nx ), 0.0 ); 95 | 96 | //Calculating the values of the table: 97 | for( int i = 0; i < nx; ++i ) 98 | { 99 | for ( int j = 0; j < ny; ++j ) 100 | { 101 | tab[i][j] = f( expr, m, l, x_in + i * h_x, y_in + j * h_y ); 102 | } 103 | } 104 | 105 | //Calculating the integral value wrt y at each point for x: 106 | for( int i = 0; i < nx; ++i ) 107 | { 108 | ax[i] = 0; 109 | for ( int j = 0; j < ny; ++j ) 110 | { 111 | if ( j == 0 || j == ny - 1 ) ax[i] += tab[i][j]; 112 | else if ( j % 2 == 0 ) ax[i] += 2 * tab[i][j]; 113 | else ax[i] += 4 * tab[i][j]; 114 | } 115 | ax[i] *= ( h_y / 3 ); 116 | } 117 | 118 | //Calculating the final integral value using the integral obtained in the above step: 119 | for ( int i = 0; i < nx; ++i ) 120 | { 121 | if ( i == 0 || i == nx - 1 ) res += ax[i]; 122 | else if ( i % 2 == 0 ) res += 2 * ax[i]; 123 | else res += 4 * ax[i]; 124 | } 125 | res *= ( h_x / 3 ); 126 | 127 | return res; 128 | } 129 | 130 | //============================================ 131 | // "initializer" function definition 132 | //============================================ 133 | /** 134 | * @brief Function used to initialize values of main program input. NB: used in main program only. 135 | * 136 | * @param equation The equation parsed by the user. 137 | * @param m A constant value. 138 | * @param l A constant value. 139 | */ 140 | void initializer( std::string& equation, int& m, int& l) 141 | { 142 | std::cout << "Enter the f(th,phi) equation shape (avoid backspaces): "; 143 | std::cin >> equation; 144 | std::cout << "Enter the value of m: "; 145 | std::cin >> m; 146 | std::cout << "Enter the value of l: "; 147 | std::cin >> l; 148 | std::cout << "\n"; 149 | } 150 | 151 | //============================================ 152 | // "letter" function definition 153 | //============================================ 154 | /** 155 | * @brief Function used to modify an input and return it. NB: used in main program only. 156 | * 157 | * @param letter A letter for option choosing. 158 | * @return char Return the chosen option. 159 | */ 160 | char abort_this( char letter ) 161 | { 162 | std::cout << "Compute another coefficient (enter \"y\" or \"n\")?: "; 163 | std::cin >> letter; 164 | std::cout << "\n"; 165 | return letter; 166 | } 167 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

An app to compute the coefficients of a function development in a spherical harmonics convergent series

4 |

5 | v1.1 7 | license 8 | 9 | C++17 10 |
11 | code size 12 | repo size 13 | total lines
14 | codeq 15 | doc 16 |

17 | 18 | ## Table of contents 19 | 20 | - [Introduction](#introduction) 21 | - [Supported operating systems](#supported-operating-systems) 22 | - [Install and run](#install-and-run) 23 | - [Extra documentation](#documentation) 24 | - [How to use](#how-to-use) 25 | - [Credits](#credits) 26 | - [Project leaders](#project-leaders) 27 | - [Other contributors](#other-contributors) 28 | - [Other contributors with no GitHub account](Other-contributors-with-no-GitHub-account) 29 | 30 | ## Introduction 31 | 32 | This program computes the coefficients of a function development in a spherical harmonics convergent series, by using a standard mathematical [algorithm](https://github.com/JustWhit3/SAFD-algorithm/tree/main/doc/algorithm_explanation.md). 33 | 34 | When running the program, you have simply to input the generic shape of the equation and the values of m and l and the coefficients will be calculated. 35 | 36 | Some program features: 37 | 38 | - Can calculate coefficients for any generic function, entered by the user during the program running. 39 | - coefficients are expressed as complex numbers. 40 | - It works well for each negative or positive value of m, with very good accuracy until m < 5. For higher m values, the accuracy gradually decrease. 41 | 42 | > **NOTE**: equations are displayed in green color in order to be correctly visualized in both normal and dark mode. 43 | 44 | Output example (terminal graphics has been produced using [`osmanip`](https://github.com/JustWhit3/osmanip)): 45 | 46 | 47 | 48 | > **NOTE**: inserted functions are plotted only in the case in which they are 1D (i.e. only one of the two angles is present in their expression) since the [`osmanip`](https://github.com/JustWhit3/osmanip) library at the moment doesn't feature 2D plotting. 49 | 50 | The software is and will stay **free**, but if you want to support me with a donation it would be really appreciated! 51 | 52 | Buy Me A Coffee 53 | 54 | If you want to use this software please cite it following [this](https://github.com/JustWhit3/SAFD-algorithm/tree/main/CITATION.cff) citation template file. 55 | 56 | ## Supported operating systems 57 | 58 | - **Linux** 59 | - *Ubuntu* (tested) 60 | - **MacOS** 61 | 62 | ## Install an run 63 | 64 | Steps to be reproduced: 65 | 66 | **1)** Download one of the releases of the repository or clone the main branch. 67 | 68 | **2)** Unzip and enter the downloaded repository directory. 69 | 70 | **3)** Install all the prerequisites: 71 | 72 | ```bash 73 | ./script/install_dependencies.sh 74 | ``` 75 | 76 | Prerequisites list: 77 | 78 | - A `g++` compiler. 79 | - C++17 standard. 80 | - [`exprtk`](https://github.com/ArashPartow/exprtk) library. 81 | - [`osmanip`](https://github.com/JustWhit3/osmanip) library. 82 | - [`arsenalgear`](https://github.com/JustWhit3/arsenalgear) library. 83 | 84 | Optional (only for developers) 85 | 86 | - [Valgrind](https://valgrind.org/) and [Cppcheck](https://github.com/danmar/cppcheck). 87 | - [Clang formatter](https://stackoverflow.com/questions/20756924/how-can-i-install-clang-format-in-ubuntu#:~:text=16.04%2C%20simply%20do%3A-,sudo%20apt%20install%20clang%2Dformat,-Share). 88 | - A terminal supporting ANSI escape sequences. 89 | 90 | **4)** Compile: 91 | 92 | ```bash 93 | make main 94 | ``` 95 | 96 | > **NOTE**: to compile test code run `make tests`. 97 | 98 | **5)** Run the main program: 99 | 100 | ```bash 101 | ./bin/main 102 | ``` 103 | 104 | > **NOTE**: to run test code run `./bin/tests`. 105 | 106 | ## Extra documentation 107 | 108 | Extra documentation is available in the [doc](https://github.com/JustWhit3/SAFD-algorithm/tree/main/doc) folder: 109 | 110 | - [Algorithm explanation and physical background](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc/Algorithm-explanation.md): contains information about the mathematical and physical explanation related to the coefficients computation and a detailed description of the used algorithm. 111 | - [Contributing](https://github.com/JustWhit3/SAFD-algorithm/tree/main/doc/Contributing.md): contains information about how to contribute to this project. 112 | - [Extra scripts](https://github.com/JustWhit3/SAFD-algorithm/blob/main/doc/Extra-scripts.md): contains extra documentation about the other scripts. 113 | 114 | Code documentation is generated using Doxygen and can be accessed [here](https://justwhit3.github.io/SAFD-algorithm/index.html). 115 | 116 | ## How to use 117 | 118 | When running the program, some options are displayed: 119 | 120 | ```Shell 121 | Available options: 122 | 1. Display the single value of a f(m,l) coefficient. 123 | 2. Display all the values of f(m,l) coefficients from m to 0 and from l to 0. 124 | 3. Quit the program. 125 | 126 | Option choice: 127 | ``` 128 | 129 | The first one is used to compute a single value of the coefficient for a certain m and l. 130 | 131 | The second one is used, instead, to compute all the values of from m to 0 and from l to 0. 132 | 133 | Third option explanation is trivial. 134 | 135 | When one of the options has been chosen, an output like this will be displayed: 136 | 137 | ```Shell 138 | Option choice: 1 139 | 140 | Enter the f(th,phi) equation shape (avoid backspaces): 141 | ``` 142 | 143 | You can enter the function shape and the values of m and l. For example: 144 | 145 | ```Shell 146 | Enter the f(th,phi) equation shape (avoid backspaces): 3*cos(th)+pow(sin(phi),5) 147 | Enter the value of m: 2 148 | Enter the value of l: 3 149 | ``` 150 | 151 | and the final result is displayed with both real and imaginary parts: 152 | 153 | ```Shell 154 | f(2,3) = 0.0546019 + -0.00160564i 155 | ``` 156 | 157 | ## Credits 158 | 159 | ### Project leaders 160 | 161 | 162 | 163 | 164 | 165 |

Gianluca Bianco
166 | 167 | ### Other contributors 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 |

Adam_T

patlefort

myermo
179 | 180 | 181 | 182 | 183 | 184 | 185 | ### Other contributors with no GitHub account 186 | 187 | - [adnukator](https://www.reddit.com/user/adnukator). 188 | -------------------------------------------------------------------------------- /doc/Algorithm-explanation.md: -------------------------------------------------------------------------------- 1 | # Algorithm explanation 2 | 3 | ## Table of contents 4 | 5 | - [Phisical background](#phisical-background) 6 | - [Algorithm description](#algorithm-description) 7 | 8 | ## Phisical background 9 | 10 | [Spherical harmonics](https://mathworld.wolfram.com/SphericalHarmonic.html) are simultaneously eigenfunctions of both the module of the angular momentum and of its arbitrary component along an axis. They are used to find the [Schrödinger equation](https://users.aber.ac.uk/ruw/teach/327/hatom.php) solution for the hydrogen atom in quantum mechanics, for example. 11 | 12 | > **NOTE**: if equations / images are not correctly displayed, this may be probably caused by Latex equation editor website maintenance. Check [here](https://latex.codecogs.com/): if the website is not displayed, server may be temporarily down for updates, so you can come back here in a few hours / days. Sorry. 13 | 14 | They are a family of infinite functions, called , which depend only on the two angles (defined in the spherical transformation of coordinates) and in which *l* and *m* are are integers which satisfy this relation: and . 15 | 16 | They can construct an orthonormal basis for any other function depending on the same variables; this means that each function can be developed into a spherical harmonics convergent series: 17 | 18 | 19 | 20 | where the coefficients can be written as: 21 | 22 | 23 | 24 | and the spherical harmonics are defined as follows: 25 | 26 | 27 | 28 | where *i* is the imaginary unit and are the **Legendre associated functions**, defined in the interval *[-1,1]* (for the *x* variable): 29 | 30 | 31 | 32 | with . 33 | 34 | The polynomials are called **Legendre polynomials** and are given by the following recursive relation: 35 | 36 | 37 | 38 | they are also defined in *[-1,1]* and have . 39 | 40 | ## Algorithm description 41 | 42 | The algorithm starts from the computation of the Legendre polynomials, for which has been created a function `Leg_pol` which reproduces the equation (5) (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/functions.cpp#:~:text=cmplx%20coefficient%3B-,//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D,%7D,-//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D)). So, nothing special for this one. 43 | 44 | To compute the Legendre associated functions of equation (4) it has been firstly defined an `n_derivative` function to compute the n-th derivative of a real given function, using this recursive relation: 45 | 46 | 47 | 48 | (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/utils.cpp#:~:text=//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D-,//Function%20used%20to%20calculate%20the%20%22n%22%2Dth%20derivative%20of%20a,%7D,-//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D)). 49 | 50 | The derivative step-size *h* has been defined with this function: 51 | 52 | ```C++ 53 | const double STEP_SIZE = 2 * cbrt( __DBL_EPSILON__ ); 54 | 55 | d_const h( i_const n, d_const x_0 ) 56 | { 57 | if ( n < 4 && n > 0 ) return STEP_SIZE * x_0; 58 | else return n * 0.09; 59 | } 60 | ``` 61 | 62 | This derivation algorithm is not optimal, in fact the calculation is not too much accurate for n > 5, but should work not so bad for higher values of n. This is the motivation for which the computation of the equation (2) is precise until m = 5. 63 | 64 | Finally, the Legendre associated functions has been computed writing a new function `Leg_func`, using the equation (4) and the previously defined derivative (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/functions.cpp#:~:text=d_const%20Leg_func(%20i_const%20b%2C%20i_const%20a%2C%20d_const%20x%20))). 65 | 66 | Then, to compute the spherical harmonics defined in (3) it has been simply implemented a complex function `sph_arm` (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/functions.cpp#:~:text=cmplx_const%20sph_arm(%20i_const%20m%2C%20i_const%20l%2C%20d_const%20theta%2C%20d_const%20phi%20))). 67 | 68 | Next step has been the one of writing an `integral` function to compute the double-integral of equation (2). For this, it has been used the **Simpson 1/3 rule**: 69 | 70 | 71 | 72 | which has been extended to two-dimensions. 73 | 74 | The integration step size for x and y variables has been defined as: 75 | 76 | ```C++ 77 | double const h_x = 0.07; 78 | double const h_y = 0.15; 79 | ``` 80 | 81 | A table of the values of the function for all possible combinations of all x and y points has been created and the Simpson rule has been applied on each row to find integral with reference to y at each x and store the values in an array. Finally, the rule has been again applied on the values of the array to calculate the integral with reference to x (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/utils.cpp#:~:text=d_const%20integral(%20four_param_func%20f%2C%20s_const%20expr%2C%20i_const%20m%2C%20i_const%20l%20))). 82 | 83 | Another function `f_m_l` has been then created to compute the final resulting coefficients of equation (2), bu using the integral algorithm defined previously (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/functions.cpp#:~:text=cmplx_const%20f_m_l(%20s_const%20expr%2C%20i_const%20m%2C%20i_const%20l%20))). 84 | 85 | At the end, a main program has been provided, in order to run all the necessary code and to parse the function from input, by simply entering its shape during the running of the whole program (see [here](https://github.com/JustWhit3/SAFD-algorithm/blob/main/src/main.cpp)). This final feature was possible thanks to the [`exprtk`](https://github.com/ArashPartow/exprtk) library tools. -------------------------------------------------------------------------------- /test/test_functions.cpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Preprocessor directives 3 | //============================================ 4 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN 5 | #define DOCTEST_CONFIG_SUPER_FAST_ASSERTS 6 | 7 | //============================================ 8 | // Headers 9 | //============================================ 10 | 11 | //My headers 12 | #include "../include/functions.hpp" 13 | #include "../include/utils.hpp" 14 | 15 | //Extra headers 16 | #include 17 | #include 18 | 19 | //STD headers 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | //============================================ 26 | // "Leg_pol" function testing 27 | //============================================ 28 | TEST_CASE( "Testing the Leg_pol function" ) // 100% working 29 | { 30 | CHECK_EQ( safd::Leg_pol( 2, 0.3 ), -0.365 ); 31 | CHECK_EQ( safd::Leg_pol( 0, 0.6 ), 1 ); 32 | CHECK_EQ( safd::Leg_pol( 1, 0.6 ), 0.6 ); 33 | CHECK_EQ( round( safd::Leg_pol( 6, 0.6 ) * 100.0 ) / 100.0, 0.17 ); 34 | CHECK_THROWS_AS( safd::Leg_pol( -2, 3 ), std::runtime_error ); 35 | } 36 | 37 | //============================================ 38 | // "Leg_func" function testing 39 | //============================================ 40 | TEST_CASE( "Testing the Leg_func function" ) // 100% working 41 | { 42 | SUBCASE( "Testing for b == 0" ) 43 | { 44 | CHECK_EQ( round( safd::Leg_func( 0, 0, 0.3 ) * 100.0 ) / 100.0, 1 ); 45 | CHECK_EQ( round( safd::Leg_func( 0, 1, 0.3 ) * 100.0 ) / 100.0, 0.3 ); 46 | CHECK_EQ( round( safd::Leg_func( 0, 2, 0.3 ) * 100.0 ) / 100.0, -0.37 ); 47 | } 48 | SUBCASE( "Testing for 1 <= b <= 3" ) 49 | { 50 | CHECK_EQ( round( safd::Leg_func( 1, 1, 0.5 ) * 100.0 ) / 100.0, -0.87 ); 51 | CHECK_EQ( round( safd::Leg_func( 1, 2, -0.3 ) * 100.0 ) / 100.0, 0.86 ); 52 | CHECK_EQ( round( safd::Leg_func( 3, 4, 0.9 ) * 100.0 ) / 100.0, -7.83 - 0.01 ); 53 | CHECK_EQ( round( safd::Leg_func( 2, 2, 0.5 ) * 100.0 ) / 100.0, 2.25 ); 54 | } 55 | SUBCASE( "Testing for b >= 4 and |b-a| <= 1" ) 56 | { 57 | CHECK( agr::IsInBounds( safd::Leg_func( 4, 5, 0.5 ), 260.0, 270.0 ) ); 58 | CHECK( agr::IsInBounds( safd::Leg_func( 6, 6, 0.005 ), 10380.0, 10400.0 ) ); 59 | CHECK( agr::IsInBounds( safd::Leg_func( 7, 8, 0.5 ), -370300.0, -369800.0 ) ); 60 | CHECK( agr::IsInBounds( safd::Leg_func( 10, 11, 0.5 ), 1631080449.0, 1638080449.0 ) ); 61 | } 62 | SUBCASE( "Testing for b >= 4 and |b-a| > 1" ) //Start loosing accuracy. Tests are not precise, but acceptable. 63 | { 64 | //CHECK_EQ( round( safd::Leg_func( 4, 6, 0.5 ) * 1.0 ) / 1.0, 465.1 ); 65 | //CHECK_EQ( round( safd::Leg_func( 6, 8, 0.5 ) * 1.0 ) / 1.0, 78388.9 ); 66 | //CHECK_EQ( round( safd::Leg_func( 7, 11, 0.5 ) * 1.0 ) / 1.0, 295075.9 ); 67 | } 68 | SUBCASE( "Testing exceptions" ) 69 | { 70 | CHECK_THROWS_AS( safd::Leg_func( 1, 2, -3 ), std::runtime_error ); 71 | CHECK_THROWS_AS( safd::Leg_func( 1, 2, 3 ), std::runtime_error ); 72 | CHECK_THROWS_AS( safd::Leg_func( 3, 2, 0.2 ), std::runtime_error ); 73 | CHECK_THROWS_AS( safd::Leg_func( -2, 1, 0.2 ), std::runtime_error ); 74 | CHECK_THROWS_AS( safd::Leg_func( -2, -3, 0.2 ), std::runtime_error ); 75 | } 76 | } 77 | 78 | //============================================ 79 | // "sph_arm" function testing 80 | //============================================ 81 | TEST_CASE( "Testing the sph_arm function" ) // 100% working 82 | { 83 | SUBCASE( "Testing for m == 0 and l == 0" ) 84 | { 85 | std::complex c( 0.28, 0 ); 86 | CHECK_EQ( round( safd::sph_arm( 0, 0, M_PI, M_PI ).real() * 100.0 ) / 100.0, c.real() ); 87 | CHECK_EQ( round( safd::sph_arm( 0, 0, M_PI, M_PI ).imag() * 100.0 ) / 100.0, c.imag() ); 88 | CHECK_EQ( round( safd::sph_arm( 0, 0, 2*M_PI, M_PI ).real() * 100.0 ) / 100.0, c.real() ); 89 | CHECK_EQ( round( safd::sph_arm( 0, 0, 2*M_PI, M_PI ).imag() * 100.0 ) / 100.0, c.imag() ); 90 | } 91 | SUBCASE( "Testing for m == 0, l == 1 and Theta = 180" ) 92 | { 93 | std::complex d( -0.49, 0 ); 94 | CHECK_EQ( round( safd::sph_arm( 0, 1, M_PI, M_PI ).real() * 100.0 ) / 100.0, d.real() ); 95 | CHECK_EQ( round( safd::sph_arm( 0, 1, M_PI, M_PI ).imag() * 100.0 ) / 100.0, d.imag() ); 96 | } 97 | SUBCASE( "Testing for m == 0, l == 2 and Theta = 180" ) 98 | { 99 | std::complex e( 0.63, 0 ); 100 | CHECK_EQ( round( safd::sph_arm( 0, 2, M_PI, M_PI ).real() * 100.0 ) / 100.0, e.real() ); 101 | CHECK_EQ( round( safd::sph_arm( 0, 2, M_PI, M_PI ).imag() * 100.0 ) / 100.0, e.imag() ); 102 | } 103 | SUBCASE( "Testing for m == 0, l == 2 and Theta = 30" ) 104 | { 105 | std::complex e_2( 0.39, 0 ); 106 | CHECK_EQ( round( safd::sph_arm( 0, 2, M_PI/6, M_PI ).real() * 100.0 ) / 100.0, e_2.real() ); 107 | CHECK_EQ( round( safd::sph_arm( 0, 2, M_PI/6, M_PI ).imag() * 100.0 ) / 100.0, e_2.imag() ); 108 | } 109 | SUBCASE( "Testing for m == 1, l == 1, Theta = 30 and Phi = 60" ) 110 | { 111 | std::complex f( -0.09, -0.15 ); 112 | CHECK_EQ( round( safd::sph_arm( 1, 1, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, f.real() ); 113 | CHECK_EQ( round( safd::sph_arm( 1, 1, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, f.imag() ); 114 | } 115 | SUBCASE( "Testing for m == -1, l == 1, Theta = 30 and Phi = 60" ) 116 | { 117 | std::complex f_n( 0.09, -0.15 ); 118 | CHECK_EQ( round( safd::sph_arm( -1, 1, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, f_n.real() ); 119 | CHECK_EQ( round( safd::sph_arm( -1, 1, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, f_n.imag() ); 120 | } 121 | SUBCASE( "Testing for m == 2, l == 2, Theta = 30 and Phi = 60" ) 122 | { 123 | std::complex g( -0.05, 0.08 ); 124 | CHECK_EQ( round( safd::sph_arm( 2, 2, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, g.real() ); 125 | CHECK_EQ( round( safd::sph_arm( 2, 2, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, g.imag() ); 126 | } 127 | SUBCASE( "Testing for m == 3, l == 4, Theta = 30 and Phi = 60" ) 128 | { 129 | std::complex h( 0.14, 0 ); 130 | CHECK_EQ( round( safd::sph_arm( 3, 4, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, h.real() ); 131 | CHECK_EQ( round( safd::sph_arm( 3, 4, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, h.imag() ); 132 | } 133 | 134 | SUBCASE( "Testing for m == 5, l == 5, Theta = 30 and Phi = 60" ) 135 | { 136 | std::complex i( -0.01, 0.01 ); 137 | CHECK_EQ( round( safd::sph_arm( 5, 5, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, i.real() ); 138 | CHECK_EQ( round( safd::sph_arm( 5, 5, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, i.imag() ); 139 | } 140 | SUBCASE( "Testing for m == 4, l == 5, Theta = 30 and Phi = 60" ) 141 | { 142 | std::complex j( -0.04, -0.07 ); 143 | CHECK_EQ( round( safd::sph_arm( 4, 5, M_PI/6, M_PI/3 ).real() * 100.0 ) / 100.0, j.real() ); 144 | CHECK_EQ( round( safd::sph_arm( 4, 5, M_PI/6, M_PI/3 ).imag() * 100.0 ) / 100.0, j.imag() ); 145 | } 146 | SUBCASE( "Testing exceptions" ) 147 | { 148 | CHECK_THROWS_AS( safd::sph_arm( 7, 2, M_PI/6, M_PI/3), std::runtime_error ); 149 | CHECK_THROWS_AS( safd::sph_arm( 1, -1, M_PI/6, M_PI/3), std::runtime_error ); 150 | CHECK_THROWS_AS( safd::sph_arm( -6, 5, M_PI/6, M_PI/3), std::runtime_error ); 151 | } 152 | } 153 | 154 | //============================================ 155 | // "parsed_f" function testing 156 | //============================================ 157 | TEST_CASE( "Testing the parsed_f function" ) // 100% working 158 | { 159 | CHECK_EQ( safd::parsed_f( "th + phi", 1, 2 ), 3 ); 160 | CHECK_EQ( safd::parsed_f( "cos( th ) - sin( phi )", M_PI, M_PI/2 ), -2 ); 161 | CHECK_EQ( safd::parsed_f( "3*( cos( th ) - sin( phi ) )", M_PI, M_PI/2 ), -6 ); 162 | 163 | double p = safd::parsed_f( "3*( cos( th ) - sin( phi ) )", M_PI, M_PI/2 ); 164 | CHECK_EQ( p, -6 ); 165 | } 166 | 167 | //============================================ 168 | // "f_theta_phi" function testing 169 | //============================================ 170 | TEST_CASE( "Testing the f_theta_phi function" ) // 100% working 171 | { 172 | CHECK_EQ( round( safd::f_theta_phi_real( "cos( th ) - sin( phi )", 1, 1, M_PI/6, M_PI/4 ) * 10000.0 ) / 10000.0, -0.0097 ); 173 | CHECK_EQ( round( safd::f_theta_phi_imag( "cos( th ) - sin( phi )", 1, 1, M_PI/6, M_PI/4 ) * 10000.0 ) / 10000.0, 0.0097 ); 174 | 175 | CHECK_EQ( round( safd::f_theta_phi_real( "sin( th ) + cos( phi )", 1, 1, M_PI/6, M_PI/3 ) * 1000.0 ) / 1000.0, -0.043 ); 176 | CHECK_EQ( round( safd::f_theta_phi_imag( "sin( th ) + cos( phi )", 1, 1, M_PI/6, M_PI/3 ) * 1000.0 ) / 1000.0, 0.075 ); 177 | } 178 | 179 | //============================================ 180 | // "f_m_l" function testing 181 | //============================================ 182 | TEST_CASE( "Testing the f_m_l function" ) 183 | { 184 | SUBCASE( "Testing for m = 0" ) 185 | { 186 | CHECK_EQ( round( safd::f_m_l( "cos( th )", 0, 0 ).real() * 100.0 ) / 100.0, 0.0 ); 187 | CHECK_EQ( round( safd::f_m_l( "cos( th )", 0, 0 ).imag() * 100.0 ) / 100.0, 0.0 ); 188 | 189 | CHECK( agr::IsInBounds( safd::f_m_l( "cos( th )", 0, 1 ).real(), 2.04, 2.065 ) ); 190 | CHECK_EQ( round( safd::f_m_l( "cos( th )", 0, 1 ).imag() * 100.0 ) / 100.0, 0.0 ); 191 | 192 | CHECK( agr::IsInBounds( safd::f_m_l( "pow( cos( th ), 3 )", 0, 1 ).real(), 1.21, 1.24 ) ); 193 | CHECK_EQ( round( safd::f_m_l( "pow( cos( th ), 3 )", 0, 1 ).imag() * 100.0 ) / 100.0, 0.0 ); 194 | } 195 | SUBCASE( "Testing for m > 0" ) 196 | { 197 | //No calculators ara available on the web to test this case, but if all the previous tests worked, 198 | //since this depends on the other one, this should work as well. 199 | } 200 | } -------------------------------------------------------------------------------- /src/functions.cpp: -------------------------------------------------------------------------------- 1 | //============================================ 2 | // Headers 3 | //============================================ 4 | 5 | //My headers 6 | #include "../include/utils.hpp" 7 | #include "../include/functions.hpp" 8 | 9 | //Extra headers 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //STD headers 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | namespace safd 23 | { 24 | //============================================ 25 | // "Leg_pol" function definition 26 | //============================================ 27 | /** 28 | * @brief Function used to calculate Legendre polynomials with index "a" and variable "x". 29 | * 30 | * @param a Index of Legendre polynomials. 31 | * @param x The variable of the polynomials. 32 | * @return double The Legendre polynomial value in point x for an index a. 33 | */ 34 | double Leg_pol( const int& a, const double& x ) 35 | { 36 | if( a == 0 ) return 1.0; 37 | else if( a == 1 ) return x; 38 | else if( a < 0 ) 39 | { 40 | throw std::runtime_error( "\033[31mLegendre polynomials index should be greater or equal than 0!\033[0m" ); 41 | } 42 | else 43 | { 44 | const double first_term = ( 2.0 * static_cast( a ) - 1.0) * x * Leg_pol( a-1, x ); 45 | const double second_term = ( static_cast( a ) - 1.0 ) * Leg_pol( a-2, x ); 46 | const double diff = ( first_term - second_term ) / static_cast( a ); 47 | 48 | return diff; 49 | } 50 | } 51 | 52 | //============================================ 53 | // "Leg_func" function definition 54 | //============================================ 55 | /** 56 | * @brief Function used to calculate Legendre associated functions with indexes "a" and "b" and variable "x". NB: works well until m = l and | m - l | = 1. 57 | * 58 | * @param b Index of Legendre function. 59 | * @param a Index of Legendre function. 60 | * @param x Variable value of Legendre function. 61 | * @return double Legendre function for indexes a and b in a point x. 62 | */ 63 | double Leg_func( const int& b, const int& a, const double& x ) 64 | { 65 | if( x < -1 || x > 1 ) throw std::runtime_error( "\033[31mLegendre associated functions variable should lie in interval [-1,1]!\033[0m" ); 66 | else 67 | { 68 | if( a < abs( b ) ) throw std::runtime_error( "\033[31mLegendre associated function indexes a and b should satisfy the relation: a >= b >= 0\033[0m" ); 69 | else 70 | { 71 | const double first_term = pow( ( 1 - (x * x) ), static_cast( b ) * 0.5 ); 72 | const double second_term = n_derivative( Leg_pol, x, a, b ); 73 | 74 | return pow( -1, b ) * first_term * second_term; 75 | } 76 | } 77 | } 78 | 79 | //============================================ 80 | // "sph_arm" function definition 81 | //============================================ 82 | /** 83 | * @brief Function used to calculate spherical harmonics functions with indexes "m" and "l" and variables "theta" and "phi". NB: in the calculator, pi = 3.14, theta = 180. 84 | * 85 | * @param m Function index. 86 | * @param l Function index. 87 | * @param theta Angular variable. 88 | * @param phi Angular variable. 89 | * @return std::complex Spherical harmonics value for m and l coefficients in theta and phi values. 90 | */ 91 | std::complex sph_arm( const int& m, const int& l, const double& theta, const double& phi ) 92 | { 93 | if( abs( m ) > l || l < 0 ) throw std::runtime_error( "\033[31mQuantum numbers l and m should satisfy the relation: l >= abs(m) >= 0\033[0m" ); 94 | else 95 | { 96 | const double sign_1 = pow( -1, ( m + abs( m ) ) * 0.5 ); 97 | const double dividedFactorial = [ l, m ] 98 | { 99 | double result = 1; 100 | const int multmin = l - abs( m ) + 1; 101 | const int multmax = l + abs( m ); 102 | for( int currval = multmin; currval <= multmax ; ++currval ) 103 | { 104 | result *= currval; 105 | }; 106 | return result; 107 | }(); 108 | const double sign_2 = reciprocalPi * sqrt( ( 2*l + 1 ) / dividedFactorial ); 109 | const double pol = Leg_func( abs( m ), l, cos( theta ) ); 110 | std::complex result ( sign_1 * sign_2 * pol * cos( m*( phi + M_PI ) ), sign_1 * sign_2 * pol * sin( m*( phi + M_PI ) ) ); 111 | 112 | return result; 113 | } 114 | } 115 | 116 | //============================================ 117 | // "parsed_f" function definition 118 | //============================================ 119 | /** 120 | * @brief Function f(theta,phi) obtained with parsing. 121 | * 122 | * @param expr Expression to be parsed into a function. 123 | * @param theta Variable of the function. 124 | * @param phi Variable of the function. 125 | * @return double Parsed function. 126 | */ 127 | double parsed_f( const std::string& expr, double theta, double phi ) 128 | { 129 | exprtk::rtl::io::file::package fileio_package; 130 | 131 | exprtk::symbol_table symbol_table; 132 | symbol_table.add_variable( "th", theta ); 133 | symbol_table.add_variable( "phi", phi ); 134 | 135 | exprtk::expression expression; 136 | expression.register_symbol_table( symbol_table ); 137 | 138 | exprtk::parser parser; 139 | if ( !parser.compile( expr, expression ) ) 140 | { 141 | throw std::runtime_error( "\033[31mError in the inserted expression!\033[0m" ); 142 | } 143 | 144 | return expression.value(); 145 | } 146 | 147 | //============================================ 148 | // "f_theta_phi" function definition 149 | //============================================ 150 | /** 151 | * @brief This function defines: f(theta,phi) * conjugate( sph_arm(m,l,theta,phi) ) * sin(theta). 152 | * 153 | * @param expr Expression to be parsed. 154 | * @param m Coefficient of the function. 155 | * @param l Coefficient of the function. 156 | * @param theta Angular variable of the function. 157 | * @param phi Angular variable of the function. 158 | * @return double Expression value. 159 | */ 160 | double f_theta_phi_real( const std::string& expr, const int& m, const int& l, const double& theta, const double& phi ) 161 | { 162 | return parsed_f( expr, theta, phi ) * sin( theta ) * sph_arm( m, l, theta, phi ).real(); 163 | } 164 | 165 | double f_theta_phi_imag( const std::string& expr, const int& m, const int& l, const double& theta, const double& phi ) 166 | { 167 | return parsed_f( expr, theta, phi ) * sin( theta ) * conj( sph_arm( m, l, theta, phi ) ).imag(); 168 | } 169 | 170 | //============================================ 171 | // "f_m_l" function definition 172 | //============================================ 173 | /** 174 | * @brief This function returns the final f_m_l coefficients. 175 | * 176 | * @param expr Expression to be parsed. 177 | * @param m Coefficient of the expression. 178 | * @param l Coefficient of the expression. 179 | * @return std::complex Coefficient f_m_l value. 180 | */ 181 | std::complex f_m_l( const std::string& expr, const int& m, const int& l ) 182 | { 183 | const double real_part = integral( f_theta_phi_real, expr, m, l ); 184 | const double imag_part = integral( f_theta_phi_imag, expr, m, l ); 185 | std::complex coefficient; 186 | coefficient.real( real_part ); 187 | coefficient.imag( imag_part ); 188 | 189 | return coefficient; 190 | } 191 | 192 | //============================================ 193 | // "plotter" function definition 194 | //============================================ 195 | /** 196 | * @brief Function used to plot the user-inserted function, which development coefficients are computed. 197 | * 198 | * @param func The expression representing the function. 199 | */ 200 | void plotter( const std::string& func ) 201 | { 202 | bool is_th = func.find( "th" ) != std::string::npos && func.find( "phi" ) == std::string::npos; 203 | bool is_phi = func.find( "phi" ) != std::string::npos && func.find( "th" ) == std::string::npos; 204 | 205 | if ( is_th || is_phi ) 206 | { 207 | std::cout << "\n"; 208 | 209 | // Preparing the canvas 210 | osm::Plot2DCanvas plot_2d_canvas( 60, 20 ); 211 | plot_2d_canvas.setBackground( ' ', osm::feat( osm::col, "bg white" ) ); 212 | plot_2d_canvas.enableFrame( true ); 213 | plot_2d_canvas.setFrame( osm::FrameStyle::BOX, osm::feat( osm::col, "bg white" ) + osm::feat( osm::col, "black" ) ); 214 | plot_2d_canvas.enableFrame( true ); 215 | plot_2d_canvas.setFrame( osm::FrameStyle::BOX, osm::feat( osm::col, "bg white" ) + osm::feat( osm::col, "black" ) ); 216 | plot_2d_canvas.setScale( 1/3.14, 0.2 ); 217 | 218 | //Functions settings 219 | std::string func_th_style = osm::feat( osm::col, "bg white" ) + osm::feat( osm::col, "bd red" ); 220 | std::string func_phi_style = osm::feat( osm::col, "bg white" ) + osm::feat( osm::col, "bd blue" ); 221 | char func_th_marker = 'X'; 222 | char func_phi_marker = 'O'; 223 | std::function func_th = [ &func ]( double th ) -> double{ return parsed_f( func, th, M_PI ); }; 224 | std::function func_phi = [ &func ]( double phi ) -> double{ return parsed_f( func, M_PI, phi ); }; 225 | 226 | //Drawing the functions 227 | for( float i = 0; i < 70; i++ ) 228 | { 229 | plot_2d_canvas.setOffset( i/3.14/1.8, -2 ); 230 | plot_2d_canvas.clear(); 231 | if ( is_th ) plot_2d_canvas.draw( func_th, func_th_marker, func_th_style ); 232 | else if ( is_phi ) plot_2d_canvas.draw( func_phi, func_phi_marker, func_phi_style ); 233 | plot_2d_canvas.refresh(); 234 | } 235 | } 236 | } 237 | 238 | //============================================ 239 | // "displayer" function definition 240 | //============================================ 241 | /** 242 | * @brief Function used to display the final result of the main program. NB: used in main program only. 243 | * 244 | * @param equation Mathematical equation. 245 | * @param m Equation coefficient. 246 | * @param l Equation coefficient. 247 | */ 248 | void displayer( const std::string& equation, const int& m, const int& l ) 249 | { 250 | try 251 | { 252 | std::cout << "f(" << m << "," << l << ") = " 253 | << osm::feat( osm::col, "green" ) << f_m_l( equation, m, l ).real() << osm::feat( osm::rst, "color" ) << " + " 254 | << osm::feat( osm::col, "green" ) << f_m_l( equation, m, l ).imag() << osm::feat( osm::rst, "color" ) 255 | << osm::feat( osm::col, "lt blue" ) << "i" << osm::feat( osm::rst, "color" ) << "\n"; 256 | } 257 | catch( std::runtime_error const & exception ) 258 | { 259 | std::cerr << osm::feat( osm::sty, "italics" ) << osm::feat( osm::col, "red" ) << "not computable!" 260 | << osm::feat( osm::rst, "all" ) << "\n\n" << exception.what() << "\n"; 261 | } 262 | } 263 | } -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.17 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a double hash (##) is considered a comment and is placed in 7 | # front of the TAG it is preceding. 8 | # 9 | # All text after a single hash (#) is considered a comment and will be ignored. 10 | # The format is: 11 | # TAG = value [value, ...] 12 | # For lists, items can also be appended using: 13 | # TAG += value [value, ...] 14 | # Values that contain spaces should be placed between quotes (\" \"). 15 | 16 | #--------------------------------------------------------------------------- 17 | # Project related configuration options 18 | #--------------------------------------------------------------------------- 19 | 20 | # This tag specifies the encoding used for all characters in the configuration 21 | # file that follow. The default is UTF-8 which is also the encoding used for all 22 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 23 | # iconv built into libc) for the transcoding. See 24 | # https://www.gnu.org/software/libiconv/ for the list of possible encodings. 25 | # The default value is: UTF-8. 26 | 27 | DOXYFILE_ENCODING = UTF-8 28 | 29 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by 30 | # double-quotes, unless you are using Doxywizard) that should identify the 31 | # project for which the documentation is generated. This name is used in the 32 | # title of most generated pages and in a few other places. 33 | # The default value is: My Project. 34 | 35 | PROJECT_NAME = "SAFD-algorithm" 36 | 37 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. This 38 | # could be handy for archiving the generated documentation or if some version 39 | # control system is used. 40 | 41 | PROJECT_NUMBER = 42 | 43 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 44 | # for a project that appears at the top of each page and should give viewer a 45 | # quick idea about the purpose of the project. Keep the description short. 46 | 47 | PROJECT_BRIEF = "An algorithm to compute the coefficients of a function development in a spherical harmonics convergent series." 48 | 49 | # With the PROJECT_LOGO tag one can specify a logo or an icon that is included 50 | # in the documentation. The maximum height of the logo should not exceed 55 51 | # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy 52 | # the logo to the output directory. 53 | 54 | PROJECT_LOGO = img/logo.svg 55 | 56 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path 57 | # into which the generated documentation will be written. If a relative path is 58 | # entered, it will be relative to the location where doxygen was started. If 59 | # left blank the current directory will be used. 60 | 61 | OUTPUT_DIRECTORY = docs 62 | 63 | # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- 64 | # directories (in 2 levels) under the output directory of each output format and 65 | # will distribute the generated files over these directories. Enabling this 66 | # option can be useful when feeding doxygen a huge amount of source files, where 67 | # putting all generated files in the same directory would otherwise causes 68 | # performance problems for the file system. 69 | # The default value is: NO. 70 | 71 | CREATE_SUBDIRS = NO 72 | 73 | # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII 74 | # characters to appear in the names of generated files. If set to NO, non-ASCII 75 | # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode 76 | # U+3044. 77 | # The default value is: NO. 78 | 79 | ALLOW_UNICODE_NAMES = NO 80 | 81 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 82 | # documentation generated by doxygen is written. Doxygen will use this 83 | # information to generate all constant output in the proper language. 84 | # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, 85 | # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), 86 | # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, 87 | # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), 88 | # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, 89 | # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, 90 | # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, 91 | # Ukrainian and Vietnamese. 92 | # The default value is: English. 93 | 94 | OUTPUT_LANGUAGE = English 95 | 96 | # The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all 97 | # documentation generated by doxygen is written. Doxygen will use this 98 | # information to generate all generated output in the proper direction. 99 | # Possible values are: None, LTR, RTL and Context. 100 | # The default value is: None. 101 | 102 | OUTPUT_TEXT_DIRECTION = None 103 | 104 | # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member 105 | # descriptions after the members that are listed in the file and class 106 | # documentation (similar to Javadoc). Set to NO to disable this. 107 | # The default value is: YES. 108 | 109 | BRIEF_MEMBER_DESC = YES 110 | 111 | # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief 112 | # description of a member or function before the detailed description 113 | # 114 | # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 115 | # brief descriptions will be completely suppressed. 116 | # The default value is: YES. 117 | 118 | REPEAT_BRIEF = YES 119 | 120 | # This tag implements a quasi-intelligent brief description abbreviator that is 121 | # used to form the text in various listings. Each string in this list, if found 122 | # as the leading text of the brief description, will be stripped from the text 123 | # and the result, after processing the whole list, is used as the annotated 124 | # text. Otherwise, the brief description is used as-is. If left blank, the 125 | # following values are used ($name is automatically replaced with the name of 126 | # the entity):The $name class, The $name widget, The $name file, is, provides, 127 | # specifies, contains, represents, a, an and the. 128 | 129 | ABBREVIATE_BRIEF = "The $name class" \ 130 | "The $name widget" \ 131 | "The $name file" \ 132 | is \ 133 | provides \ 134 | specifies \ 135 | contains \ 136 | represents \ 137 | a \ 138 | an \ 139 | the 140 | 141 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 142 | # doxygen will generate a detailed section even if there is only a brief 143 | # description. 144 | # The default value is: NO. 145 | 146 | ALWAYS_DETAILED_SEC = NO 147 | 148 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 149 | # inherited members of a class in the documentation of that class as if those 150 | # members were ordinary class members. Constructors, destructors and assignment 151 | # operators of the base classes will not be shown. 152 | # The default value is: NO. 153 | 154 | INLINE_INHERITED_MEMB = NO 155 | 156 | # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path 157 | # before files name in the file list and in the header files. If set to NO the 158 | # shortest path that makes the file name unique will be used 159 | # The default value is: YES. 160 | 161 | FULL_PATH_NAMES = YES 162 | 163 | # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. 164 | # Stripping is only done if one of the specified strings matches the left-hand 165 | # part of the path. The tag can be used to show relative paths in the file list. 166 | # If left blank the directory from which doxygen is run is used as the path to 167 | # strip. 168 | # 169 | # Note that you can specify absolute paths here, but also relative paths, which 170 | # will be relative from the directory where doxygen is started. 171 | # This tag requires that the tag FULL_PATH_NAMES is set to YES. 172 | 173 | STRIP_FROM_PATH = 174 | 175 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the 176 | # path mentioned in the documentation of a class, which tells the reader which 177 | # header file to include in order to use a class. If left blank only the name of 178 | # the header file containing the class definition is used. Otherwise one should 179 | # specify the list of include paths that are normally passed to the compiler 180 | # using the -I flag. 181 | 182 | STRIP_FROM_INC_PATH = 183 | 184 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but 185 | # less readable) file names. This can be useful is your file systems doesn't 186 | # support long names like on DOS, Mac, or CD-ROM. 187 | # The default value is: NO. 188 | 189 | SHORT_NAMES = NO 190 | 191 | # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the 192 | # first line (until the first dot) of a Javadoc-style comment as the brief 193 | # description. If set to NO, the Javadoc-style will behave just like regular Qt- 194 | # style comments (thus requiring an explicit @brief command for a brief 195 | # description.) 196 | # The default value is: NO. 197 | 198 | JAVADOC_AUTOBRIEF = NO 199 | 200 | # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line 201 | # such as 202 | # /*************** 203 | # as being the beginning of a Javadoc-style comment "banner". If set to NO, the 204 | # Javadoc-style will behave just like regular comments and it will not be 205 | # interpreted by doxygen. 206 | # The default value is: NO. 207 | 208 | JAVADOC_BANNER = NO 209 | 210 | # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first 211 | # line (until the first dot) of a Qt-style comment as the brief description. If 212 | # set to NO, the Qt-style will behave just like regular Qt-style comments (thus 213 | # requiring an explicit \brief command for a brief description.) 214 | # The default value is: NO. 215 | 216 | QT_AUTOBRIEF = NO 217 | 218 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a 219 | # multi-line C++ special comment block (i.e. a block of //! or /// comments) as 220 | # a brief description. This used to be the default behavior. The new default is 221 | # to treat a multi-line C++ comment block as a detailed description. Set this 222 | # tag to YES if you prefer the old behavior instead. 223 | # 224 | # Note that setting this tag to YES also means that rational rose comments are 225 | # not recognized any more. 226 | # The default value is: NO. 227 | 228 | MULTILINE_CPP_IS_BRIEF = NO 229 | 230 | # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the 231 | # documentation from any documented member that it re-implements. 232 | # The default value is: YES. 233 | 234 | INHERIT_DOCS = YES 235 | 236 | # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new 237 | # page for each member. If set to NO, the documentation of a member will be part 238 | # of the file/class/namespace that contains it. 239 | # The default value is: NO. 240 | 241 | SEPARATE_MEMBER_PAGES = NO 242 | 243 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen 244 | # uses this value to replace tabs by spaces in code fragments. 245 | # Minimum value: 1, maximum value: 16, default value: 4. 246 | 247 | TAB_SIZE = 4 248 | 249 | # This tag can be used to specify a number of aliases that act as commands in 250 | # the documentation. An alias has the form: 251 | # name=value 252 | # For example adding 253 | # "sideeffect=@par Side Effects:\n" 254 | # will allow you to put the command \sideeffect (or @sideeffect) in the 255 | # documentation, which will result in a user-defined paragraph with heading 256 | # "Side Effects:". You can put \n's in the value part of an alias to insert 257 | # newlines (in the resulting output). You can put ^^ in the value part of an 258 | # alias to insert a newline as if a physical newline was in the original file. 259 | # When you need a literal { or } or , in the value part of an alias you have to 260 | # escape them by means of a backslash (\), this can lead to conflicts with the 261 | # commands \{ and \} for these it is advised to use the version @{ and @} or use 262 | # a double escape (\\{ and \\}) 263 | 264 | ALIASES = 265 | 266 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 267 | # A mapping has the form "name=value". For example adding "class=itcl::class" 268 | # will allow you to use the command class in the itcl::class meaning. 269 | 270 | TCL_SUBST = 271 | 272 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 273 | # only. Doxygen will then generate output that is more tailored for C. For 274 | # instance, some of the names that are used will be different. The list of all 275 | # members will be omitted, etc. 276 | # The default value is: NO. 277 | 278 | OPTIMIZE_OUTPUT_FOR_C = NO 279 | 280 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or 281 | # Python sources only. Doxygen will then generate output that is more tailored 282 | # for that language. For instance, namespaces will be presented as packages, 283 | # qualified scopes will look different, etc. 284 | # The default value is: NO. 285 | 286 | OPTIMIZE_OUTPUT_JAVA = NO 287 | 288 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 289 | # sources. Doxygen will then generate output that is tailored for Fortran. 290 | # The default value is: NO. 291 | 292 | OPTIMIZE_FOR_FORTRAN = NO 293 | 294 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 295 | # sources. Doxygen will then generate output that is tailored for VHDL. 296 | # The default value is: NO. 297 | 298 | OPTIMIZE_OUTPUT_VHDL = NO 299 | 300 | # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice 301 | # sources only. Doxygen will then generate output that is more tailored for that 302 | # language. For instance, namespaces will be presented as modules, types will be 303 | # separated into more groups, etc. 304 | # The default value is: NO. 305 | 306 | OPTIMIZE_OUTPUT_SLICE = NO 307 | 308 | # Doxygen selects the parser to use depending on the extension of the files it 309 | # parses. With this tag you can assign which parser to use for a given 310 | # extension. Doxygen has a built-in mapping, but you can override or extend it 311 | # using this tag. The format is ext=language, where ext is a file extension, and 312 | # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, 313 | # Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, 314 | # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: 315 | # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser 316 | # tries to guess whether the code is fixed or free formatted code, this is the 317 | # default for Fortran type files), VHDL, tcl. For instance to make doxygen treat 318 | # .inc files as Fortran files (default is PHP), and .f files as C (default is 319 | # Fortran), use: inc=Fortran f=C. 320 | # 321 | # Note: For files without extension you can use no_extension as a placeholder. 322 | # 323 | # Note that for custom extensions you also need to set FILE_PATTERNS otherwise 324 | # the files are not read by doxygen. 325 | 326 | EXTENSION_MAPPING = 327 | 328 | # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments 329 | # according to the Markdown format, which allows for more readable 330 | # documentation. See https://daringfireball.net/projects/markdown/ for details. 331 | # The output of markdown processing is further processed by doxygen, so you can 332 | # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in 333 | # case of backward compatibilities issues. 334 | # The default value is: YES. 335 | 336 | MARKDOWN_SUPPORT = YES 337 | 338 | # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up 339 | # to that level are automatically included in the table of contents, even if 340 | # they do not have an id attribute. 341 | # Note: This feature currently applies only to Markdown headings. 342 | # Minimum value: 0, maximum value: 99, default value: 5. 343 | # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. 344 | 345 | TOC_INCLUDE_HEADINGS = 5 346 | 347 | # When enabled doxygen tries to link words that correspond to documented 348 | # classes, or namespaces to their corresponding documentation. Such a link can 349 | # be prevented in individual cases by putting a % sign in front of the word or 350 | # globally by setting AUTOLINK_SUPPORT to NO. 351 | # The default value is: YES. 352 | 353 | AUTOLINK_SUPPORT = YES 354 | 355 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 356 | # to include (a tag file for) the STL sources as input, then you should set this 357 | # tag to YES in order to let doxygen match functions declarations and 358 | # definitions whose arguments contain STL classes (e.g. func(std::string); 359 | # versus func(std::string) {}). This also make the inheritance and collaboration 360 | # diagrams that involve STL classes more complete and accurate. 361 | # The default value is: NO. 362 | 363 | BUILTIN_STL_SUPPORT = NO 364 | 365 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 366 | # enable parsing support. 367 | # The default value is: NO. 368 | 369 | CPP_CLI_SUPPORT = NO 370 | 371 | # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: 372 | # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen 373 | # will parse them like normal C++ but will assume all classes use public instead 374 | # of private inheritance when no explicit protection keyword is present. 375 | # The default value is: NO. 376 | 377 | SIP_SUPPORT = NO 378 | 379 | # For Microsoft's IDL there are propget and propput attributes to indicate 380 | # getter and setter methods for a property. Setting this option to YES will make 381 | # doxygen to replace the get and set methods by a property in the documentation. 382 | # This will only work if the methods are indeed getting or setting a simple 383 | # type. If this is not the case, or you want to show the methods anyway, you 384 | # should set this option to NO. 385 | # The default value is: YES. 386 | 387 | IDL_PROPERTY_SUPPORT = YES 388 | 389 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 390 | # tag is set to YES then doxygen will reuse the documentation of the first 391 | # member in the group (if any) for the other members of the group. By default 392 | # all members of a group must be documented explicitly. 393 | # The default value is: NO. 394 | 395 | DISTRIBUTE_GROUP_DOC = NO 396 | 397 | # If one adds a struct or class to a group and this option is enabled, then also 398 | # any nested class or struct is added to the same group. By default this option 399 | # is disabled and one has to add nested compounds explicitly via \ingroup. 400 | # The default value is: NO. 401 | 402 | GROUP_NESTED_COMPOUNDS = NO 403 | 404 | # Set the SUBGROUPING tag to YES to allow class member groups of the same type 405 | # (for instance a group of public functions) to be put as a subgroup of that 406 | # type (e.g. under the Public Functions section). Set it to NO to prevent 407 | # subgrouping. Alternatively, this can be done per class using the 408 | # \nosubgrouping command. 409 | # The default value is: YES. 410 | 411 | SUBGROUPING = YES 412 | 413 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions 414 | # are shown inside the group in which they are included (e.g. using \ingroup) 415 | # instead of on a separate page (for HTML and Man pages) or section (for LaTeX 416 | # and RTF). 417 | # 418 | # Note that this feature does not work in combination with 419 | # SEPARATE_MEMBER_PAGES. 420 | # The default value is: NO. 421 | 422 | INLINE_GROUPED_CLASSES = NO 423 | 424 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions 425 | # with only public data fields or simple typedef fields will be shown inline in 426 | # the documentation of the scope in which they are defined (i.e. file, 427 | # namespace, or group documentation), provided this scope is documented. If set 428 | # to NO, structs, classes, and unions are shown on a separate page (for HTML and 429 | # Man pages) or section (for LaTeX and RTF). 430 | # The default value is: NO. 431 | 432 | INLINE_SIMPLE_STRUCTS = NO 433 | 434 | # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or 435 | # enum is documented as struct, union, or enum with the name of the typedef. So 436 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 437 | # with name TypeT. When disabled the typedef will appear as a member of a file, 438 | # namespace, or class. And the struct will be named TypeS. This can typically be 439 | # useful for C code in case the coding convention dictates that all compound 440 | # types are typedef'ed and only the typedef is referenced, never the tag name. 441 | # The default value is: NO. 442 | 443 | TYPEDEF_HIDES_STRUCT = NO 444 | 445 | # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This 446 | # cache is used to resolve symbols given their name and scope. Since this can be 447 | # an expensive process and often the same symbol appears multiple times in the 448 | # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small 449 | # doxygen will become slower. If the cache is too large, memory is wasted. The 450 | # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range 451 | # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 452 | # symbols. At the end of a run doxygen will report the cache usage and suggest 453 | # the optimal cache size from a speed point of view. 454 | # Minimum value: 0, maximum value: 9, default value: 0. 455 | 456 | LOOKUP_CACHE_SIZE = 0 457 | 458 | #--------------------------------------------------------------------------- 459 | # Build related configuration options 460 | #--------------------------------------------------------------------------- 461 | 462 | # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in 463 | # documentation are documented, even if no documentation was available. Private 464 | # class members and static file members will be hidden unless the 465 | # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. 466 | # Note: This will also disable the warnings about undocumented members that are 467 | # normally produced when WARNINGS is set to YES. 468 | # The default value is: NO. 469 | 470 | EXTRACT_ALL = YES 471 | 472 | # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will 473 | # be included in the documentation. 474 | # The default value is: NO. 475 | 476 | EXTRACT_PRIVATE = NO 477 | 478 | # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual 479 | # methods of a class will be included in the documentation. 480 | # The default value is: NO. 481 | 482 | EXTRACT_PRIV_VIRTUAL = NO 483 | 484 | # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal 485 | # scope will be included in the documentation. 486 | # The default value is: NO. 487 | 488 | EXTRACT_PACKAGE = NO 489 | 490 | # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be 491 | # included in the documentation. 492 | # The default value is: NO. 493 | 494 | EXTRACT_STATIC = NO 495 | 496 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined 497 | # locally in source files will be included in the documentation. If set to NO, 498 | # only classes defined in header files are included. Does not have any effect 499 | # for Java sources. 500 | # The default value is: YES. 501 | 502 | EXTRACT_LOCAL_CLASSES = YES 503 | 504 | # This flag is only useful for Objective-C code. If set to YES, local methods, 505 | # which are defined in the implementation section but not in the interface are 506 | # included in the documentation. If set to NO, only methods in the interface are 507 | # included. 508 | # The default value is: NO. 509 | 510 | EXTRACT_LOCAL_METHODS = NO 511 | 512 | # If this flag is set to YES, the members of anonymous namespaces will be 513 | # extracted and appear in the documentation as a namespace called 514 | # 'anonymous_namespace{file}', where file will be replaced with the base name of 515 | # the file that contains the anonymous namespace. By default anonymous namespace 516 | # are hidden. 517 | # The default value is: NO. 518 | 519 | EXTRACT_ANON_NSPACES = NO 520 | 521 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all 522 | # undocumented members inside documented classes or files. If set to NO these 523 | # members will be included in the various overviews, but no documentation 524 | # section is generated. This option has no effect if EXTRACT_ALL is enabled. 525 | # The default value is: NO. 526 | 527 | HIDE_UNDOC_MEMBERS = NO 528 | 529 | # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all 530 | # undocumented classes that are normally visible in the class hierarchy. If set 531 | # to NO, these classes will be included in the various overviews. This option 532 | # has no effect if EXTRACT_ALL is enabled. 533 | # The default value is: NO. 534 | 535 | HIDE_UNDOC_CLASSES = NO 536 | 537 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend 538 | # declarations. If set to NO, these declarations will be included in the 539 | # documentation. 540 | # The default value is: NO. 541 | 542 | HIDE_FRIEND_COMPOUNDS = NO 543 | 544 | # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any 545 | # documentation blocks found inside the body of a function. If set to NO, these 546 | # blocks will be appended to the function's detailed documentation block. 547 | # The default value is: NO. 548 | 549 | HIDE_IN_BODY_DOCS = NO 550 | 551 | # The INTERNAL_DOCS tag determines if documentation that is typed after a 552 | # \internal command is included. If the tag is set to NO then the documentation 553 | # will be excluded. Set it to YES to include the internal documentation. 554 | # The default value is: NO. 555 | 556 | INTERNAL_DOCS = NO 557 | 558 | # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file 559 | # names in lower-case letters. If set to YES, upper-case letters are also 560 | # allowed. This is useful if you have classes or files whose names only differ 561 | # in case and if your file system supports case sensitive file names. Windows 562 | # (including Cygwin) ands Mac users are advised to set this option to NO. 563 | # The default value is: system dependent. 564 | 565 | CASE_SENSE_NAMES = YES 566 | 567 | # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with 568 | # their full class and namespace scopes in the documentation. If set to YES, the 569 | # scope will be hidden. 570 | # The default value is: NO. 571 | 572 | HIDE_SCOPE_NAMES = NO 573 | 574 | # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will 575 | # append additional text to a page's title, such as Class Reference. If set to 576 | # YES the compound reference will be hidden. 577 | # The default value is: NO. 578 | 579 | HIDE_COMPOUND_REFERENCE= NO 580 | 581 | # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of 582 | # the files that are included by a file in the documentation of that file. 583 | # The default value is: YES. 584 | 585 | SHOW_INCLUDE_FILES = YES 586 | 587 | # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each 588 | # grouped member an include statement to the documentation, telling the reader 589 | # which file to include in order to use the member. 590 | # The default value is: NO. 591 | 592 | SHOW_GROUPED_MEMB_INC = NO 593 | 594 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include 595 | # files with double quotes in the documentation rather than with sharp brackets. 596 | # The default value is: NO. 597 | 598 | FORCE_LOCAL_INCLUDES = NO 599 | 600 | # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the 601 | # documentation for inline members. 602 | # The default value is: YES. 603 | 604 | INLINE_INFO = YES 605 | 606 | # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the 607 | # (detailed) documentation of file and class members alphabetically by member 608 | # name. If set to NO, the members will appear in declaration order. 609 | # The default value is: YES. 610 | 611 | SORT_MEMBER_DOCS = YES 612 | 613 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief 614 | # descriptions of file, namespace and class members alphabetically by member 615 | # name. If set to NO, the members will appear in declaration order. Note that 616 | # this will also influence the order of the classes in the class list. 617 | # The default value is: NO. 618 | 619 | SORT_BRIEF_DOCS = NO 620 | 621 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the 622 | # (brief and detailed) documentation of class members so that constructors and 623 | # destructors are listed first. If set to NO the constructors will appear in the 624 | # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. 625 | # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief 626 | # member documentation. 627 | # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting 628 | # detailed member documentation. 629 | # The default value is: NO. 630 | 631 | SORT_MEMBERS_CTORS_1ST = NO 632 | 633 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy 634 | # of group names into alphabetical order. If set to NO the group names will 635 | # appear in their defined order. 636 | # The default value is: NO. 637 | 638 | SORT_GROUP_NAMES = NO 639 | 640 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by 641 | # fully-qualified names, including namespaces. If set to NO, the class list will 642 | # be sorted only by class name, not including the namespace part. 643 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 644 | # Note: This option applies only to the class list, not to the alphabetical 645 | # list. 646 | # The default value is: NO. 647 | 648 | SORT_BY_SCOPE_NAME = NO 649 | 650 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper 651 | # type resolution of all parameters of a function it will reject a match between 652 | # the prototype and the implementation of a member function even if there is 653 | # only one candidate or it is obvious which candidate to choose by doing a 654 | # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still 655 | # accept a match between prototype and implementation in such cases. 656 | # The default value is: NO. 657 | 658 | STRICT_PROTO_MATCHING = NO 659 | 660 | # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo 661 | # list. This list is created by putting \todo commands in the documentation. 662 | # The default value is: YES. 663 | 664 | GENERATE_TODOLIST = YES 665 | 666 | # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test 667 | # list. This list is created by putting \test commands in the documentation. 668 | # The default value is: YES. 669 | 670 | GENERATE_TESTLIST = YES 671 | 672 | # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug 673 | # list. This list is created by putting \bug commands in the documentation. 674 | # The default value is: YES. 675 | 676 | GENERATE_BUGLIST = YES 677 | 678 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) 679 | # the deprecated list. This list is created by putting \deprecated commands in 680 | # the documentation. 681 | # The default value is: YES. 682 | 683 | GENERATE_DEPRECATEDLIST= YES 684 | 685 | # The ENABLED_SECTIONS tag can be used to enable conditional documentation 686 | # sections, marked by \if ... \endif and \cond 687 | # ... \endcond blocks. 688 | 689 | ENABLED_SECTIONS = 690 | 691 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the 692 | # initial value of a variable or macro / define can have for it to appear in the 693 | # documentation. If the initializer consists of more lines than specified here 694 | # it will be hidden. Use a value of 0 to hide initializers completely. The 695 | # appearance of the value of individual variables and macros / defines can be 696 | # controlled using \showinitializer or \hideinitializer command in the 697 | # documentation regardless of this setting. 698 | # Minimum value: 0, maximum value: 10000, default value: 30. 699 | 700 | MAX_INITIALIZER_LINES = 30 701 | 702 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at 703 | # the bottom of the documentation of classes and structs. If set to YES, the 704 | # list will mention the files that were used to generate the documentation. 705 | # The default value is: YES. 706 | 707 | SHOW_USED_FILES = YES 708 | 709 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This 710 | # will remove the Files entry from the Quick Index and from the Folder Tree View 711 | # (if specified). 712 | # The default value is: YES. 713 | 714 | SHOW_FILES = YES 715 | 716 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces 717 | # page. This will remove the Namespaces entry from the Quick Index and from the 718 | # Folder Tree View (if specified). 719 | # The default value is: YES. 720 | 721 | SHOW_NAMESPACES = YES 722 | 723 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 724 | # doxygen should invoke to get the current version for each file (typically from 725 | # the version control system). Doxygen will invoke the program by executing (via 726 | # popen()) the command command input-file, where command is the value of the 727 | # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided 728 | # by doxygen. Whatever the program writes to standard output is used as the file 729 | # version. For an example see the documentation. 730 | 731 | FILE_VERSION_FILTER = 732 | 733 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 734 | # by doxygen. The layout file controls the global structure of the generated 735 | # output files in an output format independent way. To create the layout file 736 | # that represents doxygen's defaults, run doxygen with the -l option. You can 737 | # optionally specify a file name after the option, if omitted DoxygenLayout.xml 738 | # will be used as the name of the layout file. 739 | # 740 | # Note that if you run doxygen from a directory containing a file called 741 | # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE 742 | # tag is left empty. 743 | 744 | LAYOUT_FILE = 745 | 746 | # The CITE_BIB_FILES tag can be used to specify one or more bib files containing 747 | # the reference definitions. This must be a list of .bib files. The .bib 748 | # extension is automatically appended if omitted. This requires the bibtex tool 749 | # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. 750 | # For LaTeX the style of the bibliography can be controlled using 751 | # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the 752 | # search path. See also \cite for info how to create references. 753 | 754 | CITE_BIB_FILES = 755 | 756 | #--------------------------------------------------------------------------- 757 | # Configuration options related to warning and progress messages 758 | #--------------------------------------------------------------------------- 759 | 760 | # The QUIET tag can be used to turn on/off the messages that are generated to 761 | # standard output by doxygen. If QUIET is set to YES this implies that the 762 | # messages are off. 763 | # The default value is: NO. 764 | 765 | QUIET = NO 766 | 767 | # The WARNINGS tag can be used to turn on/off the warning messages that are 768 | # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES 769 | # this implies that the warnings are on. 770 | # 771 | # Tip: Turn warnings on while writing the documentation. 772 | # The default value is: YES. 773 | 774 | WARNINGS = YES 775 | 776 | # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate 777 | # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag 778 | # will automatically be disabled. 779 | # The default value is: YES. 780 | 781 | WARN_IF_UNDOCUMENTED = YES 782 | 783 | # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for 784 | # potential errors in the documentation, such as not documenting some parameters 785 | # in a documented function, or documenting parameters that don't exist or using 786 | # markup commands wrongly. 787 | # The default value is: YES. 788 | 789 | WARN_IF_DOC_ERROR = YES 790 | 791 | # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that 792 | # are documented, but have no documentation for their parameters or return 793 | # value. If set to NO, doxygen will only warn about wrong or incomplete 794 | # parameter documentation, but not about the absence of documentation. If 795 | # EXTRACT_ALL is set to YES then this flag will automatically be disabled. 796 | # The default value is: NO. 797 | 798 | WARN_NO_PARAMDOC = NO 799 | 800 | # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when 801 | # a warning is encountered. 802 | # The default value is: NO. 803 | 804 | WARN_AS_ERROR = NO 805 | 806 | # The WARN_FORMAT tag determines the format of the warning messages that doxygen 807 | # can produce. The string should contain the $file, $line, and $text tags, which 808 | # will be replaced by the file and line number from which the warning originated 809 | # and the warning text. Optionally the format may contain $version, which will 810 | # be replaced by the version of the file (if it could be obtained via 811 | # FILE_VERSION_FILTER) 812 | # The default value is: $file:$line: $text. 813 | 814 | WARN_FORMAT = "$file:$line: $text" 815 | 816 | # The WARN_LOGFILE tag can be used to specify a file to which warning and error 817 | # messages should be written. If left blank the output is written to standard 818 | # error (stderr). 819 | 820 | WARN_LOGFILE = 821 | 822 | #--------------------------------------------------------------------------- 823 | # Configuration options related to the input files 824 | #--------------------------------------------------------------------------- 825 | 826 | # The INPUT tag is used to specify the files and/or directories that contain 827 | # documented source files. You may enter file names like myfile.cpp or 828 | # directories like /usr/src/myproject. Separate the files or directories with 829 | # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING 830 | # Note: If this tag is empty the current directory is searched. 831 | 832 | INPUT = src include 833 | 834 | # This tag can be used to specify the character encoding of the source files 835 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses 836 | # libiconv (or the iconv built into libc) for the transcoding. See the libiconv 837 | # documentation (see: https://www.gnu.org/software/libiconv/) for the list of 838 | # possible encodings. 839 | # The default value is: UTF-8. 840 | 841 | INPUT_ENCODING = UTF-8 842 | 843 | # If the value of the INPUT tag contains directories, you can use the 844 | # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and 845 | # *.h) to filter out the source-files in the directories. 846 | # 847 | # Note that for custom extensions or not directly supported extensions you also 848 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 849 | # read by doxygen. 850 | # 851 | # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, 852 | # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, 853 | # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, 854 | # *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), 855 | # *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen 856 | # C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, 857 | # *.vhdl, *.ucf, *.qsf and *.ice. 858 | 859 | FILE_PATTERNS = *.c \ 860 | *.cc \ 861 | *.cxx \ 862 | *.cpp \ 863 | *.c++ \ 864 | *.java \ 865 | *.ii \ 866 | *.ixx \ 867 | *.ipp \ 868 | *.i++ \ 869 | *.inl \ 870 | *.idl \ 871 | *.ddl \ 872 | *.odl \ 873 | *.h \ 874 | *.hh \ 875 | *.hxx \ 876 | *.hpp \ 877 | *.h++ \ 878 | *.cs \ 879 | *.d \ 880 | *.php \ 881 | *.php4 \ 882 | *.php5 \ 883 | *.phtml \ 884 | *.inc \ 885 | *.m \ 886 | *.markdown \ 887 | *.md \ 888 | *.mm \ 889 | *.dox \ 890 | *.doc \ 891 | *.txt \ 892 | *.py \ 893 | *.pyw \ 894 | *.f90 \ 895 | *.f95 \ 896 | *.f03 \ 897 | *.f08 \ 898 | *.f \ 899 | *.for \ 900 | *.tcl \ 901 | *.vhd \ 902 | *.vhdl \ 903 | *.ucf \ 904 | *.qsf \ 905 | *.ice 906 | 907 | # The RECURSIVE tag can be used to specify whether or not subdirectories should 908 | # be searched for input files as well. 909 | # The default value is: NO. 910 | 911 | RECURSIVE = YES 912 | 913 | # The EXCLUDE tag can be used to specify files and/or directories that should be 914 | # excluded from the INPUT source files. This way you can easily exclude a 915 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 916 | # 917 | # Note that relative paths are relative to the directory from which doxygen is 918 | # run. 919 | 920 | EXCLUDE = src/main.cpp 921 | 922 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 923 | # directories that are symbolic links (a Unix file system feature) are excluded 924 | # from the input. 925 | # The default value is: NO. 926 | 927 | EXCLUDE_SYMLINKS = NO 928 | 929 | # If the value of the INPUT tag contains directories, you can use the 930 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 931 | # certain files from those directories. 932 | # 933 | # Note that the wildcards are matched against the file with absolute path, so to 934 | # exclude all test directories for example use the pattern */test/* 935 | 936 | EXCLUDE_PATTERNS = 937 | 938 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 939 | # (namespaces, classes, functions, etc.) that should be excluded from the 940 | # output. The symbol name can be a fully qualified name, a word, or if the 941 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 942 | # AClass::ANamespace, ANamespace::*Test 943 | # 944 | # Note that the wildcards are matched against the file with absolute path, so to 945 | # exclude all test directories use the pattern */test/* 946 | 947 | EXCLUDE_SYMBOLS = 948 | 949 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories 950 | # that contain example code fragments that are included (see the \include 951 | # command). 952 | 953 | EXAMPLE_PATH = 954 | 955 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 956 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and 957 | # *.h) to filter out the source-files in the directories. If left blank all 958 | # files are included. 959 | 960 | EXAMPLE_PATTERNS = * 961 | 962 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 963 | # searched for input files to be used with the \include or \dontinclude commands 964 | # irrespective of the value of the RECURSIVE tag. 965 | # The default value is: NO. 966 | 967 | EXAMPLE_RECURSIVE = NO 968 | 969 | # The IMAGE_PATH tag can be used to specify one or more files or directories 970 | # that contain images that are to be included in the documentation (see the 971 | # \image command). 972 | 973 | IMAGE_PATH = img 974 | 975 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 976 | # invoke to filter for each input file. Doxygen will invoke the filter program 977 | # by executing (via popen()) the command: 978 | # 979 | # 980 | # 981 | # where is the value of the INPUT_FILTER tag, and is the 982 | # name of an input file. Doxygen will then use the output that the filter 983 | # program writes to standard output. If FILTER_PATTERNS is specified, this tag 984 | # will be ignored. 985 | # 986 | # Note that the filter must not add or remove lines; it is applied before the 987 | # code is scanned, but not when the output code is generated. If lines are added 988 | # or removed, the anchors will not be placed correctly. 989 | # 990 | # Note that for custom extensions or not directly supported extensions you also 991 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 992 | # properly processed by doxygen. 993 | 994 | INPUT_FILTER = 995 | 996 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 997 | # basis. Doxygen will compare the file name with each pattern and apply the 998 | # filter if there is a match. The filters are a list of the form: pattern=filter 999 | # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how 1000 | # filters are used. If the FILTER_PATTERNS tag is empty or if none of the 1001 | # patterns match the file name, INPUT_FILTER is applied. 1002 | # 1003 | # Note that for custom extensions or not directly supported extensions you also 1004 | # need to set EXTENSION_MAPPING for the extension otherwise the files are not 1005 | # properly processed by doxygen. 1006 | 1007 | FILTER_PATTERNS = 1008 | 1009 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 1010 | # INPUT_FILTER) will also be used to filter the input files that are used for 1011 | # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). 1012 | # The default value is: NO. 1013 | 1014 | FILTER_SOURCE_FILES = NO 1015 | 1016 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 1017 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and 1018 | # it is also possible to disable source filtering for a specific pattern using 1019 | # *.ext= (so without naming a filter). 1020 | # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. 1021 | 1022 | FILTER_SOURCE_PATTERNS = 1023 | 1024 | # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that 1025 | # is part of the input, its contents will be placed on the main page 1026 | # (index.html). This can be useful if you have a project on for instance GitHub 1027 | # and want to reuse the introduction page also for the doxygen output. 1028 | 1029 | USE_MDFILE_AS_MAINPAGE = 1030 | 1031 | #--------------------------------------------------------------------------- 1032 | # Configuration options related to source browsing 1033 | #--------------------------------------------------------------------------- 1034 | 1035 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will be 1036 | # generated. Documented entities will be cross-referenced with these sources. 1037 | # 1038 | # Note: To get rid of all source code in the generated output, make sure that 1039 | # also VERBATIM_HEADERS is set to NO. 1040 | # The default value is: NO. 1041 | 1042 | SOURCE_BROWSER = NO 1043 | 1044 | # Setting the INLINE_SOURCES tag to YES will include the body of functions, 1045 | # classes and enums directly into the documentation. 1046 | # The default value is: NO. 1047 | 1048 | INLINE_SOURCES = NO 1049 | 1050 | # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any 1051 | # special comment blocks from generated source code fragments. Normal C, C++ and 1052 | # Fortran comments will always remain visible. 1053 | # The default value is: YES. 1054 | 1055 | STRIP_CODE_COMMENTS = YES 1056 | 1057 | # If the REFERENCED_BY_RELATION tag is set to YES then for each documented 1058 | # entity all documented functions referencing it will be listed. 1059 | # The default value is: NO. 1060 | 1061 | REFERENCED_BY_RELATION = NO 1062 | 1063 | # If the REFERENCES_RELATION tag is set to YES then for each documented function 1064 | # all documented entities called/used by that function will be listed. 1065 | # The default value is: NO. 1066 | 1067 | REFERENCES_RELATION = NO 1068 | 1069 | # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set 1070 | # to YES then the hyperlinks from functions in REFERENCES_RELATION and 1071 | # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will 1072 | # link to the documentation. 1073 | # The default value is: YES. 1074 | 1075 | REFERENCES_LINK_SOURCE = YES 1076 | 1077 | # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the 1078 | # source code will show a tooltip with additional information such as prototype, 1079 | # brief description and links to the definition and documentation. Since this 1080 | # will make the HTML file larger and loading of large files a bit slower, you 1081 | # can opt to disable this feature. 1082 | # The default value is: YES. 1083 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1084 | 1085 | SOURCE_TOOLTIPS = YES 1086 | 1087 | # If the USE_HTAGS tag is set to YES then the references to source code will 1088 | # point to the HTML generated by the htags(1) tool instead of doxygen built-in 1089 | # source browser. The htags tool is part of GNU's global source tagging system 1090 | # (see https://www.gnu.org/software/global/global.html). You will need version 1091 | # 4.8.6 or higher. 1092 | # 1093 | # To use it do the following: 1094 | # - Install the latest version of global 1095 | # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file 1096 | # - Make sure the INPUT points to the root of the source tree 1097 | # - Run doxygen as normal 1098 | # 1099 | # Doxygen will invoke htags (and that will in turn invoke gtags), so these 1100 | # tools must be available from the command line (i.e. in the search path). 1101 | # 1102 | # The result: instead of the source browser generated by doxygen, the links to 1103 | # source code will now point to the output of htags. 1104 | # The default value is: NO. 1105 | # This tag requires that the tag SOURCE_BROWSER is set to YES. 1106 | 1107 | USE_HTAGS = NO 1108 | 1109 | # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a 1110 | # verbatim copy of the header file for each class for which an include is 1111 | # specified. Set to NO to disable this. 1112 | # See also: Section \class. 1113 | # The default value is: YES. 1114 | 1115 | VERBATIM_HEADERS = YES 1116 | 1117 | # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the 1118 | # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the 1119 | # cost of reduced performance. This can be particularly helpful with template 1120 | # rich C++ code for which doxygen's built-in parser lacks the necessary type 1121 | # information. 1122 | # Note: The availability of this option depends on whether or not doxygen was 1123 | # generated with the -Duse_libclang=ON option for CMake. 1124 | # The default value is: NO. 1125 | 1126 | CLANG_ASSISTED_PARSING = NO 1127 | 1128 | # If clang assisted parsing is enabled you can provide the compiler with command 1129 | # line options that you would normally use when invoking the compiler. Note that 1130 | # the include paths will already be set by doxygen for the files and directories 1131 | # specified with INPUT and INCLUDE_PATH. 1132 | # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. 1133 | 1134 | CLANG_OPTIONS = 1135 | 1136 | # If clang assisted parsing is enabled you can provide the clang parser with the 1137 | # path to the compilation database (see: 1138 | # http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files 1139 | # were built. This is equivalent to specifying the "-p" option to a clang tool, 1140 | # such as clang-check. These options will then be passed to the parser. 1141 | # Note: The availability of this option depends on whether or not doxygen was 1142 | # generated with the -Duse_libclang=ON option for CMake. 1143 | 1144 | CLANG_DATABASE_PATH = 1145 | 1146 | #--------------------------------------------------------------------------- 1147 | # Configuration options related to the alphabetical class index 1148 | #--------------------------------------------------------------------------- 1149 | 1150 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all 1151 | # compounds will be generated. Enable this if the project contains a lot of 1152 | # classes, structs, unions or interfaces. 1153 | # The default value is: YES. 1154 | 1155 | ALPHABETICAL_INDEX = YES 1156 | 1157 | # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in 1158 | # which the alphabetical index list will be split. 1159 | # Minimum value: 1, maximum value: 20, default value: 5. 1160 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1161 | 1162 | COLS_IN_ALPHA_INDEX = 5 1163 | 1164 | # In case all classes in a project start with a common prefix, all classes will 1165 | # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag 1166 | # can be used to specify a prefix (or a list of prefixes) that should be ignored 1167 | # while generating the index headers. 1168 | # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. 1169 | 1170 | IGNORE_PREFIX = 1171 | 1172 | #--------------------------------------------------------------------------- 1173 | # Configuration options related to the HTML output 1174 | #--------------------------------------------------------------------------- 1175 | 1176 | # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output 1177 | # The default value is: YES. 1178 | 1179 | GENERATE_HTML = YES 1180 | 1181 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a 1182 | # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of 1183 | # it. 1184 | # The default directory is: html. 1185 | # This tag requires that the tag GENERATE_HTML is set to YES. 1186 | 1187 | HTML_OUTPUT = . 1188 | 1189 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each 1190 | # generated HTML page (for example: .htm, .php, .asp). 1191 | # The default value is: .html. 1192 | # This tag requires that the tag GENERATE_HTML is set to YES. 1193 | 1194 | HTML_FILE_EXTENSION = .html 1195 | 1196 | # The HTML_HEADER tag can be used to specify a user-defined HTML header file for 1197 | # each generated HTML page. If the tag is left blank doxygen will generate a 1198 | # standard header. 1199 | # 1200 | # To get valid HTML the header file that includes any scripts and style sheets 1201 | # that doxygen needs, which is dependent on the configuration options used (e.g. 1202 | # the setting GENERATE_TREEVIEW). It is highly recommended to start with a 1203 | # default header using 1204 | # doxygen -w html new_header.html new_footer.html new_stylesheet.css 1205 | # YourConfigFile 1206 | # and then modify the file new_header.html. See also section "Doxygen usage" 1207 | # for information on how to generate the default header that doxygen normally 1208 | # uses. 1209 | # Note: The header is subject to change so you typically have to regenerate the 1210 | # default header when upgrading to a newer version of doxygen. For a description 1211 | # of the possible markers and block names see the documentation. 1212 | # This tag requires that the tag GENERATE_HTML is set to YES. 1213 | 1214 | HTML_HEADER = 1215 | 1216 | # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each 1217 | # generated HTML page. If the tag is left blank doxygen will generate a standard 1218 | # footer. See HTML_HEADER for more information on how to generate a default 1219 | # footer and what special commands can be used inside the footer. See also 1220 | # section "Doxygen usage" for information on how to generate the default footer 1221 | # that doxygen normally uses. 1222 | # This tag requires that the tag GENERATE_HTML is set to YES. 1223 | 1224 | HTML_FOOTER = 1225 | 1226 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style 1227 | # sheet that is used by each HTML page. It can be used to fine-tune the look of 1228 | # the HTML output. If left blank doxygen will generate a default style sheet. 1229 | # See also section "Doxygen usage" for information on how to generate the style 1230 | # sheet that doxygen normally uses. 1231 | # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as 1232 | # it is more robust and this tag (HTML_STYLESHEET) will in the future become 1233 | # obsolete. 1234 | # This tag requires that the tag GENERATE_HTML is set to YES. 1235 | 1236 | HTML_STYLESHEET = 1237 | 1238 | # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined 1239 | # cascading style sheets that are included after the standard style sheets 1240 | # created by doxygen. Using this option one can overrule certain style aspects. 1241 | # This is preferred over using HTML_STYLESHEET since it does not replace the 1242 | # standard style sheet and is therefore more robust against future updates. 1243 | # Doxygen will copy the style sheet files to the output directory. 1244 | # Note: The order of the extra style sheet files is of importance (e.g. the last 1245 | # style sheet in the list overrules the setting of the previous ones in the 1246 | # list). For an example see the documentation. 1247 | # This tag requires that the tag GENERATE_HTML is set to YES. 1248 | 1249 | HTML_EXTRA_STYLESHEET = 1250 | 1251 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 1252 | # other source files which should be copied to the HTML output directory. Note 1253 | # that these files will be copied to the base HTML output directory. Use the 1254 | # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 1255 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that the 1256 | # files will be copied as-is; there are no commands or markers available. 1257 | # This tag requires that the tag GENERATE_HTML is set to YES. 1258 | 1259 | HTML_EXTRA_FILES = 1260 | 1261 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen 1262 | # will adjust the colors in the style sheet and background images according to 1263 | # this color. Hue is specified as an angle on a colorwheel, see 1264 | # https://en.wikipedia.org/wiki/Hue for more information. For instance the value 1265 | # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 1266 | # purple, and 360 is red again. 1267 | # Minimum value: 0, maximum value: 359, default value: 220. 1268 | # This tag requires that the tag GENERATE_HTML is set to YES. 1269 | 1270 | HTML_COLORSTYLE_HUE = 220 1271 | 1272 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors 1273 | # in the HTML output. For a value of 0 the output will use grayscales only. A 1274 | # value of 255 will produce the most vivid colors. 1275 | # Minimum value: 0, maximum value: 255, default value: 100. 1276 | # This tag requires that the tag GENERATE_HTML is set to YES. 1277 | 1278 | HTML_COLORSTYLE_SAT = 100 1279 | 1280 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the 1281 | # luminance component of the colors in the HTML output. Values below 100 1282 | # gradually make the output lighter, whereas values above 100 make the output 1283 | # darker. The value divided by 100 is the actual gamma applied, so 80 represents 1284 | # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not 1285 | # change the gamma. 1286 | # Minimum value: 40, maximum value: 240, default value: 80. 1287 | # This tag requires that the tag GENERATE_HTML is set to YES. 1288 | 1289 | HTML_COLORSTYLE_GAMMA = 80 1290 | 1291 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 1292 | # page will contain the date and time when the page was generated. Setting this 1293 | # to YES can help to show when doxygen was last run and thus if the 1294 | # documentation is up to date. 1295 | # The default value is: NO. 1296 | # This tag requires that the tag GENERATE_HTML is set to YES. 1297 | 1298 | HTML_TIMESTAMP = NO 1299 | 1300 | # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML 1301 | # documentation will contain a main index with vertical navigation menus that 1302 | # are dynamically created via JavaScript. If disabled, the navigation index will 1303 | # consists of multiple levels of tabs that are statically embedded in every HTML 1304 | # page. Disable this option to support browsers that do not have JavaScript, 1305 | # like the Qt help browser. 1306 | # The default value is: YES. 1307 | # This tag requires that the tag GENERATE_HTML is set to YES. 1308 | 1309 | HTML_DYNAMIC_MENUS = YES 1310 | 1311 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 1312 | # documentation will contain sections that can be hidden and shown after the 1313 | # page has loaded. 1314 | # The default value is: NO. 1315 | # This tag requires that the tag GENERATE_HTML is set to YES. 1316 | 1317 | HTML_DYNAMIC_SECTIONS = NO 1318 | 1319 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries 1320 | # shown in the various tree structured indices initially; the user can expand 1321 | # and collapse entries dynamically later on. Doxygen will expand the tree to 1322 | # such a level that at most the specified number of entries are visible (unless 1323 | # a fully collapsed tree already exceeds this amount). So setting the number of 1324 | # entries 1 will produce a full collapsed tree by default. 0 is a special value 1325 | # representing an infinite number of entries and will result in a full expanded 1326 | # tree by default. 1327 | # Minimum value: 0, maximum value: 9999, default value: 100. 1328 | # This tag requires that the tag GENERATE_HTML is set to YES. 1329 | 1330 | HTML_INDEX_NUM_ENTRIES = 100 1331 | 1332 | # If the GENERATE_DOCSET tag is set to YES, additional index files will be 1333 | # generated that can be used as input for Apple's Xcode 3 integrated development 1334 | # environment (see: https://developer.apple.com/xcode/), introduced with OSX 1335 | # 10.5 (Leopard). To create a documentation set, doxygen will generate a 1336 | # Makefile in the HTML output directory. Running make will produce the docset in 1337 | # that directory and running make install will install the docset in 1338 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at 1339 | # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy 1340 | # genXcode/_index.html for more information. 1341 | # The default value is: NO. 1342 | # This tag requires that the tag GENERATE_HTML is set to YES. 1343 | 1344 | GENERATE_DOCSET = NO 1345 | 1346 | # This tag determines the name of the docset feed. A documentation feed provides 1347 | # an umbrella under which multiple documentation sets from a single provider 1348 | # (such as a company or product suite) can be grouped. 1349 | # The default value is: Doxygen generated docs. 1350 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1351 | 1352 | DOCSET_FEEDNAME = "Doxygen generated docs" 1353 | 1354 | # This tag specifies a string that should uniquely identify the documentation 1355 | # set bundle. This should be a reverse domain-name style string, e.g. 1356 | # com.mycompany.MyDocSet. Doxygen will append .docset to the name. 1357 | # The default value is: org.doxygen.Project. 1358 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1359 | 1360 | DOCSET_BUNDLE_ID = org.doxygen.Project 1361 | 1362 | # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify 1363 | # the documentation publisher. This should be a reverse domain-name style 1364 | # string, e.g. com.mycompany.MyDocSet.documentation. 1365 | # The default value is: org.doxygen.Publisher. 1366 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1367 | 1368 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1369 | 1370 | # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. 1371 | # The default value is: Publisher. 1372 | # This tag requires that the tag GENERATE_DOCSET is set to YES. 1373 | 1374 | DOCSET_PUBLISHER_NAME = Publisher 1375 | 1376 | # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three 1377 | # additional HTML index files: index.hhp, index.hhc, and index.hhk. The 1378 | # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop 1379 | # (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on 1380 | # Windows. 1381 | # 1382 | # The HTML Help Workshop contains a compiler that can convert all HTML output 1383 | # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML 1384 | # files are now used as the Windows 98 help format, and will replace the old 1385 | # Windows help format (.hlp) on all Windows platforms in the future. Compressed 1386 | # HTML files also contain an index, a table of contents, and you can search for 1387 | # words in the documentation. The HTML workshop also contains a viewer for 1388 | # compressed HTML files. 1389 | # The default value is: NO. 1390 | # This tag requires that the tag GENERATE_HTML is set to YES. 1391 | 1392 | GENERATE_HTMLHELP = NO 1393 | 1394 | # The CHM_FILE tag can be used to specify the file name of the resulting .chm 1395 | # file. You can add a path in front of the file if the result should not be 1396 | # written to the html output directory. 1397 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1398 | 1399 | CHM_FILE = 1400 | 1401 | # The HHC_LOCATION tag can be used to specify the location (absolute path 1402 | # including file name) of the HTML help compiler (hhc.exe). If non-empty, 1403 | # doxygen will try to run the HTML help compiler on the generated index.hhp. 1404 | # The file has to be specified with full path. 1405 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1406 | 1407 | HHC_LOCATION = 1408 | 1409 | # The GENERATE_CHI flag controls if a separate .chi index file is generated 1410 | # (YES) or that it should be included in the master .chm file (NO). 1411 | # The default value is: NO. 1412 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1413 | 1414 | GENERATE_CHI = NO 1415 | 1416 | # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) 1417 | # and project file content. 1418 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1419 | 1420 | CHM_INDEX_ENCODING = 1421 | 1422 | # The BINARY_TOC flag controls whether a binary table of contents is generated 1423 | # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it 1424 | # enables the Previous and Next buttons. 1425 | # The default value is: NO. 1426 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1427 | 1428 | BINARY_TOC = NO 1429 | 1430 | # The TOC_EXPAND flag can be set to YES to add extra items for group members to 1431 | # the table of contents of the HTML help documentation and to the tree view. 1432 | # The default value is: NO. 1433 | # This tag requires that the tag GENERATE_HTMLHELP is set to YES. 1434 | 1435 | TOC_EXPAND = NO 1436 | 1437 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1438 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that 1439 | # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help 1440 | # (.qch) of the generated HTML documentation. 1441 | # The default value is: NO. 1442 | # This tag requires that the tag GENERATE_HTML is set to YES. 1443 | 1444 | GENERATE_QHP = NO 1445 | 1446 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify 1447 | # the file name of the resulting .qch file. The path specified is relative to 1448 | # the HTML output folder. 1449 | # This tag requires that the tag GENERATE_QHP is set to YES. 1450 | 1451 | QCH_FILE = 1452 | 1453 | # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help 1454 | # Project output. For more information please see Qt Help Project / Namespace 1455 | # (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). 1456 | # The default value is: org.doxygen.Project. 1457 | # This tag requires that the tag GENERATE_QHP is set to YES. 1458 | 1459 | QHP_NAMESPACE = org.doxygen.Project 1460 | 1461 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt 1462 | # Help Project output. For more information please see Qt Help Project / Virtual 1463 | # Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- 1464 | # folders). 1465 | # The default value is: doc. 1466 | # This tag requires that the tag GENERATE_QHP is set to YES. 1467 | 1468 | QHP_VIRTUAL_FOLDER = doc 1469 | 1470 | # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom 1471 | # filter to add. For more information please see Qt Help Project / Custom 1472 | # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- 1473 | # filters). 1474 | # This tag requires that the tag GENERATE_QHP is set to YES. 1475 | 1476 | QHP_CUST_FILTER_NAME = 1477 | 1478 | # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the 1479 | # custom filter to add. For more information please see Qt Help Project / Custom 1480 | # Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- 1481 | # filters). 1482 | # This tag requires that the tag GENERATE_QHP is set to YES. 1483 | 1484 | QHP_CUST_FILTER_ATTRS = 1485 | 1486 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1487 | # project's filter section matches. Qt Help Project / Filter Attributes (see: 1488 | # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). 1489 | # This tag requires that the tag GENERATE_QHP is set to YES. 1490 | 1491 | QHP_SECT_FILTER_ATTRS = 1492 | 1493 | # The QHG_LOCATION tag can be used to specify the location of Qt's 1494 | # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the 1495 | # generated .qhp file. 1496 | # This tag requires that the tag GENERATE_QHP is set to YES. 1497 | 1498 | QHG_LOCATION = 1499 | 1500 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be 1501 | # generated, together with the HTML files, they form an Eclipse help plugin. To 1502 | # install this plugin and make it available under the help contents menu in 1503 | # Eclipse, the contents of the directory containing the HTML and XML files needs 1504 | # to be copied into the plugins directory of eclipse. The name of the directory 1505 | # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. 1506 | # After copying Eclipse needs to be restarted before the help appears. 1507 | # The default value is: NO. 1508 | # This tag requires that the tag GENERATE_HTML is set to YES. 1509 | 1510 | GENERATE_ECLIPSEHELP = NO 1511 | 1512 | # A unique identifier for the Eclipse help plugin. When installing the plugin 1513 | # the directory name containing the HTML and XML files should also have this 1514 | # name. Each documentation set should have its own identifier. 1515 | # The default value is: org.doxygen.Project. 1516 | # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. 1517 | 1518 | ECLIPSE_DOC_ID = org.doxygen.Project 1519 | 1520 | # If you want full control over the layout of the generated HTML pages it might 1521 | # be necessary to disable the index and replace it with your own. The 1522 | # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top 1523 | # of each HTML page. A value of NO enables the index and the value YES disables 1524 | # it. Since the tabs in the index contain the same information as the navigation 1525 | # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. 1526 | # The default value is: NO. 1527 | # This tag requires that the tag GENERATE_HTML is set to YES. 1528 | 1529 | DISABLE_INDEX = NO 1530 | 1531 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1532 | # structure should be generated to display hierarchical information. If the tag 1533 | # value is set to YES, a side panel will be generated containing a tree-like 1534 | # index structure (just like the one that is generated for HTML Help). For this 1535 | # to work a browser that supports JavaScript, DHTML, CSS and frames is required 1536 | # (i.e. any modern browser). Windows users are probably better off using the 1537 | # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can 1538 | # further fine-tune the look of the index. As an example, the default style 1539 | # sheet generated by doxygen has an example that shows how to put an image at 1540 | # the root of the tree instead of the PROJECT_NAME. Since the tree basically has 1541 | # the same information as the tab index, you could consider setting 1542 | # DISABLE_INDEX to YES when enabling this option. 1543 | # The default value is: NO. 1544 | # This tag requires that the tag GENERATE_HTML is set to YES. 1545 | 1546 | GENERATE_TREEVIEW = NO 1547 | 1548 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that 1549 | # doxygen will group on one line in the generated HTML documentation. 1550 | # 1551 | # Note that a value of 0 will completely suppress the enum values from appearing 1552 | # in the overview section. 1553 | # Minimum value: 0, maximum value: 20, default value: 4. 1554 | # This tag requires that the tag GENERATE_HTML is set to YES. 1555 | 1556 | ENUM_VALUES_PER_LINE = 4 1557 | 1558 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used 1559 | # to set the initial width (in pixels) of the frame in which the tree is shown. 1560 | # Minimum value: 0, maximum value: 1500, default value: 250. 1561 | # This tag requires that the tag GENERATE_HTML is set to YES. 1562 | 1563 | TREEVIEW_WIDTH = 250 1564 | 1565 | # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to 1566 | # external symbols imported via tag files in a separate window. 1567 | # The default value is: NO. 1568 | # This tag requires that the tag GENERATE_HTML is set to YES. 1569 | 1570 | EXT_LINKS_IN_WINDOW = NO 1571 | 1572 | # Use this tag to change the font size of LaTeX formulas included as images in 1573 | # the HTML documentation. When you change the font size after a successful 1574 | # doxygen run you need to manually remove any form_*.png images from the HTML 1575 | # output directory to force them to be regenerated. 1576 | # Minimum value: 8, maximum value: 50, default value: 10. 1577 | # This tag requires that the tag GENERATE_HTML is set to YES. 1578 | 1579 | FORMULA_FONTSIZE = 10 1580 | 1581 | # Use the FORMULA_TRANSPARENT tag to determine whether or not the images 1582 | # generated for formulas are transparent PNGs. Transparent PNGs are not 1583 | # supported properly for IE 6.0, but are supported on all modern browsers. 1584 | # 1585 | # Note that when changing this option you need to delete any form_*.png files in 1586 | # the HTML output directory before the changes have effect. 1587 | # The default value is: YES. 1588 | # This tag requires that the tag GENERATE_HTML is set to YES. 1589 | 1590 | FORMULA_TRANSPARENT = YES 1591 | 1592 | # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands 1593 | # to create new LaTeX commands to be used in formulas as building blocks. See 1594 | # the section "Including formulas" for details. 1595 | 1596 | FORMULA_MACROFILE = 1597 | 1598 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see 1599 | # https://www.mathjax.org) which uses client side JavaScript for the rendering 1600 | # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX 1601 | # installed or if you want to formulas look prettier in the HTML output. When 1602 | # enabled you may also need to install MathJax separately and configure the path 1603 | # to it using the MATHJAX_RELPATH option. 1604 | # The default value is: NO. 1605 | # This tag requires that the tag GENERATE_HTML is set to YES. 1606 | 1607 | USE_MATHJAX = NO 1608 | 1609 | # When MathJax is enabled you can set the default output format to be used for 1610 | # the MathJax output. See the MathJax site (see: 1611 | # http://docs.mathjax.org/en/latest/output.html) for more details. 1612 | # Possible values are: HTML-CSS (which is slower, but has the best 1613 | # compatibility), NativeMML (i.e. MathML) and SVG. 1614 | # The default value is: HTML-CSS. 1615 | # This tag requires that the tag USE_MATHJAX is set to YES. 1616 | 1617 | MATHJAX_FORMAT = HTML-CSS 1618 | 1619 | # When MathJax is enabled you need to specify the location relative to the HTML 1620 | # output directory using the MATHJAX_RELPATH option. The destination directory 1621 | # should contain the MathJax.js script. For instance, if the mathjax directory 1622 | # is located at the same level as the HTML output directory, then 1623 | # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax 1624 | # Content Delivery Network so you can quickly see the result without installing 1625 | # MathJax. However, it is strongly recommended to install a local copy of 1626 | # MathJax from https://www.mathjax.org before deployment. 1627 | # The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. 1628 | # This tag requires that the tag USE_MATHJAX is set to YES. 1629 | 1630 | MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ 1631 | 1632 | # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax 1633 | # extension names that should be enabled during MathJax rendering. For example 1634 | # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols 1635 | # This tag requires that the tag USE_MATHJAX is set to YES. 1636 | 1637 | MATHJAX_EXTENSIONS = 1638 | 1639 | # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces 1640 | # of code that will be used on startup of the MathJax code. See the MathJax site 1641 | # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an 1642 | # example see the documentation. 1643 | # This tag requires that the tag USE_MATHJAX is set to YES. 1644 | 1645 | MATHJAX_CODEFILE = 1646 | 1647 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for 1648 | # the HTML output. The underlying search engine uses javascript and DHTML and 1649 | # should work on any modern browser. Note that when using HTML help 1650 | # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) 1651 | # there is already a search function so this one should typically be disabled. 1652 | # For large projects the javascript based search engine can be slow, then 1653 | # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to 1654 | # search using the keyboard; to jump to the search box use + S 1655 | # (what the is depends on the OS and browser, but it is typically 1656 | # , /