public double GetResultsArea(RealPoint point)
        {
            double result = 0.0;

            foreach (var area in this.Areas)
            {
                foreach (var segmentI in area.Segments)
                {
                    int i = 0;
                    foreach (var collPointI in segmentI.CollocationPoints)
                    {
                        var functionT = Function_T.CalculateAreaValue(point, segmentI, collPointI, area.configurationData);
                        var functionq = Function_q.CalculateAreaValue(point, segmentI, collPointI, area.configurationData);

                        result += -functionq * segmentI.TemperatureBoundaryCondition.BoundaryConditionVector[i] + functionT * segmentI.HeatFluxBoundaryCondition.BoundaryConditionVector[i];
                        i++;
                    }
                }
            }
            foreach (var area in this.Areas)
            {
                var initial = InitialCondition.CalculateValue(area, point);
                result += initial;

                if (area.configurationData.addHeatSource)
                {
                    var subAreaIntegrationHelper = new SubAreaIntegrationHelper(4, area.Surfaces.Select(x => x.SurfaceShape).ToList());
                    result += HeatSource.CalculateValue(area, point, subAreaIntegrationHelper);
                }
            }

            return(result);
        }
        public double GetTemperatureFromSurfaceIntegrationPointConstants(SurfaceIntegrationPoint point)
        {
            double result = 0.0;

            int j = 0;

            foreach (var area in this.Areas)
            {
                foreach (var segment in area.Segments)
                {
                    foreach (var collPoint in segment.CollocationPoints)
                    {
                        result += -point.FunctionqConstantValue[j] * segment.TemperatureBoundaryCondition.BoundaryConditionVector[collPoint.Index] + point.FunctionTConstantValue[j] * segment.HeatFluxBoundaryCondition.BoundaryConditionVector[collPoint.Index];
                        j++;
                    }
                }
            }
            int k = 0;

            foreach (var area in this.Areas)
            {
                //To tradycyjnie
                result += InitialCondition.CalculateValue(area, point.RealPosition);

                //To w przypadku przechowywania parametrów
                //foreach (var surface in this.Surfaces)
                //{
                //    foreach (var surfaceIntegrationPoint in surface.SurfaceIntegrationPoints)
                //    {
                //        value += point.InitialConditionConstantValues[k] * surfaceIntegrationPoint.TemperatureValue;
                //        k++;
                //    }
                //}

                if (area.configurationData.addHeatSource)
                {
                    if (area.configurationData.isHeatSourceTimeDependent)
                    {
                        var subAreaIntegrationHelper = new SubAreaIntegrationHelper(4, area.Surfaces.Select(x => x.SurfaceShape).ToList());

                        result += HeatSource.CalculateValue(area, point.RealPosition, subAreaIntegrationHelper);
                    }
                    else
                    {
                        result += point.HeatSourceConstantValue;
                    }
                }
            }

            return(result);
        }