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

mass matrix between two field PtrList #552

Closed
wants to merge 7 commits into from

Conversation

vressegu
Copy link
Contributor

@vressegu vressegu commented Apr 4, 2024

No description provided.

for (int i=0; i<V.size(); i++)
{
M += V(i) * F.transpose().topRows(Msize).col(i) * F.leftCols(Msize).row(i);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change? I think the vectorized version should be considerably faster.

Copy link
Contributor Author

@vressegu vressegu Apr 5, 2024

Choose a reason for hiding this comment

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

I think that I had some memory issue for large mesh (mesh size ~ 10^6).
I will double check.
And anyway, I should probably do something that does not slow down the algorithm in the "small mesh case".

if (consider_volumes)
{
Eigen::VectorXd V = getMassMatrixFV(modes[0]);
for (int i=0; i<V.size(); i++)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think also this one can be written as the previous one

@vressegu
Copy link
Contributor Author

Florian corrected this merge request.
For data of moderate size (e.g. volScalarField on a mesh with less than 1e6 cells), your (faster) vectorized version is used.
For larger data, the slower version with the loop is used, solving RAM issues.

@vressegu
Copy link
Contributor Author

I close this merge request and I will create a new one, from a dedicated branch of my fork (up to date with ITHACA-FV/master)

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.

3 participants