/// <summary> /// See <see cref="Basis.BasisInitializer"/> /// </summary> /// <param name="c"></param> /// <returns></returns> public override Basis Initialize(IInitializationContext c) { XDGBasis xdgbasis; if (c.TryGetValue(this, out xdgbasis)) { return(xdgbasis); } if (c.GridData == null) { throw new ArgumentException(); } if (!c.GridData.GridID.Equals(base.GridGuid)) { throw new ArgumentException("Wrong grid."); } var lsTrk = TrackerInitializer.Initialize(c); XDGBasis xb = new XDGBasis(lsTrk, base.Degree); myInstance = xb; c.Add(this, xb); return(xb); }
/// <summary> /// <see cref="IInitializer{T}.Initialize"/> /// </summary> /// <param name="c"></param> /// <returns></returns> public override DGField Initialize(IInitializationContext c) { DGField sff; if (c.TryGetValue(this, out sff)) { return(sff); } var Basis = base.BasisInfo.Initialize(c); LevelSet ls = new LevelSet(Basis, this.Identification); base.myInstance = ls; c.Add(this, ls); return(ls); }
/// <summary> /// /// </summary> /// <param name="c"></param> /// <returns></returns> public override DGField Initialize(IInitializationContext c) { DGField sff; if (c.TryGetValue(this, out sff)) { return(sff); } var Basis = base.BasisInfo.Initialize(c); SinglePhaseField f = new SinglePhaseField(Basis, this.Identification); myInstance = f; c.Add(this, f); return(f); }
/// <summary> /// Initializes the level set tracker. /// </summary> /// <param name="c"></param> /// <returns></returns> public override LevelSetTracker Initialize(IInitializationContext c) { LevelSetTracker lstrk; if (c.TryGetValue(this, out lstrk)) { return(lstrk); } LevelSet[] LS = new LevelSet[this.LevelSets.Length]; for (int i = 0; i < LS.Length; i++) { LS[i] = (LevelSet)this.LevelSets[i].Initialize(c); } var lsTrk = new LevelSetTracker((Grid.Classic.GridData)(c.GridData), this.CutCellQuadratureType, this.NearRegionWidth, this.SpeciesTable, LS); instance = lsTrk; c.Add(this, lsTrk); return(lsTrk); }
/// <summary> /// Instantiates the basis described by this object. /// </summary> /// <param name="c"></param> /// <returns></returns> public override Basis Initialize(IInitializationContext c) { Basis basis; if (c.TryGetValue(this, out basis)) { return(basis); } if (c.GridData == null) { throw new ArgumentException(); } if (!c.GridData.Grid.GridGuid.Equals(this.GridGuid)) { throw new ArgumentException("Wrong grid."); } Basis bb = new Basis(c.GridData, this.Degree); myInstance = bb; c.Add(this, bb); return(bb); }