Sha256: 5d0818ffd67b04f2da4517beb48b5d2b27d53fa8c1487e41ce47f0c38a74596b

Contents?: true

Size: 897 Bytes

Versions: 17

Compression:

Stored size: 897 Bytes

Contents

class CodeRunner::Trinity
	def check_parameters

		check_geometery
		check_parallelisation
		check_flux_option

	end

	def check_geometery
		error( "Can't find geo_file #@geo_file (the path of geo file should be either absolute or set relative to the run folder #@directory). If you are not using a geometry file for this run please unset the parameter geo_file.") if @geo_file and not FileTest.exist? @geo_file
	end

	def check_parallelisation
		error("nrad must be explicitly specified") unless @nrad
		error("Number of jobs: #{n_flux_tubes} must evenly divide the number of processors: #{actual_number_of_processors} when fork_flag is .true.") if fork_flag_actual.fortran_true? and not actual_number_of_processors%n_flux_tubes == 0

	end

	def check_flux_option
		if @flux_option == "gs2"
		 error("subfolders must be .true. ") unless @subfolders and @subfolders.fortran_true?
		end
	end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
trinitycrmod-0.4.7 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.6 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.5 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.4 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.3 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.2 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.1 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.4.0 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.13 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.12 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.11 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.10 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.9 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.8 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.7 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.6 lib/trinitycrmod/check_parameters.rb
trinitycrmod-0.3.5 lib/trinitycrmod/check_parameters.rb