Skip to content

Refactor CPrimalGrid classes - #1352

Merged
pcarruscag merged 57 commits into
developfrom
fix_primalgrid_const
Aug 28, 2021
Merged

Refactor CPrimalGrid classes#1352
pcarruscag merged 57 commits into
developfrom
fix_primalgrid_const

Conversation

@maxaehle

@maxaehle maxaehle commented Aug 16, 2021

Copy link
Copy Markdown
Contributor

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.

Comment thread Common/src/geometry/primal_grid/CPrimalGridFEM.cpp Outdated
Comment thread Common/include/geometry/primal_grid/CPrimalGridFEM.hpp Outdated
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>

@WallyMaier WallyMaier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This LGTM!

@TobiKattmann TobiKattmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread Common/include/geometry/primal_grid/CPrimalGridFEM.hpp Outdated
Comment thread Common/include/option_structure.hpp Outdated
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>
Comment thread Common/include/geometry/primal_grid/CPrimalGrid.hpp
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
Comment thread Common/include/geometry/primal_grid/CPrimalGrid.hpp Outdated
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.

@TobiKattmann TobiKattmann left a comment

Copy link
Copy Markdown
Contributor

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 thread Common/include/geometry/primal_grid/CLine.hpp Outdated
Comment thread Common/include/geometry/primal_grid/CVertexMPI.hpp Outdated
Comment thread Common/src/geometry/primal_grid/CTetrahedron.cpp Outdated
Comment thread Common/include/option_structure.hpp Outdated
Comment thread Common/include/geometry/primal_grid/CVertexMPI.hpp Outdated
Comment on lines -38 to -42
unsigned short CHexahedron::nFaces = 6;

unsigned short CHexahedron::nNodes = 8;

unsigned short CHexahedron::nNeighbor_Elements = 6;

Copy link
Copy Markdown
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.

Comment thread Common/include/fem/fem_cgns_elements.hpp
Comment thread Common/src/fem/fem_cgns_elements.cpp
@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