<commit_before>/*
 * BenchmarkCombined.hpp
 *
 *  Created on: 30 Nov 2016
 *      Author: martin
 */

#ifndef SRC_INCLUDE_BENCHMARKS_SPHERE_SPHEREBENCHMARKSCOMBINED_HPP_
#define SRC_INCLUDE_BENCHMARKS_SPHERE_SPHEREBENCHMARKSCOMBINED_HPP_

#include <sweet/sphere/SphereData.hpp>
#include <sweet/sphere/SphereOperators.hpp>
#include <sweet/SimulationVariables.hpp>
#include <benchmarks_sphere/BenchmarkGalewsky.hpp>
#include <benchmarks_sphere/BenchmarkGaussianDam.hpp>

class SphereBenchmarksCombined
{
public:
	static
	void setupInitialConditions(
			SphereData &o_h,
			SphereData &o_u,
			SphereData &o_v,
			SimulationVariables &io_simVars,
			SphereOperators &i_op
	)
	{
		BenchmarkGalewsky benchmarkGalewsky(io_simVars);

		if (io_simVars.setup.benchmark_scenario_id <= 0)
		{
			std::cout << std::endl;
			std::cout << "Benchmark scenario not selected (option -s [id])" << std::endl;
			std::cout << "Available benchmark scenarios:" << std::endl;
			std::cout << "	1: Galweski" << std::endl;
			std::cout << "	2: Use Gaussian bump initial conditions (0, pi/3)" << std::endl;
			std::cout << "	3: Use Gaussian bump initial conditions (pi/3, pi/3)" << std::endl;
			std::cout << "	4: Use Gaussian bump initial conditions (-pi/2, pi/4)" << std::endl;
			std::cout << "	10: Use geostrophic balance test case" << std::endl;
			std::cout << "	11: Williamson test benchmark 1 (DIV formulation)" << std::endl;
			std::cout << "	12: Williamson test benchmark 1 (GRAD formulation)" << std::endl;
			std::cout << std::endl;
			FatalError("Benchmark scenario not selected");
		}


		if (io_simVars.setup.benchmark_scenario_id == 0)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 1)
		{
			benchmarkGalewsky.setup_initial_h(o_h);
//			o_h.spat_set_zero();
			benchmarkGalewsky.setup_initial_h_add_bump(o_h);

			benchmarkGalewsky.setup_initial_u(o_u);
			benchmarkGalewsky.setup_initial_v(o_v);

			std::cout << "!!! WARNING !!!" << std::endl;
			std::cout << "!!! WARNING: Overriding simulation parameters for this benchmark !!!" << std::endl;
			std::cout << "!!! WARNING !!!" << std::endl;


			/// Setup Galewski parameters
			io_simVars.sim.coriolis_omega = 7.292e-5;
			io_simVars.sim.gravitation = 9.80616;
			io_simVars.sim.earth_radius = 6.37122e6;
			io_simVars.sim.h0 = 10000.0;

			io_simVars.misc.output_time_scale = 1.0/(60.0*60.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 2)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, 0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 3)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 4)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 5)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0, 100.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 6)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0, 100.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 7)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0, 100.0);<commit_msg>yet another minor change<commit_after>/*
 * BenchmarkCombined.hpp
 *
 *  Created on: 30 Nov 2016
 *      Author: martin
 */

#ifndef SRC_INCLUDE_BENCHMARKS_SPHERE_SPHEREBENCHMARKSCOMBINED_HPP_
#define SRC_INCLUDE_BENCHMARKS_SPHERE_SPHEREBENCHMARKSCOMBINED_HPP_

#include <sweet/sphere/SphereData.hpp>
#include <sweet/sphere/SphereOperators.hpp>
#include <sweet/SimulationVariables.hpp>
#include <benchmarks_sphere/BenchmarkGalewsky.hpp>
#include <benchmarks_sphere/BenchmarkGaussianDam.hpp>

class SphereBenchmarksCombined
{
public:
	static
	void setupInitialConditions(
			SphereData &o_h,
			SphereData &o_u,
			SphereData &o_v,
			SimulationVariables &io_simVars,
			SphereOperators &i_op
	)
	{
		BenchmarkGalewsky benchmarkGalewsky(io_simVars);

		if (io_simVars.setup.benchmark_scenario_id <= 0)
		{
			std::cout << std::endl;
			std::cout << "Benchmark scenario not selected (option -s [id])" << std::endl;
			std::cout << "Available benchmark scenarios:" << std::endl;
			std::cout << "	1: Galweski" << std::endl;
			std::cout << "	2: Use Gaussian bump initial conditions (0, pi/3)" << std::endl;
			std::cout << "	3: Use Gaussian bump initial conditions (pi/3, pi/3)" << std::endl;
			std::cout << "	4: Use Gaussian bump initial conditions (-pi/2, pi/4)" << std::endl;
			std::cout << "	10: Use geostrophic balance test case" << std::endl;
			std::cout << "	11: Williamson test benchmark 1 (DIV formulation)" << std::endl;
			std::cout << "	12: Williamson test benchmark 1 (GRAD formulation)" << std::endl;
			std::cout << std::endl;
			FatalError("Benchmark scenario not selected");
		}


		if (io_simVars.setup.benchmark_scenario_id == 0)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 1)
		{
			benchmarkGalewsky.setup_initial_h(o_h);
//			o_h.spat_set_zero();
			benchmarkGalewsky.setup_initial_h_add_bump(o_h);

			benchmarkGalewsky.setup_initial_u(o_u);
			benchmarkGalewsky.setup_initial_v(o_v);

			std::cout << "!!! WARNING !!!" << std::endl;
			std::cout << "!!! WARNING: Overriding simulation parameters for this benchmark !!!" << std::endl;
			std::cout << "!!! WARNING !!!" << std::endl;


			/// Setup Galewski parameters
			io_simVars.sim.coriolis_omega = 7.292e-5;
			io_simVars.sim.gravitation = 9.80616;
			io_simVars.sim.earth_radius = 6.37122e6;
			io_simVars.sim.h0 = 10000.0;

			io_simVars.misc.output_time_scale = 1.0/(60.0*60.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 2)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, 0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 3)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 4)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 5)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0, 100.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 6)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, M_PI/3.0, M_PI/3.0, 20.0);
		}
		else if (io_simVars.setup.benchmark_scenario_id == 7)
		{
			BenchmarkGaussianDam::setup_initial_conditions_gaussian(o_h, o_u, o_v, io_simVars, -M_PI, M_PI/4.0, 100.0);
{'fraction_non_alphanumeric': 0.13939566704675027, 'fraction_numerical': 0.028078677309007982, 'mean_word_length': 4.808774834437086, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2401366', 'n_tokens_mistral': 3180, 'n_tokens_neox': 2823, 'n_words': 472}