Creating a class for water solver