public ConcreteSectionFlexure GetNonPrestressedDoublyReinforcedRectangularSection(double b, double h,
                                                                                          double A_s1, double A_s2, double c_cntr1, double c_cntr2,
                                                                                          double A_s_prime1, double A_s_prime2, double c_cntr_prime1, double c_cntr_prime2,
                                                                                          ConcreteMaterial concrete, IRebarMaterial rebar, ConfinementReinforcementType ConfinementReinforcementType)
        {
            CrossSectionRectangularShape Section          = new CrossSectionRectangularShape(concrete, null, b, h);
            List <RebarPoint>            LongitudinalBars = new List <RebarPoint>();

            Rebar      bottom1      = new Rebar(A_s1, rebar);
            RebarPoint pointBottom1 = new RebarPoint(bottom1, new RebarCoordinate()
            {
                X = 0, Y = -h / 2.0 + c_cntr1
            });

            LongitudinalBars.Add(pointBottom1);


            if (A_s2 != 0)
            {
                Rebar      bottom2      = new Rebar(A_s2, rebar);
                RebarPoint pointBottom2 = new RebarPoint(bottom2, new RebarCoordinate()
                {
                    X = 0, Y = -h / 2.0 + c_cntr2
                });
                LongitudinalBars.Add(pointBottom2);
            }

            if (A_s_prime1 != 0)
            {
                Rebar      top1      = new Rebar(A_s_prime1, rebar);
                RebarPoint pointTop1 = new RebarPoint(top1, new RebarCoordinate()
                {
                    X = 0, Y = h / 2.0 - c_cntr_prime1
                });
                LongitudinalBars.Add(pointTop1);
            }

            if (A_s_prime2 != 0)
            {
                Rebar      top2      = new Rebar(A_s_prime2, rebar);
                RebarPoint pointTop2 = new RebarPoint(top2, new RebarCoordinate()
                {
                    X = 0, Y = h / 2.0 - c_cntr_prime2
                });
                LongitudinalBars.Add(pointTop2);
            }

            CalcLog log = new CalcLog();
            ConcreteSectionFlexure beam = new ConcreteSectionFlexure(Section, LongitudinalBars, log, ConfinementReinforcementType);

            return(beam);
        }
//        public ConcreteSectionFlexure GetRectangularSectionWithBoundaryZones(double b, double h,
//double A_sBoundary, double L_Boundary, RebarDesignation curtainBar, double s_curtain, int N_curtains, IConcreteMaterial mat, IRebarMaterial rebarMaterial,
//    ConfinementReinforcementType ConfinementReinforcementType, int NumberOfSubdivisions = 20)
//        {

//            double YTop = h / 2.0 - c_centTopBottom;
//            double YBottom = -h / 2.0 + c_centTopBottom;
//            double XLeft = -b / 2.0 + c_centLeftRight;
//            double XRight = b / 2.0 - c_centLeftRight;

//            Point2D P1 = new Point2D(XLeft, YTop);
//            Point2D P2 = new Point2D(XRight, YTop);
//            Point2D P3 = new Point2D(XRight, YBottom);
//            Point2D P4 = new Point2D(XLeft, YBottom);



//            RebarLine topLine = null;
//            RebarLine bottomLine = null;

//            RebarLine leftLine = null;
//            RebarLine rightLine = null;

//            if (NumberOfSubdivisions == 0)
//            {
//                topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
//                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);
//                if (A_sLeftRight > 0)
//                {
//                    leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
//                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);
//                }

//            }
//            else
//            {
//                topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false, false, NumberOfSubdivisions);
//                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false, false, NumberOfSubdivisions);
//                if (A_sLeftRight > 0)
//                {
//                    leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true, false, NumberOfSubdivisions);
//                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true, false, NumberOfSubdivisions);
//                }
//            }


//            List<RebarPoint> LongitudinalBars = new List<RebarPoint>();


//            if (topLine != null) LongitudinalBars.AddRange(topLine.RebarPoints);
//            if (bottomLine != null) LongitudinalBars.AddRange(bottomLine.RebarPoints);
//            if (leftLine != null) LongitudinalBars.AddRange(leftLine.RebarPoints);
//            if (rightLine != null) LongitudinalBars.AddRange(rightLine.RebarPoints);


//            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
//            CalcLog log = new CalcLog();

//            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log, ConfinementReinforcementType);
//            return sectionFlexure;
//        }

        public ConcreteSectionFlexure GetRectangularSectionFourSidesDistributed(double b, double h,
                                                                                double A_sTopBottom, double A_sLeftRight, double c_centTopBottom, double c_centLeftRight, IConcreteMaterial mat, IRebarMaterial rebarMaterial,
                                                                                ConfinementReinforcementType ConfinementReinforcementType, int NumberOfSubdivisions = 0)
        {
            double YTop    = h / 2.0 - c_centTopBottom;
            double YBottom = -h / 2.0 + c_centTopBottom;
            double XLeft   = -b / 2.0 + c_centLeftRight;
            double XRight  = b / 2.0 - c_centLeftRight;

            Point2D P1 = new Point2D(XLeft, YTop);
            Point2D P2 = new Point2D(XRight, YTop);
            Point2D P3 = new Point2D(XRight, YBottom);
            Point2D P4 = new Point2D(XLeft, YBottom);



            RebarLine topLine    = null;
            RebarLine bottomLine = null;

            RebarLine leftLine  = null;
            RebarLine rightLine = null;

            if (NumberOfSubdivisions == 0)
            {
                topLine    = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);
                if (A_sLeftRight > 0)
                {
                    leftLine  = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);
                }
            }
            else
            {
                topLine    = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false, false, NumberOfSubdivisions);
                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false, false, NumberOfSubdivisions);
                if (A_sLeftRight > 0)
                {
                    leftLine  = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true, false, NumberOfSubdivisions);
                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true, false, NumberOfSubdivisions);
                }
            }


            List <RebarPoint> LongitudinalBars = new List <RebarPoint>();


            if (topLine != null)
            {
                LongitudinalBars.AddRange(topLine.RebarPoints);
            }
            if (bottomLine != null)
            {
                LongitudinalBars.AddRange(bottomLine.RebarPoints);
            }
            if (leftLine != null)
            {
                LongitudinalBars.AddRange(leftLine.RebarPoints);
            }
            if (rightLine != null)
            {
                LongitudinalBars.AddRange(rightLine.RebarPoints);
            }


            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
            CalcLog log = new CalcLog();

            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log, ConfinementReinforcementType);

            return(sectionFlexure);
        }