示例#1
0
        /// <summary>
        /// Selects algorithm variant based on the <paramref name="Option"/>
        /// </summary>
        /// <param name="ContBasis">DG basis for the continuous output data</param>
        /// <param name="DGBasis">DG basis for the discontinuous input data</param>
        /// <param name="gridData"></param>
        /// <param name="Option">Choice of algorithm</param>
        public ContinuityProjection(Basis ContBasis, Basis DGBasis, IGridData gridData, ContinuityProjectionOption Option)
        {
            myOption = Option;
            switch (Option)
            {
            case ContinuityProjectionOption.SpecFEM: {
                var ContinuousLevelSetBasis = new SpecFemBasis((BoSSS.Foundation.Grid.Classic.GridData)gridData, DGBasis.Degree + 1);
                MyProjection = new ContinuityProjectionSpecFem(ContinuousLevelSetBasis);
                break;
            }

            case ContinuityProjectionOption.ConstrainedDG: {
                MyProjection = new ContinuityProjectionCDG(ContBasis);
                break;
            }

            case ContinuityProjectionOption.None: {
                MyProjection = new NoProjection();
                break;
            }

            default:
                throw new ArgumentException();
            }
        }
示例#2
0
        /// <summary>
        /// Selects algorithm variant based on the <paramref name="Option"/>
        /// </summary>
        /// <param name="DGLevelSet">Discontinuous Field</param>
        /// <param name="gridData"></param>
        /// <param name="Option">Choice of algorithm</param>
        /// <param name="SmoothedLevelSet">The Continuous Field</param>
        public ContinuityProjection(SinglePhaseField DGLevelSet, Foundation.Grid.Classic.GridData gridData, ContinuityProjectionOption Option)
        {
            int k = DGLevelSet.Basis.Degree + 1;

            myOption = Option;
            switch (Option)
            {
            case ContinuityProjectionOption.SpecFEM: {
                var ContinuousLevelSetBasis = new SpecFemBasis(gridData, k);
                MyProjection = new ContinuityProjectionSpecFem(ContinuousLevelSetBasis);
                break;
            }

            case ContinuityProjectionOption.ContinuousDG: {
                var ContinuousLevelSetDGBasis = new Basis(gridData, k);
                MyProjection = new ContinuityProjectionCDG(ContinuousLevelSetDGBasis);
                break;
            }

            case ContinuityProjectionOption.None: {
                MyProjection = new NoProjection();
                break;
            }

            default:
                throw new ArgumentException();
            }
        }