Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
080337df
Commit
080337df
authored
Jan 28, 2021
by
Sébastien Timmermans
Browse files
[dd] moving flag ongoing jac from opts to dd struct"
parent
59762152
Changes
3
Hide whitespace changes
Inline
Side-by-side
MBsysC/mbs_common/mbs_module/mbs_dirdyn.c
View file @
080337df
...
...
@@ -143,7 +143,6 @@ MbsDirdyn* mbs_new_dirdyn_aux(MbsData* mbs_data, MbsAux* mbs_aux)
int
check_user_dirdyn_options
(
MbsDirdyn
*
dd
,
MbsData
*
mbs_data
)
{
int
i
;
int
err
=
0
;
// errors generated
if
(
dd
->
options
->
t0
>
dd
->
options
->
tf
)
...
...
MBsysC/mbs_common/mbs_numerics/integrator.c
View file @
080337df
...
...
@@ -31,7 +31,7 @@ int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int comp
int
(
*
derivs
)(
double
,
double
[],
double
[],
MbsData
*
,
MbsDirdyn
*
),
MbsData
*
s
,
MbsDirdyn
*
dd
)
{
// setting the flag to ON
dd
->
options
->
flag_ongoing_jac_computation
=
1
;
dd
->
flag_ongoing_jac_computation
=
1
;
int
i
,
j
,
err
;
double
perturb
;
...
...
@@ -100,7 +100,7 @@ int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int comp
}
// setting the flag to OFF
dd
->
options
->
flag_ongoing_jac_computation
=
0
;
dd
->
flag_ongoing_jac_computation
=
0
;
return
0
;
}
...
...
MBsysC/mbs_common/mbs_struct/mbs_dirdyn_struct.h
View file @
080337df
...
...
@@ -131,9 +131,7 @@ typedef struct MbsDirdynOptions
// Options related to integrator that need Jacobian computation
/*TO BE COMPLETED*/
int
n_freeze
;
//!< number of time step when the jacobian is freezed (computed once at the start of the n_freeze time steps), default = 0;
int
flag_ongoing_jac_computation
;
//!< flag is ON when the implicit integrator is computing the jacobian.
//!< it allows the user the make a distinction in his user functions (typically a FSM state that should now change during jacobian computation).
// Various options
int
show_failed_closure
;
//!< 1 to generate animation of the failed Newton-Raphson procedure, default = 0.
...
...
@@ -176,6 +174,9 @@ struct MbsDirdyn
int
savePeriodCounter
;
// Part related to numerical integrator
int
flag_ongoing_jac_computation
;
//!< flag is ON (=1) when the implicit integrator is currently computing the jacobian, default is 0.
//!< it allows the user the make a distinction in his user functions (typically a FSM state that should now change during jacobian computation).
/** pointer to store integrator structure **/
void
*
integrator_struct
;
// set by initialize_integrator
/** pointer to integrator initialize function **/
...
...
@@ -185,6 +186,7 @@ struct MbsDirdyn
/** pointer to integrator closing function **/
finish_integrator_ptr
finish_integrator
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment