private double calculateParametricPosition(int collocationPointsCount, CollocationPlacementType collocationPlacementType, double parametricDistanceFromEdge) { double parametricPosition = 0; if (collocationPlacementType == CollocationPlacementType.Czebyshew) { double sk = -Math.Cos(Math.PI * (2.0 * (Index + 1.0)) / (2.0 * (collocationPointsCount + 1.0))); parametricPosition = 0.5 * (sk + 1.0); } else if (collocationPlacementType == CollocationPlacementType.Equal) { parametricPosition = (Index + 1.0) * (1.0 / (collocationPointsCount + 1.0)); } else if (collocationPlacementType == CollocationPlacementType.CloserOnEdges) { if (Index == 0) { parametricPosition = parametricDistanceFromEdge; } else if (Index == collocationPointsCount - 1) { parametricPosition = 1.0 - parametricDistanceFromEdge; } else { double s = parametricDistanceFromEdge; double d = 1.0 - parametricDistanceFromEdge; parametricPosition = s + (Index * (d / (collocationPointsCount - 1.0))); } } return(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 void calculateCollocationPoints(int collocationPointsCount, CollocationPlacementType collocationPlacementType) { CollocationPoints = new List <CollocationPoint>(); for (int index = 0; index < collocationPointsCount; index++) { var collocationPoint = new CollocationPoint(index, collocationPointsCount, collocationPlacementType, this.ShapeFunction); CollocationPoints.Add(collocationPoint); } }
private void calculateCollocationPoints(int collocationPointsCount, CollocationPlacementType collocationPlacementType, double realDistanceFromEdge) { CollocationPoints = new List <CollocationPoint>(); var parametricDistanceFromEdge = realDistanceFromEdge / this.Lenght; for (int index = 0; index < collocationPointsCount; index++) { var collocationPoint = new CollocationPoint(index, collocationPointsCount, collocationPlacementType, this.ShapeFunction, parametricDistanceFromEdge); CollocationPoints.Add(collocationPoint); } }
private double calculateParametricPosition(int collocationPointsCount, CollocationPlacementType collocationPlacementType) { double parametricPrecision = 0; if (collocationPlacementType == CollocationPlacementType.Czebyshev) { double Sk = -Math.Cos(Math.PI * (2.0 * (Index + 1.0)) / (2.0 * (collocationPointsCount + 1.0))); parametricPrecision = 0.5 * (Sk + 1.0); } return(parametricPrecision); }
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; }
public Segment(int segmentIndex, IShapeFunction shapeFunction, int collocationPointsCount, CollocationPlacementType collocationPlacementType, int regularIntegrationPointsCount, int singularIntegrationPointsCount) { this.Index = segmentIndex; this.ShapeFunction = shapeFunction; this.calculateLenght(); this.calculateCollocationPoints(collocationPointsCount, collocationPlacementType); this.calculateRegularIntegrationPoints(regularIntegrationPointsCount); this.SingularIntegrationPointsCount = singularIntegrationPointsCount; this.GaussQuadratureForSingularIntegral = new GaussQuadrature(singularIntegrationPointsCount); }
public CollocationPoint(int index, int collocationPointsCount, CollocationPlacementType collocationPlacementType, IShapeFunction shapeFunction) { this.Index = index; this.ParametricPosition = this.calculateParametricPosition(collocationPointsCount, collocationPlacementType); this.RealPosition = this.calculateRealPosition(shapeFunction); }