Skip to content

Commit

Permalink
Undo bug I introduced in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
landreman committed Nov 14, 2023
1 parent bb88259 commit 1c439a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/simsoptpp/curveplanarfourier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,10 @@ void CurvePlanarFourier<Array>::dgamma_by_dcoeff_impl(Array& data) {
counter++;


data(m, 0, counter) = 0;
data(m, 1, counter) = 0;
data(m, 2, counter) = 0;
for (int i = 0; i < 3; ++i) {
data(m, 0, counter) = 0;
data(m, 1, counter) = 0;
data(m, 2, counter) = 0;
data(m, i, counter) = 1;
counter++;
}
Expand Down
6 changes: 3 additions & 3 deletions src/simsoptpp/curveplanarfourier.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
template<class Array>
class CurvePlanarFourier : public Curve<Array> {
/*
CurvePlanarFourier is a curve that is restricted to lie in a plane. In
the plane, the curve is represented using a Fourier series in plane polar coordinates:
CurvePlanarFourier is a curve that is restricted to lie in a plane. In
the plane, the curve is represented using a Fourier series in plane polar coordinates:
r(phi) = \sum_{n=0}^{order} x_{c,n}cos(n*nfp*phi) + \sum_{n=1}^order x_{s,n}sin(n*nfp*phi)
Expand All @@ -24,7 +24,7 @@ class CurvePlanarFourier : public Curve<Array> {
c = [c_x, c_y, c_z]
The dofs are stored in the order
The dofs are stored in the order
[r_{c,0},...,r_{c,order},r_{s,1},...,r_{s,order}, q_0, q_1, q_2, q_3, c_x, c_y, c_z]
Expand Down
1 change: 0 additions & 1 deletion src/simsoptpp/python_curves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ void init_curves(py::module_ &m) {
register_common_curve_methods<PyCurveRZFourier>(pycurverzfourier);

auto pycurveplanarfourier = py::class_<PyCurvePlanarFourier, shared_ptr<PyCurvePlanarFourier>, PyCurvePlanarFourierTrampoline<PyCurvePlanarFourier>, PyCurve>(m, "CurvePlanarFourier")
//.def(py::init<int, int>())
.def(py::init<vector<double>, int, int, bool>())
.def_readwrite("rc", &PyCurvePlanarFourier::rc)
.def_readwrite("rs", &PyCurvePlanarFourier::rs)
Expand Down

0 comments on commit 1c439a4

Please sign in to comment.