-
Notifications
You must be signed in to change notification settings - Fork 47
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
Draft: add basis transformation procedure #984
base: main
Are you sure you want to change the base?
Draft: add basis transformation procedure #984
Conversation
interface/ceed-basis.c
Outdated
if (!q_weight_1d) | ||
points = Q; | ||
else | ||
points = Q; | ||
weights = q_weight_1d; |
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.
Note that the indentation here does not show the scope. Your editor should be able to re-indent to make the actual scope of the if
and else
clear.
interface/ceed-basis.c
Outdated
|
||
@ref Utility | ||
**/ | ||
int CeedHaleTrefethenStripMap(CeedInt Q, CeedInt rho, CeedScalar *g, CeedScalar *g_prime) { |
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.
If this is a public function, it'll need to be declared in a public header.
interface/ceed-basis.c
Outdated
@@ -1270,6 +1322,8 @@ int CeedGaussQuadrature(CeedInt Q, CeedScalar *q_ref_1d, | |||
q_ref_1d[i] = -xi; | |||
q_ref_1d[Q-1-i]= xi; | |||
} | |||
// Call transformed Gauss-Legendre quadrature |
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.
You probably can't just call it here because you can't change the behavior of the existing interfaces, but you'll add a new interface that creates a Gauss quadrature and then transforms it.
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.
You have reference code in Julia so the job here is mainly to be able to create the same results. So start with a particular example in Julia, like the points and weights for 5 Gauss quadrature points using the
interface/ceed-basis.c
Outdated
@@ -1231,28 +1231,30 @@ int CeedBasisDestroy(CeedBasis *basis) { | |||
|
|||
@ref Utility | |||
**/ | |||
int CeedHaleTrefethenStripMap(CeedInt Q, CeedInt rho, CeedScalar *g, CeedScalar *g_prime) { | |||
CeedScalar tau, d, C, PI2, PI = 4.0*atan(1.0); | |||
int CeedHaleTrefethenStripMap(CeedInt Q, CeedScalar rho, CeedScalar *g, CeedScalar *g_prime) { |
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.
} | ||
return CEED_ERROR_SUCCESS; | ||
} | ||
|
||
/** | ||
@brief Transform quadrature by applying a smooth mapping = (g, g_prime) | ||
|
||
@param Q Number of quadarture points | ||
@param Q Number of quadrature points |
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.
In general, every argument has to be documented. I don't know what you intend this function to do; maybe it can be deleted or maybe it needs to take a CeedBasis
as input and create a CeedBasis
as output.
CeedScalar rho; | ||
CeedScalar *g, *g_prime; | ||
|
||
CeedHaleTrefethenStripMap(); |
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.
What's the plan for this PR? |
I think that's going to be a choice for @AdelekeBankole and perhaps another student will take interest in driving this further. I think it causes no harm to stay open for a while. |
Yes that's correct, I plan to move move this PR forward. |
No description provided.