Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
9f90999c
Commit
9f90999c
authored
Apr 03, 2020
by
Charlles Abreu
Browse files
Change in the circular matrix assignment for periodic splines
parent
25c6915b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
openmmapi/src/SplineFitter.cpp
openmmapi/src/SplineFitter.cpp
+2
-1
No files found.
openmmapi/src/SplineFitter.cpp
View file @
9f90999c
...
...
@@ -87,6 +87,7 @@ void SplineFitter::createPeriodicSpline(const vector<double>& x, const vector<do
// Create the system of equations to solve.
vector
<
double
>
a
(
n
-
1
),
b
(
n
-
1
),
c
(
n
-
1
),
rhs
(
n
-
1
);
a
[
0
]
=
x
[
n
-
1
]
-
x
[
n
-
2
];
b
[
0
]
=
2.0
*
(
x
[
1
]
-
x
[
0
]
+
x
[
n
-
1
]
-
x
[
n
-
2
]);
c
[
0
]
=
x
[
1
]
-
x
[
0
];
rhs
[
0
]
=
6.0
*
((
y
[
1
]
-
y
[
0
])
/
(
x
[
1
]
-
x
[
0
])
-
(
y
[
n
-
1
]
-
y
[
n
-
2
])
/
(
x
[
n
-
1
]
-
x
[
n
-
2
]));
...
...
@@ -96,7 +97,7 @@ void SplineFitter::createPeriodicSpline(const vector<double>& x, const vector<do
c
[
i
]
=
x
[
i
+
1
]
-
x
[
i
];
rhs
[
i
]
=
6.0
*
((
y
[
i
+
1
]
-
y
[
i
])
/
(
x
[
i
+
1
]
-
x
[
i
])
-
(
y
[
i
]
-
y
[
i
-
1
])
/
(
x
[
i
]
-
x
[
i
-
1
]));
}
double
beta
=
x
[
n
-
1
]
-
x
[
n
-
2
];
double
beta
=
a
[
0
];
double
alpha
=
c
[
n
-
2
];
double
gamma
=
-
b
[
0
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment