-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed testSelectOutput to work with new scheme
- Loading branch information
Showing
4 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
SelectOutput: | ||
Default: | ||
# Particle Type 0 | ||
Coordinates_Gas: 1 # check if written when specified | ||
Velocities_Gas: 0 # check if not written when specified | ||
Masses_Gas: -5 # check warning if not 0 or 1 and if written | ||
Pot_Gas: 1 # check warning if wrong name | ||
Coordinates_Gas: on # check if written when specified | ||
Velocities_Gas: off # check if not written when specified | ||
Pot_Gas: on # check warning if wrong name | ||
# Density_Gas: 1 # check if written when not specified | ||
|
||
# Parameters for the hydrodynamics scheme | ||
SPH: | ||
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel). | ||
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Parameters for the hydrodynamics scheme | ||
SPH: | ||
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel). | ||
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. | ||
|
||
Snapshots: | ||
select_output_on: 1 | ||
select_output: selectOutput.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
############################################################################### | ||
# This file is part of SWIFT. | ||
# Copyright (c) 2015 Bert Vandenbroucke ([email protected]) | ||
# Matthieu Schaller ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
# This file is part of SWIFT. | ||
# Copyright (c) 2015 Bert Vandenbroucke ([email protected]) | ||
# Matthieu Schaller ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
# Check the output done with swift | ||
|
||
|
@@ -47,8 +47,8 @@ | |
with open(log_filename, "r") as f: | ||
data = f.read() | ||
|
||
if "SelectOutput:Masses_Gas" not in data: | ||
raise Exception("Input error in `SelectOuput:Masses_Gas` not detected") | ||
if "Default:Masses_Gas" not in data: | ||
raise Exception("Input error in `Default:Masses_Gas` not detected") | ||
|
||
if "SelectOutput:Pot_Gas" not in data: | ||
if "Default:Pot_Gas" not in data: | ||
raise Exception("Parameter name error not detected for `SelectOutput:Pot_Gas`") |