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

GRIDEDIT-1491 Added api function to retrieve node, edge and face-node data only #375

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BillSenior
Copy link
Contributor

No description provided.

@BillSenior BillSenior changed the title GRIDEDIT-1491 Added api functio nto retrieve only node, edge and face-node data GRIDEDIT-1491 Added api function to retrieve node, edge and face-node data only Oct 16, 2024
…-node data

Also added unit test to check successful execution of the function and failure
cases , e.g. nodes array is null
@BillSenior BillSenior force-pushed the feature/GRIDEDIT-1491_retrieve_only_necessary_data branch from 267942c to f3cb7fb Compare October 21, 2024 13:58
@@ -782,6 +782,32 @@ namespace meshkernelapi
return lastExitCode;
}

MKERNEL_API int mkernel_mesh2d_get_data_reduced(int meshKernelId, Mesh2D& mesh2d)
Copy link
Contributor

Choose a reason for hiding this comment

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

should mkernel_mesh2d_get_data be substituted with mkernel_mesh2d_get_data_reduced? if this is possible we have one api less to maintain in the other layers

@@ -1118,15 +1110,15 @@ VERBATIM_HEADERS = YES
# generated with the -Duse_libclang=ON option for CMake.
# The default value is: NO.

CLANG_ASSISTED_PARSING = NO
# CLANG_ASSISTED_PARSING = NO
Copy link
Contributor

Choose a reason for hiding this comment

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

do the changes in this file belong to this PR?

/// @param[in,out] mesh2d The Mesh2D data
/// @returns Error code
/// @note Only node, edge, face-node data will be retrieved (face node data include the number of nodes per face mesh2d.nodes_per_face)
MKERNEL_API int mkernel_mesh2d_get_data_reduced(int meshKernelId, Mesh2D& mesh2d);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have more descriptive names, e.g.
mkernel_mesh2d_get_connectivity (this method) and
mkernel_mesh2d_get_computed_positions (filling the edgeX, edgeY, faceX, faceY arrays).

The .._get_data can then call both (or be made obsolete).

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