public static CartesianModel CreateCommemiModel(CommemiModelSettings settings, Mpi mpi = null) { var creater = new SimpleCommemi3DModelCreater(settings.AnomalySizeInMeters); return(GenerateModel(mpi, settings, () => creater.CreateNonMeshedModel(settings.LeftConductivity, settings.RightConductivity))); }
public static void SaveToXml(string path, CommemiModelSettings model) { var xdoc = new XDocument(); var xelem = ToXElement(model, "commemi"); xelem.Add( new XElement("AnomalySizeInMeters", model.AnomalySizeInMeters), new XElement("Conductivity", new XAttribute("left", model.LeftConductivity), new XAttribute("right", model.RightConductivity))); xdoc.Add(xelem); xdoc.Save(path); }