Esempio n. 1
0
        public override IEnumerable <INumericalResult> Solve(int resultsCount)
        {
            List <INumericalResult> results = new List <INumericalResult>();

            if (_mesh.IsMeshGenerated)
            {
                GetConstantMatrix();
                _indeciesToDelete = getIndeciesWithStaticBoundaryConditions();
                Matrix StiffnessMatrix = AsumeStaticBoundaryConditions(GetStiffnessMatrix(), _indeciesToDelete);
                Matrix MassMatrix      = AsumeStaticBoundaryConditions(GetMassMatrix(), _indeciesToDelete);

                _init = AsumeStaticBoundaryConditionsToVector(_init, _indeciesToDelete);

                CauchyProblemResult newmarkResult = NewmarkSolver(MassMatrix, StiffnessMatrix, _init, 0.5, 0.5, _maxTime, _intervalsTime);

                SemidiscreteVibrationsNumericalResult result = new SemidiscreteVibrationsNumericalResult(_mesh.Elements, newmarkResult.DeltaTime, _maxTime);
                foreach (Vector v in newmarkResult.Results)
                {
                    Vector resultWithStaticPoints = addStaticPoints(v, _indeciesToDelete);
                    result.AddResult(resultWithStaticPoints);
                }

                results.Add(result);
            }
            return(results);
        }
Esempio n. 2
0
        private void AddToResult(SemidiscreteVibrationsNumericalResult result, Vector V, List <int> indeciesToDelete)
        {
            Vector u = GetU(V);

            addStaticPoints(u, indeciesToDelete);
            result.AddResult(u);
        }