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

move CellDataTransferBuffer out of internal namespace #5384

Merged
merged 2 commits into from Nov 5, 2017

Conversation

davydden
Copy link
Contributor

@davydden davydden commented Nov 3, 2017

this class is very useful in user projects. So i think it should be in parallel::GridTools:: namespace and documented.

p.s. no functional changes in the first commit, the rest is minor/cosmetic.

@davydden davydden requested a review from tjhei November 3, 2017 16:23
@davydden
Copy link
Contributor Author

davydden commented Nov 3, 2017

/run-tests

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

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

I guess this makes sense. Please update the documentation as stated and then merge yourself once the tester is happy.

/**
* A structure that allows the transfer of data of type T from one processor
* to another. It corresponds to a packed buffer that stores a list of
* cells and an array of type T.
Copy link
Member

Choose a reason for hiding this comment

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

This makes it sound like we use different containers for the cells and for the Ts, but we really just use std::vector for both. Please make sure that you use the same noun for both.

* to another. It corresponds to a packed buffer that stores a list of
* cells and an array of type T.
*
* The vector @p data is the same size as @p cell_ids.
Copy link
Member

Choose a reason for hiding this comment

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

You state it as a fact, but it's really a requirement that the user has to satisfy. Can you move this to the documentation of save() and mark it with @pre as a precondition for this function?

* The vector @p data is the same size as @p cell_ids.
*/
template <int dim, typename T>
struct CellDataTransferBuffer
Copy link
Member

Choose a reason for hiding this comment

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

  • I think it would be useful if the class doc would say that the class facilitates this transfer by providing the save/load functions that are able to pack everything up into a stream.

  • I think it would also be useful to state the requirements on T, namely that it can be serialized via the boost::serialization framework.

@davydden
Copy link
Contributor Author

davydden commented Nov 3, 2017

@bangerth i update the documentation, let me know if you have further comments.

@davydden davydden force-pushed the cell_data_transfer_for_users branch 2 times, most recently from 11e052f to 04b07ae Compare November 3, 2017 20:45
Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

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

OK to merge if you fix the two text issues, Thanks!

struct CellDataTransferBuffer
{
/**
* vector to store IDs of cells to be transfered.
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize v here. Same for the next function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Vector creates a hyperlink to dealii's vector. I will write Standard vector if you don't mind

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that works. Or "A vector to store...", which is actually better grammar anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with A.

* CellId and a vector of type @p T.
*
* This class facilitates the transfer by providing the save/load functions
* that are able to pack up the vector of CellId 's and the associated
Copy link
Member

Choose a reason for hiding this comment

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

no space before 's

@jppelteret
Copy link
Member

jppelteret commented Nov 4, 2017 via email

@davydden
Copy link
Contributor Author

davydden commented Nov 4, 2017 via email

@davydden davydden merged commit b64212d into dealii:master Nov 5, 2017
@davydden davydden deleted the cell_data_transfer_for_users branch November 5, 2017 05:52
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

3 participants