Commit aa1042fa authored by Laurent Belcour's avatar Laurent Belcour

Updating the data2data soft

parent 969d2280
......@@ -263,7 +263,10 @@ function* plugins_manager::get_function(const std::string& filename)
function* f = get_function(args);
f->setDimX(nX);
f->setDimY(nY);
f->setParametrization(param_in);
if(f->input_parametrization() == params::UNKNOWN_INPUT)
{
f->setParametrization(param_in);
}
f->setParametrization(param_out);
// Load the function part from the file object
......
......@@ -68,13 +68,7 @@ class blinn_function : public nonlinear_function
virtual params::input input_parametrization() const
{
return params::COS_TH ;
}
virtual void setParametrization(params::input new_param)
{
std::cerr << "Cannot change the ouput parametrization "
<< __FILE__ << ":" << __LINE__ << std::endl;
throw;
}
}
void setDimY(int nY)
{
......
......@@ -107,11 +107,16 @@ int main(int argc, char** argv)
if(dynamic_cast<vertical_segment*>(d_out) != NULL)
{
params::input param = params::parse_input(args["param"]);
if(param == params::UNKNOWN_INPUT)
if(param == params::UNKNOWN_INPUT && d_in->input_parametrization() != params::UNKNOWN_INPUT)
{
std::cerr << "<<ERROR>> unable to parse the parametrization" << std::endl;
return -1;
std::cout << "<<DEBUG>> using the input file input param for the output file." << std::endl;
param = d_in->input_parametrization();
}
else if(param == params::UNKNOWN_INPUT)
{
std::cerr << "<<ERROR>> not parametrization defined for input and output files." << std::endl;
return -1;
}
d_out->setParametrization(param);
d_out->setDimX(params::dimension(param));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment