Support interpolation from general-dimension tables#418
Support interpolation from general-dimension tables#418hyschive merged 24 commits intogamer-project:mainfrom
Conversation
barrytchiang
left a comment
There was a problem hiding this comment.
Thank you again for expanding the array of interpolation functions in GAMER! All the edits, additions, and tests to the code itself look great to me. I've also tested it myself, and everything seems good.
All the comments I left are small things in the text descriptions in this PR. Once these are addressed, it is ready to be merged.
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
|
@barrytchiang Thank you for reviewing and testing this PR. |
hyschive
left a comment
There was a problem hiding this comment.
@hsinhaoHHuang This PR is neat! And good job in adding unit tests for all the newly introduced functionalities! I only have some minor comments before merging.
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
hyschive
left a comment
There was a problem hiding this comment.
@hsinhaoHHuang This PR is neat! And good job in adding unit tests for all the newly introduced functionalities! I only have some minor comments before merging.
Co-authored-by: Hsi-Yu Schive <hyschive@gmail.com>
…ding to the PR review
hsinhaoHHuang
left a comment
There was a problem hiding this comment.
Thank you for all the suggestions! I have updated this PR accordingly.
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cpp
Outdated
Show resolved
Hide resolved
hyschive
left a comment
There was a problem hiding this comment.
@hsinhaoHHuang Thanks for the careful revision. Good job!
Goal
To resolve Support Mis_InterpolateFrom2D/3DTable() #403
To perform linear interpolation for general rectilinear tables
Changes
Add new functions for the calculation of interpolation
Mis_LinearInterpolate()for interpolation of 1D valuesMis_BilinearInterpolate()for interpolation of 2D valuesMis_TrilinearInterpolate()for interpolation of 3D valuesMis_MultilinearInterpolate()for interpolation of general nD valuesAdd new functions for the interpolations from tables
Mis_InterpolateFrom2DTable()for interpolation from a 2D tableMis_InterpolateFrom3DTable()for interpolation from a 3D tableMis_InterpolateFrom_nDim_Table()for interpolation from a general nD tableMis_InterpolateFrom_nDim_Table_withIdxL()for interpolation from a general nD table with the IdxL already knownReplace the
HaloMerger_Trilinear_Interpolation()andHaloMerger_Get_Value_From_HALO_IC_Datainsrc/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cppMis_InterpolateFrom_nDim_Table_withIdxL().Some minor format adjustments in
src/TestProblem/ELBDM/HaloMerger/Init_TestProb_ELBDM_HaloMerger.cppVerifications
The
Mis_InterpolateFromTable()for the soliton profile can return the same value as before inTestProblem/ELBDM/HaloMergerThe projections of the initial conditions of
TestProblem/ELBDM/HaloMergerare the same as before.All unit tests attached in
Mis_InterpolateFromTable.cppandMis_LinearInterpolate.cpppass.For example,