Mechanistic Neural Networks for Scientific Machine Learning