Ejemplo n.º 1
0
        public void DoCalculate()
        {
            InputForTemp input = new InputForTemp();

            input.TimeSteps = NumItt;
            input.C         = A;
            input.Tau       = Tau;
            input.H         = H;
            input.U         = Umas;
            ServiceClient client = new ServiceClient();
            OutputForTemp output = client.CalculateTemp(input);

            Umas = output.U;
            string mes = output.OutputMessage;
        }
Ejemplo n.º 2
0
        private void Calculate()
        {
            InputForTemp input = new InputForTemp();

            input.TimeSteps = Freq;
            input.C         = A;
            input.Tau       = Tau;
            input.H         = H;
            input.U         = U;

            Service1Client client = new Service1Client();
            OutputForTemp  output = client.CalculateTemp(input);

            U = output.U;
        }
Ejemplo n.º 3
0
        private void Calculate()
        {
            InputForTemp input = new InputForTemp();

            input.TimeSteps = this.Frequency;
            input.C         = this.A;
            input.Tau       = this.Tau;
            input.H         = this.H;
            input.U         = this.U;

            ServiceClient client = new ServiceClient();

            OutputForTemp output = client.CalculateTemp(input);

            this.U = output.U;
        }
Ejemplo n.º 4
0
        public void DoCalculate()
        {
            InputForTemp input = new InputForTemp();

            input.TimeSteps = Iteration;
            input.C         = A;
            input.Tau       = Tau;
            input.H         = H;
            input.U         = ArrayU;

            ServiceClient client = new ServiceClient();
            OutputForTemp output = client.CalculateTemp(input);

            ArrayU = output.U;
            string mes = output.OutputMessage;
        }
Ejemplo n.º 5
0
        OutputForTemp IService.CalculateTemp(InputForTemp input)
        {
            OutputForTemp result = new OutputForTemp();

            try
            {
                double[,] u          = Utils.ToMultiD(input.U);
                u                    = NewMathLib.HeatFlow.CalcNewT(u, input.C, input.H, input.Tau, input.TimeSteps);
                result.U             = Utils.ToJagged(u);
                result.OutputMessage = "Calculations are correct";
            }
            catch (Exception e)
            {
                result.OutputMessage = e.Message.ToString();
            }
            return(result);
        }
Ejemplo n.º 6
0
        static void Main(string[] args)
        {
            InputForTemp input = new InputForTemp();

            //InputForTemp
            input.C         = 1.0;
            input.H         = 1;
            input.Tau       = 0.1;
            input.TimeSteps = 3;

            double [,] U1 = new double[4, 4] {
                { 0, 0, 0, 0 }, { 1, 0, 0, 0 }, { 2, 0, 0, 0 }, { 3, 0, 0, 0 }
            };
            input.U = Utils.ToJagged(U1);

            Service1Client serv = new Service1Client();
            OutputForTemp  out1 = serv.CalculateTemp(input);
            //serv.CalculateTemp()
        }