/// <summary> /// adds multiple fixed rules to the quadrature scheme <paramref name="scheme"/>; /// this can be used to explicitly specify a quadrature rule, the choice of the order during the compilation of the scheme /// (see <see cref="QuadratureScheme{A,B}.Compile"/>) will have no effect. /// </summary> public static CellQuadratureScheme AddFixedRuleS <TQuadRule>(this CellQuadratureScheme scheme, IEnumerable <TQuadRule> fixedRules, CellMask[] domain = null) where TQuadRule : QuadRule { if (domain != null) { if (domain.Count() != fixedRules.Count()) { throw new ArgumentException(); } } for (int i = 0; i < fixedRules.Count(); i++) { scheme.AddFactoryDomainPair(new FixedRuleFactory <TQuadRule>(fixedRules.ElementAt(i)), (domain != null) ? domain[i] : null); } return(scheme); }
/// <summary> /// adds a standard(Gaussian) quadrature rule to the quadrature scheme <paramref name="scheme"/>. /// </summary> public static CellQuadratureScheme AddStandardRule(this CellQuadratureScheme scheme, Grid.RefElements.RefElement s) { scheme.AddFactoryDomainPair(new StandardQuadRuleFactory(s), null); return(scheme); }
/// <summary> /// adds a factory to a cell quadrature scheme /// </summary> public static CellQuadratureScheme AddFactory <TQuadRule>(this CellQuadratureScheme scheme, IQuadRuleFactory <TQuadRule> factory) where TQuadRule : QuadRule { scheme.AddFactoryDomainPair(factory, default(CellMask)); return(scheme); }