Esempio n. 1
0
        private void SetBoundaryConditions(TypeOfFixation type, IBoundaryCondition conditions, SparseMatrix dictionaryMatrix)
        {
            foreach (var node in conditions.FixedNodes)
            {
                switch (type)
                {
                case TypeOfFixation.RIGID:
                    globalMatrix.ClearRow(node.Key * DEGREES_OF_FREEDOM);
                    globalMatrix.ClearColumn(node.Key * DEGREES_OF_FREEDOM);
                    globalMatrix[node.Key * DEGREES_OF_FREEDOM, node.Key *DEGREES_OF_FREEDOM] = 1.0;

                    globalMatrix.ClearRow(node.Key * DEGREES_OF_FREEDOM + 1);
                    globalMatrix.ClearColumn(node.Key * DEGREES_OF_FREEDOM + 1);
                    globalMatrix[node.Key * DEGREES_OF_FREEDOM + 1, node.Key *DEGREES_OF_FREEDOM + 1] = 1.0;

                    globalMatrix.ClearRow(node.Key * DEGREES_OF_FREEDOM + 2);
                    globalMatrix.ClearColumn(node.Key * DEGREES_OF_FREEDOM + 2);
                    globalMatrix[node.Key * DEGREES_OF_FREEDOM + 2, node.Key *DEGREES_OF_FREEDOM + 2] = 1.0;

                    loads[node.Key * DEGREES_OF_FREEDOM]     = 0.0;
                    loads[node.Key * DEGREES_OF_FREEDOM + 1] = 0.0;
                    loads[node.Key * DEGREES_OF_FREEDOM + 2] = 0.0;
                    break;

                case TypeOfFixation.ARTICULATION_YZ: throw new NotImplementedException();

                case TypeOfFixation.ARTICULATION_XZ: throw new NotImplementedException();

                case TypeOfFixation.ARTICULATION_XY: throw new NotImplementedException();

                default: throw new ArgumentException("Wrong type of the fixation");
                }
            }
        }