A level set approach for the analysis of flow and compaction during resin infusion in composite materials