Skip to content

Refactor CPrimalGrid classes#1352

Merged
pcarruscag merged 57 commits intodevelopfrom
fix_primalgrid_const
Aug 28, 2021
Merged

Refactor CPrimalGrid classes#1352
pcarruscag merged 57 commits intodevelopfrom
fix_primalgrid_const

Conversation

@maxaehle
Copy link
Contributor

@maxaehle maxaehle commented Aug 16, 2021

Proposed Changes

  • Qualify member functions CPrimalGrid::Get... as const
  • CPrimalGridFEM::GetCornerPointsAllFaces did set the member nFaces. To make it const, I introduced CPrimalGridFEM::elementtype_to_nFaces and initialized nFaces in the constructor.
  • Now we can use const CPrimalGrid* elem in CInterpolator::ReconstructBoundary (Fix the neighbor-finding in CInterpolator::ReconstructBoundary #1346).
  • EDIT: see more changes below

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags, or simply --warnlevel=2 when using meson).
  • My contribution is commented and consistent with SU2 style.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp) , if necessary.

maxaehle and others added 3 commits August 17, 2021 10:29
Update Common/src/geometry/primal_grid/CPrimalGridFEM.cpp

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Update Common/include/geometry/primal_grid/CPrimalGridFEM.hpp

Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Copy link
Contributor

@WallyMaier WallyMaier left a comment

Choose a reason for hiding this comment

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

This LGTM!

Copy link
Contributor

@TobiKattmann TobiKattmann left a comment

Choose a reason for hiding this comment

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

👍

maxaehle and others added 2 commits August 19, 2021 09:24
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
maxaehle and others added 3 commits August 22, 2021 14:46
this regression was only detected by the testcase
discadj_topol_optim in parallel_regression_AD.py!
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
maxaehle and others added 2 commits August 22, 2021 15:08
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
@pcarruscag pcarruscag changed the title renovate CPrimalGrid classes Refactor CPrimalGrid classes Aug 23, 2021
Max Aehle added 3 commits August 25, 2021 19:25
The bool CPrimalGrid::gi indicated whether
CPrimalGrid::GlobalIndex_DomainElement held a GlobalIndex or a
DomainElement. We used it to check whether there each instance
uses only one of them, the regression tests succeeded.
Copy link
Contributor

@TobiKattmann TobiKattmann left a comment

Choose a reason for hiding this comment

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

Well that is quite a bit addition to this PR :) Thanks for the cleanup @maxaehle and @pcarruscag

I really appreciate the sometimes detailed commit messages and some good quality doxygen documentation (I already noticed that on the NdFlattener 👍 ). Keep that going and I hope this spreads a bit (me included ;) )

Comment on lines -38 to -42
unsigned short CHexahedron::nFaces = 6;

unsigned short CHexahedron::nNodes = 8;

unsigned short CHexahedron::nNeighbor_Elements = 6;
Copy link
Member

Choose a reason for hiding this comment

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

@TobiKattmann, reply to your question about faces and neighbors.
But the index of the neighbor can be -1 to indicate it a) does not exist; b) does not exist in this rank.

@pcarruscag pcarruscag merged commit 5fa720c into develop Aug 28, 2021
@pcarruscag pcarruscag deleted the fix_primalgrid_const branch August 28, 2021 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants