-
-
Notifications
You must be signed in to change notification settings - Fork 137
Add global data to the documentation #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c447702
Add global data documentation.
kanishkbh bbbca2c
Minor changes.
kanishkbh 7a8eb38
Add global data in other parts of the webpage
kanishkbh 2d96b2d
Title: Global data exchange -> Global data
kanishkbh 6e2c029
Undo changes in xmlreference.md
kanishkbh b02cd38
Update note about feature limitations
kanishkbh 4c4818c
Update title -> make shorter
kanishkbh 11f86b3
Update page summary: make crisp
kanishkbh 4a95dac
Crisp subheader
kanishkbh 5ef563d
Use sentence case
kanishkbh 6298dfe
Use sentence case
kanishkbh ff5e4b6
Use sentence case
kanishkbh 9da4c4e
Better wording
kanishkbh e7340a7
Crisp subheader
kanishkbh 6a88574
Use sentence case
kanishkbh 1f14572
Add a rudimentary coupling scheme in the xml example.
kanishkbh ebe8a0e
Update pages/docs/couple-your-code/couple-your-code-global-data.md
uekerman f19c7b9
Update pages/docs/couple-your-code/couple-your-code-global-data.md
uekerman 572af56
Update pages/docs/couple-your-code/couple-your-code-global-data.md
uekerman 4b73e83
Update pages/docs/couple-your-code/couple-your-code-global-data.md
uekerman ce046be
Update pages/docs/couple-your-code/couple-your-code-global-data.md
uekerman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
pages/docs/couple-your-code/couple-your-code-global-data.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| title: Global data | ||
| permalink: couple-your-code-global-data.html | ||
| keywords: api, adapter, data, global | ||
| summary: "Define and exchange global data (data not associated to a mesh) by using specific optional API functions." | ||
| --- | ||
|
|
||
| {% warning %} | ||
| These API functions are a work in progress, experimental, and are not yet released. The API might change during the ongoing development process. Use with care. | ||
| {% endwarning %} | ||
|
|
||
| {% note %} | ||
| This feature is only available for coupling between two participants, i.e. does not yet support [multi coupling](https://precice.org/configuration-coupling-multi.html). Further, it does not yet allow [convergence measures](https://precice.org/configuration-coupling.html#implicit-coupling-schemes) and [acceleration](https://precice.org/configuration-acceleration) to be defined for global data. An extension to these features is planned. | ||
| {% endnote %} | ||
|
|
||
| preCICE allows participants to exchange data that is not associated with any mesh. Examples of such data are global background pressure (e.g. fluid-acoustic coupling) and angles between coordinate systems (e.g. fluid-structure coupling for rotor blades). | ||
|
|
||
| ## Configuration | ||
|
|
||
| Configuration of global data objects is described below with examples. | ||
|
|
||
| In order to use this feature, global data needs to be explicitly defined in the configuration file using the `global-data` tag. | ||
|
|
||
| ```xml | ||
| <precice-configuration dimensions="3" experimental="true"> | ||
| <global-data:vector name="angles" /> | ||
| ... | ||
| ``` | ||
|
|
||
| Rest of the global data configuration steps are similar to the usual *mesh-associated* data as described in [introduction to configuration](https://precice.org/configuration-introduction.html). | ||
|
|
||
| ```xml | ||
| ... | ||
| <participant name="SolverOne"> | ||
| <write-data name="angles" /> | ||
| ... | ||
| <participant name="SolverTwo"> | ||
| <read-data name="angles"> | ||
| ... | ||
| <coupling-scheme:serial-explicit> | ||
| <exchange data="angles" from="SolverOne" to="SolverTwo" /> | ||
| ... | ||
| ``` | ||
|
|
||
| Since global data is not associated with any mesh, it should not be configured with the `use-data` tag under the `mesh` definition. Similarly, tags such as `read-data`, `write-data`, or `exchange` require no `mesh` attribute if used for global data. | ||
|
|
||
| ## API | ||
|
|
||
| The API functions `writeGlobalData(...)` and `readGlobalData(...)` enable exchange of global data analogous to the `writeData(...)` and `readData(...)` functions for mesh-associated data. For the above example, the API calls would be as follows. | ||
|
|
||
| For SolverOne: | ||
|
|
||
| ```C++ | ||
| ... | ||
| participant.writeGlobalData("angles", writeAngles); | ||
| ... | ||
| ``` | ||
|
|
||
| For SolverTwo: | ||
|
|
||
| ```C++ | ||
| ... | ||
| participant.readGlobalData("angles", dt, readAngles); | ||
| ... | ||
|
|
||
| ``` | ||
|
|
||
| ## Supported functionality | ||
|
|
||
| Global data exchange is supported in both explicit and implicit [coupling schemes](https://precice.org/configuration-coupling.html) with serial as well as parallel [coupling flow](https://precice.org/couple-your-code-coupling-flow.html#parallel-coupling-schemes). | ||
|
|
||
| Within implicit coupling, convergence measures and acceleration are not yet supported. | ||
|
|
||
| [Data initialization](https://precice.org/couple-your-code-initializing-coupling-data.html) and [time interpolation](https://precice.org/couple-your-code-waveform.html) are also supported for global data. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.