« GPIntegrator » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
 
(14 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
'''<font color=#FF0000>Only available since V2.1 version</font>'''
== How to call it ==
== How to call it ==


For using the [{{CurrentServer}}/uploads/JavaDocs/V2.1/fr/cnes/genopus/math/GPIntegrator.html GPIntegrator] class, the developer has only to create such an object with these two possibilities:
For using the [{{PathCurrentJavaDoc}}/fr/cnes/genopus/math/GPIntegrator.html GPIntegrator] class, the developer has only to create such an object with these two possibilities:


* With no initialization:
* With no initialization:
Ligne 10 : Ligne 12 :


In that case, all the possible integrators will be displayed (i.e. <font color=#FF8C00>Runge Kutta 4</font>, <font color=#FF8C00>Runge Kutta 6</font> and <font color=#FF8C00>Dormand Price 853</font>)
In that case, all the possible integrators will be displayed (i.e. <font color=#FF8C00>Runge Kutta 4</font>, <font color=#FF8C00>Runge Kutta 6</font> and <font color=#FF8C00>Dormand Price 853</font>)


* Or, if we want to limit the display to some of these integrators (in the example below, only <font color=#FF8C00>Runge Kutta 4</font> and <font color=#FF8C00>Dormand Price 853</font>) and choose the one initially displayes (here the <font color=#FF8C00>Dormand Price 853</font> one):
* Or, if we want to limit the display to some of these integrators (in the example below, only <font color=#FF8C00>Runge Kutta 4</font> and <font color=#FF8C00>Dormand Price 853</font>) and choose the one initially displayes (here the <font color=#FF8C00>Dormand Price 853</font> one):
Ligne 17 : Ligne 18 :
final IntegratorTypeEnum[] types = { IntegratorTypeEnum.RK4, IntegratorTypeEnum.DOP };
final IntegratorTypeEnum[] types = { IntegratorTypeEnum.RK4, IntegratorTypeEnum.DOP };
GPIntegrator gpInteg = new GPIntegrator(types, IntegratorTypeEnum.DOP);
GPIntegrator gpInteg = new GPIntegrator(types, IntegratorTypeEnum.DOP);
</syntaxhighlight>
* There are also several setter methods to override default values. For example, if we want to display by default 5 seconds for the <font color=#FF8C00>Runge Kutta</font> time steps, we will have to call to the specific method as:
<syntaxhighlight lang="java">
gpInteg.setRKParameters(5.);
</syntaxhighlight>
== Display ==
For the first cases, the display will be:
[[File:GPIntegrator1.png]]
as, for the second one …
[[File:GPIntegrator2.png]]
Note an interesting functionnality for the <font color=#FF8C00>Dormand Price 853</font> data with a user help for initializing steps and tolerances depending of some kind of orbits.
[[File:GPIntegrator3.png]]
== How to use it ==
To get a [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] <font color=#4169E1>FirstOrderIntegrator</font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:
<syntaxhighlight lang="java">
final FirstOrderIntegrator integ = gpInteg.getPatriusObject();
</syntaxhighlight>
Be careful, that this call will not work if the user selected the "Simplified" display for <font color=#FF8C00>Dormand Price 853</font> tolerances.
To be sure that it will work every time, we will have to give an orbit as input:
<syntaxhighlight lang="java">
gpInteg.setInitialOrbit(initialOrbit);
final FirstOrderIntegrator integ = gpInteg.getPatriusObject();
</syntaxhighlight>
== How it is stored ==
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format for the <font color=#FF8C00>Dormand Price 853</font> integrator data:
<syntaxhighlight lang="XML">
  <String name="Type:">Dormand-Prince (8th order)</String>
  <Real name="Minimum_timestep:_" unit="s">1.0E0</Real>
  <Real name="Maximum_timestep:_" unit="s">3.0E2</Real>
  <String name="Tolerances_definition:_">Complete</String>
  <Boolean name="Bypass_error_on_min_timestep">true</Boolean>
  <String name="Templates_for_tolerances_definition">---</String>
  <Tolerances name="Tolerance1">
    <Real name="X" unit="m">7.0E-6</Real>
    <Real name="Xr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance2">
    <Real name="Y" unit="m">7.0E-6</Real>
    <Real name="Yr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance3">
    <Real name="Z" unit="m">7.0E-6</Real>
    <Real name="Zr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance4">
    <Real name="Vx" unit="m/s">3.0E-10</Real>
    <Real name="Vxr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance5">
    <Real name="Vy" unit="m/s">3.0E-10</Real>
    <Real name="Vyr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance6">
    <Real name="Vz" unit="m/s">3.0E-10</Real>
    <Real name="Vzr" unit="%">0.0E0</Real>
  </Tolerances>
  <Real name="Mass" unit="kg">1.0E-3</Real>
  <Real name="Massr" unit="%">1.0E-2</Real>
</syntaxhighlight>
</syntaxhighlight>

Dernière version du 8 novembre 2019 à 07:58

Only available since V2.1 version

How to call it

For using the GPIntegrator class, the developer has only to create such an object with these two possibilities:

  • With no initialization:
GPIntegrator gpInteg = new GPIntegrator();

In that case, all the possible integrators will be displayed (i.e. Runge Kutta 4, Runge Kutta 6 and Dormand Price 853)

  • Or, if we want to limit the display to some of these integrators (in the example below, only Runge Kutta 4 and Dormand Price 853) and choose the one initially displayes (here the Dormand Price 853 one):
final IntegratorTypeEnum[] types = { IntegratorTypeEnum.RK4, IntegratorTypeEnum.DOP };
GPIntegrator gpInteg = new GPIntegrator(types, IntegratorTypeEnum.DOP);
  • There are also several setter methods to override default values. For example, if we want to display by default 5 seconds for the Runge Kutta time steps, we will have to call to the specific method as:
gpInteg.setRKParameters(5.);

Display

For the first cases, the display will be:

GPIntegrator1.png

as, for the second one …

GPIntegrator2.png

Note an interesting functionnality for the Dormand Price 853 data with a user help for initializing steps and tolerances depending of some kind of orbits.

GPIntegrator3.png

How to use it

To get a [PATRIUS] FirstOrderIntegrator object, we will just have to call for the getPatriusObject() method as below:

final FirstOrderIntegrator integ = gpInteg.getPatriusObject();

Be careful, that this call will not work if the user selected the "Simplified" display for Dormand Price 853 tolerances.

To be sure that it will work every time, we will have to give an orbit as input:

gpInteg.setInitialOrbit(initialOrbit);
final FirstOrderIntegrator integ = gpInteg.getPatriusObject();

How it is stored

Here is the XML format for the Dormand Price 853 integrator data:

  <String name="Type:">Dormand-Prince (8th order)</String>
  <Real name="Minimum_timestep:_" unit="s">1.0E0</Real>
  <Real name="Maximum_timestep:_" unit="s">3.0E2</Real>
  <String name="Tolerances_definition:_">Complete</String>
  <Boolean name="Bypass_error_on_min_timestep">true</Boolean>
  <String name="Templates_for_tolerances_definition">---</String>
  <Tolerances name="Tolerance1">
    <Real name="X" unit="m">7.0E-6</Real>
    <Real name="Xr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance2">
    <Real name="Y" unit="m">7.0E-6</Real>
    <Real name="Yr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance3">
    <Real name="Z" unit="m">7.0E-6</Real>
    <Real name="Zr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance4">
    <Real name="Vx" unit="m/s">3.0E-10</Real>
    <Real name="Vxr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance5">
    <Real name="Vy" unit="m/s">3.0E-10</Real>
    <Real name="Vyr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance6">
    <Real name="Vz" unit="m/s">3.0E-10</Real>
    <Real name="Vzr" unit="%">0.0E0</Real>
  </Tolerances>
  <Real name="Mass" unit="kg">1.0E-3</Real>
  <Real name="Massr" unit="%">1.0E-2</Real>