Skip to content

Commit f162e6c

Browse files
committed
Now propagate dSystemAge to dAge for all bodies for which dAge was not set.
1 parent f6ef1f6 commit f162e6c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/verify.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,17 @@ void AssignStopTime(CONTROL *control, FILES *files, OPTIONS *options,
605605
}
606606
}
607607

608+
void AssignBodyAges(BODY *body, CONTROL *control, FILES *files,
609+
OPTIONS *options, SYSTEM *system) {
610+
int iBody;
611+
612+
for (iBody = 0; iBody < files->iNumInputs - 1; iBody++) {
613+
if (options[OPT_AGE].iLine[iBody + 1] == -1) {
614+
body[iBody].dAge = system->dAge;
615+
}
616+
}
617+
}
618+
608619
void VerifyIntegration(BODY *body, CONTROL *control, FILES *files,
609620
OPTIONS *options, SYSTEM *system,
610621
fnIntegrate *fnOneStep) {
@@ -619,6 +630,7 @@ void VerifyIntegration(BODY *body, CONTROL *control, FILES *files,
619630
VerifyOutputTime(control, files, options);
620631
AssignIntegrationMethod(control, options, fnOneStep);
621632
InitializeIntegrationFiles(body, control, files, options, system);
633+
AssignBodyAges(body, control, files, options, system);
622634
}
623635

624636
/*

0 commit comments

Comments
 (0)