private static IBoundaryShape MapBoundaryShape(XElement Xsegment) { var XboundaryShapeCurve = Xsegment.Element(boundaryShapeCurveElementName); IBoundaryShape boundaryshape = null; var boundaryShapeType = int.Parse(XboundaryShapeCurve.Attribute(boundaryShapeTypeAttributeName).Value); if (boundaryShapeType == 1) { boundaryshape = new LinearCurve( new RealPoint(double.Parse(XboundaryShapeCurve.Element("P0").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P0").Attribute("y").Value.Replace(".", ","))), new RealPoint(double.Parse(XboundaryShapeCurve.Element("P1").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P1").Attribute("y").Value.Replace(".", ","))) ); } else if (boundaryShapeType == 3) { boundaryshape = new BezieCurve( new RealPoint(double.Parse(XboundaryShapeCurve.Element("P0").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P0").Attribute("y").Value.Replace(".", ","))), new RealPoint(double.Parse(XboundaryShapeCurve.Element("P3").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P3").Attribute("y").Value.Replace(".", ","))), new RealPoint(double.Parse(XboundaryShapeCurve.Element("P1").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P1").Attribute("y").Value.Replace(".", ","))), new RealPoint(double.Parse(XboundaryShapeCurve.Element("P2").Attribute("x").Value.Replace(".", ",")), double.Parse(XboundaryShapeCurve.Element("P2").Attribute("y").Value.Replace(".", ",")))); } return(boundaryshape); }
public Segment(int segmentIndex, IBoundaryShape shapeFunction, int collocationPointsCount, CollocationPlacementType collocationPlacementType, double closerCollocationPointsRealDistanceToEdge, int regularBoundaryIntegrationPointsCount, int singularBoundaryIntegrationPointsCount, int singularBoundaryIntegrationPointsForAreaCount, double distanceFromSingularPoint, BoundaryCondition KnownBoundaryCondition, bool isConnectionBoundaryCondition) { this.Index = segmentIndex; this.ShapeFunction = shapeFunction; this.calculateLenght(); this.calculateCollocationPoints(collocationPointsCount, collocationPlacementType, closerCollocationPointsRealDistanceToEdge); this.BoundaryIntegrationPoints = calculateBoundaryIntegrationPoints(regularBoundaryIntegrationPointsCount); this.SingularBoundaryIntegrationPointsForArea = calculateBoundaryIntegrationPoints(singularBoundaryIntegrationPointsForAreaCount); this.SingularBoundaryIntegrationPointsCount = singularBoundaryIntegrationPointsCount; this.GaussQuadratureForSingularIntegral = new GaussQuadrature(singularBoundaryIntegrationPointsCount); this.KnownBoundaryCondition = KnownBoundaryCondition; this.isConnectionBoundary = isConnectionBoundaryCondition; this.DistanceFromSingularPoint = distanceFromSingularPoint; }
private RealPoint calculateRealPosition(IBoundaryShape shapeFunction) { return(shapeFunction.CalculateRealPosition(this.ParametricPosition)); }
public CollocationPoint(int index, int collocationPointsCount, CollocationPlacementType collocationPlacementType, IBoundaryShape shapeFunction, double parametricDistanceFromEdge) { this.Index = index; this.ParametricPosition = this.calculateParametricPosition(collocationPointsCount, collocationPlacementType, parametricDistanceFromEdge); this.RealPosition = this.calculateRealPosition(shapeFunction); this.SurfaceIntegrationPointsInitialConditionConstantValues = new List <double>(); }
private double calculateJacobian(IBoundaryShape shapeFunction) { return(shapeFunction.CalculateJacobian(this.ParametricPosition)); }
private Vector calculateNormalVector(IBoundaryShape shapeFunction) { return(shapeFunction.CalculateNormalVector(this.ParametricPosition)); }
public BoundaryIntegrationPoint(int index, double quadraturePointPosition, double quadratureRangeBegining, double quadratureRangeEnd, double quadraturePointValue, IBoundaryShape shapeFunction) { this.Index = index; this.ParametricPosition = this.calculateParametricPosition(quadraturePointPosition, quadratureRangeBegining, quadratureRangeEnd); this.QuadratureValue = quadraturePointValue; this.RealPosition = this.calculateRealPosition(shapeFunction); this.NormalVector = this.calculateNormalVector(shapeFunction); this.Jacobian = this.calculateJacobian(shapeFunction); }