Postprocessing of results obtained with CDO schemes for a scalar transport equation.
This is an example of cs_user_extra_operations allowing to add operations on results produced by CDO schemes. It allows to define advanced postprocessing.
if (eq == nullptr)
" Invalid equation name. Stop extra operations.");
char *filename = nullptr;
int len = strlen("Resume-.log")+strlen(eqname)+1;
return;
return;
len += 9;
sprintf(filename,
"Resume-%s-t%.f.log", eqname, time_step->
t_cur);
}
else {
return;
sprintf(filename, "Resume-%s.log", eqname);
}
resume = fopen(filename, "w");
switch (space_scheme) {
_cdovb_post(connect, cdoq, time_step, eq, true);
break;
default:
_(
"Invalid space scheme. Stop post-processing.\n"));
}
printf("\n >> Extra operation for equation: %s\n", eqname);
fclose(resume);