A Finite-Element Method for a Solid Enclosing an Inviscid, Incompressible Fluid