Skip to content

Added documentation for nearest-neighbor-gradient #166

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 7 commits into from
May 10, 2022

Conversation

ariguiba
Copy link
Contributor

  • Added section for nearest-neighbor-gradient mapping in the mapping configuration page.
  • Added page about how to write gradient data into the interface (under the "Couple Your Code" section).

Copy link
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good already.
I guess we could shorten the code and config of the example quite a bit.
Simply use [...] and assume that the reader knows the standard things already.

* `isDataGradientRequired` returns a boolean, indicates if the data corresponding to the ID `dataID` has gradient data.
* `writeScalarGradientData` writes scalar-valued gradient data, derived in each spatial dimension to the coupling data structure.
* `ẁriteBlockScalarGradintData` writes multiple scalar gradient data at once, for performance reasons.
* `writeVectorGradientData` writes vector-valued gradient data to the coupling data structure. The matrix is entered as a 1D-array of each component differentiated first. The parameter `rowsFirst` allows to write the values of the matrix, such as the components are differentiated in the spatial dimensions first.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, of course, what you mean, but I have troubles understanding the last two sentences.

@davidscn davidscn changed the base branch from master to nng-docs May 10, 2022 13:39
@davidscn davidscn merged commit 6cde699 into precice:nng-docs May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants