--- a/examples/ar-vineyard/ar-vineyard.h Sun Mar 02 16:11:05 2008 -0500
+++ b/examples/ar-vineyard/ar-vineyard.h Sun Mar 02 16:42:33 2008 -0500
@@ -197,14 +197,17 @@
class ARVineyard::KineticEvaluator: public Evaluator
{
public:
- KineticEvaluator(Simulator* simulator):
- simulator_(simulator) {}
+ KineticEvaluator(Simulator* simplex_sort_simulator,
+ Simulator* trajectory_sort_simulator):
+ simplex_sort_simulator_(simplex_sort_simulator),
+ trajectory_sort_simulator_(trajectory_sort_simulator) {}
- virtual RealType time() const { return simulator_->current_time(); }
+ virtual RealType time() const { return std::max(simplex_sort_simulator_->current_time(), trajectory_sort_simulator_->current_time()); }
virtual RealType value(const Simplex& s) const { return FunctionKernel::value_at(s.max_threshold(), time()); }
private:
- Simulator* simulator_;
+ Simulator* simplex_sort_simulator_;
+ Simulator* trajectory_sort_simulator_;
};
--- a/examples/ar-vineyard/ar-vineyard.hpp Sun Mar 02 16:11:05 2008 -0500
+++ b/examples/ar-vineyard/ar-vineyard.hpp Sun Mar 02 16:42:33 2008 -0500
@@ -112,7 +112,7 @@
rLog(rlARVineyardComputing, "TrajectorySort size: %i", trajectory_sort_simulator.size());
// Simulate
- change_evaluator(new KineticEvaluator(&simplex_sort_simulator));
+ change_evaluator(new KineticEvaluator(&simplex_sort_simulator, &trajectory_sort_simulator));
while(!simplex_sort_simulator.reached_infinity() || !trajectory_sort_simulator.reached_infinity())
{
if (*(simplex_sort_simulator.top()) < *(trajectory_sort_simulator.top()))