Ejemplo n.º 1
0
        public override SpectrumTask GetCreateSpectrumConditionTask()
        {
            UnifiedSpectrumConditionKey key = Key as UnifiedSpectrumConditionKey;

            UnifiedSpectrum uspectrum = new UnifiedSpectrum(key.WindSpeed, key.WindDir, key.WaveAge);

            PhillipsSpectrum pspectrum = new PhillipsSpectrum(key.WindSpeed, key.WindDir);

            if (Key.NumGrids == 1)
            {
                return(new SpectrumTask(this, true, new ISpectrum[] { uspectrum, null, null, null }));
            }
            else if (Key.NumGrids == 2)
            {
                return(new SpectrumTask(this, true, new ISpectrum[] { uspectrum, pspectrum, null, null }));
            }
            else if (Key.NumGrids == 3)
            {
                return(new SpectrumTask(this, true, new ISpectrum[] { uspectrum, uspectrum, pspectrum, null }));
            }
            else //numGrids == 4
            {
                return(new SpectrumTask(this, true, new ISpectrum[] { uspectrum, uspectrum, pspectrum, uspectrum }));
            }
        }
Ejemplo n.º 2
0
        public override SpectrumTask GetCreateSpectrumConditionTask()
        {
            UnifiedSpectrumConditionKey key = Key as UnifiedSpectrumConditionKey;

            UnifiedSpectrum uspectrum = new UnifiedSpectrum(key.WindSpeed, key.WindDir, key.WaveAge);

            return(new SpectrumTask(this, true, new ISpectrum[] { uspectrum, uspectrum, uspectrum, uspectrum }));
        }
        public override SpectrumTask GetCreateSpectrumConditionTask()
        {
            UnifiedSpectrumConditionKey key = Key as UnifiedSpectrumConditionKey;

            UnifiedSpectrum uspectrum = new UnifiedSpectrum(key.WindSpeed, key.WindDir, key.WaveAge);

            return new SpectrumTask(this, true, new ISpectrum[] { uspectrum, uspectrum, uspectrum, uspectrum });
        }
        public override SpectrumTask GetCreateSpectrumConditionTask()
        {
            UnifiedSpectrumConditionKey unifiedSpectrumConditionKey = base.Key as UnifiedSpectrumConditionKey;
            UnifiedSpectrum             unifiedSpectrum             = new UnifiedSpectrum(unifiedSpectrumConditionKey.WindSpeed, unifiedSpectrumConditionKey.WindDir, unifiedSpectrumConditionKey.WaveAge);
            PhillipsSpectrum            phillipsSpectrum            = new PhillipsSpectrum(unifiedSpectrumConditionKey.WindSpeed, unifiedSpectrumConditionKey.WindDir);

            if (base.Key.NumGrids == 1)
            {
                bool        arg_53_1 = true;
                ISpectrum[] expr_4F  = new ISpectrum[4];
                expr_4F[0] = unifiedSpectrum;
                return(new SpectrumTask(this, arg_53_1, expr_4F));
            }
            if (base.Key.NumGrids == 2)
            {
                bool        arg_7A_1 = true;
                ISpectrum[] expr_72  = new ISpectrum[4];
                expr_72[0] = unifiedSpectrum;
                expr_72[1] = phillipsSpectrum;
                return(new SpectrumTask(this, arg_7A_1, expr_72));
            }
            if (base.Key.NumGrids == 3)
            {
                bool        arg_A5_1 = true;
                ISpectrum[] expr_99  = new ISpectrum[4];
                expr_99[0] = unifiedSpectrum;
                expr_99[1] = unifiedSpectrum;
                expr_99[2] = phillipsSpectrum;
                return(new SpectrumTask(this, arg_A5_1, expr_99));
            }
            return(new SpectrumTask(this, true, new ISpectrum[]
            {
                unifiedSpectrum,
                unifiedSpectrum,
                phillipsSpectrum,
                unifiedSpectrum
            }));
        }
        public override SpectrumTask GetCreateSpectrumConditionTask()
        {
            UnifiedSpectrumConditionKey unifiedSpectrumConditionKey = base.Key as UnifiedSpectrumConditionKey;
            UnifiedSpectrum             unifiedSpectrum             = new UnifiedSpectrum(unifiedSpectrumConditionKey.WindSpeed, unifiedSpectrumConditionKey.WindDir, unifiedSpectrumConditionKey.WaveAge);
            PhillipsSpectrum            phillipsSpectrum            = new PhillipsSpectrum(unifiedSpectrumConditionKey.WindSpeed, unifiedSpectrumConditionKey.WindDir);

            if (base.Key.NumGrids == 1)
            {
                bool        multiThreadTask = true;
                ISpectrum[] array           = new ISpectrum[4];
                array[0] = unifiedSpectrum;
                return(new SpectrumTask(this, multiThreadTask, array));
            }
            if (base.Key.NumGrids == 2)
            {
                bool        multiThreadTask2 = true;
                ISpectrum[] array2           = new ISpectrum[4];
                array2[0] = unifiedSpectrum;
                array2[1] = phillipsSpectrum;
                return(new SpectrumTask(this, multiThreadTask2, array2));
            }
            if (base.Key.NumGrids == 3)
            {
                bool        multiThreadTask3 = true;
                ISpectrum[] array3           = new ISpectrum[4];
                array3[0] = unifiedSpectrum;
                array3[1] = unifiedSpectrum;
                array3[2] = phillipsSpectrum;
                return(new SpectrumTask(this, multiThreadTask3, array3));
            }
            return(new SpectrumTask(this, true, new ISpectrum[]
            {
                unifiedSpectrum,
                unifiedSpectrum,
                phillipsSpectrum,
                unifiedSpectrum
            }));
        }