From 7355a7e075e1710b00d6165ba75e7eab7dd67734 Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Mon, 1 Dec 2025 11:47:38 +0100 Subject: [PATCH 001/112] cleanup --- src/config/default/default.json | 9 --- src/config/default/default.py | 31 -------- src/config/gaya/gaya.json | 9 --- src/config/gaya/reframe.py | 137 -------------------------------- src/config/gaya/setup.sh | 6 -- src/example/CMakeLists.txt | 1 - src/example/README.adoc | 6 -- src/example/parallelSum.cpp | 89 --------------------- src/example/parallelSum.json | 48 ----------- src/example/plots.json | 54 ------------- system_entrypoints/feelpp.sh | 5 -- system_entrypoints/feelpp1.sh | 5 -- system_entrypoints/feelpp2.sh | 5 -- system_entrypoints/feelpp3.sh | 5 -- system_entrypoints/feelpp4.sh | 5 -- 15 files changed, 415 deletions(-) delete mode 100644 src/config/default/default.json delete mode 100644 src/config/default/default.py delete mode 100644 src/config/gaya/gaya.json delete mode 100644 src/config/gaya/reframe.py delete mode 100755 src/config/gaya/setup.sh delete mode 100644 src/example/CMakeLists.txt delete mode 100644 src/example/README.adoc delete mode 100644 src/example/parallelSum.cpp delete mode 100644 src/example/parallelSum.json delete mode 100644 src/example/plots.json delete mode 100644 system_entrypoints/feelpp.sh delete mode 100644 system_entrypoints/feelpp1.sh delete mode 100644 system_entrypoints/feelpp2.sh delete mode 100644 system_entrypoints/feelpp3.sh delete mode 100644 system_entrypoints/feelpp4.sh diff --git a/src/config/default/default.json b/src/config/default/default.json deleted file mode 100644 index a40a71c..0000000 --- a/src/config/default/default.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "machine": "default", - "targets":["::"], - "execution_policy": "async", - "reframe_base_dir":"./build/reframe", - "reports_base_dir":"./reports/", - "input_dataset_base_dir":"$PWD", - "output_app_dir":"$PWD/outputs" -} \ No newline at end of file diff --git a/src/config/default/default.py b/src/config/default/default.py deleted file mode 100644 index fc3338b..0000000 --- a/src/config/default/default.py +++ /dev/null @@ -1,31 +0,0 @@ -import socket - -hostname = socket.gethostname() - -site_configuration = { - 'systems': [ - { - 'name': 'default', - 'descr': 'Default system', - 'hostnames': [f'{hostname}'], - 'partitions': [ - { - 'name': 'default', - 'scheduler': 'local', - 'launcher': 'mpiexec', - 'environs': ['default'], - 'processor': { 'num_cpus': 4 } - }, - ] - } - ], - 'environments': [ - { - 'name': 'default', - 'modules': [], - 'cc': 'clang', - 'cxx': 'clang++', - 'target_systems': ['default:default'] - } - ] -} diff --git a/src/config/gaya/gaya.json b/src/config/gaya/gaya.json deleted file mode 100644 index 9aae917..0000000 --- a/src/config/gaya/gaya.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "machine": "gaya", - "targets":["production::hpcx"], - "execution_policy": "async", - "reframe_base_dir":"./build/reframe", - "reports_base_dir":"./reports/", - "input_dataset_base_dir":"$PWD", - "output_app_dir":"$PWD/outputs" -} \ No newline at end of file diff --git a/src/config/gaya/reframe.py b/src/config/gaya/reframe.py deleted file mode 100644 index e592f9d..0000000 --- a/src/config/gaya/reframe.py +++ /dev/null @@ -1,137 +0,0 @@ -site_configuration = { - 'systems': [ - { - 'name': 'gaya', - 'descr': 'Gaya', - 'hostnames': ['gaya'], - 'modules_system': 'tmod4', - 'partitions': [ - { - 'name': 'production', - 'scheduler': 'squeue', - 'launcher': 'mpiexec', - 'max_jobs': 12, - 'access': ['--partition=production'], - 'environs': ['default','hpcx'], - 'prepare_cmds': [ - 'source /etc/profile.d/modules.sh', - "export PATH=/opt/apptainer/v1.3.5/apptainer/bin/:$PATH" - ], - 'processor': { - 'num_cpus': 128 - }, - 'resources': [ - { - 'name':'launcher_options', - 'options':['-bind-to','core'] - } - ], - 'devices': [ - { - 'type': 'cpu', - 'num_devices': 4 - } - ], - 'container_platforms':[ - { - 'type': 'Apptainer' - } - ], - 'extras':{ - 'memory_per_node':500 - } - }, - { - 'name': 'public', - 'scheduler': 'squeue', - 'launcher': 'mpiexec', - 'max_jobs': 8, - 'access': ['--partition=public'], - 'environs': ['default','hpcx'], - 'prepare_cmds': [ - 'source /etc/profile.d/modules.sh', - "export PATH=/opt/apptainer/v1.3.5/apptainer/bin/:$PATH" - ], - 'processor': { - 'num_cpus': 128 - }, - 'resources': [ - { - 'name':'launcher_options', - 'options':['-bind-to','core'] - } - ], - 'devices': [ - { - 'type': 'cpu', - 'num_devices': 4 - } - ], - 'container_platforms':[ - { - 'type': 'Apptainer' - } - ], - 'extras':{ - 'memory_per_node':500 - } - }, - { - 'name':'gpu', - 'scheduler':'squeue', - 'launcher':'mpiexec', - 'max_jobs':4, - 'access': ['--partition=gpu'], - 'environs': ['default'], - 'resources': [ - { - 'name': '_rfm_gpu', - 'options': ['--gres=gpu:{num_gpus_per_node}'], - }, - { - 'name':'launcher_options', - 'options':['-bind-to','none'] - } - ], - 'prepare_cmds': [ - 'source /etc/profile.d/modules.sh', - "export PATH=/opt/apptainer/v1.3.5/apptainer/bin/:$PATH" - ], - 'processor': { - 'num_cpus': 32 - }, - 'devices': [ - { - 'type': 'gpu', - 'num_devices': 3 - } - ], - 'container_platforms':[ - { - 'type': 'Apptainer' - } - ], - 'extras':{ - 'memory_per_node':256 - } - } - ] - } - ], - 'environments': [ - { - 'name': 'default', - 'modules': [], - 'cc': 'clang', - 'cxx': 'clang++', - 'target_systems': ['gaya:production','gaya:public','gaya:gpu'] - }, - { - 'name': 'hpcx', - 'modules': ['hpcx'], - 'cc': 'clang', - 'cxx': 'clang++', - 'target_systems': ['gaya:production','gaya:public'] - } - ] -} diff --git a/src/config/gaya/setup.sh b/src/config/gaya/setup.sh deleted file mode 100755 index da89d9b..0000000 --- a/src/config/gaya/setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -l - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install --upgrade pip -python3 -m pip install -r requirements.txt \ No newline at end of file diff --git a/src/example/CMakeLists.txt b/src/example/CMakeLists.txt deleted file mode 100644 index ebec13d..0000000 --- a/src/example/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -feelpp_add_application(parallelSum SRCS parallelSum.cpp ) diff --git a/src/example/README.adoc b/src/example/README.adoc deleted file mode 100644 index eb1cf6f..0000000 --- a/src/example/README.adoc +++ /dev/null @@ -1,6 +0,0 @@ -# feelpp-benchmark example - -[source, bash] ----- -feelpp-benchmarking-exec --machine-config src/config/default/default.json --custom-rfm-config src/config/default/default.py --benchmark-config src/example/parallelSum.json --plots-config src/example/plots.json --website ----- \ No newline at end of file diff --git a/src/example/parallelSum.cpp b/src/example/parallelSum.cpp deleted file mode 100644 index e4895a6..0000000 --- a/src/example/parallelSum.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -namespace fs = std::filesystem; - -int main(int argc, char** argv) -{ - MPI_Init(&argc, &argv); - - int rank, size; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Comm_size(MPI_COMM_WORLD, &size); - - if ( argc < 3 ) - { - if (rank == 0) - std::cerr << "Usage: " << argv[0] << " \n"; - MPI_Finalize(); - return 1; - } - int N = std::stoi(argv[1]); - fs::path output_dir = argv[2]; - int base_chunk_size = N / size; - int remainder = N % size; - - int local_start = rank * base_chunk_size + std::min(rank, remainder); - int local_end = local_start + base_chunk_size + (rank < remainder ? 1 : 0); - - std::vector local_array(local_end - local_start, 1.0); - - double start_time = MPI_Wtime(); - double local_sum = 0; - for (size_t i = 0; i < local_array.size(); ++i) - local_sum += local_array[i]; - double end_time = MPI_Wtime(); - - double start_comm_time = MPI_Wtime(); - double global_sum = 0.0; - MPI_Reduce(&local_sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); - double end_comm_time = MPI_Wtime(); - if ( rank == 0 ) - { - double computation_time = end_time - start_time; - double communication_time = end_comm_time - start_comm_time; - std::cout << "Global sum = " << global_sum << "\n"; - std::cout << "Computation time: " << computation_time << " seconds\n"; - std::cout << "Communication time: " << communication_time << " seconds\n"; - - if (!fs::exists(output_dir)) - fs::create_directories(output_dir); - - fs::path filename = "scalability.json"; - - std::ofstream scal_outfile(output_dir/filename); - if ( scal_outfile.is_open() ) - { - scal_outfile << "{\n"; - scal_outfile << " \"computation_time\": " << computation_time << ",\n"; - scal_outfile << " \"communication_time\": " << communication_time << "\n"; - scal_outfile << "}\n"; - scal_outfile.close(); - } - else - std::cerr << "[OOPSIE] Error opening file for writing." << std::endl; - - fs::path out_filename = "outputs.csv"; - std::ofstream out_outfile(output_dir/out_filename); - if (out_outfile.is_open()) - { - out_outfile << "N,sum,num_process\n"; - out_outfile << N << "," << global_sum << "," << size ; - out_outfile.close(); - } - else - std::cerr << "[OOPSIE] Error opening file for writing [outputs]." << std::endl; - - std::cout << "[SUCCESS]" << std::endl; - } - - MPI_Finalize(); - - - return 0; -} \ No newline at end of file diff --git a/src/example/parallelSum.json b/src/example/parallelSum.json deleted file mode 100644 index d8cefdb..0000000 --- a/src/example/parallelSum.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "executable": "{{machine.input_dataset_base_dir}}/build/default/src/example/feelpp_app_parallelSum", - "use_case_name": "parallel_sum", - "timeout":"0-0:5:0", - "output_directory": "{{machine.output_app_dir}}/parallelSum", - //Application options - "options": [ - "{{parameters.elements.value}}", - "{{output_directory}}/{{instance}}" - ], - //Files containing execution times - "scalability": { - "directory": "{{output_directory}}/{{instance}}/", - "stages": [ - { - "name":"", - "filepath": "scalability.json", - "format": "json", - "variables_path":"*" - } - ] - }, - // Resources for the test - "resources":{ - "tasks":"{{parameters.tasks.value}}", - "exclusive_access":false - }, - // Test validation (Only stdout supported at the moment) - "sanity": { - "success": ["[SUCCESS]"], - "error": ["[OOPSIE]","Error"] - }, - // Test parameters - "parameters": [ - { - "name": "tasks", - "sequence": [ 1, 2, 4 ] - }, - { - "name":"elements", - "linspace":{ - "min":100000000, - "max":1000000000, - "n_steps":4 - } - } - ] -} \ No newline at end of file diff --git a/src/example/plots.json b/src/example/plots.json deleted file mode 100644 index bdaa96e..0000000 --- a/src/example/plots.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "plots":[ - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "grouped_bar" ], - "transformation": "performance", - "variables": [ "computation_time" ], - "names": ["Time"], - "xaxis":{ - "parameter":"tasks", - "label":"Number of tasks" - }, - "yaxis":{"label":"Execution time (s)"}, - "secondary_axis":{ - "parameter":"elements", - "label":"N" - } - }, - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "table" ], - "transformation": "performance", - "variables": [ "computation_time" ], - "names": ["Time"], - "xaxis":{ - "parameter":"elements", - "label":"N" - }, - "yaxis":{"label":"Execution time (s)"}, - "secondary_axis":{ - "parameter":"tasks", - "label":"Number of tasks" - } - }, - { - "title": "Speedup", - "plot_types": [ "scatter" ], - "transformation": "speedup", - "variables": [ "computation_time" ], - "names": ["Time"], - "xaxis": { - "parameter": "tasks", - "label": "Number of tasks" - }, - "yaxis": { - "label": "Execution time (s)" - }, - "secondary_axis":{ - "parameter":"elements", - "label":"N" - } - } - ] -} \ No newline at end of file diff --git a/system_entrypoints/feelpp.sh b/system_entrypoints/feelpp.sh deleted file mode 100644 index 0647826..0000000 --- a/system_entrypoints/feelpp.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install feelpp-benchmarking \ No newline at end of file diff --git a/system_entrypoints/feelpp1.sh b/system_entrypoints/feelpp1.sh deleted file mode 100644 index 0647826..0000000 --- a/system_entrypoints/feelpp1.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install feelpp-benchmarking \ No newline at end of file diff --git a/system_entrypoints/feelpp2.sh b/system_entrypoints/feelpp2.sh deleted file mode 100644 index 0647826..0000000 --- a/system_entrypoints/feelpp2.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install feelpp-benchmarking \ No newline at end of file diff --git a/system_entrypoints/feelpp3.sh b/system_entrypoints/feelpp3.sh deleted file mode 100644 index 0647826..0000000 --- a/system_entrypoints/feelpp3.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install feelpp-benchmarking \ No newline at end of file diff --git a/system_entrypoints/feelpp4.sh b/system_entrypoints/feelpp4.sh deleted file mode 100644 index 0647826..0000000 --- a/system_entrypoints/feelpp4.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install feelpp-benchmarking \ No newline at end of file From 55c8ec3020491bfb85d79ab9e5bf691b54656f4f Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:07:37 +0100 Subject: [PATCH 002/112] cleanup --- docs/modules/ROOT/pages/env/antora.adoc | 16 --- docs/modules/ROOT/pages/env/cmake.adoc | 37 ------ .../modules/ROOT/pages/env/githubactions.adoc | 19 --- docs/modules/ROOT/pages/env/jupyter.adoc | 56 -------- docs/modules/ROOT/pages/env/rename.adoc | 5 - docs/modules/ROOT/pages/env/vscode.adoc | 14 -- docs/modules/ROOT/pages/examples/index.adoc | 2 - docs/modules/ROOT/pages/quickstart.adoc | 63 --------- rename.sh | 122 ------------------ test.slurm | 8 -- 10 files changed, 342 deletions(-) delete mode 100644 docs/modules/ROOT/pages/env/antora.adoc delete mode 100644 docs/modules/ROOT/pages/env/cmake.adoc delete mode 100644 docs/modules/ROOT/pages/env/githubactions.adoc delete mode 100644 docs/modules/ROOT/pages/env/jupyter.adoc delete mode 100644 docs/modules/ROOT/pages/env/rename.adoc delete mode 100644 docs/modules/ROOT/pages/env/vscode.adoc delete mode 100644 docs/modules/ROOT/pages/examples/index.adoc delete mode 100644 docs/modules/ROOT/pages/quickstart.adoc delete mode 100644 rename.sh delete mode 100644 test.slurm diff --git a/docs/modules/ROOT/pages/env/antora.adoc b/docs/modules/ROOT/pages/env/antora.adoc deleted file mode 100644 index 8144312..0000000 --- a/docs/modules/ROOT/pages/env/antora.adoc +++ /dev/null @@ -1,16 +0,0 @@ -= Antora Environment - -Antora is our static website generator. -We use it to generate the documentation of the project -It is part of the documentation of https://docs.feelpp.org[{feelpp} docs] website. - -.To generate the documentation -[source,shell] ----- - $ npm install # <1> - $ npm run antora # <2> - $ npm run start # <3> ----- -<1> Install the dependencies -<2> Generate the documentation -<3> Serve the documentation, the URL is provided in the console diff --git a/docs/modules/ROOT/pages/env/cmake.adoc b/docs/modules/ROOT/pages/env/cmake.adoc deleted file mode 100644 index 10217c6..0000000 --- a/docs/modules/ROOT/pages/env/cmake.adoc +++ /dev/null @@ -1,37 +0,0 @@ -= CMake Environment - -The CMakeLists.txt is setup with {feelpp}. -A sample {feelpp} application is available in `src`. - -== Building - -The CMakeLists.txt is configured to build the application in `src`. -The following commands can be used to build the application: - -[source,bash] ----- - $ cmake --preset default # <1> - $ cmake --build --preset default # <2> - $ cmake --build --preset default -t install # <3> ----- -<1> Configure the project -<2> Build the project -<3> Install the project - -== Packaging - -CPack is configured and allows to generate a binary and source package. -Use the following commands to generate the binary package: - - $ cmake --build --preset default -t package - -Use the following commands to generate the source package: - - $ cmake --build --preset default -t package_source - -== Testing - -CTest is configured. -Use the following command to run the tests: - - $ cmake --build --preset default -t test \ No newline at end of file diff --git a/docs/modules/ROOT/pages/env/githubactions.adoc b/docs/modules/ROOT/pages/env/githubactions.adoc deleted file mode 100644 index 071d904..0000000 --- a/docs/modules/ROOT/pages/env/githubactions.adoc +++ /dev/null @@ -1,19 +0,0 @@ -= GitHub Actions - -GitHub Actions are set up to - -* build the documentation using Antora and upload them to docs.feelpp.org[{feelpp} docs] upon any change in the repo. -* build, install, package and deliver the {feelpp} code - -See the [workflow file](.github/workflows/ci.yml) for more details. - -== Skipping a job - -You can skip the CI by adding the following line in the commit message: `[skip ci]` - -You can skip the job that build the documentation by adding the following line in the commit message: `doc skip`. - -You can skip the job that build the code by adding the following line in the commit message: `code skip`. - - - diff --git a/docs/modules/ROOT/pages/env/jupyter.adoc b/docs/modules/ROOT/pages/env/jupyter.adoc deleted file mode 100644 index f873433..0000000 --- a/docs/modules/ROOT/pages/env/jupyter.adoc +++ /dev/null @@ -1,56 +0,0 @@ -= {project_name} Notebook -:stem: latexmath -:page-jupyter: true - -[.lead] -This is a Jupyter notebook for the {project_name} project. - -== Introduction - -You write your notebook in AsciiDoc including LaTeX math and thanks to the `:page-jupyter: true` attribute, the notebook is converted to a Jupyter notebook when the book is built. - -== Code cells - -You can include code cells in your notebook using the `[source,python]` block macro. - -[source,python] ----- -import sys, os -print("Hello, world!") ----- - -== {feelpp} Code cells - -You can include {feelpp} code cells in your notebook using the `[source,python]` block macro. - -[source,python] ----- -import feelpp -app = feelpp.Environment(["myapp"],config=feelpp.globalRepository("myapp")) - -geo=feelpp.download( "github:{repo:feelpp,path:feelpp/quickstart/laplacian/cases/feelpp2d/feelpp2d.geo}", worldComm=app.worldCommPtr() )[0] -print("geo file: {}".format(geo)) -mesh = feelpp.load(feelpp.mesh(dim=2,realdim=2), geo, 0.1) - -Xh=feelpp.functionSpace(mesh=mesh, space="Pchv") -f = Xh.element() -f.on(range=feelpp.elements(mesh),expr=feelpp.expr("{sin(pi*x)*sin(pi*y),cos(pi*x)*cos(pi*y)}:x:y",row=2,col=1)) -e= feelpp.exporter(mesh=mesh) -e.add("f",f) -e.save() ----- - -You can then visualize the result using the `pyvista` package as follows: - -[source,python] ----- -from xvfbwrapper import Xvfb -vdisplay = Xvfb() -vdisplay.start() - -import pyvista as pv -pv.set_jupyter_backend('panel') -reader = pv.get_reader("exports/ensightgold/Exporter/Exporter.case") -mesh = reader.read() -mesh.plot(scalars="f",show_edges=True) ----- \ No newline at end of file diff --git a/docs/modules/ROOT/pages/env/rename.adoc b/docs/modules/ROOT/pages/env/rename.adoc deleted file mode 100644 index e7f8833..0000000 --- a/docs/modules/ROOT/pages/env/rename.adoc +++ /dev/null @@ -1,5 +0,0 @@ -= Renaming the Project - -The script `rename.sh` renames the project. - -You have to answer a few questions to set up a new project out of this template. diff --git a/docs/modules/ROOT/pages/env/vscode.adoc b/docs/modules/ROOT/pages/env/vscode.adoc deleted file mode 100644 index 241590e..0000000 --- a/docs/modules/ROOT/pages/env/vscode.adoc +++ /dev/null @@ -1,14 +0,0 @@ -= VS Code Integration - -The project is configured to integrate VSCode using Docker Container. - -The Docker image can be set from `feelpp/feelpp` or `feelpp/feelpp-toolboxes`, simply edit `.devcontainer/Dockerfile` and choose the image you want. - -`ssh-keyscan` is used on `github.com` to register the public key of github in $HOME/.ssh/known_hosts and avoid having git auth issues the first time we log into the container and push/pull to/from github. - -The following extensions are installed in Docker: - -* cpptools -* cmaketools -* cmake -* asciidoctor-vscode diff --git a/docs/modules/ROOT/pages/examples/index.adoc b/docs/modules/ROOT/pages/examples/index.adoc deleted file mode 100644 index fe0b2c0..0000000 --- a/docs/modules/ROOT/pages/examples/index.adoc +++ /dev/null @@ -1,2 +0,0 @@ -= Examples -:page-layout: case-study \ No newline at end of file diff --git a/docs/modules/ROOT/pages/quickstart.adoc b/docs/modules/ROOT/pages/quickstart.adoc deleted file mode 100644 index 96f7b7c..0000000 --- a/docs/modules/ROOT/pages/quickstart.adoc +++ /dev/null @@ -1,63 +0,0 @@ -= Quickstart Guide -:navtitle: Quickstart - -To get started with compiling and using {project_name}, you can either - -- [x] install https://docs.feelpp.org/user/latest/install/index.html[{feelpp} Debian or Ubuntu packages] if you use such systems or -- [x] use DevContainers in Visual Studio Code as described below. - -To get started with viewing and creating documentation, checkout the project xref:env/antora.adoc[Antora] page. - -== Using DevContainers in Visual Studio Code - -[IMPORTANT] -==== -Please ensure that you have https://code.visualstudio.com/[Visual Studio Code] and https://docs.docker.com/engine/install/[Docker] installed before proceeding. -==== - -=== Getting Started - -To start using DevContainers in Visual Studio Code, follow these steps: - -. Open your project in Visual Studio Code. -. A `devcontainer.json` file in the root of your project in `.devcontainer` directory -. A configuration similar to the following one is available: -+ -[source,json] ----- -{ - "name": "Feel++ Dev Jammy", - "image": "ghcr.io/feelpp/feelpp-dev:jammy", - "extensions": [ - "ms-vscode.cpptools", - "ms-vscode.cmake-tools", - "josetr.cmake-language-support-vscode", - "asciidoctor.asciidoctor-vscode", - "ms-python.python", - "ms-toolsai.jupyter" - ] -} ----- - -. Customize the configuration based on your project requirements. -In the example above, the configuration sets the name of the Dev Container as "Feel++ Dev Jammy" and specifies the Docker image to use as "ghcr.io/feelpp/feelpp-dev:jammy". -Additionally, it includes a list of extensions to install inside the Dev Container. - -=== Opening in DevContainer - -To open your project using the DevContainer, follow these steps: - -. Open the Command Palette in Visual Studio Code by pressing `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS). -. Search for and select "Remote-Containers: Reopen in Container". -. Visual Studio Code will build the Docker image specified in the `devcontainer.json` file and open a new window inside the Dev Container. -. Once the Dev Container is loaded, you can start working on your project within the containerized environment. - -=== Benefits of Using DevContainers - -Using DevContainers in Visual Studio Code offers several benefits: - -- **Consistent Development Environment**: DevContainers provide a consistent and reproducible development environment across different machines, ensuring that everyone works in the same environment. -- **Isolation and Dependency Management**: DevContainers isolate your project dependencies from your local machine, reducing conflicts and simplifying dependency management. -- **Easy Extension Installation**: DevContainers automatically install the specified extensions, making it easy to set up the required tools and configurations for your project. - -NOTE: Make sure your Docker daemon is running and accessible from the terminal to use DevContainers in Visual Studio Code. diff --git a/rename.sh b/rename.sh deleted file mode 100644 index 132bfda..0000000 --- a/rename.sh +++ /dev/null @@ -1,122 +0,0 @@ -#! /bin/bash - -# This script is used to rename the project from myproject to something else. - -create_name(){ - string=$1 - # Use parameter expansion to get the second part of the string - second_part="${string#*/}" - echo "$second_part" -} -create_short_name() { - name=$1 - # Convert the name to lowercase and remove spaces - short_name=$(echo "$name" | tr '[:upper:]' '[:lower:]' | sed 's/ //g') - - # Get the first word - first_word=$(echo "${short_name%%-*}") - #echo "First word: $first_word" - # Get the other words and their first letters - other_words=$(echo "${short_name}" | tr '-' '\n' | cut -c1 | tr -d '\n') - #echo "Other words: $other_words" - # Combine the first word and other letters to create a shorter name - #shorter_name="${first_word}-${other_words}" - shorter_name="${other_words}" - - # Print the shorter name - echo "$shorter_name" -} -create_title() { - name=$1 -# Convert the name to lowercase and remove spaces -short_name=$(echo "$name" | tr '[:upper:]' '[:lower:]' | sed 's/ //g') - -# Replace hyphens with spaces -short_name=${short_name//-/ } - -# Use parameter expansion to uppercase the first letter of each word -uppercase_name=$(echo "$short_name" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1') - - - # Print the shorter name - echo "$uppercase_name" -} - -# This script is used to rename the project from myproject to something else. -if [ -z "$1" ]; then - echo "Usage: $0 " - exit 1 -elif [ "$1" == "-h" -o "$1" == "--help" ]; then - echo "Usage: $0 " - exit 1 -elif [ "$1" == "-r" ]; then - in_default_projectname="project" - read -p "What is the name of the project ? [$in_default_projectname]: " projectname - projectname=${projectname:-$in_default_projectname} - - in_default_titlename="$projectname" - read -p "What is the title of the project? [$in_default_titlename]" projecttitle - projecttitle=${projecttitle:-$in_default_titlename} - - in_default_shortname="p" - read -p "What is the short name of the project? []" shortprojectname - shortprojectname=${shortprojectname:-$in_default_shortname} - - in_default_appname="myapp" - read -p "What is the name of the first application? [$in_default_appname]" appname - appname=${appname:-$in_default_appname} -else - projectname=$( create_name $1 ) - projecttitle=$(create_title ${projectname}) - shortprojectname=$( create_short_name $projectname ) - appname="app" - projectname_="${projectname//-/_}" - -fi - -echo " project name: $projectname" -echo " project title: $projecttitle" -echo "project shortname: $shortprojectname" -echo " app name: $appname" - -if [ "$1" == "-r" ]; then - PS3="Do you wish to rename this project?" - select yn in Yes No - do - case $yn in - Yes ) echo "Ok lets go!"; break;; - No ) exit;; - esac - done -fi - -export projectname -export projectname_ -export projecttitle -export shortprojectname -export appname - -files=( "README.adoc" "README.md" "CMakeLists.txt" "src/CMakeLists.txt" - "src/cpp/.tests.laplacian" - "src/cpp/.tests.toolbox" - "site.yml" - "docs/antora.yml" - "package.json" - "package-lock.json" - "pyproject.toml" - "docs/modules/ROOT/pages/index.adoc" - ".github/workflows/ci.yml" ) -for i in "${files[@]}" -do - echo "processing renaming in $i ...." - perl -077pi.bak -e 's/feelpp-project/$ENV{'projectname'}/sg' $i - perl -077pi.bak -e 's/feelpp_project/$ENV{'projectname_'}/sg' $i - perl -077pi.bak -e 's/Feel\+\+ Template Project/$ENV{'projecttitle'}/sg' $i - perl -077pi.bak -e 's/\"fp\"/"$ENV{'shortprojectname'}"/sg' $i - perl -077pi.bak -e 's/myapp/$ENV{'appname'}/sg' $i -done -git mv src/python/feelpp/project src/python/feelpp/$projectname_ - - - - diff --git a/test.slurm b/test.slurm deleted file mode 100644 index fa1723d..0000000 --- a/test.slurm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -#SBATCH -p public -#SBATCH -n 10 -#SBATCH -J test -#SBATCH -o job%j-o.log -#SBATCH -e job%j-e.log -echo "Hello world" -mpirun -np 10 -bind-to core feelpp_toolbox_heat --config-file /usr/share/feelpp/data/testcases/toolboxes/heat/cases/Building/ThermalBridgesENISO10211/case3.cfg \ No newline at end of file From 5e4cd48e436e801fa4a82e604c3be003091d412d Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:07:49 +0100 Subject: [PATCH 003/112] use ref --- src/utils/report.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/report.hpp b/src/utils/report.hpp index 7544e20..d8a0669 100644 --- a/src/utils/report.hpp +++ b/src/utils/report.hpp @@ -42,12 +42,12 @@ class Report { } } - void setMeasure(const std::string name, double value) + void setMeasure(std::string const& name, double value) { M_data[name] = value; } - double getMeasure(const std::string name) + double getMeasure(std::string const& name) { return M_data.at(name); } From fa3a5e3205af527ebe4033c283c629ee188f5c1d Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:09:45 +0100 Subject: [PATCH 004/112] rm cases --- src/cases/electric/2d.cfg | 15 ---- src/cases/electric/2d.geo | 17 ---- src/cases/electric/2d.json | 52 ------------ src/cases/laplacian/CMakeLists.txt | 58 ------------- src/cases/laplacian/fin.json | 19 ----- src/cases/laplacian/fin/fin.geo | 105 ----------------------- src/cases/laplacian/fin/fin1/fin2d.cfg | 10 --- src/cases/laplacian/fin/fin2d.json | 103 ----------------------- src/cases/laplacian/fin/fin4/fin2d.cfg | 15 ---- src/cases/square/square.cfg | 27 ------ src/cases/square/square.geo | 21 ----- src/cases/square/square.json | 112 ------------------------- 12 files changed, 554 deletions(-) delete mode 100644 src/cases/electric/2d.cfg delete mode 100644 src/cases/electric/2d.geo delete mode 100644 src/cases/electric/2d.json delete mode 100644 src/cases/laplacian/CMakeLists.txt delete mode 100644 src/cases/laplacian/fin.json delete mode 100644 src/cases/laplacian/fin/fin.geo delete mode 100644 src/cases/laplacian/fin/fin1/fin2d.cfg delete mode 100644 src/cases/laplacian/fin/fin2d.json delete mode 100644 src/cases/laplacian/fin/fin4/fin2d.cfg delete mode 100644 src/cases/square/square.cfg delete mode 100644 src/cases/square/square.geo delete mode 100644 src/cases/square/square.json diff --git a/src/cases/electric/2d.cfg b/src/cases/electric/2d.cfg deleted file mode 100644 index 555064e..0000000 --- a/src/cases/electric/2d.cfg +++ /dev/null @@ -1,15 +0,0 @@ -directory=feelpp-project/update - -myexpr=-(x*x+y*y)*sin(x*y):x:y - -[electric] -mesh.filename=$cfgdir/2d.geo -filename=$cfgdir/2d.json - -verbose_solvertimer=1 -pc-type=gamg -ksp-monitor=1 - -[electric.gmsh] -hsize=0.1 -partition=1 diff --git a/src/cases/electric/2d.geo b/src/cases/electric/2d.geo deleted file mode 100644 index ada4f9f..0000000 --- a/src/cases/electric/2d.geo +++ /dev/null @@ -1,17 +0,0 @@ -h=0.1; - -Point(1) = {0,0,0,h}; -Point(2) = {1,0,0,h}; -Point(3) = {0,1,0,h}; -Point(4) = {1,1,0,h}; - -Line(1) = {1,2}; -Line(2) = {2,4}; -Line(3) = {4,3}; -Line(4) = {3,1}; - -Line Loop(1) = {1,2,3,4}; -Plane Surface(1) = {1}; - -Physical Surface("omega") = {1}; -Physical Line("gamma") = {1,2,3,4}; diff --git a/src/cases/electric/2d.json b/src/cases/electric/2d.json deleted file mode 100644 index f278893..0000000 --- a/src/cases/electric/2d.json +++ /dev/null @@ -1,52 +0,0 @@ -// -*- mode: javascript -*- -{ - "Name":"update", - "ShortName":"update", - "Materials": - { - "omega": - { - "sigma":"-1" - } - }, - "BoundaryConditions": - { - "electric-potential": - { - "Dirichlet": - { - "gamma": - { - "expr":"sin(x*y):x:y" - } - } - } - }, - "PostProcess": - { - "Exports": - { - "fields":["electric-potential","electric-field","pid"] - }, - "Measures": - { - "Norm": - { - "potential-error": - { - "type": "L2-error", - "field": "electric-potential", - "solution": "sin(x*y):x:y", - "markers": "omega" - }, - "field-error": - { - "type": "L2-error", - "field": "electric-field", - "solution": "{y*cos(x*y),x*cos(x*y)}:x:y", - "markers": "omega" - } - } - } - } -} diff --git a/src/cases/laplacian/CMakeLists.txt b/src/cases/laplacian/CMakeLists.txt deleted file mode 100644 index 30ce83c..0000000 --- a/src/cases/laplacian/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -# ## TEMPLATE.txt.tpl; coding: utf-8 --- - -# Author(s): Christophe Prud'homme -# Date: 2024-07-17 -# -# Copyright (C) 2024 University of Strasbourg -# -# Distributed under the GPL(GNU Public License): -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# -macro(zip_files src dest) - # Ensure the destination directory exists - get_filename_component(dest_dir ${dest} DIRECTORY) - file(MAKE_DIRECTORY ${dest_dir}) - - # Collect all files in the source directory to ensure dependencies are tracked - file(GLOB_RECURSE src_files ${src}/* ${src}.json) - get_filename_component(src_dir ${src} NAME) - message(STATUS "src_dir=${src_dir}") - - add_custom_command( - OUTPUT ${dest} - COMMAND ${CMAKE_COMMAND} -E chdir ${src}/.. ${CMAKE_COMMAND} -E tar "cf" ${dest} --format=zip ${src_dir} ${src_dir}.json - DEPENDS ${src_files} - COMMENT "Creating zip file ${dest}" - ) -endmacro() - -# Usage of the macro to zip the content of the 'fin' folder -set(src_dir ${CMAKE_CURRENT_SOURCE_DIR}/fin) -set(dest_zip ${CMAKE_BINARY_DIR}/datasets/fin.zip) - -# List of dataset directories -set(datasets "fin" ) - -# Loop over the datasets and create a zip for each -foreach(dataset ${datasets}) - set(src_dir ${CMAKE_CURRENT_SOURCE_DIR}/${dataset}) - set(dest_zip ${CMAKE_BINARY_DIR}/datasets/dataset-${dataset}.zip) - zip_files(${src_dir} ${dest_zip}) - - # Add a custom target for each zip file - add_custom_target(zip_${dataset} ALL DEPENDS ${dest_zip}) -endforeach() - diff --git a/src/cases/laplacian/fin.json b/src/cases/laplacian/fin.json deleted file mode 100644 index 4d27b4b..0000000 --- a/src/cases/laplacian/fin.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "fin simulations", - "description": "Dataset for fin heat simulation cases", - "configurations": [ - { - "filename": "fin1/fin2d.cfg", - "description": "Configuration for a 1 fin 2D simulation" - }, - { - "filename": "fin4/fin2d.cfg", - "description": "Configuration for a 4 fins 2D simulation" - } - ], - "metadata": { - "author": "Feel++ Team", - "version": "1.0", - "date": "2024-06-24" - } -} \ No newline at end of file diff --git a/src/cases/laplacian/fin/fin.geo b/src/cases/laplacian/fin/fin.geo deleted file mode 100644 index e11c188..0000000 --- a/src/cases/laplacian/fin/fin.geo +++ /dev/null @@ -1,105 +0,0 @@ -SetFactory("OpenCASCADE"); -//+ -h = 0.05; - -Nfins=4; -Lfins=2.5; -dim=2; - -N = DefineNumber[ Nfins, Name "Parameters/N" ]; -L = DefineNumber[ Lfins, Name "Parameters/L" ]; -t = DefineNumber[ 0.25, Name "Parameters/t" ]; -d = DefineNumber[ 0.75, Name "Parameters/d" ]; -hmax=0.5; -Mesh.CharacteristicLengthMax = hmax; - -If ( dim == 2 ) - -//+ -Rectangle(1) = {0, 0, 0, 1, N*(d+t)+t, 0}; -For r In {1:N} - Printf("fin = %g",r); - Rectangle(r+1) = {-L, r*(d+t), 0, 2*L+1, t, 0}; -EndFor - -S[]=BooleanFragments{ Surface{1}; Delete; }{ Surface{2:N+1}; Delete;}; -Characteristic Length{ PointsOf{ Surface{ : }; } } = h; - -If ( Nfins==1 ) - -EndIf -//+ -// Physical Surface (Sprintf("fin-%g",r)) = r+1; - -Physical Surface("Post") = {1:2*N}; -finid = 1; -For r In {2*N+1:#S[]:2 } - Printf("Fin number %g %g ", r, finid); - Physical Surface(Sprintf("Fin_%g",finid)) = {r,r+1}; - finid += 1; -EndFor - -bdy[] = CombinedBoundary { Surface{:}; }; - -Physical Curve("Gamma_ext") = bdy[0]; - -For ii In { 1 : (#bdy[]-1) } - If (bdy[ii] != 4) - Printf("boundary number %g = %g", ii, Abs(bdy[ii])); - Physical Curve("Gamma_ext") += Abs(bdy[ii]); - Else - Physical Curve("Gamma_root") = bdy[ii]; - EndIf -EndFor - -// Nfins = 1 2 cavities -// If ( Nfins == 1 ) -// Physical Curve("Cavity_1_1") = {1}; -// Physical Curve("Cavity_1_2") = {10}; -// -// Physical Curve("Cavity_2_1") = {3}; -// Physical Curve("Cavity_2_2") = {13}; -// EndIf -ElseIf ( dim == 3 ) - -//+ -Box(1) = {0, 0, 0, 1, 1, N*(d+t)+t}; -For r In {1:N} - Printf("fin = %g",r); - Box(r+1) = {-L, -L, r*(d+t), 2*L+1, 2*L+1, t}; -EndFor - -S[]=BooleanFragments{ Volume{1}; Delete; }{ Volume{2:N+1}; Delete;}; -Characteristic Length{ PointsOf{ Surface{ : }; } } = h; - -//+ -// Physical Volume (Sprintf("fin-%g",r)) = r+1; - -Physical Volume("Post") = {1:2*N}; -finid = 1; -For r In {2*N+1:#S[]:1 } - Printf("Fin number %g %g ", r, finid); - Physical Volume(Sprintf("Fin_%g",finid)) = { r }; - finid += 1; -EndFor - -bdy[] = CombinedBoundary { Volume{:}; }; - -Physical Surface("Gamma_ext") = bdy[0]; - -For ii In { 1 : (#bdy[]-1) } - If (bdy[ii] != 5) - Printf("boundary number %g = %g", ii, Abs(bdy[ii])); - Physical Surface("Gamma_ext") += Abs(bdy[ii]); - Else - Physical Surface("Gamma_root") = bdy[ii]; - EndIf -EndFor - -// Mesh 2; -// Show "*"; - - -EndIf -// Mesh 2; -// Show "*"; diff --git a/src/cases/laplacian/fin/fin1/fin2d.cfg b/src/cases/laplacian/fin/fin1/fin2d.cfg deleted file mode 100644 index 98d7afa..0000000 --- a/src/cases/laplacian/fin/fin1/fin2d.cfg +++ /dev/null @@ -1,10 +0,0 @@ -specs=$cfgdir/../fin2d.json - -[gmsh] -geo-variables-list=Nfins=1:dim=2 - -[bdf] -order=2 -time-step=0.5 -time-final=10 -steady=1 diff --git a/src/cases/laplacian/fin/fin2d.json b/src/cases/laplacian/fin/fin2d.json deleted file mode 100644 index 8ac7d11..0000000 --- a/src/cases/laplacian/fin/fin2d.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Name": "Thermalfin 2D", - "ShortName": "thermalfin2d", - "Models": { - "laplacian": { - "name": "omega", - "Materials": [ - "Post", - "Fin_1", - "Fin_2", - "Fin_3", - "Fin_4" - ] - } - }, - "Meshes": { - "laplacian": { - "Import": { - "filename": "$cfgdir/../fin.geo", - "partition": 0 - } - } - }, - "Spaces": { - "laplacian": { - "Domain": { - - - } - } - }, - "TimeStepping": - { - "laplacian" :{ - "steady": false, - "order" : 1, - "start": 0.0, - "end": 10, - "step": 0.1 - } - }, - "Materials": { - "Post": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_1": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_2": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_3": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_4": { - "k": "1", - "Cp": "1", - "rho": "1" - } - }, - "InitialConditions": { - "laplacian": { - "temperature": { - "Expression": { - "Tini": { - "markers": [ - "Fin_1", - "Fin_2", - "Fin_3", - "Fin_4", - "Post" - ], - "expr": "0" - } - } - } - } - }, - "BoundaryConditions": { - "laplacian": { - "flux": { - "Gamma_root": { - "expr": "1" - } - }, - "convective_laplacian_flux": { - "Gamma_ext": { - "h": "0.3", - "Text": "0" - } - } - } - } - -} diff --git a/src/cases/laplacian/fin/fin4/fin2d.cfg b/src/cases/laplacian/fin/fin4/fin2d.cfg deleted file mode 100644 index e6fa211..0000000 --- a/src/cases/laplacian/fin/fin4/fin2d.cfg +++ /dev/null @@ -1,15 +0,0 @@ -specs=$cfgdir/../fin2d.json - -[gmsh] -geo-variables-list=Nfins=4:dim=2 -hsize=0.025 - -[bdf] -order=2 -time-step=0.5 -time-final=10 -steady=1 - -[exporter] -static=true -geometry=static \ No newline at end of file diff --git a/src/cases/square/square.cfg b/src/cases/square/square.cfg deleted file mode 100644 index c72e25b..0000000 --- a/src/cases/square/square.cfg +++ /dev/null @@ -1,27 +0,0 @@ - -directory=toolboxes/heat/h-convergence/square/ - -case.dimension=2 -case.discretization=P1 -case.mode=h-convergence - -# [case.mode.h-convergence] -# hsize=0.02 -# hsize=0.01 -# hsize=0.005 - -# measures=Norm_error-evaluated_L2-error -# measures=Norm_error-evaluated_H1-error -# measures=Norm_error-evaluated_SemiH1-error -# slopes=2 -# slopes=1 -# slopes=1 - -[heat] -filename=$cfgdir/square.json -gmsh.hsize=0.01 - -#verbose=1 -#verbose_solvertimer=1 -pc-type=gamg -ksp-monitor=1 diff --git a/src/cases/square/square.geo b/src/cases/square/square.geo deleted file mode 100644 index 191abd8..0000000 --- a/src/cases/square/square.geo +++ /dev/null @@ -1,21 +0,0 @@ -h = 0.1; -xmin = 0; -xmax = 1; -ymin = 0; -ymax = 1; -Point(1) = {xmin,ymin,0.0,h}; -Point(2) = {xmax,ymin+0,0.0,h}; -Point(3) = {xmax+0,ymax,0.0,h}; -Point(4) = {xmin+0,ymax+0,0.0,h}; -Line(1) = {4,1}; -Line(2) = {1,2}; -Line(3) = {2,3}; -Line(4) = {3,4}; -Line Loop(5) = {1,2,3,4}; -Plane Surface(6) = {5}; - -Physical Line("Left") = {1}; -Physical Line("Bottom") = {2}; -Physical Line("Right") = {3}; -Physical Line("Top") = {4}; -Physical Surface("Omega") = {6}; diff --git a/src/cases/square/square.json b/src/cases/square/square.json deleted file mode 100644 index ea7edfa..0000000 --- a/src/cases/square/square.json +++ /dev/null @@ -1,112 +0,0 @@ -// -*- mode: javascript -*- -{ - "Name": "h-convergence heat square", - "Parameters": - { - "alpha":4, - "beta":1.5, - "exact_solution":"cos(alpha*pi*x)*sin(beta*pi*y):x:y:alpha:beta", - "grad_exact_solution":"{-alpha*pi*sin(alpha*pi*x)*sin(beta*pi*y), beta*pi*cos(alpha*pi*x)*cos(beta*pi*y)}:x:y:alpha:beta", - "laplacian_exact_solution":"-((alpha*pi)^2)*cos(alpha*pi*x)*sin(beta*pi*y)-((beta*pi)^2)*cos(alpha*pi*x)*sin(beta*pi*y):x:y:alpha:beta" - }, - "Meshes": - { - "heat": - { - "Import": - { - "filename":"$cfgdir/square.geo" - //"hsize":0.001 - } - } - }, - "Materials": - { - "Omega": - { - "k":1 - } - }, - "Models": - { - "heat": - { - "setup": { - "heat-sources": { - "expr":"-laplacian_exact_solution:laplacian_exact_solution" - } - } - } - }, - "BoundaryConditions": - { - "heat": - { - "temperature": - { - "mybc": - { - "markers":["Left","Bottom","Right","Top"], - "expr":"exact_solution:exact_solution" - } - } - } - }, - "PostProcess": - { - "heat": - { - "Exports": - { - "fields":["temperature","pid"], - "expr": - { - "exact_solution":"exact_solution:exact_solution" - } - }, - "Measures": - { - "Normal-Heat-Flux": - { - "bottom": - { - "markers":"Top", - "direction":"inward" - } - }, - "Norm": - { - "error-evaluated": - { - "field":"temperature", - "type":["L2-error","H1-error","SemiH1-error"], - "solution":"exact_solution:exact_solution", - "grad_solution":"{grad_exact_solution_0,grad_exact_solution_1}:grad_exact_solution_0:grad_exact_solution_1" - } - } - }, - "Checkers": - { - "Measures": - { - "Norm_error-evaluated_L2-error": - { - "value":0, - "tolerance":1e-2 - }, - "Norm_error-evaluated_H1-error": - { - "value":0, - "tolerance":1 - }, - "Norm_error-evaluated_SemiH1-error": - { - "value":0, - "tolerance":1 - } - } - } - } - } - -} From 7f58d64ada7f47b2a87207ed59cbefb6d9365ef3 Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:26:45 +0100 Subject: [PATCH 005/112] rm discr --- src/app-feelpp-discr-1.old/CMakeLists.txt | 8 -- src/app-feelpp-discr-1.old/README.adoc | 9 -- src/app-feelpp-discr-1.old/discr-heat.cpp | 67 --------- src/app-feelpp-discr-1.old/heat2DP1.json | 51 ------- src/app-feelpp-discr-1.old/plots.json | 70 ---------- src/app-feelpp-discr-1/README.adoc | 13 -- src/app-feelpp-discr-1/heat_plots.json | 95 ------------- .../thermal_bridges_case_3.json | 130 ------------------ 8 files changed, 443 deletions(-) delete mode 100644 src/app-feelpp-discr-1.old/CMakeLists.txt delete mode 100644 src/app-feelpp-discr-1.old/README.adoc delete mode 100644 src/app-feelpp-discr-1.old/discr-heat.cpp delete mode 100644 src/app-feelpp-discr-1.old/heat2DP1.json delete mode 100644 src/app-feelpp-discr-1.old/plots.json delete mode 100644 src/app-feelpp-discr-1/README.adoc delete mode 100644 src/app-feelpp-discr-1/heat_plots.json delete mode 100644 src/app-feelpp-discr-1/thermal_bridges_case_3.json diff --git a/src/app-feelpp-discr-1.old/CMakeLists.txt b/src/app-feelpp-discr-1.old/CMakeLists.txt deleted file mode 100644 index c7e6810..0000000 --- a/src/app-feelpp-discr-1.old/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ - -set(ORDERS 1 2 3) -set(DIM 2 3) -foreach(order ${ORDERS}) -foreach(dim ${DIM}) - feelpp_add_application(discr_heat_${dim}DP${order} SRCS discr-heat.cpp ../utils/report.hpp LINK_LIBRARIES Feelpp::feelpp_toolbox_heat_lib DEFS ORDER=${order} FEELPP_DIM=${dim}) - endforeach() -endforeach() diff --git a/src/app-feelpp-discr-1.old/README.adoc b/src/app-feelpp-discr-1.old/README.adoc deleted file mode 100644 index 85891b4..0000000 --- a/src/app-feelpp-discr-1.old/README.adoc +++ /dev/null @@ -1,9 +0,0 @@ -# app-feelpp-discr-1 - -Solve a PDE (heat,solid mech) with different discretisation methods from low to high order - - -[source, bash] ----- -feelpp-benchmarking-exec --machine-config src/config/default/default.json --custom-rfm-config src/config/default/default.py --benchmark-config src/app-feelpp-discr-1/heat2DP1.json --plots-config src/app-feelpp-discr-1/plots.json ----- \ No newline at end of file diff --git a/src/app-feelpp-discr-1.old/discr-heat.cpp b/src/app-feelpp-discr-1.old/discr-heat.cpp deleted file mode 100644 index 3c7a38e..0000000 --- a/src/app-feelpp-discr-1.old/discr-heat.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include "../utils/report.hpp" - -#ifndef FEELPP_DIM // Default value for IDE satisfaction, values are set in CMakeLists -#define ORDER 1 -#define FEELPP_DIM 2 -#endif - - -int main(int argc, char** argv) -{ - using namespace Feel; - po::options_description myoptions("my options"); - myoptions.add( toolboxes_options("heat") ); - myoptions.add_options() - ( "output-dir", Feel::po::value()->default_value("") ) - ( "report", Feel::po::value()->default_value("scalability.json") ) - ; - - double time_solve, time_export; - - Environment env( _argc=argc, _argv=argv, - _desc=myoptions, - _about=about(_name="update_toolbox", - _author="Feel++ Consortium", - _email="feelpp-devel@feelpp.org")); - - Feel::cout << fmt::format("Running app-feelpp-discr-1 (heat toolbox) in {}D, with the discretization P{}", FEELPP_DIM, ORDER) << std::endl; - - typedef FeelModels::Heat< Simplex, - Lagrange > model_type; - std::shared_ptr heat( new model_type("heat") ); - // init the toolbox - heat->init(); - heat->printAndSaveInfo(); - - // solve - tic(); - heat->solve(); - time_solve = toc("solve"); - tic(); - heat->exportResults(); - time_export = toc("export results"); - - const fs::path output_dir_option = Environment::expand(soption("output-dir")); - const fs::path outputDir = (output_dir_option == "") ? fs::current_path() : output_dir_option; - - Report report( outputDir, soption("report") ); - - const auto measures = heat->postProcessMeasures(); - auto values = measures.values(); - for (const auto& [key, val] : values) - { - Feel::cout << key << " : " << val << std::endl; - } - - report.setMeasure("Norm_error-evaluated_L2-error", values["Norm_error-evaluated_L2-error"]); - report.setMeasure("time_solve", time_solve); - report.setMeasure("time_export", time_export); - - report.exportMeasures(); - - Feel::cout << "[SUCCESS]" << std::endl; - - return 0; -} diff --git a/src/app-feelpp-discr-1.old/heat2DP1.json b/src/app-feelpp-discr-1.old/heat2DP1.json deleted file mode 100644 index cedd4c8..0000000 --- a/src/app-feelpp-discr-1.old/heat2DP1.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "executable": "{{machine.input_dataset_base_dir}}/build/default/src/app-feelpp-discr-1/feelpp_app_discr_heat_2DP1", - "use_case_name": "heat2DP1", - "timeout":"0-0:5:0", - "output_directory": "{{machine.output_app_dir}}/feelpp_app_discr_heat_2DP1", - //Application options - "options": [ - "--gmsh.hsize {{parameters.hsize.value}}", - "--output-dir {{output_directory}}/{{instance}}/", - "--report scalability.json", - "--config-file /nvme0/saigre/feelpp-app/src/cases/square/square.cfg", - "--directory {{output_directory}}/{{instance}}/" - ], - //Files containing execution times - "scalability": { - "directory": "{{output_directory}}/{{instance}}/", - "stages": [ - { - "name":"", - "filepath": "scalability.json", - "format": "json", - "variables_path":"*" - } - ] - }, - // Resources for the test - "resources":{ - "tasks":"{{parameters.tasks.value}}", - "exclusive_access":false - }, - // Test validation (Only stdout supported at the moment) - "sanity": { - "success": ["[SUCCESS]"], - "error": ["[OOPSIE]", "Error", "[Error]"] - }, - // Test parameters - "parameters": [ - { - "name": "tasks", - "sequence": [ 1, 2, 4 ] - }, - { - "name":"hsize", - "linspace":{ - "min":0.02, - "max":0.005, - "n_steps":4 - } - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1.old/plots.json b/src/app-feelpp-discr-1.old/plots.json deleted file mode 100644 index 544c99b..0000000 --- a/src/app-feelpp-discr-1.old/plots.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "plots":[ - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "grouped_bar" ], - "transformation": "performance", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis":{ - "parameter":"tasks", - "label":"Number of tasks" - }, - "yaxis":{"label":"Solving time (s)"}, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - }, - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "grouped_bar" ], - "transformation": "performance", - "variables": [ "time_export" ], - "names": ["Time"], - "xaxis":{ - "parameter":"tasks", - "label":"Number of tasks" - }, - "yaxis":{"label":"Export time (s)"}, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - }, - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "table" ], - "transformation": "performance", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis":{ - "parameter":"hsize", - "label":"N" - }, - "yaxis":{"label":"Execution time (s)"}, - "secondary_axis":{ - "parameter":"tasks", - "label":"Number of tasks" - } - }, - { - "title": "Speedup", - "plot_types": [ "scatter" ], - "transformation": "speedup", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis": { - "parameter": "tasks", - "label": "Number of tasks" - }, - "yaxis": { - "label": "Execution time (s)" - }, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1/README.adoc b/src/app-feelpp-discr-1/README.adoc deleted file mode 100644 index c70faea..0000000 --- a/src/app-feelpp-discr-1/README.adoc +++ /dev/null @@ -1,13 +0,0 @@ -= App feelpp-discr-1 - -== Benchmark: ThermalBridgesENISO10211 - -[source, bash] ----- -feelpp-benchmarking-exec --machine-config src/config/gaya/gaya.json --benchmark-config src/app-feelpp-discr-1/thermal_bridges_case_3.json --plots-config src/app-feelpp-discr-1/heat_plots.json --website -rc src/config/gaya/reframe.py ----- - -[source, bash] ----- -feelpp-benchmarking-render --plot-configs src/app-feelpp-discr-1/heat_plots.json --patch-reports gaya:all:all:all -sp ----- \ No newline at end of file diff --git a/src/app-feelpp-discr-1/heat_plots.json b/src/app-feelpp-discr-1/heat_plots.json deleted file mode 100644 index f8b55b2..0000000 --- a/src/app-feelpp-discr-1/heat_plots.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "plots": [ - { - "title": "Validation measures", - "plot_types": [ "scatter" ], - "transformation": "performance", - "variables": [ - "Outputs_Normal_Heat_Flux_alpha", "Outputs_Normal_Heat_Flux_beta", "Outputs_Normal_Heat_Flux_gamma", - "Outputs_Points_alpha_max_field_temperature", "Outputs_Points_alpha_min_field_temperature", - "Outputs_Points_beta_max_field_temperature", "Outputs_Points_beta_min_field_temperature", - "Outputs_Statistics_temperature_alpha_max", "Outputs_Statistics_temperature_alpha_min", - "Outputs_Statistics_temperature_beta_max", "Outputs_Statistics_temperature_beta_min" - ], - "names": [ ], - "xaxis": { "parameter": "mesh", "label": "mesh levels" }, - "yaxis": { "label": "Heat flow [W]" }, - "color_axis":{ "parameter": "discretization", "label": "Discretization" }, - "secondary_axis":{ "parameter": "performance_variable", "label": "Measures" }, - "aggregations": [ {"column": "resources.tasks", "agg": "filter:128"} ] - }, - { - "title": "General Performance (P1)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P1"} ] - }, - { - "title": "General Performance (P2)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P2"} ] - }, - { - "title": "General Performance (P3)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P3"} ] - }, - { - "title": "Reading mesh measures", - "plot_types": ["grouped_bar", "stacked_bar", "scatter"], - "transformation": "performance", - "variables": ["Journal_readElements_time","Journal_readPoints_time","Journal_readStats_time"], - "names": ["read elements", "read points", "read stats" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P1"} ] - }, - { - "title": "Number of iterations of GMRES", - "plot_types": ["scatter"], - "transformation": "performance", - "variables": ["Solve_ksp-niter"], - "names": ["ksp"], - "xaxis":{ - "parameter": "resources.tasks", - "label": "Number of tasks" - }, - "yaxis":{ - "label": "Number of iterations" - }, - "color_axis":{ - "parameter": "mesh", - "label": "Mesh" - }, - "secondary_axis":{ - "parameter": "discretization", - "label": "Discretization" - }, - "aggregations": [ - {"column": "performance_variable","agg": "filter:Solve_ksp-niter"} - ] - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1/thermal_bridges_case_3.json b/src/app-feelpp-discr-1/thermal_bridges_case_3.json deleted file mode 100644 index 39929f8..0000000 --- a/src/app-feelpp-discr-1/thermal_bridges_case_3.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "executable": "/data/home/saigre/feelpp/build/default/toolboxes/heat/feelpp_toolbox_heat", - "output_directory": "{{machine.output_app_dir}}/toolboxes/heat/ThermalBridgesENISO10211/Case3", - "use_case_name": "ThermalBridgesENISO10211", - "timeout":"0-01:10:00", - "resources":{ - "tasks":"{{parameters.resources.tasks.value}}", - "exclusive_access":"{{parameters.resources.exclusive_access.value}}" - }, - "input_file_dependencies":{ - "solver_cfg":"benchmark/{{use_case_name}}/{{parameters.solver.value}}.cfg", - "mesh_json":"benchmark/{{use_case_name}}/partitioning/case3/{{parameters.mesh.value}}/case3_p{{parameters.resources.tasks.value}}.json", - "mesh_hdf5":"benchmark/{{use_case_name}}/partitioning/case3/{{parameters.mesh.value}}/case3_p{{parameters.resources.tasks.value}}.h5" - }, - "platforms": { - "apptainer":{ - "image": { - "filepath":"{{machine.containers.apptainer.image_base_dir}}/feelpp-noble.sif" - }, - "input_dir":"/input_data", - "options": [ - "--home {{machine.output_app_dir}}", - "--bind {{machine.input_dataset_base_dir}}/:{{platforms.apptainer.input_dir}}", - "--env OMP_NUM_THREADS=1" - ], - "append_app_option":[] - }, - "builtin":{ - "input_dir":"{{machine.input_dataset_base_dir}}", - "append_app_option":[] - } - }, - "options": [ - "--config-files /usr/share/feelpp/data/testcases/toolboxes/heat/cases/Building/ThermalBridgesENISO10211/case3.cfg", - "--directory {{output_directory}}/{{instance}}", - "--repository.case {{use_case_name}}", - "--heat.scalability-save=1", - "--repository.append.np 0", - "--case.discretization {{parameters.discretization.value}}", - "--heat.json.patch='{\"op\": \"replace\",\"path\": \"/Meshes/heat/Import/filename\",\"value\": \"{{platforms.{{machine.platform}}.input_dir}}/{{input_file_dependencies.mesh_json}}\" }'" - ], - "additional_files":{ - "parameterized_descriptions_filepath":"{{output_directory}}/{{instance}}/{{use_case_name}}/heat.information.adoc", - "custom_logs":[ - "{{output_directory}}/{{instance}}/{{use_case_name}}/logs/{{executable}}.INFO", - "{{output_directory}}/{{instance}}/{{use_case_name}}/logs/{{executable}}.WARNING" - ] - }, - "scalability": { - "directory": "{{output_directory}}/{{instance}}/{{use_case_name}}", - "clean_directory":true, - "stages": [ - { - "name": "Constructor", - "filepath": "heat.scalibility.HeatConstructor.data", - "format": "tsv" - }, - { - "name": "PostProcessing", - "filepath": "heat.scalibility.HeatPostProcessing.data", - "format": "tsv" - }, - { - "name": "Solve", - "filepath": "heat.scalibility.HeatSolve.data", - "format": "tsv", - "units":{ - "*":"s", - "ksp-niter":"iter" - } - }, - { - "name": "Outputs", - "filepath": "heat.measures/values.csv", - "format": "csv", - "units" :{ - "*":"W" - } - }, - { - "name": "Journal", - "filepath": "journal.json", - "format": "json", - "variables_path": "Mesh.heat.loadMesh_times.*" - } - ] - }, - "sanity": { - "success": [], - "error": [] - }, - "parameters": [ - { - "name": "resources", - "zip":[ - { - "name":"tasks", - "sequence":[64, 128, 256] - //, 512] - }, - { - "name":"exclusive_access", - "repeat":{"value":true, "count":10} - } - ] - }, - { - "name":"mesh", - "sequence":["M1", "M2", "M3"], - "conditions":{ - "M1":[{ "resources.tasks":[64, 128, 256, 512] }], - "M2":[{ "resources.tasks":[64, 128, 256, 512] }], - "M3":[{ "resources.tasks":[256, 512] }] - } - }, - { - "name":"discretization", - "sequence":["P1", "P2"], - "conditions":{ - "P1":[{ "resources.tasks":[64, 128, 256, 512] }], - "P2":[{ "resources.tasks":[64, 128, 256, 512] }], - "P3":[{ "resources.tasks":[256, 512] }] - } - }, - { - "name": "solver", - "sequence": ["gamg"] - } - ] -} \ No newline at end of file From 8cc5695b95d01af4c4e34fd1e2f85689c6f45c5f Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:30:13 +0100 Subject: [PATCH 006/112] rm broken link --- benchmark | 1 - 1 file changed, 1 deletion(-) delete mode 120000 benchmark diff --git a/benchmark b/benchmark deleted file mode 120000 index 69d7b69..0000000 --- a/benchmark +++ /dev/null @@ -1 +0,0 @@ -../benchmark/ \ No newline at end of file From 6579197d7875309ed064b794fc327ce20900277c Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 09:38:04 +0100 Subject: [PATCH 007/112] rm old apps from cmake --- src/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4fa60a2..aab0af7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,3 @@ feelpp_add_testcase(cases PREFIX fp CATEGORY feelpp) -add_subdirectory(cases/laplacian) - -add_subdirectory(example) -add_subdirectory(app-feelpp-discr-1.old) add_subdirectory(app-feelpp-io) add_subdirectory(app-feelpp-distance) From a1639fcd3bd8c6d24b706e183e625de000fc915c Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 10:42:40 +0100 Subject: [PATCH 008/112] cleanup --- docs/modules/ROOT/pages/examples/index.adoc | 2 - rename.sh | 122 ---------------- src/app-feelpp-discr-1.old/CMakeLists.txt | 8 -- src/app-feelpp-discr-1.old/README.adoc | 9 -- src/app-feelpp-discr-1.old/discr-heat.cpp | 67 --------- src/app-feelpp-discr-1.old/heat2DP1.json | 51 ------- src/app-feelpp-discr-1.old/plots.json | 70 ---------- src/app-feelpp-discr-1/README.adoc | 13 -- src/app-feelpp-discr-1/heat_plots.json | 95 ------------- .../thermal_bridges_case_3.json | 130 ------------------ src/cases/electric/2d.cfg | 15 -- src/cases/electric/2d.geo | 17 --- src/cases/electric/2d.json | 52 ------- src/cases/laplacian/CMakeLists.txt | 58 -------- src/cases/laplacian/fin.json | 19 --- src/cases/laplacian/fin/fin.geo | 105 -------------- src/cases/laplacian/fin/fin1/fin2d.cfg | 10 -- src/cases/laplacian/fin/fin2d.json | 103 -------------- src/cases/laplacian/fin/fin4/fin2d.cfg | 15 -- src/cases/square/square.cfg | 27 ---- src/cases/square/square.geo | 21 --- src/cases/square/square.json | 112 --------------- src/utils/report.hpp | 4 +- test.slurm | 8 -- 24 files changed, 2 insertions(+), 1131 deletions(-) delete mode 100644 docs/modules/ROOT/pages/examples/index.adoc delete mode 100644 rename.sh delete mode 100644 src/app-feelpp-discr-1.old/CMakeLists.txt delete mode 100644 src/app-feelpp-discr-1.old/README.adoc delete mode 100644 src/app-feelpp-discr-1.old/discr-heat.cpp delete mode 100644 src/app-feelpp-discr-1.old/heat2DP1.json delete mode 100644 src/app-feelpp-discr-1.old/plots.json delete mode 100644 src/app-feelpp-discr-1/README.adoc delete mode 100644 src/app-feelpp-discr-1/heat_plots.json delete mode 100644 src/app-feelpp-discr-1/thermal_bridges_case_3.json delete mode 100644 src/cases/electric/2d.cfg delete mode 100644 src/cases/electric/2d.geo delete mode 100644 src/cases/electric/2d.json delete mode 100644 src/cases/laplacian/CMakeLists.txt delete mode 100644 src/cases/laplacian/fin.json delete mode 100644 src/cases/laplacian/fin/fin.geo delete mode 100644 src/cases/laplacian/fin/fin1/fin2d.cfg delete mode 100644 src/cases/laplacian/fin/fin2d.json delete mode 100644 src/cases/laplacian/fin/fin4/fin2d.cfg delete mode 100644 src/cases/square/square.cfg delete mode 100644 src/cases/square/square.geo delete mode 100644 src/cases/square/square.json delete mode 100644 test.slurm diff --git a/docs/modules/ROOT/pages/examples/index.adoc b/docs/modules/ROOT/pages/examples/index.adoc deleted file mode 100644 index fe0b2c0..0000000 --- a/docs/modules/ROOT/pages/examples/index.adoc +++ /dev/null @@ -1,2 +0,0 @@ -= Examples -:page-layout: case-study \ No newline at end of file diff --git a/rename.sh b/rename.sh deleted file mode 100644 index 132bfda..0000000 --- a/rename.sh +++ /dev/null @@ -1,122 +0,0 @@ -#! /bin/bash - -# This script is used to rename the project from myproject to something else. - -create_name(){ - string=$1 - # Use parameter expansion to get the second part of the string - second_part="${string#*/}" - echo "$second_part" -} -create_short_name() { - name=$1 - # Convert the name to lowercase and remove spaces - short_name=$(echo "$name" | tr '[:upper:]' '[:lower:]' | sed 's/ //g') - - # Get the first word - first_word=$(echo "${short_name%%-*}") - #echo "First word: $first_word" - # Get the other words and their first letters - other_words=$(echo "${short_name}" | tr '-' '\n' | cut -c1 | tr -d '\n') - #echo "Other words: $other_words" - # Combine the first word and other letters to create a shorter name - #shorter_name="${first_word}-${other_words}" - shorter_name="${other_words}" - - # Print the shorter name - echo "$shorter_name" -} -create_title() { - name=$1 -# Convert the name to lowercase and remove spaces -short_name=$(echo "$name" | tr '[:upper:]' '[:lower:]' | sed 's/ //g') - -# Replace hyphens with spaces -short_name=${short_name//-/ } - -# Use parameter expansion to uppercase the first letter of each word -uppercase_name=$(echo "$short_name" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1') - - - # Print the shorter name - echo "$uppercase_name" -} - -# This script is used to rename the project from myproject to something else. -if [ -z "$1" ]; then - echo "Usage: $0 " - exit 1 -elif [ "$1" == "-h" -o "$1" == "--help" ]; then - echo "Usage: $0 " - exit 1 -elif [ "$1" == "-r" ]; then - in_default_projectname="project" - read -p "What is the name of the project ? [$in_default_projectname]: " projectname - projectname=${projectname:-$in_default_projectname} - - in_default_titlename="$projectname" - read -p "What is the title of the project? [$in_default_titlename]" projecttitle - projecttitle=${projecttitle:-$in_default_titlename} - - in_default_shortname="p" - read -p "What is the short name of the project? []" shortprojectname - shortprojectname=${shortprojectname:-$in_default_shortname} - - in_default_appname="myapp" - read -p "What is the name of the first application? [$in_default_appname]" appname - appname=${appname:-$in_default_appname} -else - projectname=$( create_name $1 ) - projecttitle=$(create_title ${projectname}) - shortprojectname=$( create_short_name $projectname ) - appname="app" - projectname_="${projectname//-/_}" - -fi - -echo " project name: $projectname" -echo " project title: $projecttitle" -echo "project shortname: $shortprojectname" -echo " app name: $appname" - -if [ "$1" == "-r" ]; then - PS3="Do you wish to rename this project?" - select yn in Yes No - do - case $yn in - Yes ) echo "Ok lets go!"; break;; - No ) exit;; - esac - done -fi - -export projectname -export projectname_ -export projecttitle -export shortprojectname -export appname - -files=( "README.adoc" "README.md" "CMakeLists.txt" "src/CMakeLists.txt" - "src/cpp/.tests.laplacian" - "src/cpp/.tests.toolbox" - "site.yml" - "docs/antora.yml" - "package.json" - "package-lock.json" - "pyproject.toml" - "docs/modules/ROOT/pages/index.adoc" - ".github/workflows/ci.yml" ) -for i in "${files[@]}" -do - echo "processing renaming in $i ...." - perl -077pi.bak -e 's/feelpp-project/$ENV{'projectname'}/sg' $i - perl -077pi.bak -e 's/feelpp_project/$ENV{'projectname_'}/sg' $i - perl -077pi.bak -e 's/Feel\+\+ Template Project/$ENV{'projecttitle'}/sg' $i - perl -077pi.bak -e 's/\"fp\"/"$ENV{'shortprojectname'}"/sg' $i - perl -077pi.bak -e 's/myapp/$ENV{'appname'}/sg' $i -done -git mv src/python/feelpp/project src/python/feelpp/$projectname_ - - - - diff --git a/src/app-feelpp-discr-1.old/CMakeLists.txt b/src/app-feelpp-discr-1.old/CMakeLists.txt deleted file mode 100644 index c7e6810..0000000 --- a/src/app-feelpp-discr-1.old/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ - -set(ORDERS 1 2 3) -set(DIM 2 3) -foreach(order ${ORDERS}) -foreach(dim ${DIM}) - feelpp_add_application(discr_heat_${dim}DP${order} SRCS discr-heat.cpp ../utils/report.hpp LINK_LIBRARIES Feelpp::feelpp_toolbox_heat_lib DEFS ORDER=${order} FEELPP_DIM=${dim}) - endforeach() -endforeach() diff --git a/src/app-feelpp-discr-1.old/README.adoc b/src/app-feelpp-discr-1.old/README.adoc deleted file mode 100644 index 85891b4..0000000 --- a/src/app-feelpp-discr-1.old/README.adoc +++ /dev/null @@ -1,9 +0,0 @@ -# app-feelpp-discr-1 - -Solve a PDE (heat,solid mech) with different discretisation methods from low to high order - - -[source, bash] ----- -feelpp-benchmarking-exec --machine-config src/config/default/default.json --custom-rfm-config src/config/default/default.py --benchmark-config src/app-feelpp-discr-1/heat2DP1.json --plots-config src/app-feelpp-discr-1/plots.json ----- \ No newline at end of file diff --git a/src/app-feelpp-discr-1.old/discr-heat.cpp b/src/app-feelpp-discr-1.old/discr-heat.cpp deleted file mode 100644 index 3c7a38e..0000000 --- a/src/app-feelpp-discr-1.old/discr-heat.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include "../utils/report.hpp" - -#ifndef FEELPP_DIM // Default value for IDE satisfaction, values are set in CMakeLists -#define ORDER 1 -#define FEELPP_DIM 2 -#endif - - -int main(int argc, char** argv) -{ - using namespace Feel; - po::options_description myoptions("my options"); - myoptions.add( toolboxes_options("heat") ); - myoptions.add_options() - ( "output-dir", Feel::po::value()->default_value("") ) - ( "report", Feel::po::value()->default_value("scalability.json") ) - ; - - double time_solve, time_export; - - Environment env( _argc=argc, _argv=argv, - _desc=myoptions, - _about=about(_name="update_toolbox", - _author="Feel++ Consortium", - _email="feelpp-devel@feelpp.org")); - - Feel::cout << fmt::format("Running app-feelpp-discr-1 (heat toolbox) in {}D, with the discretization P{}", FEELPP_DIM, ORDER) << std::endl; - - typedef FeelModels::Heat< Simplex, - Lagrange > model_type; - std::shared_ptr heat( new model_type("heat") ); - // init the toolbox - heat->init(); - heat->printAndSaveInfo(); - - // solve - tic(); - heat->solve(); - time_solve = toc("solve"); - tic(); - heat->exportResults(); - time_export = toc("export results"); - - const fs::path output_dir_option = Environment::expand(soption("output-dir")); - const fs::path outputDir = (output_dir_option == "") ? fs::current_path() : output_dir_option; - - Report report( outputDir, soption("report") ); - - const auto measures = heat->postProcessMeasures(); - auto values = measures.values(); - for (const auto& [key, val] : values) - { - Feel::cout << key << " : " << val << std::endl; - } - - report.setMeasure("Norm_error-evaluated_L2-error", values["Norm_error-evaluated_L2-error"]); - report.setMeasure("time_solve", time_solve); - report.setMeasure("time_export", time_export); - - report.exportMeasures(); - - Feel::cout << "[SUCCESS]" << std::endl; - - return 0; -} diff --git a/src/app-feelpp-discr-1.old/heat2DP1.json b/src/app-feelpp-discr-1.old/heat2DP1.json deleted file mode 100644 index cedd4c8..0000000 --- a/src/app-feelpp-discr-1.old/heat2DP1.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "executable": "{{machine.input_dataset_base_dir}}/build/default/src/app-feelpp-discr-1/feelpp_app_discr_heat_2DP1", - "use_case_name": "heat2DP1", - "timeout":"0-0:5:0", - "output_directory": "{{machine.output_app_dir}}/feelpp_app_discr_heat_2DP1", - //Application options - "options": [ - "--gmsh.hsize {{parameters.hsize.value}}", - "--output-dir {{output_directory}}/{{instance}}/", - "--report scalability.json", - "--config-file /nvme0/saigre/feelpp-app/src/cases/square/square.cfg", - "--directory {{output_directory}}/{{instance}}/" - ], - //Files containing execution times - "scalability": { - "directory": "{{output_directory}}/{{instance}}/", - "stages": [ - { - "name":"", - "filepath": "scalability.json", - "format": "json", - "variables_path":"*" - } - ] - }, - // Resources for the test - "resources":{ - "tasks":"{{parameters.tasks.value}}", - "exclusive_access":false - }, - // Test validation (Only stdout supported at the moment) - "sanity": { - "success": ["[SUCCESS]"], - "error": ["[OOPSIE]", "Error", "[Error]"] - }, - // Test parameters - "parameters": [ - { - "name": "tasks", - "sequence": [ 1, 2, 4 ] - }, - { - "name":"hsize", - "linspace":{ - "min":0.02, - "max":0.005, - "n_steps":4 - } - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1.old/plots.json b/src/app-feelpp-discr-1.old/plots.json deleted file mode 100644 index 544c99b..0000000 --- a/src/app-feelpp-discr-1.old/plots.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "plots":[ - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "grouped_bar" ], - "transformation": "performance", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis":{ - "parameter":"tasks", - "label":"Number of tasks" - }, - "yaxis":{"label":"Solving time (s)"}, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - }, - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "grouped_bar" ], - "transformation": "performance", - "variables": [ "time_export" ], - "names": ["Time"], - "xaxis":{ - "parameter":"tasks", - "label":"Number of tasks" - }, - "yaxis":{"label":"Export time (s)"}, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - }, - { - "title": "Absolute performance", - "plot_types": [ "stacked_bar", "table" ], - "transformation": "performance", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis":{ - "parameter":"hsize", - "label":"N" - }, - "yaxis":{"label":"Execution time (s)"}, - "secondary_axis":{ - "parameter":"tasks", - "label":"Number of tasks" - } - }, - { - "title": "Speedup", - "plot_types": [ "scatter" ], - "transformation": "speedup", - "variables": [ "time_solve" ], - "names": ["Time"], - "xaxis": { - "parameter": "tasks", - "label": "Number of tasks" - }, - "yaxis": { - "label": "Execution time (s)" - }, - "secondary_axis":{ - "parameter":"hsize", - "label":"h" - } - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1/README.adoc b/src/app-feelpp-discr-1/README.adoc deleted file mode 100644 index c70faea..0000000 --- a/src/app-feelpp-discr-1/README.adoc +++ /dev/null @@ -1,13 +0,0 @@ -= App feelpp-discr-1 - -== Benchmark: ThermalBridgesENISO10211 - -[source, bash] ----- -feelpp-benchmarking-exec --machine-config src/config/gaya/gaya.json --benchmark-config src/app-feelpp-discr-1/thermal_bridges_case_3.json --plots-config src/app-feelpp-discr-1/heat_plots.json --website -rc src/config/gaya/reframe.py ----- - -[source, bash] ----- -feelpp-benchmarking-render --plot-configs src/app-feelpp-discr-1/heat_plots.json --patch-reports gaya:all:all:all -sp ----- \ No newline at end of file diff --git a/src/app-feelpp-discr-1/heat_plots.json b/src/app-feelpp-discr-1/heat_plots.json deleted file mode 100644 index f8b55b2..0000000 --- a/src/app-feelpp-discr-1/heat_plots.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "plots": [ - { - "title": "Validation measures", - "plot_types": [ "scatter" ], - "transformation": "performance", - "variables": [ - "Outputs_Normal_Heat_Flux_alpha", "Outputs_Normal_Heat_Flux_beta", "Outputs_Normal_Heat_Flux_gamma", - "Outputs_Points_alpha_max_field_temperature", "Outputs_Points_alpha_min_field_temperature", - "Outputs_Points_beta_max_field_temperature", "Outputs_Points_beta_min_field_temperature", - "Outputs_Statistics_temperature_alpha_max", "Outputs_Statistics_temperature_alpha_min", - "Outputs_Statistics_temperature_beta_max", "Outputs_Statistics_temperature_beta_min" - ], - "names": [ ], - "xaxis": { "parameter": "mesh", "label": "mesh levels" }, - "yaxis": { "label": "Heat flow [W]" }, - "color_axis":{ "parameter": "discretization", "label": "Discretization" }, - "secondary_axis":{ "parameter": "performance_variable", "label": "Measures" }, - "aggregations": [ {"column": "resources.tasks", "agg": "filter:128"} ] - }, - { - "title": "General Performance (P1)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P1"} ] - }, - { - "title": "General Performance (P2)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P2"} ] - }, - { - "title": "General Performance (P3)", - "plot_types": ["stacked_bar", "grouped_bar"], - "transformation": "performance", - "variables": ["Constructor_init","Solve_solve","PostProcessing_exportResults"], - "names": ["Constructor", "solve", "PostProcessing" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P3"} ] - }, - { - "title": "Reading mesh measures", - "plot_types": ["grouped_bar", "stacked_bar", "scatter"], - "transformation": "performance", - "variables": ["Journal_readElements_time","Journal_readPoints_time","Journal_readStats_time"], - "names": ["read elements", "read points", "read stats" ], - "xaxis": { "parameter": "resources.tasks", "label": "Number of tasks" }, - "secondary_axis": { "parameter": "mesh", "label": "Mesh level" }, - "yaxis": { "label": "execution time (s)" }, - "color_axis":{ "parameter": "performance_variable", "label": "Performance variable" }, - "aggregations": [ {"column": "discretization", "agg": "filter:P1"} ] - }, - { - "title": "Number of iterations of GMRES", - "plot_types": ["scatter"], - "transformation": "performance", - "variables": ["Solve_ksp-niter"], - "names": ["ksp"], - "xaxis":{ - "parameter": "resources.tasks", - "label": "Number of tasks" - }, - "yaxis":{ - "label": "Number of iterations" - }, - "color_axis":{ - "parameter": "mesh", - "label": "Mesh" - }, - "secondary_axis":{ - "parameter": "discretization", - "label": "Discretization" - }, - "aggregations": [ - {"column": "performance_variable","agg": "filter:Solve_ksp-niter"} - ] - } - ] -} \ No newline at end of file diff --git a/src/app-feelpp-discr-1/thermal_bridges_case_3.json b/src/app-feelpp-discr-1/thermal_bridges_case_3.json deleted file mode 100644 index 39929f8..0000000 --- a/src/app-feelpp-discr-1/thermal_bridges_case_3.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "executable": "/data/home/saigre/feelpp/build/default/toolboxes/heat/feelpp_toolbox_heat", - "output_directory": "{{machine.output_app_dir}}/toolboxes/heat/ThermalBridgesENISO10211/Case3", - "use_case_name": "ThermalBridgesENISO10211", - "timeout":"0-01:10:00", - "resources":{ - "tasks":"{{parameters.resources.tasks.value}}", - "exclusive_access":"{{parameters.resources.exclusive_access.value}}" - }, - "input_file_dependencies":{ - "solver_cfg":"benchmark/{{use_case_name}}/{{parameters.solver.value}}.cfg", - "mesh_json":"benchmark/{{use_case_name}}/partitioning/case3/{{parameters.mesh.value}}/case3_p{{parameters.resources.tasks.value}}.json", - "mesh_hdf5":"benchmark/{{use_case_name}}/partitioning/case3/{{parameters.mesh.value}}/case3_p{{parameters.resources.tasks.value}}.h5" - }, - "platforms": { - "apptainer":{ - "image": { - "filepath":"{{machine.containers.apptainer.image_base_dir}}/feelpp-noble.sif" - }, - "input_dir":"/input_data", - "options": [ - "--home {{machine.output_app_dir}}", - "--bind {{machine.input_dataset_base_dir}}/:{{platforms.apptainer.input_dir}}", - "--env OMP_NUM_THREADS=1" - ], - "append_app_option":[] - }, - "builtin":{ - "input_dir":"{{machine.input_dataset_base_dir}}", - "append_app_option":[] - } - }, - "options": [ - "--config-files /usr/share/feelpp/data/testcases/toolboxes/heat/cases/Building/ThermalBridgesENISO10211/case3.cfg", - "--directory {{output_directory}}/{{instance}}", - "--repository.case {{use_case_name}}", - "--heat.scalability-save=1", - "--repository.append.np 0", - "--case.discretization {{parameters.discretization.value}}", - "--heat.json.patch='{\"op\": \"replace\",\"path\": \"/Meshes/heat/Import/filename\",\"value\": \"{{platforms.{{machine.platform}}.input_dir}}/{{input_file_dependencies.mesh_json}}\" }'" - ], - "additional_files":{ - "parameterized_descriptions_filepath":"{{output_directory}}/{{instance}}/{{use_case_name}}/heat.information.adoc", - "custom_logs":[ - "{{output_directory}}/{{instance}}/{{use_case_name}}/logs/{{executable}}.INFO", - "{{output_directory}}/{{instance}}/{{use_case_name}}/logs/{{executable}}.WARNING" - ] - }, - "scalability": { - "directory": "{{output_directory}}/{{instance}}/{{use_case_name}}", - "clean_directory":true, - "stages": [ - { - "name": "Constructor", - "filepath": "heat.scalibility.HeatConstructor.data", - "format": "tsv" - }, - { - "name": "PostProcessing", - "filepath": "heat.scalibility.HeatPostProcessing.data", - "format": "tsv" - }, - { - "name": "Solve", - "filepath": "heat.scalibility.HeatSolve.data", - "format": "tsv", - "units":{ - "*":"s", - "ksp-niter":"iter" - } - }, - { - "name": "Outputs", - "filepath": "heat.measures/values.csv", - "format": "csv", - "units" :{ - "*":"W" - } - }, - { - "name": "Journal", - "filepath": "journal.json", - "format": "json", - "variables_path": "Mesh.heat.loadMesh_times.*" - } - ] - }, - "sanity": { - "success": [], - "error": [] - }, - "parameters": [ - { - "name": "resources", - "zip":[ - { - "name":"tasks", - "sequence":[64, 128, 256] - //, 512] - }, - { - "name":"exclusive_access", - "repeat":{"value":true, "count":10} - } - ] - }, - { - "name":"mesh", - "sequence":["M1", "M2", "M3"], - "conditions":{ - "M1":[{ "resources.tasks":[64, 128, 256, 512] }], - "M2":[{ "resources.tasks":[64, 128, 256, 512] }], - "M3":[{ "resources.tasks":[256, 512] }] - } - }, - { - "name":"discretization", - "sequence":["P1", "P2"], - "conditions":{ - "P1":[{ "resources.tasks":[64, 128, 256, 512] }], - "P2":[{ "resources.tasks":[64, 128, 256, 512] }], - "P3":[{ "resources.tasks":[256, 512] }] - } - }, - { - "name": "solver", - "sequence": ["gamg"] - } - ] -} \ No newline at end of file diff --git a/src/cases/electric/2d.cfg b/src/cases/electric/2d.cfg deleted file mode 100644 index 555064e..0000000 --- a/src/cases/electric/2d.cfg +++ /dev/null @@ -1,15 +0,0 @@ -directory=feelpp-project/update - -myexpr=-(x*x+y*y)*sin(x*y):x:y - -[electric] -mesh.filename=$cfgdir/2d.geo -filename=$cfgdir/2d.json - -verbose_solvertimer=1 -pc-type=gamg -ksp-monitor=1 - -[electric.gmsh] -hsize=0.1 -partition=1 diff --git a/src/cases/electric/2d.geo b/src/cases/electric/2d.geo deleted file mode 100644 index ada4f9f..0000000 --- a/src/cases/electric/2d.geo +++ /dev/null @@ -1,17 +0,0 @@ -h=0.1; - -Point(1) = {0,0,0,h}; -Point(2) = {1,0,0,h}; -Point(3) = {0,1,0,h}; -Point(4) = {1,1,0,h}; - -Line(1) = {1,2}; -Line(2) = {2,4}; -Line(3) = {4,3}; -Line(4) = {3,1}; - -Line Loop(1) = {1,2,3,4}; -Plane Surface(1) = {1}; - -Physical Surface("omega") = {1}; -Physical Line("gamma") = {1,2,3,4}; diff --git a/src/cases/electric/2d.json b/src/cases/electric/2d.json deleted file mode 100644 index f278893..0000000 --- a/src/cases/electric/2d.json +++ /dev/null @@ -1,52 +0,0 @@ -// -*- mode: javascript -*- -{ - "Name":"update", - "ShortName":"update", - "Materials": - { - "omega": - { - "sigma":"-1" - } - }, - "BoundaryConditions": - { - "electric-potential": - { - "Dirichlet": - { - "gamma": - { - "expr":"sin(x*y):x:y" - } - } - } - }, - "PostProcess": - { - "Exports": - { - "fields":["electric-potential","electric-field","pid"] - }, - "Measures": - { - "Norm": - { - "potential-error": - { - "type": "L2-error", - "field": "electric-potential", - "solution": "sin(x*y):x:y", - "markers": "omega" - }, - "field-error": - { - "type": "L2-error", - "field": "electric-field", - "solution": "{y*cos(x*y),x*cos(x*y)}:x:y", - "markers": "omega" - } - } - } - } -} diff --git a/src/cases/laplacian/CMakeLists.txt b/src/cases/laplacian/CMakeLists.txt deleted file mode 100644 index 30ce83c..0000000 --- a/src/cases/laplacian/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -# ## TEMPLATE.txt.tpl; coding: utf-8 --- - -# Author(s): Christophe Prud'homme -# Date: 2024-07-17 -# -# Copyright (C) 2024 University of Strasbourg -# -# Distributed under the GPL(GNU Public License): -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# -macro(zip_files src dest) - # Ensure the destination directory exists - get_filename_component(dest_dir ${dest} DIRECTORY) - file(MAKE_DIRECTORY ${dest_dir}) - - # Collect all files in the source directory to ensure dependencies are tracked - file(GLOB_RECURSE src_files ${src}/* ${src}.json) - get_filename_component(src_dir ${src} NAME) - message(STATUS "src_dir=${src_dir}") - - add_custom_command( - OUTPUT ${dest} - COMMAND ${CMAKE_COMMAND} -E chdir ${src}/.. ${CMAKE_COMMAND} -E tar "cf" ${dest} --format=zip ${src_dir} ${src_dir}.json - DEPENDS ${src_files} - COMMENT "Creating zip file ${dest}" - ) -endmacro() - -# Usage of the macro to zip the content of the 'fin' folder -set(src_dir ${CMAKE_CURRENT_SOURCE_DIR}/fin) -set(dest_zip ${CMAKE_BINARY_DIR}/datasets/fin.zip) - -# List of dataset directories -set(datasets "fin" ) - -# Loop over the datasets and create a zip for each -foreach(dataset ${datasets}) - set(src_dir ${CMAKE_CURRENT_SOURCE_DIR}/${dataset}) - set(dest_zip ${CMAKE_BINARY_DIR}/datasets/dataset-${dataset}.zip) - zip_files(${src_dir} ${dest_zip}) - - # Add a custom target for each zip file - add_custom_target(zip_${dataset} ALL DEPENDS ${dest_zip}) -endforeach() - diff --git a/src/cases/laplacian/fin.json b/src/cases/laplacian/fin.json deleted file mode 100644 index 4d27b4b..0000000 --- a/src/cases/laplacian/fin.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "fin simulations", - "description": "Dataset for fin heat simulation cases", - "configurations": [ - { - "filename": "fin1/fin2d.cfg", - "description": "Configuration for a 1 fin 2D simulation" - }, - { - "filename": "fin4/fin2d.cfg", - "description": "Configuration for a 4 fins 2D simulation" - } - ], - "metadata": { - "author": "Feel++ Team", - "version": "1.0", - "date": "2024-06-24" - } -} \ No newline at end of file diff --git a/src/cases/laplacian/fin/fin.geo b/src/cases/laplacian/fin/fin.geo deleted file mode 100644 index e11c188..0000000 --- a/src/cases/laplacian/fin/fin.geo +++ /dev/null @@ -1,105 +0,0 @@ -SetFactory("OpenCASCADE"); -//+ -h = 0.05; - -Nfins=4; -Lfins=2.5; -dim=2; - -N = DefineNumber[ Nfins, Name "Parameters/N" ]; -L = DefineNumber[ Lfins, Name "Parameters/L" ]; -t = DefineNumber[ 0.25, Name "Parameters/t" ]; -d = DefineNumber[ 0.75, Name "Parameters/d" ]; -hmax=0.5; -Mesh.CharacteristicLengthMax = hmax; - -If ( dim == 2 ) - -//+ -Rectangle(1) = {0, 0, 0, 1, N*(d+t)+t, 0}; -For r In {1:N} - Printf("fin = %g",r); - Rectangle(r+1) = {-L, r*(d+t), 0, 2*L+1, t, 0}; -EndFor - -S[]=BooleanFragments{ Surface{1}; Delete; }{ Surface{2:N+1}; Delete;}; -Characteristic Length{ PointsOf{ Surface{ : }; } } = h; - -If ( Nfins==1 ) - -EndIf -//+ -// Physical Surface (Sprintf("fin-%g",r)) = r+1; - -Physical Surface("Post") = {1:2*N}; -finid = 1; -For r In {2*N+1:#S[]:2 } - Printf("Fin number %g %g ", r, finid); - Physical Surface(Sprintf("Fin_%g",finid)) = {r,r+1}; - finid += 1; -EndFor - -bdy[] = CombinedBoundary { Surface{:}; }; - -Physical Curve("Gamma_ext") = bdy[0]; - -For ii In { 1 : (#bdy[]-1) } - If (bdy[ii] != 4) - Printf("boundary number %g = %g", ii, Abs(bdy[ii])); - Physical Curve("Gamma_ext") += Abs(bdy[ii]); - Else - Physical Curve("Gamma_root") = bdy[ii]; - EndIf -EndFor - -// Nfins = 1 2 cavities -// If ( Nfins == 1 ) -// Physical Curve("Cavity_1_1") = {1}; -// Physical Curve("Cavity_1_2") = {10}; -// -// Physical Curve("Cavity_2_1") = {3}; -// Physical Curve("Cavity_2_2") = {13}; -// EndIf -ElseIf ( dim == 3 ) - -//+ -Box(1) = {0, 0, 0, 1, 1, N*(d+t)+t}; -For r In {1:N} - Printf("fin = %g",r); - Box(r+1) = {-L, -L, r*(d+t), 2*L+1, 2*L+1, t}; -EndFor - -S[]=BooleanFragments{ Volume{1}; Delete; }{ Volume{2:N+1}; Delete;}; -Characteristic Length{ PointsOf{ Surface{ : }; } } = h; - -//+ -// Physical Volume (Sprintf("fin-%g",r)) = r+1; - -Physical Volume("Post") = {1:2*N}; -finid = 1; -For r In {2*N+1:#S[]:1 } - Printf("Fin number %g %g ", r, finid); - Physical Volume(Sprintf("Fin_%g",finid)) = { r }; - finid += 1; -EndFor - -bdy[] = CombinedBoundary { Volume{:}; }; - -Physical Surface("Gamma_ext") = bdy[0]; - -For ii In { 1 : (#bdy[]-1) } - If (bdy[ii] != 5) - Printf("boundary number %g = %g", ii, Abs(bdy[ii])); - Physical Surface("Gamma_ext") += Abs(bdy[ii]); - Else - Physical Surface("Gamma_root") = bdy[ii]; - EndIf -EndFor - -// Mesh 2; -// Show "*"; - - -EndIf -// Mesh 2; -// Show "*"; diff --git a/src/cases/laplacian/fin/fin1/fin2d.cfg b/src/cases/laplacian/fin/fin1/fin2d.cfg deleted file mode 100644 index 98d7afa..0000000 --- a/src/cases/laplacian/fin/fin1/fin2d.cfg +++ /dev/null @@ -1,10 +0,0 @@ -specs=$cfgdir/../fin2d.json - -[gmsh] -geo-variables-list=Nfins=1:dim=2 - -[bdf] -order=2 -time-step=0.5 -time-final=10 -steady=1 diff --git a/src/cases/laplacian/fin/fin2d.json b/src/cases/laplacian/fin/fin2d.json deleted file mode 100644 index 8ac7d11..0000000 --- a/src/cases/laplacian/fin/fin2d.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Name": "Thermalfin 2D", - "ShortName": "thermalfin2d", - "Models": { - "laplacian": { - "name": "omega", - "Materials": [ - "Post", - "Fin_1", - "Fin_2", - "Fin_3", - "Fin_4" - ] - } - }, - "Meshes": { - "laplacian": { - "Import": { - "filename": "$cfgdir/../fin.geo", - "partition": 0 - } - } - }, - "Spaces": { - "laplacian": { - "Domain": { - - - } - } - }, - "TimeStepping": - { - "laplacian" :{ - "steady": false, - "order" : 1, - "start": 0.0, - "end": 10, - "step": 0.1 - } - }, - "Materials": { - "Post": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_1": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_2": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_3": { - "k": "1", - "Cp": "1", - "rho": "1" - }, - "Fin_4": { - "k": "1", - "Cp": "1", - "rho": "1" - } - }, - "InitialConditions": { - "laplacian": { - "temperature": { - "Expression": { - "Tini": { - "markers": [ - "Fin_1", - "Fin_2", - "Fin_3", - "Fin_4", - "Post" - ], - "expr": "0" - } - } - } - } - }, - "BoundaryConditions": { - "laplacian": { - "flux": { - "Gamma_root": { - "expr": "1" - } - }, - "convective_laplacian_flux": { - "Gamma_ext": { - "h": "0.3", - "Text": "0" - } - } - } - } - -} diff --git a/src/cases/laplacian/fin/fin4/fin2d.cfg b/src/cases/laplacian/fin/fin4/fin2d.cfg deleted file mode 100644 index e6fa211..0000000 --- a/src/cases/laplacian/fin/fin4/fin2d.cfg +++ /dev/null @@ -1,15 +0,0 @@ -specs=$cfgdir/../fin2d.json - -[gmsh] -geo-variables-list=Nfins=4:dim=2 -hsize=0.025 - -[bdf] -order=2 -time-step=0.5 -time-final=10 -steady=1 - -[exporter] -static=true -geometry=static \ No newline at end of file diff --git a/src/cases/square/square.cfg b/src/cases/square/square.cfg deleted file mode 100644 index c72e25b..0000000 --- a/src/cases/square/square.cfg +++ /dev/null @@ -1,27 +0,0 @@ - -directory=toolboxes/heat/h-convergence/square/ - -case.dimension=2 -case.discretization=P1 -case.mode=h-convergence - -# [case.mode.h-convergence] -# hsize=0.02 -# hsize=0.01 -# hsize=0.005 - -# measures=Norm_error-evaluated_L2-error -# measures=Norm_error-evaluated_H1-error -# measures=Norm_error-evaluated_SemiH1-error -# slopes=2 -# slopes=1 -# slopes=1 - -[heat] -filename=$cfgdir/square.json -gmsh.hsize=0.01 - -#verbose=1 -#verbose_solvertimer=1 -pc-type=gamg -ksp-monitor=1 diff --git a/src/cases/square/square.geo b/src/cases/square/square.geo deleted file mode 100644 index 191abd8..0000000 --- a/src/cases/square/square.geo +++ /dev/null @@ -1,21 +0,0 @@ -h = 0.1; -xmin = 0; -xmax = 1; -ymin = 0; -ymax = 1; -Point(1) = {xmin,ymin,0.0,h}; -Point(2) = {xmax,ymin+0,0.0,h}; -Point(3) = {xmax+0,ymax,0.0,h}; -Point(4) = {xmin+0,ymax+0,0.0,h}; -Line(1) = {4,1}; -Line(2) = {1,2}; -Line(3) = {2,3}; -Line(4) = {3,4}; -Line Loop(5) = {1,2,3,4}; -Plane Surface(6) = {5}; - -Physical Line("Left") = {1}; -Physical Line("Bottom") = {2}; -Physical Line("Right") = {3}; -Physical Line("Top") = {4}; -Physical Surface("Omega") = {6}; diff --git a/src/cases/square/square.json b/src/cases/square/square.json deleted file mode 100644 index ea7edfa..0000000 --- a/src/cases/square/square.json +++ /dev/null @@ -1,112 +0,0 @@ -// -*- mode: javascript -*- -{ - "Name": "h-convergence heat square", - "Parameters": - { - "alpha":4, - "beta":1.5, - "exact_solution":"cos(alpha*pi*x)*sin(beta*pi*y):x:y:alpha:beta", - "grad_exact_solution":"{-alpha*pi*sin(alpha*pi*x)*sin(beta*pi*y), beta*pi*cos(alpha*pi*x)*cos(beta*pi*y)}:x:y:alpha:beta", - "laplacian_exact_solution":"-((alpha*pi)^2)*cos(alpha*pi*x)*sin(beta*pi*y)-((beta*pi)^2)*cos(alpha*pi*x)*sin(beta*pi*y):x:y:alpha:beta" - }, - "Meshes": - { - "heat": - { - "Import": - { - "filename":"$cfgdir/square.geo" - //"hsize":0.001 - } - } - }, - "Materials": - { - "Omega": - { - "k":1 - } - }, - "Models": - { - "heat": - { - "setup": { - "heat-sources": { - "expr":"-laplacian_exact_solution:laplacian_exact_solution" - } - } - } - }, - "BoundaryConditions": - { - "heat": - { - "temperature": - { - "mybc": - { - "markers":["Left","Bottom","Right","Top"], - "expr":"exact_solution:exact_solution" - } - } - } - }, - "PostProcess": - { - "heat": - { - "Exports": - { - "fields":["temperature","pid"], - "expr": - { - "exact_solution":"exact_solution:exact_solution" - } - }, - "Measures": - { - "Normal-Heat-Flux": - { - "bottom": - { - "markers":"Top", - "direction":"inward" - } - }, - "Norm": - { - "error-evaluated": - { - "field":"temperature", - "type":["L2-error","H1-error","SemiH1-error"], - "solution":"exact_solution:exact_solution", - "grad_solution":"{grad_exact_solution_0,grad_exact_solution_1}:grad_exact_solution_0:grad_exact_solution_1" - } - } - }, - "Checkers": - { - "Measures": - { - "Norm_error-evaluated_L2-error": - { - "value":0, - "tolerance":1e-2 - }, - "Norm_error-evaluated_H1-error": - { - "value":0, - "tolerance":1 - }, - "Norm_error-evaluated_SemiH1-error": - { - "value":0, - "tolerance":1 - } - } - } - } - } - -} diff --git a/src/utils/report.hpp b/src/utils/report.hpp index 7544e20..d8a0669 100644 --- a/src/utils/report.hpp +++ b/src/utils/report.hpp @@ -42,12 +42,12 @@ class Report { } } - void setMeasure(const std::string name, double value) + void setMeasure(std::string const& name, double value) { M_data[name] = value; } - double getMeasure(const std::string name) + double getMeasure(std::string const& name) { return M_data.at(name); } diff --git a/test.slurm b/test.slurm deleted file mode 100644 index fa1723d..0000000 --- a/test.slurm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -#SBATCH -p public -#SBATCH -n 10 -#SBATCH -J test -#SBATCH -o job%j-o.log -#SBATCH -e job%j-e.log -echo "Hello world" -mpirun -np 10 -bind-to core feelpp_toolbox_heat --config-file /usr/share/feelpp/data/testcases/toolboxes/heat/cases/Building/ThermalBridgesENISO10211/case3.cfg \ No newline at end of file From 9bc9a2ee789e619dd4366dd0da079c9b741cd92a Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 10:42:49 +0100 Subject: [PATCH 009/112] rm old files from cmake --- src/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4fa60a2..aab0af7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,3 @@ feelpp_add_testcase(cases PREFIX fp CATEGORY feelpp) -add_subdirectory(cases/laplacian) - -add_subdirectory(example) -add_subdirectory(app-feelpp-discr-1.old) add_subdirectory(app-feelpp-io) add_subdirectory(app-feelpp-distance) From 519929fb6f5dc4bb298a7894fc32fff4570bb717 Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 10:46:59 +0100 Subject: [PATCH 010/112] fix env --- docs/antora.yml | 3 +- docs/modules/ROOT/nav.adoc | 5 +- docs/modules/ROOT/pages/index.adoc | 46 ++++++++++++-- docs/modules/documentation/nav.adoc | 4 ++ .../pages/add_a_case.adoc | 0 .../documentation/pages/env/antora.adoc | 16 +++++ .../documentation/pages/env/cmake.adoc | 37 +++++++++++ .../pages/env/githubactions.adoc | 19 ++++++ .../documentation/pages/env/jupyter.adoc | 56 +++++++++++++++++ .../documentation/pages/env/rename.adoc | 5 ++ .../documentation/pages/env/vscode.adoc | 14 +++++ .../pages/overview.adoc | 0 .../documentation/pages/quickstart.adoc | 63 +++++++++++++++++++ .../pages/software-and-demonstrators.adoc | 0 14 files changed, 259 insertions(+), 9 deletions(-) create mode 100644 docs/modules/documentation/nav.adoc rename docs/modules/{ROOT => documentation}/pages/add_a_case.adoc (100%) create mode 100644 docs/modules/documentation/pages/env/antora.adoc create mode 100644 docs/modules/documentation/pages/env/cmake.adoc create mode 100644 docs/modules/documentation/pages/env/githubactions.adoc create mode 100644 docs/modules/documentation/pages/env/jupyter.adoc create mode 100644 docs/modules/documentation/pages/env/rename.adoc create mode 100644 docs/modules/documentation/pages/env/vscode.adoc rename docs/modules/{ROOT => documentation}/pages/overview.adoc (100%) create mode 100644 docs/modules/documentation/pages/quickstart.adoc rename docs/modules/{ROOT => documentation}/pages/software-and-demonstrators.adoc (100%) diff --git a/docs/antora.yml b/docs/antora.yml index a1ae035..66b8390 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -14,4 +14,5 @@ asciidoc: python: Python cpp: C++ nav: - - modules/ROOT/nav.adoc \ No newline at end of file + - modules/ROOT/nav.adoc + - modules/documentation/nav.adoc \ No newline at end of file diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index d9f6673..2782717 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,4 +1 @@ -* xref:ROOT:index.adoc[Apps-Feelpp] -* xref:ROOT:overview.adoc[Overview] -* xref:ROOT:software-and-demonstrators.adoc[Software and demonstrators] -* xref:ROOT:add_a_case.adoc[Add a case] \ No newline at end of file +* xref:ROOT:index.adoc[Apps-Feelpp] \ No newline at end of file diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index fde3993..4e1035e 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -1,4 +1,42 @@ -= Apps-Feelpp -:page-layout: toolboxes -:page-tags: catalog, catalog-index -:docdatetime: 2025-07-10T13:37:50 +:imagesprefix: +ifdef::env-github,env-browser,env-vscode[:imagesprefix: ../images/] += feelpp.benchmarking +:page-layout: manuals +:page-cards-tag: benchmark,report,machine,application,usecase,example +:page-tags: dashboard_index +:page-cards-within-module: false +:docdatetime: 2025-12-09:10:33:57 + +- Feel++ Benchmarking Version : 4.0.0 + +== Overview + +=== Latest benchmarks + + + + + + + +[.scrollable] +-- +[cols="^1,^2,^1,^1,^1, options="header"] +|=== +| Status | Date | machine | application | Use Case + +|🟢 | 2025-12-09 10:30:47 | gaya | feelpp_app_io | eye-mesh +|🟢 | 2025-12-09 10:27:36 | gaya | feelpp_app_io | eye-mesh + +|=== +-- + +++++ + + +++++ diff --git a/docs/modules/documentation/nav.adoc b/docs/modules/documentation/nav.adoc new file mode 100644 index 0000000..0042575 --- /dev/null +++ b/docs/modules/documentation/nav.adoc @@ -0,0 +1,4 @@ + +* xref:documentation:overview.adoc[Overview] +* xref:documentation:software-and-demonstrators.adoc[Software and demonstrators] +* xref:documentation:add_a_case.adoc[Add a case] \ No newline at end of file diff --git a/docs/modules/ROOT/pages/add_a_case.adoc b/docs/modules/documentation/pages/add_a_case.adoc similarity index 100% rename from docs/modules/ROOT/pages/add_a_case.adoc rename to docs/modules/documentation/pages/add_a_case.adoc diff --git a/docs/modules/documentation/pages/env/antora.adoc b/docs/modules/documentation/pages/env/antora.adoc new file mode 100644 index 0000000..8144312 --- /dev/null +++ b/docs/modules/documentation/pages/env/antora.adoc @@ -0,0 +1,16 @@ += Antora Environment + +Antora is our static website generator. +We use it to generate the documentation of the project +It is part of the documentation of https://docs.feelpp.org[{feelpp} docs] website. + +.To generate the documentation +[source,shell] +---- + $ npm install # <1> + $ npm run antora # <2> + $ npm run start # <3> +---- +<1> Install the dependencies +<2> Generate the documentation +<3> Serve the documentation, the URL is provided in the console diff --git a/docs/modules/documentation/pages/env/cmake.adoc b/docs/modules/documentation/pages/env/cmake.adoc new file mode 100644 index 0000000..10217c6 --- /dev/null +++ b/docs/modules/documentation/pages/env/cmake.adoc @@ -0,0 +1,37 @@ += CMake Environment + +The CMakeLists.txt is setup with {feelpp}. +A sample {feelpp} application is available in `src`. + +== Building + +The CMakeLists.txt is configured to build the application in `src`. +The following commands can be used to build the application: + +[source,bash] +---- + $ cmake --preset default # <1> + $ cmake --build --preset default # <2> + $ cmake --build --preset default -t install # <3> +---- +<1> Configure the project +<2> Build the project +<3> Install the project + +== Packaging + +CPack is configured and allows to generate a binary and source package. +Use the following commands to generate the binary package: + + $ cmake --build --preset default -t package + +Use the following commands to generate the source package: + + $ cmake --build --preset default -t package_source + +== Testing + +CTest is configured. +Use the following command to run the tests: + + $ cmake --build --preset default -t test \ No newline at end of file diff --git a/docs/modules/documentation/pages/env/githubactions.adoc b/docs/modules/documentation/pages/env/githubactions.adoc new file mode 100644 index 0000000..071d904 --- /dev/null +++ b/docs/modules/documentation/pages/env/githubactions.adoc @@ -0,0 +1,19 @@ += GitHub Actions + +GitHub Actions are set up to + +* build the documentation using Antora and upload them to docs.feelpp.org[{feelpp} docs] upon any change in the repo. +* build, install, package and deliver the {feelpp} code + +See the [workflow file](.github/workflows/ci.yml) for more details. + +== Skipping a job + +You can skip the CI by adding the following line in the commit message: `[skip ci]` + +You can skip the job that build the documentation by adding the following line in the commit message: `doc skip`. + +You can skip the job that build the code by adding the following line in the commit message: `code skip`. + + + diff --git a/docs/modules/documentation/pages/env/jupyter.adoc b/docs/modules/documentation/pages/env/jupyter.adoc new file mode 100644 index 0000000..f873433 --- /dev/null +++ b/docs/modules/documentation/pages/env/jupyter.adoc @@ -0,0 +1,56 @@ += {project_name} Notebook +:stem: latexmath +:page-jupyter: true + +[.lead] +This is a Jupyter notebook for the {project_name} project. + +== Introduction + +You write your notebook in AsciiDoc including LaTeX math and thanks to the `:page-jupyter: true` attribute, the notebook is converted to a Jupyter notebook when the book is built. + +== Code cells + +You can include code cells in your notebook using the `[source,python]` block macro. + +[source,python] +---- +import sys, os +print("Hello, world!") +---- + +== {feelpp} Code cells + +You can include {feelpp} code cells in your notebook using the `[source,python]` block macro. + +[source,python] +---- +import feelpp +app = feelpp.Environment(["myapp"],config=feelpp.globalRepository("myapp")) + +geo=feelpp.download( "github:{repo:feelpp,path:feelpp/quickstart/laplacian/cases/feelpp2d/feelpp2d.geo}", worldComm=app.worldCommPtr() )[0] +print("geo file: {}".format(geo)) +mesh = feelpp.load(feelpp.mesh(dim=2,realdim=2), geo, 0.1) + +Xh=feelpp.functionSpace(mesh=mesh, space="Pchv") +f = Xh.element() +f.on(range=feelpp.elements(mesh),expr=feelpp.expr("{sin(pi*x)*sin(pi*y),cos(pi*x)*cos(pi*y)}:x:y",row=2,col=1)) +e= feelpp.exporter(mesh=mesh) +e.add("f",f) +e.save() +---- + +You can then visualize the result using the `pyvista` package as follows: + +[source,python] +---- +from xvfbwrapper import Xvfb +vdisplay = Xvfb() +vdisplay.start() + +import pyvista as pv +pv.set_jupyter_backend('panel') +reader = pv.get_reader("exports/ensightgold/Exporter/Exporter.case") +mesh = reader.read() +mesh.plot(scalars="f",show_edges=True) +---- \ No newline at end of file diff --git a/docs/modules/documentation/pages/env/rename.adoc b/docs/modules/documentation/pages/env/rename.adoc new file mode 100644 index 0000000..e7f8833 --- /dev/null +++ b/docs/modules/documentation/pages/env/rename.adoc @@ -0,0 +1,5 @@ += Renaming the Project + +The script `rename.sh` renames the project. + +You have to answer a few questions to set up a new project out of this template. diff --git a/docs/modules/documentation/pages/env/vscode.adoc b/docs/modules/documentation/pages/env/vscode.adoc new file mode 100644 index 0000000..241590e --- /dev/null +++ b/docs/modules/documentation/pages/env/vscode.adoc @@ -0,0 +1,14 @@ += VS Code Integration + +The project is configured to integrate VSCode using Docker Container. + +The Docker image can be set from `feelpp/feelpp` or `feelpp/feelpp-toolboxes`, simply edit `.devcontainer/Dockerfile` and choose the image you want. + +`ssh-keyscan` is used on `github.com` to register the public key of github in $HOME/.ssh/known_hosts and avoid having git auth issues the first time we log into the container and push/pull to/from github. + +The following extensions are installed in Docker: + +* cpptools +* cmaketools +* cmake +* asciidoctor-vscode diff --git a/docs/modules/ROOT/pages/overview.adoc b/docs/modules/documentation/pages/overview.adoc similarity index 100% rename from docs/modules/ROOT/pages/overview.adoc rename to docs/modules/documentation/pages/overview.adoc diff --git a/docs/modules/documentation/pages/quickstart.adoc b/docs/modules/documentation/pages/quickstart.adoc new file mode 100644 index 0000000..2943d9c --- /dev/null +++ b/docs/modules/documentation/pages/quickstart.adoc @@ -0,0 +1,63 @@ += Quickstart Guide +:navtitle: Quickstart + +To get started with compiling and using {project_name}, you can either + +- [x] install https://docs.feelpp.org/user/latest/install/index.html[{feelpp} Debian or Ubuntu packages] if you use such systems or +- [x] use DevContainers in Visual Studio Code as described below. + +To get started with viewing and creating documentation, checkout the project xref:env/antora.adoc[Antora] page. + +== Using DevContainers in Visual Studio Code + +[IMPORTANT] +==== +Please ensure that you have https://code.visualstudio.com/[Visual Studio Code] and https://docs.docker.com/engine/install/[Docker] installed before proceeding. +==== + +=== Getting Started + +To start using DevContainers in Visual Studio Code, follow these steps: + +. Open your project in Visual Studio Code. +. A `devcontainer.json` file in the root of your project in `.devcontainer` directory +. A configuration similar to the following one is available: ++ +[source,json] +---- +{ + "name": "Feel++ Dev Jammy", + "image": "ghcr.io/feelpp/feelpp-dev:jammy", + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools", + "josetr.cmake-language-support-vscode", + "asciidoctor.asciidoctor-vscode", + "ms-python.python", + "ms-toolsai.jupyter" + ] +} +---- + +. Customize the configuration based on your project requirements. +In the example above, the configuration sets the name of the Dev Container as "Feel++ Dev Jammy" and specifies the Docker image to use as "ghcr.io/feelpp/feelpp-dev:jammy". +Additionally, it includes a list of extensions to install inside the Dev Container. + +=== Opening in DevContainer + +To open your project using the DevContainer, follow these steps: + +. Open the Command Palette in Visual Studio Code by pressing `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS). +. Search for and select "Remote-Containers: Reopen in Container". +. Visual Studio Code will build the Docker image specified in the `devcontainer.json` file and open a new window inside the Dev Container. +. Once the Dev Container is loaded, you can start working on your project within the containerized environment. + +=== Benefits of Using DevContainers + +Using DevContainers in Visual Studio Code offers several benefits: + +- **Consistent Development Environment**: DevContainers provide a consistent and reproducible development environment across different machines, ensuring that everyone works in the same environment. +- **Isolation and Dependency Management**: DevContainers isolate your project dependencies from your local machine, reducing conflicts and simplifying dependency management. +- **Easy Extension Installation**: DevContainers automatically install the specified extensions, making it easy to set up the required tools and configurations for your project. + +NOTE: Make sure your Docker daemon is running and accessible from the terminal to use DevContainers in Visual Studio Code. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/software-and-demonstrators.adoc b/docs/modules/documentation/pages/software-and-demonstrators.adoc similarity index 100% rename from docs/modules/ROOT/pages/software-and-demonstrators.adoc rename to docs/modules/documentation/pages/software-and-demonstrators.adoc From b0b20db790c93c7dda897542d50bf936a64935a3 Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 10:47:07 +0100 Subject: [PATCH 011/112] add firtufy_source flag ? --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aab0af7..d81f598 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,4 @@ +add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3) feelpp_add_testcase(cases PREFIX fp CATEGORY feelpp) add_subdirectory(app-feelpp-io) add_subdirectory(app-feelpp-distance) From dc977d42bd109ff3184bda519adfa6487754830f Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 12:00:02 +0100 Subject: [PATCH 012/112] up deps --- package-lock.json | 14 +++++++------- package.json | 2 +- site.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd36e5d..ef846d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@antora/site-generator": "~3.1.14", "@antora/site-generator-default": "~3.1.14", "@asciidoctor/core": "~2.2.8", - "@feelpp/asciidoctor-extensions": "1.0.0-rc.13", + "@feelpp/asciidoctor-extensions": "1.0.0-rc.15", "asciidoctor": "~2.2.8", "asciidoctor-jupyter": "^0.7.0", "asciidoctor-kroki": "^0.18.1", @@ -361,9 +361,9 @@ } }, "node_modules/@feelpp/asciidoctor-extensions": { - "version": "1.0.0-rc.13", - "resolved": "https://registry.npmjs.org/@feelpp/asciidoctor-extensions/-/asciidoctor-extensions-1.0.0-rc.13.tgz", - "integrity": "sha512-brDULLvvzMDtrmFfDXT9nZoPIpzJ+cIwsWVnJ6rQVz0HZkd1MDUm+LcsDMduwUbezFTRpuu98sYTiIpbZmEfAw==" + "version": "1.0.0-rc.15", + "resolved": "https://registry.npmjs.org/@feelpp/asciidoctor-extensions/-/asciidoctor-extensions-1.0.0-rc.15.tgz", + "integrity": "sha512-HcZxT2EJa/UMtFsfLJmznA508Wv3nZxIL4HQccUDFCTALJn0Ez01eWyZYFXk2ye0Cfs9P4a37JZJB7dJDTX8BQ==" }, "node_modules/@iarna/toml": { "version": "2.2.5", @@ -3486,9 +3486,9 @@ } }, "@feelpp/asciidoctor-extensions": { - "version": "1.0.0-rc.13", - "resolved": "https://registry.npmjs.org/@feelpp/asciidoctor-extensions/-/asciidoctor-extensions-1.0.0-rc.13.tgz", - "integrity": "sha512-brDULLvvzMDtrmFfDXT9nZoPIpzJ+cIwsWVnJ6rQVz0HZkd1MDUm+LcsDMduwUbezFTRpuu98sYTiIpbZmEfAw==" + "version": "1.0.0-rc.15", + "resolved": "https://registry.npmjs.org/@feelpp/asciidoctor-extensions/-/asciidoctor-extensions-1.0.0-rc.15.tgz", + "integrity": "sha512-HcZxT2EJa/UMtFsfLJmznA508Wv3nZxIL4HQccUDFCTALJn0Ez01eWyZYFXk2ye0Cfs9P4a37JZJB7dJDTX8BQ==" }, "@iarna/toml": { "version": "2.2.5", diff --git a/package.json b/package.json index 04454c3..7e7cb2f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@antora/site-generator": "~3.1.14", "@antora/site-generator-default": "~3.1.14", "@asciidoctor/core": "~2.2.8", - "@feelpp/asciidoctor-extensions": "1.0.0-rc.13", + "@feelpp/asciidoctor-extensions": "1.0.0-rc.15", "asciidoctor": "~2.2.8", "asciidoctor-jupyter": "^0.7.0", "asciidoctor-kroki": "^0.18.1", diff --git a/site.yml b/site.yml index 53175cb..21845b4 100644 --- a/site.yml +++ b/site.yml @@ -9,7 +9,7 @@ content: ui: supplemental_files: ./docs/antora/supplemental-ui bundle: - url: https://github.com/feelpp/antora-ui/releases/latest/download/ui-bundle.zip + url: https://github.com/feelpp/antora-ui/releases/download/v0.46/ui-bundle.zip snapshot: true output: clean: true From a9f527e74ce8a96703e33f1882544d86f99e2066 Mon Sep 17 00:00:00 2001 From: Javier Cladellas Date: Tue, 9 Dec 2025 13:22:57 +0100 Subject: [PATCH 013/112] add extra js and css for bench --- docs/antora/supplemental-ui/css/figures.css | 78 +++++++++++++++++++ docs/antora/supplemental-ui/css/table.css | 3 + .../supplemental-ui/js/figure-helper.js | 52 +++++++++++++ .../supplemental-ui/js/table-filter-sort.js | 71 +++++++++++++++++ .../partials/footer-content.hbs | 5 ++ .../partials/header-content.hbs | 3 + 6 files changed, 212 insertions(+) create mode 100644 docs/antora/supplemental-ui/css/figures.css create mode 100644 docs/antora/supplemental-ui/css/table.css create mode 100644 docs/antora/supplemental-ui/js/figure-helper.js create mode 100644 docs/antora/supplemental-ui/js/table-filter-sort.js diff --git a/docs/antora/supplemental-ui/css/figures.css b/docs/antora/supplemental-ui/css/figures.css new file mode 100644 index 0000000..e0aed62 --- /dev/null +++ b/docs/antora/supplemental-ui/css/figures.css @@ -0,0 +1,78 @@ +.figure-container { + position: relative; + margin: 1.5rem auto; + padding: 1rem; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); +} + +.subfigure-container { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #f9f9f9; + padding: 1rem; + border: 1px solid #ddd; + border-top: none; + border-radius: 0 0 8px 8px; +} + +.subfigure-container.active { + position: relative; + opacity: 1; + pointer-events: auto; + z-index: 1; +} + +.subfigure-container.inactive { + opacity: 0; + pointer-events: none; + z-index: 0; +} + +/* Tabs container: display buttons inline with a bottom border to indicate grouping */ +.tabs-container { + display: flex; + border-bottom: 2px solid #007acc; + margin-bottom: 0.5rem; +} + +/* Figure tab button styling */ +.figure-tab { + background: transparent; + border: none; + outline: none; + padding: 0.5rem 1rem; + margin-right: 0.3rem; + font-size: 1rem; + color: #007acc; + cursor: pointer; + border-radius: 4px 4px 0 0; + transition: background-color 0.2s ease, color 0.2s ease; +} + +.figure-tab:hover, +.figure-tab.active { + background-color: #007acc; + color: #fff; +} + +.export-container button { + background-color: #007acc; + color: #fff; + border: none; + padding: 0.4rem 0.8rem; + margin-right: 0.4rem; + border-radius: 4px; + cursor: pointer; + font-size: 0.9rem; + transition: background-color 0.2s ease; +} + +.export-container button:hover { + background-color: #005fa3; +} \ No newline at end of file diff --git a/docs/antora/supplemental-ui/css/table.css b/docs/antora/supplemental-ui/css/table.css new file mode 100644 index 0000000..ffbdf67 --- /dev/null +++ b/docs/antora/supplemental-ui/css/table.css @@ -0,0 +1,3 @@ +.scrollable { + overflow-x: auto; +} \ No newline at end of file diff --git a/docs/antora/supplemental-ui/js/figure-helper.js b/docs/antora/supplemental-ui/js/figure-helper.js new file mode 100644 index 0000000..34fa910 --- /dev/null +++ b/docs/antora/supplemental-ui/js/figure-helper.js @@ -0,0 +1,52 @@ +function downloadData(data, filename) { + if (data.length == 1) { + if (data[0].content.length == 1) { + d = data[0].content[0]; + const blob = new Blob([d.data], { type: "plain/text;charset=utf-8" }); + downloadBlob(blob, `${d.title}.${data[0].format}`); + } + else { + downloadFilesAsZip(data[0].content, filename); + } + } + else if (data.length > 1) { + downloadFilesAsZip(data, filename); + } + else { + alert("No data to download"); + } +} + + +function downloadFilesAsZip(data, zipFilename) { + const zip = new JSZip(); + data.forEach((d) => { + d.content.forEach((c) => { + const filename = `${c.title}.${d.format}`; + zip.file(filename, c.data); + }); + }); + zip.generateAsync({ type: "blob" }).then((blob) => downloadBlob(blob, zipFilename)); +} + +function downloadBlob(blob, filename) { + const url = URL.createObjectURL(blob); + const a = document.createElement("a"); + a.href = url; + a.download = filename; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + URL.revokeObjectURL(url); +} + +function switchTab(button, tabIndex) { + const figureContainer = button.closest('.figure-container'); + figureContainer.querySelectorAll('.subfigure-container').forEach(subfig => { + subfig.classList.remove('active'); + subfig.classList.add('inactive'); + }); + const activeSubfig = figureContainer.querySelector(`.subfigure-container[data-subfigure='${tabIndex}']`); + activeSubfig.classList.add('active'); + activeSubfig.classList.remove('inactive'); +} diff --git a/docs/antora/supplemental-ui/js/table-filter-sort.js b/docs/antora/supplemental-ui/js/table-filter-sort.js new file mode 100644 index 0000000..bc98a9c --- /dev/null +++ b/docs/antora/supplemental-ui/js/table-filter-sort.js @@ -0,0 +1,71 @@ +// table-filter-sort.js +(function () { + function filterTable(table, input) { + if (!table || !input) return; + + input.addEventListener("input", () => { + const term = input.value.toLowerCase(); + const rows = table.querySelectorAll("tbody tr"); + rows.forEach(row => { + row.style.display = row.textContent.toLowerCase().includes(term) ? "" : "none"; + }); + }); + } + + function sortTable(table) { + if (!table) return; + + const headers = table.querySelectorAll("thead th"); + headers.forEach((header, index) => { + header.style.cursor = "pointer"; + + header.addEventListener("click", () => { + const tbody = table.querySelector("tbody"); + const rows = Array.from(tbody.querySelectorAll("tr")); + const asc = header.dataset.sortOrder !== "asc"; + + // reset arrows + headers.forEach(h => { + h.textContent = h.textContent.replace(/[\u25B2\u25BC]/g, "").trim(); + delete h.dataset.sortOrder; + }); + + // set arrow + header.dataset.sortOrder = asc ? "asc" : "desc"; + header.textContent += asc ? " ▲" : " ▼"; + + // sort rows + rows.sort((a, b) => { + const ta = a.children[index].textContent.trim(); + const tb = b.children[index].textContent.trim(); + const na = parseFloat(ta); + const nb = parseFloat(tb); + + if (!isNaN(na) && !isNaN(nb)) return asc ? na - nb : nb - na; + return asc ? ta.localeCompare(tb) : tb.localeCompare(ta); + }); + + rows.forEach(r => tbody.appendChild(r)); + }); + }); + } + + /** + * Initialize a table with sorting & filtering + * @param {HTMLElement} table - the table element + * @param {string} inputId - ID of the input element + */ + function initTable(table, inputId) { + const input = document.getElementById(inputId); + if (!table || !input) { + console.warn("Table or input not found", table, inputId); + return; + } + + filterTable(table, input); + sortTable(table); + } + + // expose globally + window.initTable = initTable; +})(); diff --git a/docs/antora/supplemental-ui/partials/footer-content.hbs b/docs/antora/supplemental-ui/partials/footer-content.hbs index f20f705..37ab140 100644 --- a/docs/antora/supplemental-ui/partials/footer-content.hbs +++ b/docs/antora/supplemental-ui/partials/footer-content.hbs @@ -19,3 +19,8 @@ + + + + + diff --git a/docs/antora/supplemental-ui/partials/header-content.hbs b/docs/antora/supplemental-ui/partials/header-content.hbs index c4b7c6c..f7c1a97 100644 --- a/docs/antora/supplemental-ui/partials/header-content.hbs +++ b/docs/antora/supplemental-ui/partials/header-content.hbs @@ -1,3 +1,6 @@ + + +