# $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/modules/module-mds/mds,v 1.8 2017/01/12 14:54:57 masarati Exp $
# MBDyn (C) is a multibody analysis code. 
# http://www.mbdyn.org
# 
# Copyright (C) 1996-2017
# 
# Pierangelo Masarati	<masarati@aero.polimi.it>
# Paolo Mantegazza	<mantegazza@aero.polimi.it>
# 
# Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
# via La Masa, 34 - 20156 Milano, Italy
# http://www.aero.polimi.it
# 
# Changing this copyright notice is forbidden.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation (version 2 of the License).
# 
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# 

begin: data;
	problem: initial value;
end: data;

begin: initial value;
	initial time: 0.;
	final time: 10.;
	time step: 1.e-2;

	tolerance: 1.e-6;
	max iterations: 10;

	method: ms, .6;

	# derivatives coefficient: 1.e-12;
	derivatives tolerance: 1.e-3;
	derivatives max iterations: 10;

	# linear solver: umfpack, cc;

	output: iterations;
	#output: residual;
	#output: solution;
	#output: jacobian;
end: initial value;

begin: control data;
	loadable elements: 1;
end: control data;

set: real M = 1.;
set: real OMEGA = 2*pi;
set: real XI = .1;
set: real K = M*OMEGA^2;
set: real D = 2*XI*M*OMEGA;

begin: elements;
	module load: "libmodule-mds";
	user defined: 1, mds,
		M, D, K,
			# sine, 0., .2*OMEGA, 1., forever, 0.,
			sine, 0., 10.*OMEGA, 1., one, 0.,
		output, yes;
end: elements;

# vim:ft=mbd
