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

Field data returns object #1538

Merged
merged 48 commits into from
Apr 19, 2023
Merged

Field data returns object #1538

merged 48 commits into from
Apr 19, 2023

Conversation

prmukherj
Copy link
Collaborator

@prmukherj prmukherj commented Apr 12, 2023

FieldData modules like: "get_scalar_field_data", "get_surface_data", "get_vector_field_data" and "get_pathlines_field_data" to return objects instead of dictionaries.

Example Use Case:

>>> abs_press_data = field_data.get_scalar_field_data(field_name="absolute-pressure", surface_name="cold-inlet")
>>> abs_press_data.size
>>> abs_press_data[120].scalar_data

>>> velocity_vector_data = field_data.get_vector_field_data(field_name="velocity", surface_name="cold-inlet")
>>> velocity_vector_data.size
>>> velocity_vector_data.scale

>>> vertices_data = field_data.get_surface_data(data_type=SurfaceDataType.Vertices, surface_name="cold-inlet")
>>> vertices_data[5].x

>>> path_lines_data = field_data.get_pathlines_field_data(field_name="velocity", surface_name="cold-inlet")
>>> path_lines_data["lines"][100].node_count
>>> path_lines_data["lines"][100].node_data

@seanpearsonuk
Copy link
Collaborator

@prmukherj, Please could you provide a PR description. Thanks.

@prmukherj prmukherj marked this pull request as ready for review April 13, 2023 10:31
Your Name added 2 commits April 13, 2023 17:07
prmukherj and others added 8 commits April 17, 2023 21:23
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
@prmukherj prmukherj merged commit 6a2959d into main Apr 19, 2023
@prmukherj prmukherj deleted the feat/field_data_returns_object branch April 19, 2023 04:17
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.

6 participants