# -*- coding: utf-8 -*-
"""
  i_comp.py generated by WhatsOpt 1.8.2
"""
import numpy as np
from i_comp_base import ICompBase


class IComp(ICompBase):
    """An OpenMDAO component to encapsulate IComp discipline"""

    def compute(self, inputs, outputs):
        """IComp computation"""
        if self._impl:
            # Docking mechanism: use implementation if referenced in .whatsopt_dock.yml file
            self._impl.compute(inputs, outputs)
        else:
            outputs["I"] = np.ones((50,))


# Reminder: inputs of compute()
#
#       inputs['h'] -> shape: (50,), type: Float

# To declare partial derivatives computation ...
#
#    def setup(self):
#        super(IComp, self).setup()
#        self.declare_partials('*', '*')
#
#    def compute_partials(self, inputs, partials):
#        """ Jacobian for IComp """
#
#       	partials['I', 'h'] = np.zeros((50, 50))
