# -*- coding: utf-8 -*-
"""
  compliance_comp.py generated by WhatsOpt 1.8.2
"""
import numpy as np
from parallel.sub0.compliance_comp_base import ComplianceCompBase


class ComplianceComp(ComplianceCompBase):
    """An OpenMDAO component to encapsulate ComplianceComp discipline"""

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


# Reminder: inputs of compute()
#
#       inputs['displacements_0'] -> shape: (102,), type: Float
#       inputs['displacements_1'] -> shape: (102,), type: Float

# To declare partial derivatives computation ...
#
#    def setup(self):
#        super(ComplianceComp, self).setup()
#        self.declare_partials('*', '*')
#
#    def compute_partials(self, inputs, partials):
#        """ Jacobian for ComplianceComp """
#
#       	partials['compliance_0', 'displacements_0'] = np.zeros((1, 102))
#       	partials['compliance_0', 'displacements_1'] = np.zeros((1, 102))
#       	partials['compliance_1', 'displacements_0'] = np.zeros((1, 102))
#       	partials['compliance_1', 'displacements_1'] = np.zeros((1, 102))
