From 4e4ed54566117330f0c5e185c765da746e3b1ffe Mon Sep 17 00:00:00 2001 From: Markus Wess Date: Tue, 11 Jun 2024 13:48:45 +0200 Subject: [PATCH] Update documentation --- _sources/installation.md | 58 ++++++++++++++++++++++++++------ _sources/intro.md | 12 ++++++- installation.html | 71 ++++++++++++++++++++++++++++++++-------- intro.html | 6 +++- searchindex.js | 2 +- 5 files changed, 123 insertions(+), 26 deletions(-) diff --git a/_sources/installation.md b/_sources/installation.md index 333088b..67a486b 100644 --- a/_sources/installation.md +++ b/_sources/installation.md @@ -1,35 +1,73 @@ (installation)= # Installation +The `dualcellspaces` package is an add-on to the high-order finite element library [NGSolve](https://ngsolve.org). Thus the main premise is that a sufficiently recent version of [NGSolve](https://ngsolve.org) is installed beforehand. + ## Get NGSolve -The main premise is that a sufficiently recent version of [NGSolve](https://ngsolve.org) is already installed. If this is not the case the most simple way to install the packe is done using `pip` (the [python package installer](https://pypi.org/project/pip/)): +The most simple way to install the `NGSolve` is to use `pip` (the [python package installer](https://pypi.org/project/pip/)): ``` python -m pip install numpy scipy matplotlib jupyter ipyparallel scikit-build python -m pip install --upgrade --pre ngsolve webgui_jupyter_widgets ``` +For troubleshooting we refer to the various `NGSolve` installation tutorials [NGS24](https://docu.ngsolve.org/ngs24/intro.html) or the [NGSolve Documentation](https://docu.ngsolve.org/latest/). + +If you do not want to update or modify your `NGSolve` installation you might want to consider installing `NGSolve` and the `dualcellspaces` add on in a [virtual environment](https://docu.ngsolve.org/ngs24/intro.html#installing-parallel-ngsolve). ## Install the Dual Cell Method add-on -As the Dual Cell Method is not available in the core code of `NGSolve` the `dcm` add-on has to be installed. +As the Dual Cell Method is not available in the core code of `NGSolve` the `dualcellspaces` add-on has to be installed. ### Using pip The most simple way to install the add on is again to use `pip` via + +```` {tab-set} +```{tab-item} NGSolve pip installation + + if you have installed NGSolve via pip or binaries + + pip install git+https://github.com/NGSolve/dcm.git ``` -pip install git+https://github.com/NGSolve/dcm.git +```{tab-item} NGSolve built from sources + + if your NGSolve was built from sources + + python -m pip install scikit-build-core pybind11_stubgen + python -m pip install --no-build-isolation git+https://github.com/NGSolve/dcm.git ``` +```` -### Compiling the code +### Working with the code -Compiling the code may be done using +If you also want to have the sources of the `dualcellspaces` module available you may clone them using ``` git clone https://github.com/NGSolve/dcm.git -cd dcm -mkdir build -cd build -cmake .. -make -j4 install ``` + +Installation can be done either again using pip or building using `CMake` + +```` {tab-set} +``` {tab-item} pip + cd dcm + python -m pip install --no-build-isolation . +``` +``` {tab-item} CMake + cd dcm + mkdir build + cd build + cmake .. + make -j4 install +``` +```` + + +### Test the `dualcellspaces` installation + +Test whether the installation worked using +``` +python -m dualcellspaces.demos.dc_intrules +``` + diff --git a/_sources/intro.md b/_sources/intro.md index e00ea48..5031e69 100644 --- a/_sources/intro.md +++ b/_sources/intro.md @@ -1,9 +1,13 @@ # The Dual Cell Method in NGSolve -*M. Wess*, *J. Schöberl* +by *M. Wess*, *J. Schöberl* TU Wien, Institute of Analysis and Scientific Computing, +*based on joint work with B. Kapidani and L. Codecasa* + + +--- This book is designed to provide an introduction and examples to the implementation of the Dual Cell Method in the high-order finite element library [NGSolve](https://ngsolve.org). @@ -13,9 +17,15 @@ The *Dual Cell Method* (DCM) is a Galerkin Method for the simulation of time-dom For a full mathematical introduction to the method we refer to {cite}`WKCS2023,KCS2021`. +--- + ## Table of Contents ```{tableofcontents} ``` + + +--- + ## References ```{bibliography} ``` diff --git a/installation.html b/installation.html index 100ff13..8c00227 100644 --- a/installation.html +++ b/installation.html @@ -376,7 +376,8 @@

Contents

  • 1.1. Get NGSolve
  • 1.2. Install the Dual Cell Method add-on
  • @@ -392,33 +393,76 @@

    Contents

    1. Installation#

    +

    The dualcellspaces package is an add-on to the high-order finite element library NGSolve. Thus the main premise is that a sufficiently recent version of NGSolve is installed beforehand.

    1.1. Get NGSolve#

    -

    The main premise is that a sufficiently recent version of NGSolve is already installed. If this is not the case the most simple way to install the packe is done using pip (the python package installer):

    +

    The most simple way to install the NGSolve is to use pip (the python package installer):

    python -m pip install numpy scipy matplotlib jupyter ipyparallel scikit-build
     python -m pip install --upgrade --pre ngsolve webgui_jupyter_widgets
     
    +

    For troubleshooting we refer to the various NGSolve installation tutorials NGS24 or the NGSolve Documentation.

    +

    If you do not want to update or modify your NGSolve installation you might want to consider installing NGSolve and the dualcellspaces add on in a virtual environment.

    1.2. Install the Dual Cell Method add-on#

    -

    As the Dual Cell Method is not available in the core code of NGSolve the dcm add-on has to be installed.

    +

    As the Dual Cell Method is not available in the core code of NGSolve the dualcellspaces add-on has to be installed.

    Using pip#

    The most simple way to install the add on is again to use pip via

    -
    pip install git+https://github.com/NGSolve/dcm.git
    +
    + +
    +

    if you have installed NGSolve via pip or binaries

    +
    pip install git+https://github.com/NGSolve/dcm.git
     
    +
    + +
    +

    if your NGSolve was built from sources

    +
    python -m pip install scikit-build-core pybind11_stubgen 
    +python -m pip install --no-build-isolation git+https://github.com/NGSolve/dcm.git
    +
    +
    +
    +
    -
    -

    Compiling the code#

    -

    Compiling the code may be done using

    +
    +

    Working with the code#

    +

    If you also want to have the sources of the dualcellspaces module available you may clone them using

    git clone https://github.com/NGSolve/dcm.git
    -cd dcm
    -mkdir build
    -cd build
    -cmake ..
    -make -j4 install
    +
    +
    +

    Installation can be done either again using pip or building using CMake

    +
    + +
    +
    cd dcm
    +python -m pip install --no-build-isolation .
    +
    +
    +
    + +
    +
    cd dcm
    +mkdir build
    +cd build
    +cmake ..
    +make -j4 install
    +
    +
    +
    +
    +
    +
    +

    Test the dualcellspaces installation#

    +

    Test whether the installation worked using

    +
    python -m dualcellspaces.demos.dc_intrules
     
    @@ -483,7 +527,8 @@

    Compiling the code1.1. Get NGSolve
  • 1.2. Install the Dual Cell Method add-on
  • diff --git a/intro.html b/intro.html index a5deb05..2d1be84 100644 --- a/intro.html +++ b/intro.html @@ -390,11 +390,14 @@

    Contents

    The Dual Cell Method in NGSolve#

    -

    M. Wess, J. Schöberl

    +

    by M. Wess, J. Schöberl

    TU Wien, Institute of Analysis and Scientific Computing,

    +

    based on joint work with B. Kapidani and L. Codecasa

    +

    This book is designed to provide an introduction and examples to the implementation of the Dual Cell Method in the high-order finite element library NGSolve.

    The Dual Cell Method (DCM) is a Galerkin Method for the simulation of time-domain waves (e.g., electromagnetic or acoustiv waves) in mixed formulation. It is a Disconitinuous Galerkin variant where the two wave-fields are approximated by conforming functions on meshes dual to each other. Thus the respective ansatz functions feature discontinuities on different element boundaries.

    For a full mathematical introduction to the method we refer to [KCSchoberl21, WKCS23].

    +

    Table of Contents#

    @@ -403,6 +406,7 @@

    Table of Contents

    References#

    diff --git a/searchindex.js b/searchindex.js index cc65728..43a1f8c 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["installation", "intro"], "filenames": ["installation.md", "intro.md"], "titles": ["1. Installation", "The Dual Cell Method in NGSolve"], "terms": {"m": [0, 1], "wess": 1, "j": 1, "sch\u00f6berl": 1, "tu": 1, "wien": 1, "institut": 1, "analysi": 1, "scientif": 1, "comput": 1, "afd": [], "asdfadf": [], "thi": [0, 1], "book": 1, "i": [0, 1], "design": 1, "provid": 1, "an": 1, "introduct": 1, "exampl": 1, "implement": 1, "high": 1, "order": 1, "finit": 1, "element": 1, "librari": 1, "http": 0, "org": [], "For": 1, "full": 1, "mathemat": 1, "we": 1, "kcschoberl21": 1, "wkcs23": 1, "bernard": 1, "kapidani": 1, "lorenzo": 1, "codecasa": 1, "joachim": 1, "sch": 1, "\u00f6": 1, "berl": 1, "arbitrari": 1, "block": 1, "diagon": 1, "mass": 1, "matric": 1, "time": 1, "depend": 1, "2": 1, "d": 1, "axwel": 1, "equat": 1, "phy": 1, "433": 1, "paper": 1, "No": 1, "110184": 1, "20": 1, "2021": 1, "url": [], "doi": 1, "10": 1, "1016": 1, "jcp": 1, "marku": 1, "lump": 1, "polynomi": 1, "degre": 1, "acoust": 1, "electromagnet": 1, "wave": 1, "2023": 1, "arxiv": 1, "2312": 1, "14716": 1, "instal": 1, "A": [], "short": [], "The": 0, "main": 0, "premis": 0, "suffici": 0, "recent": 0, "version": 0, "ngsolv": [], "alreadi": 0, "If": 0, "case": 0, "most": 0, "simpl": 0, "wai": 0, "pack": 0, "done": 0, "us": [], "pip": [], "python": 0, "numpi": 0, "scipi": 0, "matplotlib": 0, "jupyt": 0, "ipyparallel": 0, "scikit": 0, "build": 0, "upgrad": 0, "pre": 0, "webgui_jupyter_widget": 0, "packag": 0, "dcm": [0, 1], "galerkin": 1, "simul": 1, "domain": 1, "e": 1, "g": 1, "acoustiv": 1, "mix": 1, "formul": 1, "It": 1, "disconitinu": 1, "variant": 1, "where": 1, "two": 1, "field": 1, "ar": 1, "approxim": 1, "conform": 1, "function": 1, "mesh": 1, "each": 1, "other": 1, "thu": 1, "respect": 1, "ansatz": 1, "featur": 1, "discontinu": 1, "differ": 1, "boundari": 1, "As": 0, "avail": 0, "core": 0, "ha": 0, "again": 0, "via": 0, "git": 0, "github": 0, "com": 0, "mai": 0, "clone": 0, "cd": 0, "src": [], "mkdir": 0, "cmake": 0, "make": 0, "j4": 0}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"The": 1, "dual": [0, 1], "cell": [0, 1], "method": [0, 1], "ngsolv": [0, 1], "tabl": 1, "content": 1, "refer": 1, "afd": [], "asdfa": [], "instal": 0, "A": [], "short": [], "introduct": [], "get": 0, "add": 0, "us": 0, "pip": 0, "compil": 0, "code": 0}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinxcontrib.bibtex": 9, "sphinx": 60}, "alltitles": {"Installation": [[0, "installation"]], "Get NGSolve": [[0, "get-ngsolve"]], "Install the Dual Cell Method add-on": [[0, "install-the-dual-cell-method-add-on"]], "Using pip": [[0, "using-pip"]], "Compiling the code": [[0, "compiling-the-code"]], "The Dual Cell Method in NGSolve": [[1, "the-dual-cell-method-in-ngsolve"]], "Table of Contents": [[1, "table-of-contents"]], "References": [[1, "references"]]}, "indexentries": {}}) \ No newline at end of file +Search.setIndex({"docnames": ["installation", "intro"], "filenames": ["installation.md", "intro.md"], "titles": ["1. Installation", "The Dual Cell Method in NGSolve"], "terms": {"m": [0, 1], "wess": 1, "j": 1, "sch\u00f6berl": 1, "tu": 1, "wien": 1, "institut": 1, "analysi": 1, "scientif": 1, "comput": 1, "afd": [], "asdfadf": [], "thi": 1, "book": 1, "i": [0, 1], "design": 1, "provid": 1, "an": [0, 1], "introduct": 1, "exampl": 1, "implement": 1, "high": [0, 1], "order": [0, 1], "finit": [0, 1], "element": [0, 1], "librari": [0, 1], "http": 0, "org": [], "For": [0, 1], "full": 1, "mathemat": 1, "we": [0, 1], "kcschoberl21": 1, "wkcs23": 1, "bernard": 1, "kapidani": 1, "lorenzo": 1, "codecasa": 1, "joachim": 1, "sch": 1, "\u00f6": 1, "berl": 1, "arbitrari": 1, "block": 1, "diagon": 1, "mass": 1, "matric": 1, "time": 1, "depend": 1, "2": 1, "d": 1, "axwel": 1, "equat": 1, "phy": 1, "433": 1, "paper": 1, "No": 1, "110184": 1, "20": 1, "2021": 1, "url": [], "doi": 1, "10": 1, "1016": 1, "jcp": 1, "marku": 1, "lump": 1, "polynomi": 1, "degre": 1, "acoust": 1, "electromagnet": 1, "wave": 1, "2023": 1, "arxiv": 1, "2312": 1, "14716": 1, "instal": 1, "A": [], "short": [], "The": 0, "main": 0, "premis": 0, "suffici": 0, "recent": 0, "version": 0, "ngsolv": [], "alreadi": [], "If": 0, "case": [], "most": 0, "simpl": 0, "wai": 0, "pack": [], "done": 0, "us": [], "pip": [], "python": 0, "numpi": 0, "scipi": 0, "matplotlib": 0, "jupyt": 0, "ipyparallel": 0, "scikit": 0, "build": 0, "upgrad": 0, "pre": 0, "webgui_jupyter_widget": 0, "packag": 0, "dcm": [0, 1], "galerkin": 1, "simul": 1, "domain": 1, "e": 1, "g": 1, "acoustiv": 1, "mix": 1, "formul": 1, "It": 1, "disconitinu": 1, "variant": 1, "where": 1, "two": 1, "field": 1, "ar": 1, "approxim": 1, "conform": 1, "function": 1, "mesh": 1, "each": 1, "other": 1, "thu": [0, 1], "respect": 1, "ansatz": 1, "featur": 1, "discontinu": 1, "differ": 1, "boundari": 1, "As": 0, "avail": 0, "core": 0, "ha": 0, "again": 0, "via": 0, "git": 0, "github": 0, "com": 0, "mai": 0, "clone": 0, "cd": 0, "src": [], "mkdir": 0, "cmake": 0, "make": 0, "j4": 0, "base": 1, "joint": 1, "work": 1, "b": 1, "l": 1, "beforehand": 0, "troubleshoot": 0, "refer": 0, "variou": 0, "tutori": 0, "ngs24": 0, "document": 0, "you": 0, "do": 0, "want": 0, "updat": 0, "modifi": 0, "your": 0, "might": 0, "consid": 0, "virtual": 0, "environ": 0, "built": 0, "from": 0, "sourc": 0, "pybind11_stubgen": 0, "isol": 0, "have": 0, "binari": 0, "wa": 0, "also": 0, "modul": 0, "them": 0, "can": 0, "either": 0, "whether": 0, "demo": 0, "dc_intrul": 0}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"The": 1, "dual": [0, 1], "cell": [0, 1], "method": [0, 1], "ngsolv": [0, 1], "tabl": 1, "content": 1, "refer": 1, "afd": [], "asdfa": [], "instal": 0, "A": [], "short": [], "introduct": [], "get": 0, "add": 0, "us": 0, "pip": 0, "compil": [], "code": 0, "work": 0, "test": 0, "dcm": [], "dualcellspac": 0}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinxcontrib.bibtex": 9, "sphinx": 60}, "alltitles": {"Installation": [[0, "installation"]], "Get NGSolve": [[0, "get-ngsolve"]], "Install the Dual Cell Method add-on": [[0, "install-the-dual-cell-method-add-on"]], "Using pip": [[0, "using-pip"]], "Working with the code": [[0, "working-with-the-code"]], "Test the dualcellspaces installation": [[0, "test-the-dualcellspaces-installation"]], "The Dual Cell Method in NGSolve": [[1, "the-dual-cell-method-in-ngsolve"]], "Table of Contents": [[1, "table-of-contents"]], "References": [[1, "references"]]}, "indexentries": {}}) \ No newline at end of file