Skip to content
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

Support element variables in UDP output #160

Merged
merged 7 commits into from
Jun 1, 2021
Merged

Support element variables in UDP output #160

merged 7 commits into from
Jun 1, 2021

Conversation

ngoiz
Copy link
Contributor

@ngoiz ngoiz commented May 28, 2021

Very minor enhancement to support element structural variables to be output in a UDP message (i.e. the CRV can now be sent).

As written out in the documentation, element variables should be included in the variables yaml file as:

        - name: 'psi'  # element variable like the CRV
          inout: 'out'
          var_type: 'node'
          position: 3  # node id
          index: 2  # index dimension

and the code will look for the relevant element and local node in which the value is stored since these variables are typically stored in [n_elem, i_local_elem, i_index] form.

OP Update:
Changed to input to be the same as for pos variables.

@ngoiz ngoiz requested a review from ArturoMS13 May 28, 2021 15:18
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2021

Codecov Report

Merging #160 (68168ff) into develop (536d8fd) will increase coverage by 0.00%.
The diff coverage is 70.83%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #160   +/-   ##
========================================
  Coverage    61.83%   61.84%           
========================================
  Files          123      123           
  Lines        22479    22495   +16     
========================================
+ Hits         13900    13912   +12     
- Misses        8579     8583    +4     
Impacted Files Coverage Δ
sharpy/io/network_interface.py 74.26% <ø> (ø)
sharpy/io/inout_variables.py 53.40% <70.83%> (+1.97%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 536d8fd...68168ff. Read the comment docs.

Copy link
Contributor

@ArturoMS13 ArturoMS13 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. I just made a very minor comment.

@ngoiz
Copy link
Contributor Author

ngoiz commented May 28, 2021

Many thanks for your suggestions. I have actually updated this to fetch the variable from the relevant element and local node, and the user just needs to provide the node_id and dimension index desired.

@ngoiz ngoiz merged commit 5c4924e into develop Jun 1, 2021
@ngoiz ngoiz deleted the fix_udp_crv branch May 13, 2022 18:39
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