From edb2cdf6b9fc0c94cce910c9d488e69200402c57 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 27 Nov 2012 17:01:23 +0100 Subject: Create (and use) model which is fixed in space --- LocomotorPrimitives.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'LocomotorPrimitives.cpp') diff --git a/LocomotorPrimitives.cpp b/LocomotorPrimitives.cpp index 7e24f08..341fa74 100644 --- a/LocomotorPrimitives.cpp +++ b/LocomotorPrimitives.cpp @@ -10,13 +10,14 @@ #include "LocomotorPrimitivesManager.h" #include "LocomotorPrimitivesController.h" -#define NO_SIM 0 +#define FIXED_IN_SPACE 1 +#define NO_SIM 0 static const std::string MODEL_NAME = "LocomotorPrimitives"; // Define the initial and final simulation time static const double initialTime = 0.0; -static const double finalTime = 5.0; +static const double finalTime = 2.0; static void constructModel(OpenSim::Model &model) { @@ -88,7 +89,8 @@ int main(void) try { // Create an OpenSim model and set its name - OpenSim::Model osimModel("../../locomotor-primitives.osim"); + std::string modelName = FIXED_IN_SPACE ? "locomotor-primitives-fixed.osim" : "locomotor-primitives.osim"; + OpenSim::Model osimModel("../../" + modelName); osimModel.setName(MODEL_NAME); constructModel(osimModel); @@ -96,12 +98,15 @@ int main(void) simulateModel(osimModel); } catch (OpenSim::Exception ex) { std::cout << ex.getMessage() << std::endl; + std::cin.get(); return 1; } catch (std::exception ex) { std::cout << ex.what() << std::endl; + std::cin.get(); return 1; } catch (...) { std::cout << "UNRECOGNIZED EXCEPTION" << std::endl; + std::cin.get(); return 1; } -- cgit v1.2.3-54-g00ecf et-next.git/log/kernel/kthread.c'>logtreecommitdiff
path: root/kernel/kthread.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2012-12-12 13:51:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 17:38:33 -0800
commitaee4faa499dc58fdb126885f68d447f2eba79b43 (patch)
treef0987873eba0b2158386a5af80cda9846ca0006d /kernel/kthread.c
parenta47b53c5f9a690addbc094501e4ae083ec307f57 (diff)
kthread: use N_MEMORY instead N_HIGH_MEMORY
N_HIGH_MEMORY stands for the nodes that has normal or high memory. N_MEMORY stands for the nodes that has any memory. The code here need to handle with the nodes which have memory, we should use N_MEMORY instead. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Cc: Christoph Lameter <cl@linux.com> Cc: Hillf Danton <dhillf@gmail.com> Cc: Lin Feng <linfeng@cn.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kthread.c')