def check_integrated_surface_force_partials():
    nnodes = 3
    prob = om.Problem()
    ivc = om.IndepVarComp()
    ivc.add_output('aoa', val=45.0, units='deg')
    ivc.add_output('yaw', val=135.0, units='deg')
    ivc.add_output('ref_area', val=0.2)
    ivc.add_output('moment_center', shape=3, val=np.zeros(3))
    ivc.add_output('ref_length', val=3.0)
    ivc.add_output('q_inf', val=10.0)
    ivc.add_output('x_aero', shape=(3 * nnodes), val=np.random.rand((3 * nnodes)), distributed=True)
    ivc.add_output('f_aero', shape=(3 * nnodes), val=np.random.rand((3 * nnodes)), distributed=True)
    prob.model.add_subsystem('ivc', ivc, promotes_outputs=['*'])
    prob.model.add_subsystem('forces', IntegratedSurfaceForces(), promotes_inputs=['*'])
    prob.setup(force_alloc_complex=True)
    prob.run_model()
    prob.check_partials(compact_print=True, method='cs')
def check_integrated_surface_force_partials():
    nnodes = 3
    prob = om.Problem()
    ivc = om.IndepVarComp()
    ivc.add_output('aoa', val=45.0, units='deg')
    ivc.add_output('yaw', val=135.0, units='deg')
    ivc.add_output('ref_area', val=0.2)
    ivc.add_output('moment_center', shape=3, val=np.zeros(3))
    ivc.add_output('ref_length', val=3.0)
    ivc.add_output('q_inf', val=10.0)
    ivc.add_output('x_aero', shape=(3 * nnodes), val=np.random.rand((3 * nnodes)), distributed=True)
    ivc.add_output('f_aero', shape=(3 * nnodes), val=np.random.rand((3 * nnodes)), distributed=True)
    prob.model.add_subsystem('ivc', ivc, promotes_outputs=['*'])
    prob.model.add_subsystem('forces', IntegratedSurfaceForces(), promotes_inputs=['*'])
    prob.setup(force_alloc_complex=True)
    prob.run_model()
    prob.check_partials(compact_print=True, method='cs')