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

Moment fitted machinery #68

Merged
merged 21 commits into from
Aug 21, 2023
Merged

Moment fitted machinery #68

merged 21 commits into from
Aug 21, 2023

Conversation

pmartorell
Copy link
Collaborator

Dear @fverdugo ,

this PR is adding the moment fitted machinery developed by @ericneiva and used in the publication:
https://doi.org/10.1016/j.camwa.2022.09.027 by @santiagobadia , @ericneiva and @fverdugo .

Comments:

@ericneiva
Copy link
Member

Hi, @pmartorell , thanks for doing this work :)

Coverage in src/AgFEM/AggregateBoundingBoxes.jl

The BBoxes machinery is definitely covered in the Poisson Modal C0 test, but the tests in the GridapEmbeddedTests folder are not included in the main runtests.jl. They are tested separately here.

Could this be the reason why it appears as "not covered"?

@pmartorell
Copy link
Collaborator Author

They are tested separately here.

Indeed. May be convenient to include some tests into the main runtest.jl ? To keep the high coverage statistics.

@fverdugo
Copy link
Member

Hi @ericneiva can you please review the PR?

Once you are happy, I'll merge it.

@ericneiva
Copy link
Member

Hi, @fverdugo, I am happy to review it, though it's basically my own code extracted from the InterpolatedAgFEM.jl package and cleaned by @pmartorell.

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@94dfa39). Click here to learn what that means.
The diff coverage is 71.54%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff            @@
##             master      #68   +/-   ##
=========================================
  Coverage          ?   83.43%           
=========================================
  Files             ?       17           
  Lines             ?     2258           
  Branches          ?        0           
=========================================
  Hits              ?     1884           
  Misses            ?      374           
  Partials          ?        0           
Files Changed Coverage Δ
src/AgFEM/AggregateBoundingBoxes.jl 0.00% <0.00%> (ø)
src/Interfaces/EmbeddedFacetDiscretizations.jl 75.75% <0.00%> (ø)
src/Interfaces/Interfaces.jl 100.00% <ø> (ø)
src/LevelSetCutters/LevelSetCutters.jl 82.92% <50.00%> (ø)
...MomentFittedQuadratures/MomentFittedQuadratures.jl 85.42% <85.42%> (ø)
src/Interfaces/EmbeddedDiscretizations.jl 80.58% <100.00%> (ø)

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

@pmartorell
Copy link
Collaborator Author

Hi @ericneiva,
I have found an important bottleneck in memory consumption related with the usage of CompressedArray in both modal C0 basis and moment fitting measures. It seems that Gridap is not efficient with CompressedArray with a large amount of values, e.g., CompressedArray(vals,1:length(vals)). The usage of flat arrays instead will reduce the memory consumption up to one order of magnitude.

A possible optimization would accommodate the Gridap constructors of CellQuadrature and FESpaces to flat arrays of quadrature and reference FEs, respectively. It is probably better to include this optimization in another PR.

@ericneiva
Copy link
Member

Hi, @pmartorell, thanks a lot for identifying this.

Is it possible to get rid of the CompressedArray usage in the Moment Fitted measures without touching Gridap? If so, could you please update this PR with this optimization?

I agree to change the Gridap constructors in another PR.

@pmartorell
Copy link
Collaborator Author

Hi @ericneiva,
the optimization have to be done in Gridap first. Then, eliminating CompressedArray in GridapEmbedded/MomentFittedQuadratures is straighforward.

I do not have much time for the developments right now. I have tested this by editing the FESpace and CellMeasure a posteriori.

@ericneiva
Copy link
Member

the optimization have to be done in Gridap first.

Okay, thanks for letting me know.

I do not have much time for the developments right now.

Of course you don't, I know. I was just hoping that changing MomentFittedQuadratures could be quickly done without touching Gridap...

@ericneiva
Copy link
Member

Hi, @pmartorell, other than the performance issues, which we won't solve now, is there anything left to add to this branch, before merging it with GE?

@pmartorell
Copy link
Collaborator Author

Hi @ericneiva , I do not have new changes right now. You can merge it. Thanks for asking.

Copy link
Member

@ericneiva ericneiva left a comment

Choose a reason for hiding this comment

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

Hi, @fverdugo, this is ready to be merged.

If you want, I can merge it myself and release GE 0.8.2 (I think I have the permissions).

Let me know if you are ok with this.

@pmartorell Thanks a lot for your work!

@fverdugo fverdugo merged commit dedf4dd into gridap:master Aug 21, 2023
4 checks passed
@fverdugo
Copy link
Member

@ericneiva feel free to release a new version.

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.

4 participants