Skip to content

Instantly share code, notes, and snippets.

@mariusz
Created January 19, 2009 20:02
Show Gist options
  • Select an option

  • Save mariusz/49146 to your computer and use it in GitHub Desktop.

Select an option

Save mariusz/49146 to your computer and use it in GitHub Desktop.
public static double[][] SecondKindBoundry(double[][] matrixH, Side side, Area area, double q)
{
List<CustomPoint> points = new List<CustomPoint>();
switch (side)
{
case Side.Dó³:
points = area.FirstRow;
break;
case Side.Lewa:
points = area.FirstColumn;
break;
case Side.Prawa:
points = area.LastColumn;
break;
case Side.Góra:
points = area.LastRow;
break;
}
for (int i = 0; i < points.Count - 1; i++)
{
double p1Value, p2Value;
Element element = area.GetElement(points[i].NodeNumber, points[i+1].NodeNumber);
element.GetValuesForP(points[i], points[i+1], q, out p1Value, out p2Value);
matrixH[points[i].NodeNumber][matrixH.Length] = p1Value;
matrixH[points[i+1].NodeNumber][matrixH.Length] = p2Value;
}
return matrixH;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment