Skip to content

Conversation

@yungyuc
Copy link
Member

@yungyuc yungyuc commented May 28, 2022

Use the SimpleArray converter to improve bound-checking of the mesh coordinate data setup in RStaticMesh.

Also fix a bug of missing m_nghost and m_body in the move constructor of SimpleArray.

Use the SimpleArray converter to improve bound-checking of the mesh coordinate data setup in RStaticMesh.

Also fix a bug of missing m_nghost and m_body in the move constructor of SimpleArray.
@yungyuc yungyuc added the enhancement New feature or request label May 28, 2022
@yungyuc yungyuc self-assigned this May 28, 2022
*ptr++ = mh.ndcrd(ind, 0);
*ptr++ = mh.ndcrd(ind, 1);
*ptr++ = (3 == mh.ndim()) ? mh.ndcrd(ind, 2) : 0;
sarr(ind, 0) = mh.ndcrd(ind, 0);
Copy link
Member Author

Choose a reason for hiding this comment

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

Make the element setting code to be symmetric between the assignment.

The new intermediate runs slower, but looks nicer.

: m_buffer(std::move(other.m_buffer))
, m_shape(std::move(other.m_shape))
, m_stride(std::move(other.m_stride))
, m_nghost(other.m_nghost)
Copy link
Member Author

Choose a reason for hiding this comment

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

For some reasons I forgot this in the past.

@yungyuc yungyuc marked this pull request as ready for review May 28, 2022 11:45
@yungyuc yungyuc merged commit 3ccee1b into solvcon:master May 28, 2022
@yungyuc yungyuc deleted the feature/qbarray branch May 28, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant