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

MeshLib add properties #542

Merged
merged 40 commits into from
Jan 7, 2015
Merged

Conversation

TomFischer
Copy link
Member

This PR is based on the discussion in PR #531:

  • It adds an implemention to manage properties within the Mesh.
  • The properties are associated to specific mesh items like mesh nodes or mesh
    elements via an enum class (see enum class MeshItemType).
  • The properties are not restricted to a particular data type, you can use several types like double, vector or matrix
    types at run time together (see tests).
  • There is not a possibility to get the value data type.

#include <boost/any.hpp>
#include <boost/optional.hpp>

#include "logog/include/logog.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

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

is logog used somewhere in this header? ✅

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. It is not any more necessary to include logog.hpp, as well as boost/any.hpp, boost/optional.hpp and map. I will remove them.


/// @brief Material property manager on mesh items.
/// Class Properties manages scalar, vector or matrix properties. For instance
/// in groundwater flow porosity is scalar property and permeabilty can be
Copy link
Member

Choose a reason for hiding this comment

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

Typo: is _a_ scalar ✅

@bilke
Copy link
Member

bilke commented Dec 11, 2014

Good documentation! 👍

@TomFischer
Copy link
Member Author

Reworked according remarks of @bilke and rebased.

/// on the heap), see the parameter item2group_mapping, is required.
/// @tparam T type of the property value
/// @param name the name of the property
/// @param mesh_item_type for instance node or element assigned properties
Copy link
Member

Choose a reason for hiding this comment

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

param-documentation for n_prop_groups and item2group_mapping are missing ✅

@norihiro-w
Copy link
Collaborator

👍

@endJunction
Copy link
Member

Very nice!

Two suggestions for future:

  • use make_pair, instead of pair ctor, which requires the types: std::make_pair(a, b) vs. std::pair<TheAType, TheBType>(a, b).
  • Don't hessitate to make a type alias for often used structures, like for the std::map<PropertyKey, boost::any> and its const_iterator making code more compact (and abstract).

I like very much the std::default_delete() usage. No memory leaks and no compilation warnings.

endJunction added a commit that referenced this pull request Jan 7, 2015
@endJunction endJunction merged commit 8a51809 into ufz:master Jan 7, 2015
@TomFischer TomFischer deleted the MeshLibAddProperties branch January 7, 2015 07:06
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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