Skip to content

Commit

Permalink
Merge branch 'develop' into 161-cabin
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm committed Aug 17, 2023
2 parents 189271c + 925e0eb commit 329dfd3
Show file tree
Hide file tree
Showing 1,353 changed files with 47,820 additions and 8,214 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Deploy

on:
push:
branches:
- '**' # Push events on all branches
paths-ignore:
- '.github/workflows/init.yml'
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 including semver

jobs:

build_docs:
runs-on: ubuntu-22.04
name: Build, Install, Package documentation
if: "!contains(github.event.head_commit.message, 'docs skip')"
steps:
- uses: actions/checkout@v3
- name: Install credentials
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials
env:
GITHUB_OAUTH: ${{ secrets.CR_PAT_WORKFLOW }}
- name: Build
run: |
npm install
npm run antora
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: public # The folder the action should deploy.
4 changes: 2 additions & 2 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Trigger Toolbox Update

on:
push:
branches: master
branches: [master,develop]

jobs:
build:
Expand All @@ -21,4 +21,4 @@ jobs:
ORG: feelpp
REPO: book.feelpp.org
run: |
curl -d "{\"event_type\": \"${EVENT}\"}" -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.everest-preview+json" "https://api.github.com/repos/${ORG}/${REPO}/dispatches"
curl -d "{\"event_type\": \"${EVENT}\"}" -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.everest-preview+json" "https://api.github.com/repos/${ORG}/${REPO}/dispatches"
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Thumbs.db
*.kate-swp
build/
*~
*.DS_Store
**/.DS_Store
*bak
**/feelppdb
**/node_modules
**/node_modules
public/
node_modules/
cache/
jupyter/
7 changes: 2 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"spellright.documentTypes": [
],
"asciidoc.asciidoctor_command": "asciidoctor",
"asciidoc.asciidoctorpdf_command": "asciidoctor-pdf",
"asciidoc.forceUnixStyleSeparator": true,
"asciidoc.preview.breaks": false,
"asciidoc.preview.doubleClickToSwitchToEditor": true,
Expand All @@ -31,14 +30,12 @@
"asciidoc.preview.lineHeight": 1.6,
"asciidoc.preview.linkify": true,
"asciidoc.preview.markEditorSelection": true,
"asciidoc.preview.openAsciiDocLinks": "inPreview",
"asciidoc.preview.scrollEditorWithPreview": true,
"asciidoc.preview.scrollEditorWithPreview": false,
"asciidoc.preview.scrollPreviewWithEditor": true,
"asciidoc.preview.useEditorStyle": true,
"asciidoc.previewFrontMatter": "hide",
"asciidoc.preview.attributes": {},
"asciidoc.preview.style": "",
"asciidoc.trace": "off",
"asciidoc.use_asciidoctor_js": true,
"asciidoc.use_asciidoctorpdf": false
"asciidoc.use_asciidoctor_js": true
}
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
source "https://rubygems.org"
gem 'liquid'
5 changes: 5 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ ifdef::env-github,env-browser[]
endif::[]
:stem: latexmath


image::https://api.netlify.com/api/v1/badges/4026f83d-53a1-4ad6-86e7-b6bda4298cc6/deploy-status[link:https://app.netlify.com/sites/dashing-twilight-9661e1/deploys[Netlify Status]]



List of Toolboxes

* <<examples/modules/csm/pages/README#,Computational Solid Mechanics>>
Expand Down
9 changes: 0 additions & 9 deletions benchmarks/modules/ROOT/_attributes.adoc

This file was deleted.

1 change: 0 additions & 1 deletion benchmarks/modules/cfd/_attributes.adoc

This file was deleted.

1 change: 0 additions & 1 deletion benchmarks/modules/csm/_attributes.adoc

This file was deleted.

1 change: 0 additions & 1 deletion benchmarks/modules/fsi/_attributes.adoc

This file was deleted.

1 change: 0 additions & 1 deletion benchmarks/modules/thermoelectric/_attributes.adoc

This file was deleted.

11 changes: 9 additions & 2 deletions contribute/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: contribute
title: Toolbox Contribution Guide
version: master
title: Toolboxes Contribution Guide
version: ~
asciidoc:
attributes:
project_name: Toolboxes Contribution Guide
plotly: plotly
vtkjs: VTK.js
feelpp: Feel++
girder: Girder
nav:
- modules/ROOT/nav.adoc
- modules/girder/nav.adoc
49 changes: 24 additions & 25 deletions contribute/modules/ROOT/examples/tree-example.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
examples
└── modules
├── ROOT
   └── pages
└── pages
├── cfd <1>
   ├── examples <2>
   │   ├── cyclone
   │   │   └── attic
   │   └── flow_past_cylinder <3>
   └── pages <4>
   └── flow_past_cylinder
├── examples <2>
├── cyclone
│ │ └── attic
└── flow_past_cylinder <3>
└── pages <4>
└── flow_past_cylinder
└── csm <5>
├── assets <6>
│   └── images <7>
│   ├── ribs <8>
│   ├── rotating-winch <8>
│   ├── sensor <8>
│   ├── sheet-rounding <8>
│   ├── suspension <8>
│   ├── t-beam <8>
│   ├── torsion-bar <8>
│   └── vierendeel-truss <8>
├─── images <6>
│ ├── ribs <7>
│ ├── rotating-winch <7>
│ ├── sensor <7>
│ ├── sheet-rounding <7>
│ ├── suspension <7>
│ ├── t-beam <7>
│ ├── torsion-bar <7>
│ └── vierendeel-truss <7>
└── pages <4>
├── ribs <9>
├── rotating-winch <9>
├── sensor <9>
├── sheet-rounding <9>
├── suspension <9>
├── t-beam <9>
├── torsion-bar <9>
└── vierendeel-truss <9>
├── ribs <8>
├── rotating-winch <8>
├── sensor <8>
├── sheet-rounding <8>
├── suspension <8>
├── t-beam <8>
├── torsion-bar <8>
└── vierendeel-truss <8>
33 changes: 16 additions & 17 deletions contribute/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ This is how the `examples` tree directory may look like
--
include::{examplesdir}/tree-example.txt[]
--
<1> example module for the computational fluid dynamic (cfd) toolbox
<2> `examples` contains the examples input dataset
<3> example directory `flow_past_cylinder` containing the configuration files (`cfg`, `json`, `geo`, ...)
<4> `pages` contains the documentation pages where Antora look into to transform `.adoc` files into `.html` files
<5> example module for the computational solid mechanics (csm) toolbox
<6> the `assets` directory contains images or data associated to the examples.
<7> the `assets/images` contains the images of each example
<8> the images of each example are organized by directory named using the slug name of the example,
<9> each example documentation is located in a topic directory named using the slug name of the example. The topic directory contains `.adoc` files.
<.> example module for the computational fluid dynamic (cfd) toolbox
<.> `examples` contains the examples input dataset
<.> example directory `flow_past_cylinder` containing the configuration files (`cfg`, `json`, `geo`, ...)
<.> `pages` contains the documentation pages where Antora look into to transform `.adoc` files into `.html` files
<.> example module for the computational solid mechanics (csm) toolbox
<.> the `images` directory contains images associated to the examples.
<.> the images of each example are organized by directory named using the slug name of the example,
<.> each example documentation is located in a topic directory named using the slug name of the example. The topic directory contains `.adoc` files.

NOTE: the slug name of a `case` does not contain spaces or dots or any special characters and can for example be used in url.

Expand All @@ -72,12 +71,12 @@ NOTE: the slug name of a `case` does not contain spaces or dots or any special c
You need to identify which toolbox the example belongs to.
here is the list of **slug toolbox name**:

cfd:: xref:toolboxes:cfd:index.adoc[Computational Fluid Dynamics]
csm:: xref:toolboxes:csm:index.adoc[Computation Solid Mechanics]
heat:: xref:toolboxes:heat:index.adoc[Heat transfer]
heatfluid:: xref:toolboxes:heatfluid:index.adoc[Heat and CFD coupling]
fsi:: xref:toolboxes:fsi:index.adoc[Fluid Structure Interaction (FSI)], CFD and CSM coupling
thermoelectric:: xref:toolboxes:thermoelectric:index.adoc[Electrostatic and heat coupling]
cfd:: xref:toolboxes:cfd:manual.adoc[Computational Fluid Dynamics]
csm:: xref:toolboxes:csm:manual.adoc[Computation Solid Mechanics]
heat:: xref:toolboxes:heat:manual.adoc[Heat transfer]
heatfluid:: xref:toolboxes:heatfluid:manual.adoc[Heat and CFD coupling]
fsi:: xref:toolboxes:fsi:manual.adoc[Fluid Structure Interaction (FSI)], CFD and CSM coupling
thermoelectric:: xref:toolboxes:thermoelectric:manual.adoc[Electrostatic and heat coupling]


The example is then located in the model named after The slug name of the toolbox:
Expand Down Expand Up @@ -130,10 +129,10 @@ This step may require
* [x] generating {plotly} interactive graphics embedded in the browser to show 2D data, convergence plots, ...

The generation of {vtkjs} files is now **preferred** as it permits interaction.
Have a look at the xref:cases:csm:README.adoc[examples in computational solid mechanics] providing both images and {vtkjs} files.
Have a look at the xref:toolboxes:csm:README.adoc[examples in computational solid mechanics] providing both images and {vtkjs} files.

NOTE: The image files for the example `electromagnet` in the `thermoelectric` toolbox are in
link:https://github.com/feelpp/toolbox/tree/master/examples/modules/thermoelectric/assets/images/electromagnet[examples/modules/thermoelectric/assets/images/electromagnet/]
link:https://github.com/feelpp/toolbox/tree/master/examples/modules/thermoelectric/images/electromagnet[examples/modules/thermoelectric/images/electromagnet/]

NOTE: Read about xref:vtkjs.adoc[how to create and use {vtkjs} files] and about xref:contribute:girder:README.adoc[contributing data using girder].

Expand Down
90 changes: 52 additions & 38 deletions contribute/modules/ROOT/pages/vtkjs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The {vtkjs} are uploaded then to https://girder.math.unistra.fr[Girder] and are
See

* [x] xref:girder:README.adoc[how to contribute data using Girder]
* [x] and the xref:data:ROOT:index.adoc[Data manual] to understand {feelpp} data management.
* [x] and the xref:data:ROOT:manual.adoc[Data manual] to understand {feelpp} data management.

== Import the javascript library in an Antora page

Expand All @@ -31,52 +31,66 @@ NOTE: the {vtkjs} file is provided by the `supplemental-ui` directory.

== Use WebGL rendering with VTK-js

* Create a `div` with an `id` where you want to place the WebGL window.
+
[source,javascript]
----
<div id="vtkVisuSection1" ... </div>
----
We rely on an Asciidoctor extension to render VTK-js visualization.

* Then, you can call the function `feelppVtkJs.createSceneImporter( divId, options )`. The first argument `divId` is
the `id` of the `div` defined previouly. The second argument `options` collect the rendering properties :
** `fileURL` : [mandatory] the url of a vtkjs file
** `objects` : description of objects to visualize.
[source,javascript]
* Create a `vtkjs` block with a file URL:

[,adoc]
-----
[vtkjs,https://mydb.com/myfile.vtkjs]
----
objects: { "deformation":[ { scene:"displacement" }, { scene:"von_mises" }, { scene:"pid" } ],
"geometry":[ { scene:"geo_initial", name:"solid" } ] }
----
** `onlyOneObject` : [default=false] rendering is done for only one object of the scene (only work if `objects` is not given)
-----

* Define how objects will be visualized:

[source,javascript]
[,adoc]
-----
[vtkjs,https://mydb.com/myfile.vtkjs]
----
<script type="text/javascript">
feelppVtkJs.createSceneImporter( vtkVisuSection1,
{ fileURL: "https://mydb.com/myfile.vtkjs",
objects: { "deformation":[ { scene:"displacement" }, { scene:"von_mises" }, { scene:"pid" } ],
"geometry":[ { scene:"geo_initial", name:"solid" } ] } } );
</script>
{
"deformation": [
{
"scene": "displacement"
},
{
"scene": "von_mises"
},
{
"scene": "pid"
}
],
"geometry": [
{
"scene": "geo_initial",
"name": "solid"
}
]
}
----
-----

WARNING: Each `scene` option corresponds to the entries in Paraview' left panel (default is `Export.case`). We advise you to rename each scene consistently with its content before running the Python script.

IMPORTANT: Each `scene` option corresponds to the entries in Paraview' left panel (default is `Export.case`). We advise you to rename each scene consistently with its content before running the Python script.

== An example with Asciidoc in the {feelpp} book

The example of {vtkjs} visualization below is taken from xref:cases:csm:torsion-bar/README.adoc[the Torsion Bar] example.
The example of {vtkjs} visualization below is taken from xref:toolboxes:csm:torsion-bar/README.adoc[the Torsion Bar] example.

.3D Model of the torsion of a NeoHookean Beam.
++++
<div class="stretchy-wrapper-16_9">
<div id="vtkVisuSection1" style="margin: auto; width: 100%; height: 100%; padding: 10px;"></div>
</div>
<script type="text/javascript">
feelppVtkJs.createSceneImporter( vtkVisuSection1, {
fileURL: "https://girder.math.unistra.fr/api/v1/file/5a687a58b0e9570150cb252d/download",
objects: { "object":[ { scene:"displacement" }, { scene:"von_mises_criterions",name:"von_mises" }, { scene:"pid" } ] }
} );
</script>
++++
[vtkjs,https://girder.math.unistra.fr/api/v1/file/5a687a58b0e9570150cb252d/download]
----
{
"object": [
{
"scene": "displacement"
},
{
"scene": "von_mises_criterions",
"name": "von_mises"
},
{
"scene": "pid"
}
]
}
----
1 change: 0 additions & 1 deletion contribute/modules/girder/attributes.adoc

This file was deleted.

4 changes: 2 additions & 2 deletions examples/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cases
title: Feel++ Toolbox Cases Guide
name: cases-old
title: Toolboxes Case Studies (<= 0.110)
version: 'latest'
nav:
- modules/ROOT/nav.adoc
Expand Down
9 changes: 0 additions & 9 deletions examples/modules/ROOT/_attributes.adoc

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/modules/ROOT/images/cabine-600x300.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/modules/ROOT/images/drop3d_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 329dfd3

Please sign in to comment.