Esempio n. 1
0
ImposeCFL::ImposeCFL ( const std::string& name ) :
  TimeStepComputer(name),
  m_cfl(0.)
{
  mark_basic();
  // options
  options().add("cfl", std::string("1.") )
    .description("Courant Number")
    .pretty_name("CFL")
    .mark_basic()
    .attach_trigger( boost::bind( &ImposeCFL::parse_cfl, this) );
  parse_cfl();
}
Esempio n. 2
0
int main_spow(int argc, char* argv[argc])
{
	mini_cmdline(argc, argv, 3, usage_str, help_str);

	complex float expo;

	if (0 != parse_cfl(&expo, argv[1])) {

		fprintf(stderr, "ERROR: exponent %s is not a number.\n", argv[1]);
		exit(1);
	}

	const int N = DIMS;
	long dims[N];
	complex float* idata = load_cfl(argv[2], N, dims);
	complex float* odata = create_cfl(argv[3], N, dims);
		
	md_zspow(N, dims, odata, idata, expo);

	unmap_cfl(N, dims, idata);
	unmap_cfl(N, dims, odata);
	exit(0);
}