Commit a3cc55b2 authored by Daniel Brown's avatar Daniel Brown

Adding in xaxis compatiability for nle

parent 074e636f
......@@ -10613,6 +10613,9 @@ int get_xparam(double **xparam, int i, const char *parameter, char *unit,
case TF:
assign_tf_parameter(&component_param);
break;
case NLE:
assign_nle_parameter(&component_param);
break;
default:
server_gerror("Line `%s':\ninvalid component\n", command_string);
return (-1);
......@@ -11600,6 +11603,28 @@ int assign_tf_parameter(component_param_t *component_param) {
return 0;
}
int assign_nle_parameter(component_param_t *component_param) {
nle_t *nle = &inter.nle_list[component_param->component_index];
if(strcasecmp("r", component_param->parameter) == 0){
*component_param->xparam = &(nle->r);
strcpy(component_param->unit, " [dB]");
*component_param->lborder = 0;
*component_param->uborder = 0;
} else if(strcasecmp("phi", component_param->parameter) == 0){
*component_param->xparam = &(nle->phi);
strcpy(component_param->unit, " [deg]");
*component_param->lborder = 0;
*component_param->uborder = 0;
} else {
server_gerror("Line `%s':\nparameter '%s' not tunable for non linear element\n",
component_param->command_string, component_param->parameter);
return (-1);
}
return 0;
}
//! Assign attribute parameters to a beam parametera at a given node
/*!
......
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