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

Base.copy(::CellDatum) to copy solutions #841

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Antoinemarteau
Copy link
Contributor

Following #827,
This copy should copy the necessary data to make an independent copy of CellFields solution data (e.g. dof, free, dirichlet values), useful to save FEM solution to prevent loss due to in place modification (e.g. by TransientFESolution iterator). It does not copy geometry related data (e.g. CellPoint is not copied, just returned), those could be modified from the original instance.

Potential flow :

  • a FEFunction can "not be in" its FESpace, as the FESpace dirichlet values can be modified from the copied FEFunction (the FESpace is not copied)
  • copy on CellPoint does nothing, could it be misleading ?

I would appreciate any feedback on how to make this PR better !

This copy should copy the necessary data to make an independent copy of
CellFields solution data (e.g. dof and dirichlet values), useful to save
FEM solution modified in place (e.g. by TransientFESolution iterator).
It does not copy geometry related data (e.g. CellPoint is not copied,
just returned), those could be modified from the original instance.
@codecov-commenter
Copy link

Codecov Report

Merging #841 (fe6b2e1) into master (1e49a45) will decrease coverage by 0.10%.
The diff coverage is 28.12%.

@@            Coverage Diff             @@
##           master     #841      +/-   ##
==========================================
- Coverage   88.33%   88.22%   -0.11%     
==========================================
  Files         164      164              
  Lines       19109    19141      +32     
==========================================
+ Hits        16879    16888       +9     
- Misses       2230     2253      +23     
Impacted Files Coverage Δ
src/CellData/CellDataInterface.jl 43.75% <0.00%> (-2.92%) ⬇️
src/CellData/CellDofs.jl 51.51% <0.00%> (-0.80%) ⬇️
src/CellData/CellQuadratures.jl 78.94% <0.00%> (-0.84%) ⬇️
src/CellData/CellStates.jl 87.67% <0.00%> (-1.22%) ⬇️
src/CellData/SkeletonCellFieldPair.jl 82.60% <0.00%> (-5.77%) ⬇️
src/FESpaces/FESpaceInterface.jl 81.04% <0.00%> (-0.39%) ⬇️
src/FESpaces/FESpacesWithLinearConstraints.jl 94.73% <ø> (ø)
src/MultiField/MultiFieldCellFields.jl 66.66% <0.00%> (-13.34%) ⬇️
src/ODEs/TransientFETools/TransientCellField.jl 59.09% <0.00%> (-2.82%) ⬇️
...s/TransientFETools/TransientMultiFieldCellField.jl 47.16% <0.00%> (-2.84%) ⬇️
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

None yet

2 participants