Skip to content

Commit cee1bcf

Browse files
authored
fix time limit for z4c linear wave test (#585)
* fix time limit * linting
1 parent bbf8d6d commit cee1bcf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pgen/tests/z4c_linear_wave.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,15 @@ void ProblemGenerator::Z4cLinearWave(ParameterInput *pin, const bool restart) {
8888
Real theta = std::atan2(sqrt(kx2 * kx2 + kx1 * kx1), kx3);
8989
Real phi = std::atan2(kx1, kx2);
9090

91+
// Find wavelength
92+
Real lambda = 1/knorm;
93+
9194
// set new time limit in ParameterInput (to be read by Driver constructor) based on
9295
// wave speed of selected mode.
93-
// input tlim is interpreted asnumber of wave periods for evolution
96+
// input tlim is interpreted as number of wave periods for evolution
9497
if (set_initial_conditions) {
9598
Real tlim = pin->GetReal("time", "tlim");
96-
pin->SetReal("time", "tlim", tlim*knorm);
99+
pin->SetReal("time", "tlim", tlim*lambda);
97100
}
98101

99102
// rotated weight for each tensor element

0 commit comments

Comments
 (0)