Skip to content

Commit

Permalink
Merge pull request #143 from hugtalbot/202408_test_fix_relative_url
Browse files Browse the repository at this point in the history
Attempt to fix relative url
  • Loading branch information
hugtalbot authored Aug 9, 2024
2 parents af2ffe8 + a7fd353 commit ce2df10
Show file tree
Hide file tree
Showing 89 changed files with 267 additions and 267 deletions.
4 changes: 2 additions & 2 deletions 10_Getting_Started/15_Binaries/10_Binaries_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ If you downloaded an installer file, simply run the file, and follow the install

## Execute

To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.
To run SOFA, locate and execute the application called `runSofa`. For more detailed information on how to use the application, you can refer to the [page dedicated to runsofa](../../../using-sofa/runsofa/). This documentation will provide you with further guidance on using SOFA effectively.

### Notes for macOS Users

Unfortunately, macOS binaries of SOFA are not code-signed. It means that macOS adds a quarantine flag to the binaries when a user downloads them. The result is a warning window with the message "runSofa cannot be opened because the developer cannot be verified.", preventing to open the application.

There are several solutions to run SOFA anyway:

- Build SOFA by yourself. MacOS does not add the quarantine flags on the local builds. See the instructions [here](../build/macos/).
- Build SOFA by yourself. MacOS does not add the quarantine flags on the local builds. See the instructions [here](../../build/macos/).
- Run the following command:

```bash
Expand Down
2 changes: 1 addition & 1 deletion 10_Getting_Started/20_Build/10_Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ COPY\_ONLY with COPYONLY and **Configure** again.

## Compilation tutorial

See our page presenting [video tutorial for compilation on Linux](../video-tutorials/how-to-compile-sofa/#linux).
See our page presenting [video tutorial for compilation on Linux](../../video-tutorials/how-to-compile-sofa/#linux).
2 changes: 1 addition & 1 deletion 10_Getting_Started/20_Build/30_Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ The two scripts `setup-windows_1.bat` and `setup-windows_2.bat` install the mini

## Compilation tutorial

See our page presenting [video tutorial for compilation on Windows](../video-tutorials/how-to-compile-sofa/#windows).
See our page presenting [video tutorial for compilation on Windows](../../video-tutorials/how-to-compile-sofa/#windows).
8 changes: 4 additions & 4 deletions 10_Getting_Started/20_Build/40_Build_Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ no code optimization. **RelWithDebInfo** is similar to **Release**, but keeps th

- **SOFA\_EXTERNAL\_DIRECTORIES**: path to external directories, this can be especially useful
to build external plugins with SOFA. For more information, please read the documentation
about [Building a plugin](../../using-sofa/build-a-plugin "Building a plugin").
about [Building a plugin](../../../using-sofa/build-a-plugin "Building a plugin").


- **SOFA_BUILD\_TUTORIALS** : this options activates the build of
Expand All @@ -120,7 +120,7 @@ all tutorials located in *applications/tutorials*.

- **SOFA_BUILD\_TESTS** : this option activates unit tests for SOFA.
For more information, please go to the [Tests
page](../../contributing-to-sofa/writing-tests "Writing Tests").
page](../../../contributing-to-sofa/writing-tests "Writing Tests").


- **SOFA\_FLOATING\_POINT\_TYPE** : this option determines the type(s) (float, double or both)
Expand All @@ -136,7 +136,7 @@ deactivate the macro **SOFA\_WITH\_DOUBLE** and **SOFA\_WITH\_FLOAT** in the cod
- **SOFA\_DUMP\_VISITOR\_INFO** : enabling this option allows to get more debugging information at each
step of the simulations. For a more complete description and how to use
these information, please go to the [Inspect Performances
page](../../using-sofa/performances/inspect-performances "Inspect Performances").
page](../../../using-sofa/performances/inspect-performances "Inspect Performances").

- **SOFA_WITH_DEVTOOLS** : enabling this option activates more features for developers such as more verbose log messages.
It is enabled by default.
Expand All @@ -146,7 +146,7 @@ code of SOFA. It will be always be activated for DLLs on windows. On
some platforms, it can fix RTTI issues (typeid / dynamic\_cast), and it
significantly speeds up compilation and linking on every platform. More
information here: [Shared Libraries
Mechanism](../../programming-with-sofa/api-overview/macro-for-dll-import-export/ "Shared Libraries Mechanism").
Mechanism](../../../programming-with-sofa/api-overview/macro-for-dll-import-export/ "Shared Libraries Mechanism").


- **SOFA\_NO\_OPENGL** : this option will remove any OpenGL-related code from SOFA. This is
Expand Down
6 changes: 3 additions & 3 deletions 15_Using_SOFA/05_Lexicography.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Examples: Sofa.Component.Collision, Sofa.Component.Engine.Analyze, Sofa.Componen
Plugins are optional Modules adding more SOFA features.

Plugins contain Components.
Plugins are externalizable. Some external plugins can be [auto-fetched into SOFA sources](../plugins/fetch-plugin-code-source/).
Plugins are externalizable. Some external plugins can be [auto-fetched into SOFA sources](../../plugins/fetch-plugin-code-source/).
Plugins can be disabled via a CMake option. Most Plugins are OFF by default.

A Plugin can "contain" other Modules and Libraries. Technically, it will have link dependencies on those Modules.
Expand Down Expand Up @@ -71,7 +71,7 @@ Simulation corresponds to the process computing the change of state of the physi

## Scene
Scene denotes the graph structure (direct acyclic graph) describing the physical systems, their physical behavior, their properties and the numerical tools used for the computation. The Scene description starts with a root Node which then contains child Nodes (sub-Nodes). Each child Node of the root Node usually corresponds to one object (one physical system).
Read more about the [Scene graph](../simulation-principles/scene-graph/)
Read more about the [Scene graph](../../simulation-principles/scene-graph/)

## Example
Example refers to set of Scene files provided with SOFA. These Scene files illustrate most of the SOFA components in a dedicated Simulation. They can be found within the _examples/_ folder in the SOFA sources or within the _share/sofa/examples/_ folder in the SOFA binaries.
Expand All @@ -98,7 +98,7 @@ Component corresponds to C++ classes implementing specific physical models or al

## Data
Data is a public attribute of a Component (C++ class) visible to the user in the SOFA user interface. For a physical model or an algorithm, a Data is a parameter available for the user (e.g. the total mass `totalMass` in a mass component). Data may be defined by the user (some are compulsory - a.k.a. required - else a warning will be sent), accessed and modified.
Read more about [Data](../simulation-principles/scene-graph/#data).
Read more about [Data](../../simulation-principles/scene-graph/#data).

## Datafield
DataField refers to a Data
Expand Down
2 changes: 1 addition & 1 deletion 15_Using_SOFA/10_runSofa.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The default compilation of SOFA produces a binary file called **runSofa**, which can be
found in the folder *%{SOFA\_BUILD\_DIR}/bin*.
The execution of the binary - either via the terminal or by double-clicking the executable -
launches a default [XML scene](./create-your-scene-in-xml "Write XML scene") with the name caduceus.scn, using the Qt library.
launches a default [XML scene](./../create-your-scene-in-xml "Write XML scene") with the name caduceus.scn, using the Qt library.
![Execution of runSofa using the
default scene caduceus](https://www.sofa-framework.org/wp-content/uploads/2014/11/Screenshot-from-2015-01-14-1839152.png)

Expand Down
2 changes: 1 addition & 1 deletion 15_Using_SOFA/25_Create_your_scene_in_Cpp_.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

See [Programming with SOFA > Create your scene in C++](../programming-with-sofa/create-your-scene-in-cpp/).
See [Programming with SOFA > Create your scene in C++](../../programming-with-sofa/create-your-scene-in-cpp/).
34 changes: 17 additions & 17 deletions 15_Using_SOFA/32_Performances/20_Improve_performances.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When running `runSofa` with the GUI, an option allows to update the visual repre

The first step toward better performances is to identify the bottleneck of the simulation.
SOFA provides some tools to profile the simulation.
See [this page](./inspect-performances/) to learn how to use those tools.
See [this page](./../inspect-performances/) to learn how to use those tools.
The principle is to measure the time taken by all major steps of the simulation.
The timers are organized as a tree: a monitored step can call monitored substeps, making it a parent of the substeps.

Expand Down Expand Up @@ -66,34 +66,34 @@ If collision detection has been identified as a bottleneck, here are a few tips

### Asynchronous Free Motion

This tip requires to use a [FreeMotionAnimationLoop](../../components/animationloop/freemotionanimationloop/).
This tip requires to use a [FreeMotionAnimationLoop](../../../components/animationloop/freemotionanimationloop/).

The steps of collision detection and free motion are independent: they can be computed in parallel.
The component [FreeMotionAnimationLoop](../../components/animationloop/freemotionanimationloop/) has boolean Data *parallelCollisionDetectionAndFreeMotion* to specify if both steps are computed in parallel or not.
The component [FreeMotionAnimationLoop](../../../components/animationloop/freemotionanimationloop/) has boolean Data *parallelCollisionDetectionAndFreeMotion* to specify if both steps are computed in parallel or not.
This optimization is the most effective when both steps takes about the same time.
The total time of both steps computed in parallel will be the time taken by the most time-consuming one (plus the overhead due to parallelization).

### Parallel Algorithms

There are high chances that a simulation uses [BruteForceBroadPhase](../../components/collision/detection/algorithm/bruteforcebroadphase/) and [BVHNarrowPhase](../../components/collision/detection/algorithm/bvhnarrowphase/).
Multi-threaded versions of those two components are available in the [MultiThreading plugin](../../plugins/usual-plugins/multithreading/).
There are high chances that a simulation uses [BruteForceBroadPhase](../../../components/collision/detection/algorithm/bruteforcebroadphase/) and [BVHNarrowPhase](../../../components/collision/detection/algorithm/bvhnarrowphase/).
Multi-threaded versions of those two components are available in the [MultiThreading plugin](../../../plugins/usual-plugins/multithreading/).
Depending on the cases, the parallelization can help speeding up the collision detection phase.
See details in the [MultiThreading plugin](../../plugins/usual-plugins/multithreading/) dedicated page.
See details in the [MultiThreading plugin](../../../plugins/usual-plugins/multithreading/) dedicated page.

## Free Motion

This step is computed in the [FreeMotionAnimationLoop](../../components/animationloop/freemotionanimationloop/).
However, there are also common steps with the [DefaultAnimationLoop](../../components/animationloop/defaultanimationloop/), such as the computation of the force, the matrix assembly and the resolution of the linear system.
Therefore, most of the tips of this section are also available for [DefaultAnimationLoop](../../components/animationloop/defaultanimationloop/).
This step is computed in the [FreeMotionAnimationLoop](../../../components/animationloop/freemotionanimationloop/).
However, there are also common steps with the [DefaultAnimationLoop](../../../components/animationloop/defaultanimationloop/), such as the computation of the force, the matrix assembly and the resolution of the linear system.
Therefore, most of the tips of this section are also available for [DefaultAnimationLoop](../../../components/animationloop/defaultanimationloop/).

### The Choice of the Linear Solver

See [this page](../../simulation-principles/system-resolution/linear-solver/) for a description of the different types of linear solvers.
See [this page](../../../simulation-principles/system-resolution/linear-solver/) for a description of the different types of linear solvers.

#### Iterative Solvers

The error reduces at each iteration of an iterative solver.
Some of the parameters (e.g. *iterations*, *tolerance* and *threshold* in [CGLinearSolver](../../components/linearsolver/iterative/cglinearsolver/)) controls when the solver stops its iterations.
Some of the parameters (e.g. *iterations*, *tolerance* and *threshold* in [CGLinearSolver](../../../components/linearsolver/iterative/cglinearsolver/)) controls when the solver stops its iterations.
Less iterations means less computation, therefore faster simulations.
Stopping too early can come at the price of too large error, and can even bring instabilities.
With iterative solvers, finding an appropriate trade-off between accuracy and efficiency is key.
Expand All @@ -113,7 +113,7 @@ To activate this option, enable the Data `parallelAssemblyIndependentMatrices` i

#### Matrix Assembly vs. Matrix Free

[CGLinearSolver](../../components/linearsolver/iterative/cglinearsolver/) supports both strategies:
[CGLinearSolver](../../../components/linearsolver/iterative/cglinearsolver/) supports both strategies:

- `GraphScattered` is the template parameter for a matrix-free solver
- `CompressedRowSparseMatrixd` and `CompressedRowSparseMatrixMat3x3d` are template parameters for an assembled matrix
Expand All @@ -125,7 +125,7 @@ However, it is easy to try both strategies: just change `<CGLinearSolver templat

SparseLDLSolver has an asynchronous equivalent (AsyncSparseLDLSolver), which the goal is to reduce the duration of the linear system solving.
Computing asynchronously the LDL factorization of the matrix, this solver will however change the behavior of your simulation.
Read more about it on the [AsyncSparseLDLSolver page](../../components/linearsolver/direct/asyncsparseldlsolver/).
Read more about it on the [AsyncSparseLDLSolver page](../../../components/linearsolver/direct/asyncsparseldlsolver/).
In your scene, just replace `<SparseLDLSolver/>` by `<AsyncSparseLDLSolver/>`.

#### Constant Sparsity Pattern
Expand Down Expand Up @@ -158,14 +158,14 @@ In such scenarios, the 'ConstantSparsityPatternSystem' component is a valuable t

### Parallel ODE Solving

This optimization requires to use a [FreeMotionAnimationLoop](../../components/animationloop/freemotionanimationloop/).
This optimization requires to use a [FreeMotionAnimationLoop](../../../components/animationloop/freemotionanimationloop/).
When multiple objects evolve in a simulation, SOFA supports the following configurations:

- There is a single ODE solver for all the objects.
- There are multiple ODE solvers, and each one can simulate one or multiple objects.

In the latter case, there are as many free motion computations as the number of ODE solvers in the scene. In this first step of the FreeMotionAnimationLoop, the free motion assumes that objects can have a "free" motion, thus ignoring possible interaction between objects. Therefore, the computation of the free motion of an object is independent from the others, and each ODE solve step can be trivially parallelized.
The component [FreeMotionAnimationLoop](../../components/animationloop/freemotionanimationloop/) has boolean Data *parallelODESolving* to specify if both ODE solve steps are to be computed in parallel or not.
The component [FreeMotionAnimationLoop](../../../components/animationloop/freemotionanimationloop/) has boolean Data *parallelODESolving* to specify if both ODE solve steps are to be computed in parallel or not.

### Finite Element Method

Expand All @@ -184,7 +184,7 @@ The following options allow to leverage multi-threaded implementations of some a

## Rendering

- A data `computeBoundingBox` is available in all [AnimationLoops](../../simulation-principles/animation-loop/). This data defines whether the global bounding box of the scene is computed at each time step. Setting this data to `false` will avoid the recomputation of the bounding box used for rendering, thus possibly saving computation time.
- A data `computeBoundingBox` is available in all [AnimationLoops](../../../simulation-principles/animation-loop/). This data defines whether the global bounding box of the scene is computed at each time step. Setting this data to `false` will avoid the recomputation of the bounding box used for rendering, thus possibly saving computation time.

- Debug visualization can be very costly. For example, drawing thousands of tetrahedra is very time consuming. Draw only what you need.

Expand All @@ -199,5 +199,5 @@ This technique is available in a plugin: [https://github.com/SofaDefrost/ModelOr
## GPGPU

SOFA has a plugin allowing to compute some steps of the simulation on the GPU, based on CUDA.
See [this page](../../plugins/usual-plugins/using-cuda/).
See [this page](../../../plugins/usual-plugins/using-cuda/).
In most cases, the simulation is much faster when computed on the GPU, compared to the CPU version.
6 changes: 3 additions & 3 deletions 20_Simulation_Principles/10_Scene_Graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ The figure 3 shows a simulation involving two different objects. One node can co

To build a simulation in SOFA, the scene graph can be written both using:

* XML files. Read the [associated page](../using-sofa/write-a-scene-in-xml/) about how to write a scene in XML.
* Python scripts. Read the [associated page](../using-sofa/features/python-scripting/) about how to write in Python.
* XML files. Read the [associated page](../../using-sofa/write-a-scene-in-xml/) about how to write a scene in XML.
* Python scripts. Read the [associated page](../../using-sofa/features/python-scripting/) about how to write in Python.


Data
Expand All @@ -53,7 +53,7 @@ Two Data instances can be connected one with another to keep their value synchro
<Component dataname="@path_to/component.data" />
```

Read more about data on the [Components and Data](../programming-with-sofa/start-coding/components-api/components-and-datas/) documentation page.
Read more about data on the [Components and Data](../../programming-with-sofa/start-coding/components-api/components-and-datas/) documentation page.


Tags
Expand Down
Loading

0 comments on commit ce2df10

Please sign in to comment.