public static void PopulateAnomaly(string path, CartesianAnomaly anomaly) { anomaly.CreateSigma(); var sigma = anomaly.Sigma; for (int k = 0; k < anomaly.Layers.Count; k++) { var layer = anomaly.Layers[k]; var xlayer = layer.UnderlyingXml; var depth = xlayer.AttributeAsDecimal(AnomalyLayerDepthAttr); var thickness = xlayer.AttributeAsDecimal(AnomalyLayerThicknessAttr); if (layer.Depth != depth) { throw new InvalidOperationException(); } if (layer.Thickness != thickness) { throw new InvalidOperationException(); } var xfromFile = xlayer.Element(AnomalyFromFile); if (xfromFile != null) { LoadAnomalyValuesFromFile(xfromFile, sigma, k, path); } var xapplique = xlayer.Element(AnomalyApplique); if (xapplique != null) { LoadAnomalyValuesFromApplique(xapplique, sigma, k); } } }
private static void UpdateAnomalyLocalSize(Mpi mpi, CartesianAnomaly anomaly) { var localSize = new Size2D(mpi.CalcLocalHalfNxLength(anomaly.LocalSize.Nx), anomaly.LocalSize.Ny); anomaly.ChangeLocalSize(localSize); anomaly.CreateSigma(); }