diff --git a/tests/integration_tests/openmdao_analysis_base_test.py b/tests/integration_tests/openmdao_analysis_base_test.py index d74d585bf..aa844519f 100644 --- a/tests/integration_tests/openmdao_analysis_base_test.py +++ b/tests/integration_tests/openmdao_analysis_base_test.py @@ -8,6 +8,7 @@ assert_check_totals, ) +from tacs import elements from tacs import TACS ErrorTuple = namedtuple("ErrorTuple", ["forward", "reverse", "forward_reverse"]) @@ -58,6 +59,9 @@ def setUp(self): if self.wrt is None: self.wrt = [] + # Seed random number generator in tacs for consistent test results + elements.SeedRandomGenerator(0) + def setup_problem(self, dtype): """ Setup openmdao problem object we will be testing. diff --git a/tests/integration_tests/pytacs_analysis_base_test.py b/tests/integration_tests/pytacs_analysis_base_test.py index 53d9a7861..1279fc689 100644 --- a/tests/integration_tests/pytacs_analysis_base_test.py +++ b/tests/integration_tests/pytacs_analysis_base_test.py @@ -5,6 +5,7 @@ import numpy as np from mpi4py import MPI +from tacs import elements from tacs import TACS from tacs import problems from tacs import constraints @@ -63,6 +64,9 @@ def setUp(self): # Populate fd/cs perturbation vectors based on user-defined method self.setup_tacs_vecs(self.fea_assembler, self.dv_pert, self.xpts_pert) + # Seed random number generator in tacs for consistent test results + elements.SeedRandomGenerator(0) + def setup_tacs_problems(self, comm): """ Setup pytacs object and problems we will be testing.