A 3D AMR library for hydrodynamics codes