/* -------------------------------------------------------------------------- * * OpenSim: testSmoothSegmentedFunctionFactory.cpp * * -------------------------------------------------------------------------- * * The OpenSim API is a toolkit for musculoskeletal modeling and simulation. * * See http://opensim.stanford.edu and the NOTICE file for more information. * * OpenSim is developed at Stanford University and supported by the US * * National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA * * through the Warrior Web program. * * * * Copyright (c) 2005-2012 Stanford University and the Authors * * Author(s): Matthew Millard * * * * Licensed under the Apache License, Version 2.0 (the "License"); you may * * not use this file except in compliance with the License. You may obtain a * * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * * -------------------------------------------------------------------------- */ /* Update: This is a port of the original code so that it will work with the multibody code RBDL written by Martin Felis. This also includes additional curves (the Anderson2007 curves) which are not presently in OpenSim. Author: Matthew Millard Date: Nov 2015 */ /* Below is a basic bench mark simulation for the MuscleFunctionFactory class, a class that enables the easy generation of C2 continuous curves that define the various characteristic curves required in a muscle model */ // Author: Matthew Millard //============================================================================== // INCLUDES //============================================================================== #include "../../geometry/geometry.h" #include "../MuscleFunctionFactory.h" #include "../../geometry/tests/numericalTestFunctions.h" #include #include #include #include #include #include #include using namespace RigidBodyDynamics::Addons::Geometry; using namespace RigidBodyDynamics::Addons::Muscle; using namespace std; //using namespace OpenSim; //using namespace SimTK; /* static double EPSILON = numeric_limits::epsilon(); static bool FLAG_PLOT_CURVES = false; static string FILE_PATH = ""; static double TOL_DX = 5e-3; static double TOL_DX_BIG = 1e-2; static double TOL_BIG = 1e-6; static double TOL_SMALL = 1e-12; */ TEST(tendonCurve) { //cout <<"**************************************************"<