Пример #1
0
        /// <summary>
        /// Interior quadrature for the surface elements, i.e. for each cut background-cell \f$ K_j \f$ a quadrature to approximate
        /// \f[
        ///    \oint_{K_j \cap \mathfrak{I} } \ldots \mathrm{dS} .
        /// \f]
        /// </summary>
        public CellQuadratureScheme Get_SurfaceElement_VolumeQuadScheme(SpeciesId sp)
        {
            if (!this.SpeciesList.Contains(sp))
            {
                throw new ArgumentException("Given species (id = " + sp.cntnt + ") is not supported.");
            }



            var spdom          = XDGSpaceMetrics.LevelSetRegions.GetSpeciesMask(sp);
            var IntegrationDom = XDGSpaceMetrics.LevelSetRegions.GetCutCellMask().Intersect(spdom);

            var LevSetQrIns = new CellQuadratureScheme(false, IntegrationDom);

            foreach (var Kref in XDGSpaceMetrics.GridDat.Grid.RefElements)
            {
                for (int iLevSet = 0; iLevSet < XDGSpaceMetrics.NoOfLevelSets; iLevSet++)   // loop over level sets...
                {
                    var surfaceFactory = this.XDGSpaceMetrics.XQuadFactoryHelper.GetSurfaceFactory(iLevSet, Kref);
                    LevSetQrIns = LevSetQrIns.AddFactory(surfaceFactory, XDGSpaceMetrics.LevelSetRegions.GetCutCellMask4LevSet(iLevSet));
                }
            }

            return(LevSetQrIns);
        }