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

Respect colorrange and support nonlinear interpolations #119

Closed

Conversation

KnutAM
Copy link
Member

@KnutAM KnutAM commented Feb 10, 2024

While working I discovered a few issues, and am using this as my "fixes branch", hence the unrelated changes.
Towards #103 as based on that branch

Fixes

  • Using super and subparameteric interpolations when the number of celldofs for one interpolation is different to the number of nodes
  • Makes the colorrange given to solutionplot being respected (instead of being overwritten by the automatic range calculated from the data)

Copy link
Member

@termi-official termi-official left a comment

Choose a reason for hiding this comment

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

Thanks for the PR Knut! A few questions from my side

local_celldofs_field = reshape(@view(_celldofs[dof_range_]), (field_dim,length(cell.nodes)))
local_celldofs_field = reshape(@view(_celldofs[dof_range_]), (field_dim, length(dof_range_)÷field_dim))
Copy link
Member

Choose a reason for hiding this comment

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

What exactly is fixed here? Both statements should be equivalent.

Copy link
Member Author

@KnutAM KnutAM Feb 13, 2024

Choose a reason for hiding this comment

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

Ah, bad commit message - makes it work for superparameteric elements (and subparametric).

Copy link
Member Author

@KnutAM KnutAM Feb 13, 2024

Choose a reason for hiding this comment

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

But I see now that this would fail below for subparametric and relies on that the linear dofs comes first for superparameteric (but I think they do...).
So probably a more complete solution would be desired...?

@@ -33,7 +33,7 @@ keyword arguments are:
deformation_field=:default,
process=postprocess,
colormap=:cividis,
colorrange=(0,1),
colorrange=(0,0),
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

That might work too - I don't know the internal details enough to say, just made the minimum possible intrusive change I could come up with.
Currently, the problem was just that the provided colorrange was just overwritten here

So any solution respecting the provided input would be good.

@KnutAM
Copy link
Member Author

KnutAM commented Feb 14, 2024

Superseded by #120 and #121

@KnutAM KnutAM closed this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants