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

Feature/correct mappings #13

Merged
merged 7 commits into from
Sep 15, 2023
Merged

Feature/correct mappings #13

merged 7 commits into from
Sep 15, 2023

Conversation

lucacarniato
Copy link
Contributor

No description provided.

@lucacarniato lucacarniato marked this pull request as ready for review August 24, 2023 12:45
/// @brief Gets the double fill value
/// @param[out] fillValue The double indicating the fill value
/// @returns Error code
UGRID_API int ug_get_double_fill_value(double& fillValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to pass i by ref.

/// @brief Gets the int fill value
/// @param[out] fillValue The int indicating the fill value
/// @returns Error code
UGRID_API int ug_get_int_fill_value(int& fillValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to pass i by ref.

@@ -214,9 +213,13 @@ void Mesh2D::put(ugridapi::Mesh2D const& mesh2d)
}

// Edges
if (auto const it = m_topology_attribute_variables.find("edge_node_connectivity"); mesh2d.edge_node != nullptr && it != m_topology_attribute_variables.end())
if (auto const it = m_topology_attribute_variables.find("edge_node_connectivity"); mesh2d.edge_nodes != nullptr && it != m_topology_attribute_variables.end())
Copy link
Contributor

Choose a reason for hiding this comment

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

A general comments about put:

  1. Are all topology attributes mandatory? Are some optional? If the key of a mandatory attribute is not found in the map, a run time error should be thrown.
  2. Can't the if statements be replaced by a generic function?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should use vectors instead of unique_ptrs.

@lucacarniato lucacarniato merged commit 75f8c9d into main Sep 15, 2023
3 of 4 checks passed
@lucacarniato lucacarniato deleted the feature/correct_mappings branch September 15, 2023 12:36
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.

2 participants