Exemple #1
0
 public void Solve(double[] rhsVector)
 {
     if (ActivateNonLinearSolver == true)
     {
         staticSolutionVector = NonLinearScheme.Solve(AssemblyData, LinearScheme, rhsVector);
     }
     else
     {
         if (CustomStiffnessMatrix == null)
         {
             double[,] coefMatrix = AssemblyData.CreateTotalStiffnessMatrix();
             staticSolutionVector = LinearScheme.Solve(coefMatrix, rhsVector);
         }
         //double[,] coefMatrix = AssemblyData.CreateTotalStiffnessMatrix();
         //staticSolutionVector = LinearScheme.Solve(coefMatrix, rhsVector);
         else
         {
             double[,] coefMatrix = CustomStiffnessMatrix;
             staticSolutionVector = LinearScheme.Solve(coefMatrix, rhsVector);
         }
     }
 }
Exemple #2
0
 public void Solve(double[] rhsVector)
 {
     if (ActivateNonLinearSolver == true)
     {
         dynamicSolutionVector = NonLinearScheme.Solve(AssemblyData, LinearScheme, rhsVector);
     }
     else
     {
         if (CustomStiffnessMatrix == null)
         {
             double[,] coefMatrix  = AssemblyData.CreateTotalStiffnessMatrix();
             dynamicSolutionVector = LinearScheme.Solve(coefMatrix, rhsVector);
         }
         //double[,] coefMatrix = AssemblyData.CreateTotalStiffnessMatrix();
         //staticSolutionVector = LinearScheme.Solve(coefMatrix, rhsVector);
         else
         {
             CentralDifferences dynamicScheme = new CentralDifferences(LinearScheme, InitialConditionValues, TotalSimulationTime, TotalTimeSteps, CustomStiffnessMatrix, CustomMassMatrix, rhsVector);
             dynamicSolutionVector = dynamicScheme.GetExplicitSolution;
         }
     }
 }