public void IsogeometricSquareShell()
        {
            Model  model    = new Model();
            var    filename = "SquareShell";
            string filepath = $"..\\..\\..\\MGroup.IGA.Tests\\InputFiles\\{filename}.txt";
            IsogeometricShellReader modelReader = new IsogeometricShellReader(model, filepath);

            modelReader.CreateShellModelFromFile();

            Matrix <double> loadVector =
                MatlabReader.Read <double>("..\\..\\..\\MGroup.IGA.Tests\\InputFiles\\SquareShell.mat", "LoadVector");

            for (int i = 0; i < loadVector.ColumnCount; i += 3)
            {
                var indexCP = i / 3;
                model.Loads.Add(new Load()
                {
                    Amount = loadVector.At(0, i),
                    Node   = model.ControlPointsDictionary[indexCP],
                    DOF    = StructuralDof.TranslationX
                });
                model.Loads.Add(new Load()
                {
                    Amount = loadVector.At(0, i + 1),
                    Node   = model.ControlPointsDictionary[indexCP],
                    DOF    = StructuralDof.TranslationY
                });
                model.Loads.Add(new Load()
                {
                    Amount = loadVector.At(0, i + 2),
                    Node   = model.ControlPointsDictionary[indexCP],
                    DOF    = StructuralDof.TranslationZ
                });
            }

            foreach (var edge in model.PatchesDictionary[0].EdgesDictionary.Values)
            {
                foreach (var controlPoint in edge.ControlPointsDictionary.Values)
                {
                    model.ControlPointsDictionary[controlPoint.ID].Constraints.Add(new Constraint()
                    {
                        DOF = StructuralDof.TranslationX
                    });
                    model.ControlPointsDictionary[controlPoint.ID].Constraints.Add(new Constraint()
                    {
                        DOF = StructuralDof.TranslationY
                    });
                    model.ControlPointsDictionary[controlPoint.ID].Constraints.Add(new Constraint()
                    {
                        DOF = StructuralDof.TranslationZ
                    });
                }
            }

            // Solvers
            var     solverBuilder = new SkylineSolver.Builder();
            ISolver solver        = solverBuilder.BuildSolver(model);

            // Structural problem provider
            var provider = new ProblemStructural(model, solver);

            // Linear static analysis
            var childAnalyzer  = new LinearAnalyzer(model, solver, provider);
            var parentAnalyzer = new StaticAnalyzer(model, solver, provider, childAnalyzer);

            // Run the analysis
            parentAnalyzer.Initialize();
            parentAnalyzer.Solve();

            //var paraview = new ParaviewNurbsShells(model, solver.LinearSystems[0].Solution, filename);
            //paraview.CreateParaview2DFile();

            Matrix <double> solutionVectorExpected =
                MatlabReader.Read <double>("..\\..\\..\\MGroup.IGA.Tests\\InputFiles\\SquareShell.mat", "SolutionVector");

            for (int i = 0; i < solutionVectorExpected.ColumnCount; i++)
            {
                Assert.True(Utilities.AreValuesEqual(solutionVectorExpected.At(0, i), solver.LinearSystems[0].Solution[i],
                                                     1e-9));
            }
        }
        public void IsogeometricCantileverShell()
        {
            Model  model    = new Model();
            string filename = "..\\..\\..\\MGroup.IGA.Tests\\InputFiles\\CantileverShell.txt";
            IsogeometricShellReader modelReader = new IsogeometricShellReader(model, filename);

            modelReader.CreateShellModelFromFile();

            model.Loads.Add(new Load()
            {
                Amount = -1,
                Node   = model.ControlPointsDictionary[9],
                DOF    = StructuralDof.TranslationZ
            });
            model.Loads.Add(new Load()
            {
                Amount = -1,
                Node   = model.ControlPointsDictionary[10],
                DOF    = StructuralDof.TranslationZ
            });
            model.Loads.Add(new Load()
            {
                Amount = -1,
                Node   = model.ControlPointsDictionary[11],
                DOF    = StructuralDof.TranslationZ
            });

            for (int i = 0; i < 6; i++)
            {
                model.ControlPointsDictionary[i].Constraints.Add(new Constraint()
                {
                    DOF = StructuralDof.TranslationX
                });
                model.ControlPointsDictionary[i].Constraints.Add(new Constraint()
                {
                    DOF = StructuralDof.TranslationY
                });
                model.ControlPointsDictionary[i].Constraints.Add(new Constraint()
                {
                    DOF = StructuralDof.TranslationZ
                });
            }

            // Solvers
            var     solverBuilder = new SkylineSolver.Builder();
            ISolver solver        = solverBuilder.BuildSolver(model);

            // Structural problem provider
            var provider = new ProblemStructural(model, solver);

            // Linear static analysis
            var childAnalyzer  = new LinearAnalyzer(model, solver, provider);
            var parentAnalyzer = new StaticAnalyzer(model, solver, provider, childAnalyzer);

            // Run the analysis
            parentAnalyzer.Initialize();
            parentAnalyzer.Solve();

            var expectedSolution = new double[18]
            {
                0.0, 0.0, -7499.999986865148, 0.0, 0.0, -7499.99998660616, 0.0, 0.0, -7499.999986347174, 0.0, 0.0,
                -14999.999980230163, 0.0, 0.0, -14999.999980050825, 0.0, 0.0, -14999.999979871487
            };

            for (int i = 0; i < expectedSolution.Length; i++)
            {
                Utilities.AreValuesEqual(expectedSolution[i], solver.LinearSystems[0].Solution[i], 7);
            }
        }