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/importer samcef #1800

Merged
merged 24 commits into from
Mar 13, 2022
Merged

Feature/importer samcef #1800

merged 24 commits into from
Mar 13, 2022

Conversation

vincentchabannes
Copy link
Member

@vincentchabannes vincentchabannes commented Mar 9, 2022

  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes?
  • Have you successfully run the Feel++ testsuite with your changes locally?
  • Have you written Doxygen comments in your contribution ?

Copy link
Member

@prudhomm prudhomm left a comment

Choose a reason for hiding this comment

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

@vincentchabannes only minor improvements possible using universal ref, perfect forwarding and constexpr for readability,

super job!

if ( verbose )
cout << "[loadMesh] Loading mesh in format Samcef: " << fs::system_complete(mesh_name) << "\n";
LOG(INFO) << " Loading mesh in Samcef format " << fs::system_complete(mesh_name);
CHECK( mesh ) << "Invalid mesh pointer to load " << mesh_name;
Copy link
Member

Choose a reason for hiding this comment

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

how about throwing an exception here ?

this->addMarker( 1, v );
}
template <typename TT,std::enable_if_t< is_iterable_of_v<TT,flag_type>, bool> = true >
void setMarker( TT const& vs )
Copy link
Member

Choose a reason for hiding this comment

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

candidate for perfect forwarding ?
TT&&

this->setMarker( 1, vs );
}
template <typename TT,std::enable_if_t< is_iterable_of_v<TT,flag_type>, bool> = true >
void addMarker( TT const& vs )
Copy link
Member

Choose a reason for hiding this comment

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

idem

}
//! add flags vs to the marker type id k
template <typename TT,std::enable_if_t< is_iterable_of_v<TT,flag_type>, bool> = true >
void addMarker( uint16_type k, TT const& vs )
Copy link
Member

Choose a reason for hiding this comment

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

candidate for constexpr and merge with the function above for greater readbility ?

@prudhomm
Copy link
Member

prudhomm commented Mar 9, 2022

and it is a little bit more than juste samcef reader ;)

@vincentchabannes vincentchabannes merged commit 629a068 into develop Mar 13, 2022
@vincentchabannes vincentchabannes deleted the feature/importer_samcef branch March 13, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants