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

KISS-111, add api for writing double variables with mesh locations #7

Merged
merged 10 commits into from
Mar 24, 2022

Conversation

lucacarniato
Copy link
Contributor

No description provided.

Edges = 2, ///< Edges
};

static std::unordered_map<MeshLocations, std::string> locations_attribute_names{

Choose a reason for hiding this comment

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

Do you need Doxygen documentation here?

throw std::invalid_argument("UGrid: The selected file_id does not exist.");
}

const auto name = ugrid::char_array_to_string(variable_name, ugrid::name_long_length);

Choose a reason for hiding this comment

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

This variable name does not seem to be used. Can it be removed, or should line 326 use name instead of variable_name, or somehing else?

}
if (mesh_location_enum == MeshLocations::Nodes)
{
coordinates = get_coordinate_variable_string(file_id, topology_id, Mesh2dTopology, "node_coordinates");

Choose a reason for hiding this comment

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

Do we need a:
location = "nodes";
here?

Copy link

@fwplatzek fwplatzek left a comment

Choose a reason for hiding this comment

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

See my comments

@@ -163,6 +163,20 @@ namespace ugridapi
return it->second;
}

static auto get_coordinate_variable_string(int file_id, int topology_id, int topology_type, std::string const& var_name)

Choose a reason for hiding this comment

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

std::string const& var_name ?
or
const std::string& var_name

@lucacarniato lucacarniato merged commit 5349419 into main Mar 24, 2022
@lucacarniato lucacarniato deleted the feature/define_variables_on_locations branch March 24, 2022 14:12
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.

None yet

2 participants