summaryrefslogtreecommitdiff
path: root/langevin.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-06 22:03:34 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-06 22:03:34 +0100
commit09bd9058e00b609d8cee2baa8023710ba74e3deb (patch)
treef35fbfba5fcc2d8998dad3743928b500af1749e5 /langevin.cpp
parentc60430fc1c5d90ae06d1fd019257474c8f395bef (diff)
downloadcode-09bd9058e00b609d8cee2baa8023710ba74e3deb.tar.gz
code-09bd9058e00b609d8cee2baa8023710ba74e3deb.tar.bz2
code-09bd9058e00b609d8cee2baa8023710ba74e3deb.zip
Finished Levenburg-Marquardt for Stokes lines.
Diffstat (limited to 'langevin.cpp')
-rw-r--r--langevin.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/langevin.cpp b/langevin.cpp
index d23cb33..adb5212 100644
--- a/langevin.cpp
+++ b/langevin.cpp
@@ -193,8 +193,35 @@ int main(int argc, char* argv[]) {
}
*/
+ /*
+ J(0,0,0) = Complex(2, 3);
+ J(1,1,1) = Complex(-2, 0.3);
+ J(0,1,1) = Complex(4, 0.2);
+ J(1,0,1) = Complex(4, 0.2);
+ J(1,1,0) = Complex(4, 0.2);
+ J(1,0,0) = Complex(0.7, 0.4);
+ J(0,1,0) = Complex(0.7, 0.4);
+ J(0,0,1) = Complex(0.7, 0.4);
+
+ ComplexVector z0(2);;
+ z0 << Complex(0.8, 0.3), Complex(0.7, 0.2);
+ ComplexVector z1(2);
+ z1 << Complex(-0.5, 0.2), Complex(1.0, 1.0);
+
+ Cord test(J, z0, z1, 2);
+
+ test.gs[0](0) = Complex(0.2, 0.2);
+ test.gs[0](1) = Complex(0.4, 0.4);
+ test.gs[1](0) = Complex(0.1, 0.2);
+ test.gs[1](1) = Complex(0.3, 0.4);
+
+ auto [dgs, ddgs] = test.gsGradHess(J, 0.7);
+
+ std::cout << dgs << std::endl;
+ std::cout << ddgs << std::endl;
+ */
- Cord test(J, zSaddle, zSaddleNext, 2);
+ Cord test(J, zSaddle, zSaddleNext, 5);
test.relaxNewton(J, 20, 1, 1e4);
std::cout << test.z0.transpose() << std::endl;