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

Fix compilation of a test. #16802

Merged
merged 1 commit into from Mar 28, 2024
Merged

Fix compilation of a test. #16802

merged 1 commit into from Mar 28, 2024

Conversation

bangerth
Copy link
Member

@bangerth bangerth commented Mar 28, 2024

This should fix #16794, broken by #16790.

The test as fixed compiles for me (it didn't without the changes) but produces different output on my machine. That said, the differences in output are produced in other parts of the test, not by the function here, so I'm pretty confident that the patch is correct.

Copy link
Member

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

What about lines 139 through 147? We should also replace begin_raw and end_raw there.

@bangerth
Copy link
Member Author

I had done so until I realized that (i) these are for SymmetricTensor, for which the function is not deprecated or removed yet, and (ii) SymmetricTensor<4,dim> does not implement operator[].

I did verify that the test compiles with my changes. I'd like to leave everything else for a later patch.

@masterleinad
Copy link
Member

I had done so until I realized that (i) these are for SymmetricTensor, for which the function is not deprecated or removed yet, and (ii) SymmetricTensor<4,dim> does not implement operator[].

It seems they are, see

/**
* Return a pointer to the first element of the underlying storage.
*
* @deprecated This function suggests that the elements of a SymmetricTensor
* object are stored as a contiguous array, but this is not in fact true
* and one should not pretend that this so. As a consequence, this function
* is deprecated.
*/
DEAL_II_DEPRECATED
Number *
begin_raw();
/**
* Return a const pointer to the first element of the underlying storage.
*
* @deprecated This function suggests that the elements of a SymmetricTensor
* object are stored as a contiguous array, but this is not in fact true
* and one should not pretend that this so. As a consequence, this function
* is deprecated.
*/
DEAL_II_DEPRECATED
const Number *
begin_raw() const;
/**
* Return a pointer to the element past the end of the underlying storage.
*
* @deprecated This function suggests that the elements of a SymmetricTensor
* object are stored as a contiguous array, but this is not in fact true
* and one should not pretend that this so. As a consequence, this function
* is deprecated.
*/
DEAL_II_DEPRECATED
Number *
end_raw();
/**
* Return a const pointer to the element past the end of the underlying
* storage.
*
* @deprecated This function suggests that the elements of a SymmetricTensor
* object are stored as a contiguous array, but this is not in fact true
* and one should not pretend that this so. As a consequence, this function
* is deprecated.
*/
DEAL_II_DEPRECATED
const Number *
end_raw() const;
and https://github.com/dealii/dealii/blob/master/include/deal.II/base/symmetric_tensor.h#L1021-L1037.

@bangerth
Copy link
Member Author

Oh. Still -- let's leave that for a non-emergency situation.

@masterleinad masterleinad merged commit c660c0d into dealii:master Mar 28, 2024
16 checks passed
@bangerth bangerth deleted the fix-test branch March 28, 2024 23:53
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.

Regression tester regressed 052db7
3 participants