public IntegrationPoint[] GetIntegrationPointsProjectedOntoEdge(int edgeIndex) { int pointsCountForEdge = Math.Round(Math.Sqrt(PointsCount)).ToInt(); var points = new List <IntegrationPoint>(); for (int i = 0; i < pointsCountForEdge; i++) { if (edgeIndex == 0 || edgeIndex == 2) { //horizontal var point = Points[i]; var eta = edgeIndex == 0 ? -1 : 1; var projected = new IntegrationPoint(point.Ksi, eta, point.WeightKsi, 1); points.Add(projected); } else { //vertical var point = Points[i * pointsCountForEdge]; var ksi = edgeIndex == 3 ? -1 : 1; var projected = new IntegrationPoint(ksi, point.Eta, 1, point.WeightEta); points.Add(projected); } } return(points.ToArray()); }
public double[] CalculateNValues(IntegrationPoint point) { return(new[] { CalculateNValue(point, 0), CalculateNValue(point, 1), CalculateNValue(point, 2), CalculateNValue(point, 3) }); }
private double CalculateNValue(IntegrationPoint point, int NIndex) { if (NIndex == 0) { return(0.25 * (1 - point.Ksi) * (1 - point.Eta)); } if (NIndex == 1) { return(0.25 * (1 + point.Ksi) * (1 - point.Eta)); } if (NIndex == 2) { return(0.25 * (1 + point.Ksi) * (1 + point.Eta)); } return(0.25 * (1 - point.Ksi) * (1 + point.Eta)); }