Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
9251c86
Attempt to create constructor for KokkosBSpline
Mar 8, 2026
420575e
Attempt derivative coeff function, started eval
Mar 9, 2026
0f46eb0
Attempt eval function, need compilation, testing
Mar 10, 2026
06ae6f3
Create init test for BSplineKokkos
Mar 10, 2026
7e97698
Add BSplineKokkos executable to CMakeLists.txt
Mar 10, 2026
c07c382
Fixed some syntax error and templating issues
Mar 11, 2026
a6cfa5a
Fix compiling error
Mar 11, 2026
789f6bc
Link Kokkos::kokkos to testSplineKokkosBase
Mar 11, 2026
333c669
Fixed vector initialization error
Mar 11, 2026
fbe5082
Moving constructor from .cpp to .h
Mar 11, 2026
9822f38
Moved functions use execution space to .h file
Mar 12, 2026
f87d67a
Modified test case to suit the 2D structure
Mar 12, 2026
004e5ee
Fixed 1st, 2nd derivative coef function
Mar 12, 2026
1b0c522
Added constructor from a vector of kokkos splines
Mar 12, 2026
603aee7
fixed 1 spline initialization and test
Mar 12, 2026
09b8b83
Multispline constructor, offset problem in progress
Mar 13, 2026
8030c59
Fixed ctrlpts, knots offset error
Mar 16, 2026
79b1947
First attempt on eval1stDerivative
Mar 17, 2026
defbba2
Still debugging derivative coef calculation error
Mar 17, 2026
8e4b58c
Fixing 1st deriv coe err 2nd deriv coe in progress
Mar 17, 2026
d5707a8
Fixing2nd deriv coe, 1&2 deriv coe need to verify
Mar 18, 2026
935a31d
1st attempt at eval2ndDeriv
Mar 18, 2026
dfafacb
fixed indent & remove repeat knots, ongoing debug
Mar 24, 2026
f788662
fixing indentation to match existing code
Mar 24, 2026
bc562b9
fixing memory access error for spline constructors
Mar 25, 2026
2b8d27c
Fixing print function
Mar 25, 2026
e861781
fixed multi spline constructor offset index
Mar 25, 2026
865a5a3
Coeff function adapt with mirror views
Mar 25, 2026
c794c9c
eval1stD debug in progress
Mar 25, 2026
2289339
Add serial spline & init SplineKokkos w/ same data
Mar 31, 2026
6c1196f
Removed weights from constructors and member var
Mar 31, 2026
246ed75
Added serial 1st derivative test, wip for kokkos
Mar 31, 2026
bcad4bf
Fixing coef calculation in progress
Mar 31, 2026
b2a667f
Fixed deriv coef calculation for 1st deriv
Apr 1, 2026
9e11d6e
Added simple 2nd deriv test against serial version
Apr 1, 2026
dd470d5
Ongoing fix for 2nd deriv coeff
Apr 1, 2026
8e7bc8a
Added tests for kokkos 1st derivative
Apr 5, 2026
5e4439b
Added test to CMakeLists, 1stDeriv returns x&y res
Apr 5, 2026
9e99759
1st Deriv serial pass all tests, GPU in progress
Apr 8, 2026
3a73fe0
Made kokkos 1st deriv test concise & automatable
Apr 8, 2026
d64a89e
Fixed difference calculation error
Apr 8, 2026
d424269
Known Error at parallel_for in 1stDeriv evaluation
Apr 8, 2026
793c6c0
Fixed formatting and argumnet check
Apr 11, 2026
b9db307
Changed 1st deriv to device function
Apr 15, 2026
ff2e5f7
Change x to vector of x, eval ok for cpu & gpu
Apr 15, 2026
93e722b
Update the input type for eval 1st derivative
Apr 15, 2026
b770910
Added 1spline constructor and accessors
Apr 20, 2026
6730696
Added multispline constructor
Apr 20, 2026
0d429d7
Coef calculation function in progress
Apr 20, 2026
e45dbba
Not test yet 1st pass implementation for coef calc
Apr 21, 2026
1d7fd21
Added new test for 2D view rep of Kokkos Spline
Apr 21, 2026
e25c9ef
For adding the library in CMakeLists.txt
Apr 21, 2026
e562b35
Syntax err fix for 2d kokkos spline test and class
Apr 21, 2026
2e44c75
Test updated, single spline initialization ok
Apr 22, 2026
716bd6c
add 1st pass eval1stDeriv, no compile err
Apr 22, 2026
9d07184
1st pass test, no compile & not in CMakeLists
Apr 22, 2026
156d619
Fixed 1st derivative coeff calculation
Apr 30, 2026
8d56882
Fixed 2nd deriv coeff calculation
Apr 30, 2026
036bbb3
1st deriv test pass both NATIVE & AMPERE86 builds
Apr 30, 2026
2089e1a
Add 1st & 2nd coef test pass ampere & native build
Apr 30, 2026
8f25efe
Fixed 1st & 2nd coef calculation
Apr 30, 2026
59d3ba6
First pass implementation for 2nd deriv
May 1, 2026
c7f583c
First pass implementation of 2nd deriv test
May 1, 2026
91e8c8f
Bug fixes, 2nd deriv test segfaults
May 1, 2026
54ec379
Fixed nested forloop, all serial ok, fail parallel
May 1, 2026
f2f91ce
Change deriv input to view, all test in cpu&gpu ok
May 1, 2026
72d0037
Attempt to format the functions
May 4, 2026
a25f24b
Update BSplineKokkos2D.h
hsiehhRPI May 4, 2026
00a549b
Update testSplineKokkos2DBase.cpp
hsiehhRPI May 4, 2026
df86673
Update testKokkos2D1stDeriv.cpp
hsiehhRPI May 4, 2026
6c5b232
Update testKokkos2D1stDeriv.cpp
hsiehhRPI May 4, 2026
ea33d98
Update testKokkos2D2ndDeriv.cpp
hsiehhRPI May 4, 2026
0c9f9c6
Ran bash script and additional formatting fix
May 7, 2026
f09d1dd
Fix conflict & Merge branch 'fh_Kokkos_BSpline' of github.com:SCOREC/…
May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions BSplineKokkos.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include "BSplineKokkos.h"
#include <iostream>
/*template<typename ExecutionSpace>
BSplineKokkos<ExecutionSpace>::BSplineKokkos(int orderC, std::vector<double>& ctrlPtsC, std::vector<double>& knotsC, std::vector<double>& weightsC) {
order = orderC;
//Allocate appropriate view space based on the number of control points, copy the data over to view
ctrlPts("ctrlPts", ctrlPtsC.size());
for (int i = 0; i < ctrlPtsC.size(); i++) {
ctrlPts(i) = ctrlPtsC[i];
}
//Same for knots and weights
knots("knots", knotsC.size());
for (int i = 0; i < knotsC.size(); i++) {
knots(i) = knotsC[i];
}

weights("weights", weightsC.size());
for (int i = 0; i < weightsC.size(); i++) {
weights(i) = weightsC[i];
}
//Call the calculateDerivCoeff() to populate
//1st and 2nd deriavtive views

//NOTE: UNCOMMENT THIS ONCE ALL IN FRONT ARE RESOLVED
//calculateDerivCoeff();

}*/


/*template<typename ExecutionSpace>
void BSplineKokkos<ExecutionSpace>::calculateDerivCoeff() {
//Calculate first order derivative
//Allocate space for ctrlPts_1stD
ctrlPts_1stD("ctrlPts1Derivative", ctrlPts.extent(0)-1);
for (int i = 1; i < ctrlPts.extent(0); i++) {
double delta = double(order - 1)/(knots(i+order-1)-knots(i));
ctrlPts_1stD(i) = ((ctrlPts(i) - ctrlPts(i-1)*delta));

}

//Calculate second order derivative
//Allocate space for ctrlPts_2ndD
ctrlPts_2ndD("ctrlPts2Derivative", ctrlPts.extent(0)-2);
for (int i = 0; i < ctrlPts_1stD.extent(0); i++) {
double delta = double(order - 2) / (knots(i+order-1)-knots(i+1));
ctrlPts_2ndD(i) = ((ctrlPts_1stD(i) - ctrlPts_1stD(i-1))*delta);
}
//TODO: find another way to verify the size of the second derivative view

}*/

//Explicit instantiation of the templated class for Kokkos::serial
//template class BSplineKokkos<Kokkos::Serial>;
Comment on lines +3 to +53
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.

please remove code that is commented out

Loading