Addition of species diffusion term to surface heat flux#1383
Addition of species diffusion term to surface heat flux#1383
Conversation
Signed-off-by: jtneedels <[email protected]>
|
This pull request introduces 1 alert when merging ffa2836 into 6338bff - view on LGTM.com new alerts:
|
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
|
This pull request introduces 1 alert when merging b14d3a5 into 6338bff - view on LGTM.com new alerts:
|
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
|
This pull request fixes 2 alerts when merging d10a6c3 into 057da5b - view on LGTM.com fixed alerts:
|
|
This pull request fixes 2 alerts when merging 8e311ad into 057da5b - view on LGTM.com fixed alerts:
|
Signed-off-by: jtneedels <[email protected]>
| for (iDim = 0; iDim < nDim; iDim++) { | ||
| for (iSpecies = 0; iSpecies < nSpecies; iSpecies++) { | ||
| dYsn = Grad_PrimVar[RHOS_INDEX+iSpecies][iDim]/rho*UnitNormal[iDim]; | ||
| sumJhs += rho*Ds[iSpecies]*dYsn*hs[iSpecies]; | ||
| } | ||
| } |
There was a problem hiding this comment.
Clean this up please, you're dividing by rho, then multiplying on the line below.
And use the geometry toolbox for dot products with the unit normal, saves the loop over nDim (which is in the wrong order, should be inside the species loop).
There was a problem hiding this comment.
Ok, I'll do the same for the compressible and incompressible heat fluxes as well. It looks like there are a lot of iDim loops that can be replaced in friction forces. I can open a separate PR to replace those, would that be a good idea?
There was a problem hiding this comment.
No need to fix all of them (unless you really want to of course) not introducing new ones is enough :)
There was a problem hiding this comment.
Haha sounds good, I'll do those two since it's quick. Is the benefit to using GeometryToolbox for dot products because it reduces lines of code, and should be faster since its an inline function?
There was a problem hiding this comment.
Aside from cleanup / expressiveness (i.e. reading a word instead of code), we gain some safety by being able to:
const su2double a = GeometryToolbox::Something(...)
Instead of having to allow a to be modified.
On the performance side, one of the main sources of inefficiency in SU2 is that the compilers "don't know" that loops over nDim, nVar, nSpecies, are super small, and they often make them inefficient by applying optimizations that are only profitable for large loops.
By encapsulating those loops over nDim we have a single place where we can inform the compilers (via all sorts of compiler-specific directives or in the limit by stating "nDim is 2 or 3") we are not doing this yet.
|
This pull request fixes 2 alerts when merging 2f8e7e3 into 58c580b - view on LGTM.com fixed alerts:
|
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
Signed-off-by: jtneedels <[email protected]>
|
This pull request fixes 2 alerts when merging c5044a2 into 58c580b - view on LGTM.com fixed alerts:
|
pcarruscag
left a comment
There was a problem hiding this comment.
Thanks for the additional cleanup 👍
Proposed Changes
Related Work
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.