/// <summary> /// Uses <see cref="Grid.RefElement.GetQuadratureRule"/> to create a quad rule /// (i.e., the quad rule is the same for all elements of /// <paramref name="mask"/>) /// </summary> /// <param name="mask"> /// <see cref="IQuadRuleFactory{QuadRule}.GetQuadRuleSet"/> /// </param> /// <param name="order"> /// <see cref="IQuadRuleFactory{QuadRule}.GetQuadRuleSet"/> /// </param> /// <returns> /// <see cref="Grid.RefElement.GetQuadratureRule"/> /// </returns> public IEnumerable <IChunkRulePair <CellBoundaryQuadRule> > GetQuadRuleSet(ExecutionMask mask, int order) { CellBoundaryQuadRule rule = RefElement.GetBoundaryQuadRule(order); Debug.Assert(rule.Nodes.IsLocked, "Error: non-locked quad rule from reference element."); Debug.Assert(object.ReferenceEquals(rule.Nodes.RefElement, RefElement), "Error: quad rule from reference element has not the right reference elment assigned."); return(mask.Select(chunk => new ChunkRulePair <CellBoundaryQuadRule>(chunk, rule))); }
/// <summary> /// Uses <see cref="Grid.RefElement.GetQuadratureRule"/> to create a quad rule /// (i.e., the quad rule is the same for all elements of /// <paramref name="mask"/>) /// </summary> /// <param name="mask"> /// <see cref="IQuadRuleFactory{QuadRule}.GetQuadRuleSet"/> /// </param> /// <param name="order"> /// <see cref="IQuadRuleFactory{QuadRule}.GetQuadRuleSet"/> /// </param> /// <returns> /// <see cref="Grid.RefElement.GetQuadratureRule"/> /// </returns> public IEnumerable <IChunkRulePair <CellBoundaryQuadRule> > GetQuadRuleSet(ExecutionMask mask, int order) { CellBoundaryQuadRule rule = RefElement.GetBoundaryQuadRule(order); Debug.Assert(rule.Nodes.IsLocked, "Error: non-locked quad rule from reference element."); Debug.Assert(object.ReferenceEquals(rule.Nodes.RefElement, RefElement), "Error: quad rule from reference element has not the right reference element assigned."); if (mask.MaskType != MaskType.Geometrical) { throw new ArgumentException("Expecting a geometrical mask."); } return(mask.Select(chunk => new ChunkRulePair <CellBoundaryQuadRule>(chunk, rule))); }