Tests and user defined mesh density routine added