Example #1
0
        /// <summary>
        /// Setting initial value.
        /// </summary>
        protected override void SetInitial()
        {
            TestData.ProjectField(TestDataFunc);
            DelUpdateLevelset(new DGField[] { uX }, 0.0, 0.0, 1.0, false);

            uX.ProjectField((x, y) => 1.0);

            // check error
            double L2err = TestData.L2Error(TestDataFunc);

            Console.WriteLine("Projection error from old to new grid: " + L2err);
            Assert.LessOrEqual(L2err, 1.0e-8, "Projection error of test field to high.");
        }
Example #2
0
        /// <summary>
        /// Setting initial value.
        /// </summary>
        protected override void SetInitial()
        {
            TestData.ProjectField(TestDataFunc);
            DelUpdateLevelset(new DGField[] { uX }, 0.0, 0.0, 1.0, false);

            uX.ProjectField((x, y) => 1.0);

            /*
             * RefinedGrid = this.GridData;
             * Refined_u = this.u;
             * Refined_TestData = new SinglePhaseField(this.u.Basis, "TestData");
             * Refined_Grad_u = this.Grad_u;
             * Refined_MagGrad_u = this.MagGrad_u;
             */
        }