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

Extend docu of MatrixFree::initialize_dof_vector() #13484

Merged
merged 1 commit into from Mar 9, 2022

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Mar 3, 2022

follow-up to #13481

FYI @nfehn

Comment on lines +2242 to +2247
static_assert(IsBlockVector<VectorType>::value == false,
"This function is not supported for block vectors.");

Assert(task_info.n_procs == 1,
ExcMessage("This function can only be used in serial."));
Copy link
Member Author

Choose a reason for hiding this comment

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

I also added here some asserts. Hope my understanding about serial non-block vector is correct.

* defines which component is to be used.
* Initialize function for a general serial non-block vector.
* The length of the vector is equal to the total number of
* degrees in the DoFHandler. Vector entries are initialized with zero.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* degrees in the DoFHandler. Vector entries are initialized with zero.
* degrees of freedom in the DoFHandler. Vector entries are initialized with zero.

* @p dof_handler_index defines which component is to be used.
*
* @note Serial vectors also include Trilinos and PETSc vectors; however
* in these cases, MatrixFree has to be in a serial context, i.e., size
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* in these cases, MatrixFree has to be in a serial context, i.e., size
* in these cases, MatrixFree has to be used in a serial context, i.e., the size

@peterrum peterrum force-pushed the initialize_dof_vector_docu branch 2 times, most recently from df1637d to 32c8566 Compare March 3, 2022 08:22
@peterrum
Copy link
Member Author

peterrum commented Mar 3, 2022

@kronbichler I have made the modifications!

Comment on lines 1526 to 1527
* The length of the vector is equal to the total number of
* degrees of freedom in the DoFHandler. Vector entries are initialized
Copy link
Member

Choose a reason for hiding this comment

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

Maybe say "After a call to this function, the length of the vector..." to make it clear that this function sets the length of the vector to that value?

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

I think we can get this merged if you fix @bangerth's comment.

@peterrum
Copy link
Member Author

peterrum commented Mar 8, 2022

@bangerth @kronbichler I have made the modification.

@kronbichler kronbichler merged commit 17fb45e into dealii:master Mar 9, 2022
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