aboutsummaryrefslogtreecommitdiff
path: root/Carpet/LoopControl/src/lc_hill.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-10-10 13:39:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-10-10 13:39:00 +0000
commit3215a191496ef0f9807d3b574151e91ebc27ca8a (patch)
tree8536bd7c3c3f0ff0a44d2a7b030b5881b0179b8e /Carpet/LoopControl/src/lc_hill.h
parente15f981b761acb114010667880ef59fd508ee41a (diff)
LoopControl: Big update, introducing a hill climbing algorithm
darcs-hash:20071010133923-dae7b-a3406485d61ab795191655c89a16e2ae2c487978.gz
Diffstat (limited to 'Carpet/LoopControl/src/lc_hill.h')
-rw-r--r--Carpet/LoopControl/src/lc_hill.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Carpet/LoopControl/src/lc_hill.h b/Carpet/LoopControl/src/lc_hill.h
new file mode 100644
index 000000000..7d418314b
--- /dev/null
+++ b/Carpet/LoopControl/src/lc_hill.h
@@ -0,0 +1,38 @@
+#ifndef LC_HILL_H
+#define LC_HILL_H
+
+#include <cctk.h>
+
+#include "loopcontrol.h"
+
+
+
+/* no typedef here; forward declcared in loopcontrol.h */
+struct lc_hill_state_t {
+ int iteration;
+
+ lc_state_t best;
+ double best_time;
+ int have_best;
+
+ int excursion_start; /* -1 if not on an excursion */
+
+ lc_state_t previous;
+ double previous_time;
+ int have_previous;
+
+ lc_state_t state;
+ double time;
+};
+
+
+
+void
+lc_hill_init (lc_statset_t * restrict const ls,
+ lc_state_t * restrict const state);
+
+void
+lc_hill_finish (lc_statset_t * restrict const ls,
+ lc_stattime_t const * restrict const lt);
+
+#endif /* #ifndef LC_HILL_H */