Class UnboundedCartesianEnergy

    • Constructor Detail

      • UnboundedCartesianEnergy

        public UnboundedCartesianEnergy​(String name,
                                        double massFlowRateFactor,
                                        EventDetectionSettings eventDetectionSettings)
        Constructor.
        Parameters:
        name - name
        massFlowRateFactor - mass flow rate factor
        eventDetectionSettings - detection settings for singularity detections
      • UnboundedCartesianEnergy

        public UnboundedCartesianEnergy​(String name,
                                        double massFlowRateFactor)
        Constructor.
        Parameters:
        name - name
        massFlowRateFactor - mass flow rate factor
    • Method Detail

      • getThrustForceNorm

        protected double getThrustForceNorm​(double[] adjointVariables,
                                            double mass)
        Computes the Euclidean norm of the thrust force.
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        norm of thrust
      • getFieldThrustForceNorm

        protected <T extends CalculusFieldElement<T>> T getFieldThrustForceNorm​(T[] adjointVariables,
                                                                                T mass)
        Computes the Euclidean norm of the thrust force.
        Type Parameters:
        T - field type
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        norm of thrust
      • getEventDetectors

        public Stream<EventDetector> getEventDetectors()
        Get the discrete events related to the model.

        This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called

        Returns:
        stream of event detectors
      • getFieldEventDetectors

        public <T extends CalculusFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventDetectors​(Field<T> field)
        Get the discrete events related to the model.

        This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called

        Type Parameters:
        T - extends CalculusFieldElement<T>
        Parameters:
        field - field to which the state belongs
        Returns:
        stream of event detectors
      • getEventDetectionSettings

        public EventDetectionSettings getEventDetectionSettings()
        Getter for event detection settings.
        Returns:
        detection settings.
      • getThrustAccelerationVector

        public Vector3D getThrustAccelerationVector​(double[] adjointVariables,
                                                    double mass)
        Computes the thrust acceleration vector in propagation frame from the adjoint variables and the mass.
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        thrust vector
      • getFieldThrustAccelerationVector

        public <T extends CalculusFieldElement<T>> FieldVector3D<T> getFieldThrustAccelerationVector​(T[] adjointVariables,
                                                                                                     T mass)
        Computes the thrust acceleration vector in propagation frame from the adjoint variables and the mass.
        Type Parameters:
        T - field type
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        thrust vector
      • getThrustDirection

        protected Vector3D getThrustDirection​(double[] adjointVariables)
        Computes the direction of thrust.
        Parameters:
        adjointVariables - adjoint vector
        Returns:
        thrust direction
      • getFieldThrustDirection

        protected <T extends CalculusFieldElement<T>> FieldVector3D<T> getFieldThrustDirection​(T[] adjointVariables)
        Computes the direction of thrust.
        Type Parameters:
        T - field type
        Parameters:
        adjointVariables - adjoint vector
        Returns:
        thrust direction
      • updateAdjointDerivatives

        public void updateAdjointDerivatives​(double[] adjointVariables,
                                             double mass,
                                             double[] adjointDerivatives)
        Update the adjoint derivatives if necessary.
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        adjointDerivatives - derivatives to update
      • updateFieldAdjointDerivatives

        public <T extends CalculusFieldElement<T>> void updateFieldAdjointDerivatives​(T[] adjointVariables,
                                                                                      T mass,
                                                                                      T[] adjointDerivatives)
        Update the adjoint derivatives if necessary.
        Type Parameters:
        T - field type
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        adjointDerivatives - derivatives to update
      • getHamiltonianContribution

        public double getHamiltonianContribution​(double[] adjointVariables,
                                                 double mass)
        Computes the Hamiltonian contribution of the cost function.
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        contribution to Hamiltonian
      • getFieldHamiltonianContribution

        public <T extends CalculusFieldElement<T>> T getFieldHamiltonianContribution​(T[] adjointVariables,
                                                                                     T mass)
        Computes the Hamiltonian contribution of the cost function.
        Type Parameters:
        T - field type
        Parameters:
        adjointVariables - adjoint vector
        mass - mass
        Returns:
        contribution to Hamiltonian