Exemplo n.º 1
0
        private static void WriteFullField(StreamWriter sw, AllFieldsAtSite fv)
        {
            Action <Complex> write = (c)
                                     => sw.Write("{0} {1} ",
                                                 c.Real.ToString("E").PadLeft(14, ' '),
                                                 c.Imaginary.ToString("E").PadLeft(14, ' '));

            Action <ComplexVector> writeVector = (cv)
                                                 =>
            {
                write(cv.X);
                write(cv.Y);
                write(cv.Z);
            };

            writeVector(fv.NormalE1);
            writeVector(fv.NormalH1);
            writeVector(fv.NormalE2);
            writeVector(fv.NormalH2);

            writeVector(fv.AnomalyE1);
            writeVector(fv.AnomalyH1);
            writeVector(fv.AnomalyE2);
            writeVector(fv.AnomalyH2);
        }
Exemplo n.º 2
0
        private void WriteRhoAndPhase(StreamWriter sw, double freq, AllFieldsAtSite value)
        {
            var omega     = OmegaModelUtils.FrequencyToOmega(freq);
            var impedance = ResponseFunctionsCalculator.CalculateImpedanceTensor(value);

            WriteApparentResistivity(sw, impedance, omega);
            WritePhase(sw, impedance);
        }
Exemplo n.º 3
0
        private void WriteTipperMag(StreamWriter sw, AllFieldsAtSite value)
        {
            Action <Complex> write = (c)
                                     => sw.Write("{0} ",
                                                 c.Magnitude.ToString("E").PadLeft(14, ' '));

            var tipper = ResponseFunctionsCalculator.CalculateTipper(value);

            write(tipper.Zx);
            write(tipper.Zy);
        }
Exemplo n.º 4
0
        private void WriteTipperReIm(StreamWriter sw, AllFieldsAtSite value)
        {
            Action <double> write = (c)
                                    => sw.Write("{0} ",
                                                c.ToString("E").PadLeft(14, ' '));

            var tipper = ResponseFunctionsCalculator.CalculateTipper(value);

            write(tipper.Zx.Real);
            write(tipper.Zx.Imaginary);
            write(tipper.Zy.Real);
            write(tipper.Zy.Imaginary);
        }
Exemplo n.º 5
0
        public AllFieldsAtSite(AllFieldsAtSite site)
        {
            Site = site.Site;

            NormalE1 = new ComplexVector(site.NormalE1);
            NormalE2 = new ComplexVector(site.NormalE2);
            NormalH1 = new ComplexVector(site.NormalH1);
            NormalH2 = new ComplexVector(site.NormalH2);

            AnomalyE1 = new ComplexVector(site.AnomalyE1);
            AnomalyE2 = new ComplexVector(site.AnomalyE2);
            AnomalyH1 = new ComplexVector(site.AnomalyH1);
            AnomalyH2 = new ComplexVector(site.AnomalyH2);
        }