//XdgBDFTimestepping AltTimeIntegration; protected override void CreateEquationsAndSolvers(GridUpdateDataVaultBase L) { int quadorder = this.u.Basis.Degree * 2 + 1; Op = new XSpatialOperatorMk2(1, 0, 1, (A, B, C) => quadorder, LsTrk.SpeciesNames, "u", "c1"); var blkFlux = new DxFlux(this.LsTrk, alpha_A, alpha_B); Op.EquationComponents["c1"].Add(blkFlux); // Flux in Bulk Phase; Op.EquationComponents["c1"].Add(new LevSetFlx(this.LsTrk, alpha_A, alpha_B)); // flux am lev-set 0 Op.LinearizationHint = LinearizationHint.AdHoc; Op.TemporalOperator = new ConstantXTemporalOperator(Op, 1.0); Op.Commit(); if (L == null) { /* * AltTimeIntegration = new XdgBDFTimestepping( * new DGField[] { u }, new DGField[0], new DGField[] { uResidual }, base.LsTrk, * true, * DelComputeOperatorMatrix, Op.TemporalOperator, DelUpdateLevelset, * 3, // BDF3 * //-1, // Crank-Nicolson * //0, // Explicit Euler * LevelSetHandling.LieSplitting, * MassMatrixShapeandDependence.IsTimeDependent, * SpatialOperatorType.LinearTimeDependent, * MultigridOperatorConfig, * this.MultigridSequence, * this.LsTrk.SpeciesIdS.ToArray(), * quadorder, * this.THRESHOLD, * true, * this.Control.NonLinearSolver, * this.Control.LinearSolver); */ TimeIntegration = new XdgTimestepping( Op, new DGField[] { u }, new DGField[] { uResidual }, TimeSteppingScheme.BDF3, this.DelUpdateLevelset, LevelSetHandling.LieSplitting, MultigridOperatorConfig, MultigridSequence, _AgglomerationThreshold: this.THRESHOLD, LinearSolver: this.Control.LinearSolver, NonLinearSolver: this.Control.NonLinearSolver); } else { Debug.Assert(object.ReferenceEquals(this.MultigridSequence[0].ParentGrid, this.GridData)); TimeIntegration.DataRestoreAfterBalancing(L, new DGField[] { u }, new DGField[] { uResidual }, base.LsTrk, this.MultigridSequence); //AltTimeIntegration.DataRestoreAfterBalancing(L, new DGField[] { u }, new DGField[] { uResidual }, base.LsTrk, this.MultigridSequence); } }
protected override void CreateEquationsAndSolvers(GridUpdateDataVaultBase L) { int quadorder = this.u.Basis.Degree * 2 + 1; Op = new XSpatialOperator(1, 0, 1, (A, B, C) => quadorder, "u", "c1"); var blkFlux = new DxFlux(this.LsTrk, alpha_A, alpha_B); Op.EquationComponents["c1"].Add(blkFlux); // Flux in Bulk Phase; Op.EquationComponents["c1"].Add(new LevSetFlx(this.LsTrk, alpha_A, alpha_B)); // flux am lev-set 0 Op.Commit(); if (L == null) { TimeIntegration = new XdgBDFTimestepping( new DGField[] { u }, new DGField[] { uResidual }, base.LsTrk, true, DelComputeOperatorMatrix, null, DelUpdateLevelset, 3, // BDF3 //-1, // Crank-Nicolson //0, // Explicit Euler LevelSetHandling.LieSplitting, MassMatrixShapeandDependence.IsTimeDependent, SpatialOperatorType.LinearTimeDependent, MassScale, MultigridOperatorConfig, this.MultigridSequence, this.LsTrk.SpeciesIdS.ToArray(), quadorder, this.THRESHOLD, true, this.Control.NonLinearSolver, this.Control.LinearSolver); } else { Debug.Assert(object.ReferenceEquals(this.MultigridSequence[0].ParentGrid, this.GridData)); TimeIntegration.DataRestoreAfterBalancing(L, new DGField[] { u }, new DGField[] { uResidual }, base.LsTrk, this.MultigridSequence); } }