-
Notifications
You must be signed in to change notification settings - Fork 917
Contiguous storage of CEdge(s) #959
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
Conversation
pcarruscag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gist of the PR:
| CPrimalGrid*** bound; /*!< \brief Boundary vector (primal grid information). */ | ||
| CPoint** node; /*!< \brief Node vector (dual grid information). */ | ||
| CEdge** edge; /*!< \brief Edge vector (dual grid information). */ | ||
| CEdge* edges; /*!< \brief Edge vector (dual grid information). */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Significant change 1.
| Index_t iPoint = geometry.edge[iEdge]->GetNode(0); | ||
| Index_t jPoint = geometry.edge[iEdge]->GetNode(1); | ||
| Index_t iPoint = geometry.edges->GetNode(iEdge,0); | ||
| Index_t jPoint = geometry.edges->GetNode(iEdge,1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Significant change 2.
…we must be doing...)
…ld not track root cause with valgrind)
| /*--- Menter's first blending function ---*/ | ||
|
|
||
| if(sst) visc_numerics->SetF1blending(nodes->GetF1blending(iPoint), nodes->GetF1blending(iPoint)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The F1 blending factor was missing in BC_Fluid_Interface of the SST solver (classic copy paste bug...), which is what was causing a bunch of valgrind warnings.
I moved the entire method to CTurbSolver, I rather have one if(sst) than 1 copy pasted method.
By the way, the way this method includes the viscous residual is very fishy... But that is not something I will fix.
talbring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pcarruscag! All of the changes make sense. Just two very small questions below.
| for (unsigned short iDim = 0; iDim < nDim; iDim++) | ||
| Normal[iDim]=val_face_normal[iDim]; | ||
| template<class T> | ||
| void SetNormal(unsigned long iEdge, const T& normal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are they templated? To pass different array types? 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the idea yes, in case we need to pass std::vector or std::array or even just an object with operator []
|
I'll merge this one to make the diff on my other PR's cleaner, but feel free to comment if you see something that does not look right. |
Proposed Changes
Make CEdge a class of arrays, instead of using it as an array of classes.
Ended up having to add some const-correctness to CNumerics too.
Forgot to turn off "auto blank space stripping" so a few files will show more changes than this actually introduces.
Related Work
Needed for #789 (to eventually support the SIMD part).
Similar changes to #753.
Fixes a bug in the SST fluid-fluid interface.
PR Checklist