Estimation of inlet flow rate in simulations of left atrial flows: A proposed optimized and reference-based algorithm with application to sinus rhythm and atrial fibrillation