Skip to content

Commit 581e5f5

Browse files
committed
Change SolverType from GMRES to SPARSE_QR for tests
1 parent 6747be1 commit 581e5f5

19 files changed

Lines changed: 20 additions & 41 deletions

demos/DeepCWind/demo_DeepCWind_decay.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ int main(int argc, char* argv[]) {
4141
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
4242
double timestep = 0.08;
4343
system.SetTimestepperType(ChTimestepper::Type::HHT);
44-
system.SetSolverType(ChSolver::Type::GMRES);
45-
system.GetSolver()->AsIterative()->SetMaxIterations(
46-
300); // the higher, the easier to keep the constraints satisfied.
44+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
4745
double simulationDuration = 1000.0;
4846

4947
// Create user interface

demos/oswec/demo_oswec_decay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int main(int argc, char* argv[]) {
8888
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
8989
double timestep = 0.03;
9090
// system.SetTimestepperType(ChTimestepper::Type::HHT);
91-
system.SetSolverType(ChSolver::Type::GMRES);
91+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
9292
// system.GetSolver()->AsIterative()->SetMaxIterations(300); // the higher, the easier to keep the constraints
9393
// satisfied.
9494
ChRealtimeStepTimer realtime_timer;

demos/oswec/demo_oswec_reg_waves.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int main(int argc, char* argv[]) {
9595
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
9696
double timestep = 0.03;
9797
// system.SetTimestepperType(ChTimestepper::Type::HHT);
98-
system.SetSolverType(ChSolver::Type::GMRES);
98+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
9999
// system.GetSolver()->AsIterative()->SetMaxIterations(300);
100100
ChRealtimeStepTimer realtime_timer;
101101
double simulationDuration = 1000.0;

demos/rm3/demo_rm3_decay.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ int main(int argc, char* argv[]) {
4545

4646
double timestep = 0.01;
4747
system.SetTimestepperType(ChTimestepper::Type::HHT);
48-
system.SetSolverType(ChSolver::Type::GMRES);
49-
system.GetSolver()->AsIterative()->SetMaxIterations(
50-
300); // the higher, the easier to keep the constraints satisfied.
48+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
5149
ChRealtimeStepTimer realtime_timer;
5250
double simulationDuration = 40.0;
5351

demos/rm3/demo_rm3_reg_waves.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ int main(int argc, char* argv[]) {
5656
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
5757
double timestep = 0.01;
5858
system.SetTimestepperType(ChTimestepper::Type::HHT);
59-
system.SetSolverType(ChSolver::Type::GMRES);
60-
system.GetSolver()->AsIterative()->SetMaxIterations(
61-
300); // the higher, the easier to keep the constraints satisfied.
59+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
6260
ChRealtimeStepTimer realtime_timer;
6361
double simulationDuration = 40.0;
6462

demos/sphere/demo_sphere_decay.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ int main(int argc, char* argv[]) {
4343
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
4444

4545
double timestep = 0.015;
46-
system.SetSolverType(ChSolver::Type::GMRES);
47-
system.GetSolver()->AsIterative()->SetMaxIterations(
48-
300); // the higher, the easier to keep the constraints satisfied.
46+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
4947
ChRealtimeStepTimer realtime_timer;
5048
double simulationDuration = 40.0;
5149

demos/sphere/demo_sphere_irreg_waves.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ int main(int argc, char* argv[]) {
3939
ChSystemNSC system;
4040
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
4141
double timestep = 0.015;
42-
system.SetSolverType(ChSolver::Type::GMRES);
43-
system.GetSolver()->AsIterative()->SetMaxIterations(300);
42+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
4443
ChRealtimeStepTimer realtime_timer;
4544
double simulationDuration = 600.0;
4645

demos/sphere/demo_sphere_irreg_waves_eta_import.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ int main(int argc, char* argv[]) {
3939
ChSystemNSC system;
4040
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
4141
double timestep = 0.015;
42-
system.SetSolverType(ChSolver::Type::GMRES);
43-
system.GetSolver()->AsIterative()->SetMaxIterations(300);
42+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
4443
ChRealtimeStepTimer realtime_timer;
4544
double simulationDuration = 600.0;
4645

demos/sphere/demo_sphere_reg_waves.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ int main(int argc, char* argv[]) {
5353
ChSystemNSC system;
5454
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
5555
double timestep = 0.015;
56-
system.SetSolverType(ChSolver::Type::GMRES);
57-
system.GetSolver()->AsIterative()->SetMaxIterations(
58-
300); // the higher, the easier to keep the constraints satisfied.
56+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
5957
ChRealtimeStepTimer realtime_timer;
6058
double simulation_duration = 600.0;
6159

demos/sphere/sphere_irreg_waves.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ int main(int argc, char* argv[]) {
8282
ChSystemNSC system;
8383
system.SetGravitationalAcceleration(ChVector3d(0.0, 0.0, -9.81));
8484
double timestep = 0.015;
85-
system.SetSolverType(ChSolver::Type::GMRES);
86-
system.GetSolver()->AsIterative()->SetMaxIterations(300); // the higher, the easier to keep the constraints satisfied.
85+
system.SetSolverType(ChSolver::Type::SPARSE_QR);
8786
ChRealtimeStepTimer realtime_timer;
8887
double simulationDuration = 600.0;
8988

0 commit comments

Comments
 (0)