コード例 #1
0
ファイル: ModelGenUtils.cs プロジェクト: prisae/extreme
        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)));
        }
コード例 #2
0
        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);
        }