def compute(self, inputs, outputs):
    aoa = inputs['aoa']
    yaw = inputs['yaw']
    area = inputs['ref_area']
    q_inf = inputs['q_inf']
    xc = inputs['moment_center'][0]
    yc = inputs['moment_center'][1]
    zc = inputs['moment_center'][2]
    c = inputs['ref_length']
    x = inputs['x_aero'][0::3]
    y = inputs['x_aero'][1::3]
    z = inputs['x_aero'][2::3]
    fx = inputs['f_aero'][0::3]
    fy = inputs['f_aero'][1::3]
    fz = inputs['f_aero'][2::3]
    fx_total = self.comm.allreduce(np.sum(fx))
    fy_total = self.comm.allreduce(np.sum(fy))
    fz_total = self.comm.allreduce(np.sum(fz))
    outputs['F_X'] = fx_total
    outputs['F_Y'] = fy_total
    outputs['F_Z'] = fz_total
    outputs['C_X'] = (fx_total / (q_inf * area))
    outputs['C_Y'] = (fy_total / (q_inf * area))
    outputs['C_Z'] = (fz_total / (q_inf * area))
    outputs['Lift'] = (((- fx_total) * np.sin(aoa)) + (fz_total * np.cos(aoa)))
    outputs['Drag'] = ((((fx_total * np.cos(aoa)) * np.cos(yaw)) - (fy_total * np.sin(yaw))) + ((fz_total * np.sin(aoa)) * np.cos(yaw)))
    outputs['C_L'] = (outputs['Lift'] / (q_inf * area))
    outputs['C_D'] = (outputs['Drag'] / (q_inf * area))
    m_x = self.comm.allreduce((np.dot(fz, (y - yc)) - np.dot(fy, (z - zc))))
    m_y = self.comm.allreduce(((- np.dot(fz, (x - xc))) + np.dot(fx, (z - zc))))
    m_z = self.comm.allreduce((np.dot(fy, (x - xc)) - np.dot(fx, (y - yc))))
    outputs['M_X'] = m_x
    outputs['M_Y'] = m_y
    outputs['M_Z'] = m_z
    outputs['CM_X'] = (m_x / ((q_inf * area) * c))
    outputs['CM_Y'] = (m_y / ((q_inf * area) * c))
    outputs['CM_Z'] = (m_z / ((q_inf * area) * c))
def compute(self, inputs, outputs):
    aoa = inputs['aoa']
    yaw = inputs['yaw']
    area = inputs['ref_area']
    q_inf = inputs['q_inf']
    xc = inputs['moment_center'][0]
    yc = inputs['moment_center'][1]
    zc = inputs['moment_center'][2]
    c = inputs['ref_length']
    x = inputs['x_aero'][0::3]
    y = inputs['x_aero'][1::3]
    z = inputs['x_aero'][2::3]
    fx = inputs['f_aero'][0::3]
    fy = inputs['f_aero'][1::3]
    fz = inputs['f_aero'][2::3]
    fx_total = self.comm.allreduce(np.sum(fx))
    fy_total = self.comm.allreduce(np.sum(fy))
    fz_total = self.comm.allreduce(np.sum(fz))
    outputs['F_X'] = fx_total
    outputs['F_Y'] = fy_total
    outputs['F_Z'] = fz_total
    outputs['C_X'] = (fx_total / (q_inf * area))
    outputs['C_Y'] = (fy_total / (q_inf * area))
    outputs['C_Z'] = (fz_total / (q_inf * area))
    outputs['Lift'] = (((- fx_total) * np.sin(aoa)) + (fz_total * np.cos(aoa)))
    outputs['Drag'] = ((((fx_total * np.cos(aoa)) * np.cos(yaw)) - (fy_total * np.sin(yaw))) + ((fz_total * np.sin(aoa)) * np.cos(yaw)))
    outputs['C_L'] = (outputs['Lift'] / (q_inf * area))
    outputs['C_D'] = (outputs['Drag'] / (q_inf * area))
    m_x = self.comm.allreduce((np.dot(fz, (y - yc)) - np.dot(fy, (z - zc))))
    m_y = self.comm.allreduce(((- np.dot(fz, (x - xc))) + np.dot(fx, (z - zc))))
    m_z = self.comm.allreduce((np.dot(fy, (x - xc)) - np.dot(fx, (y - yc))))
    outputs['M_X'] = m_x
    outputs['M_Y'] = m_y
    outputs['M_Z'] = m_z
    outputs['CM_X'] = (m_x / ((q_inf * area) * c))
    outputs['CM_Y'] = (m_y / ((q_inf * area) * c))
    outputs['CM_Z'] = (m_z / ((q_inf * area) * c))