Nek5000 / nekRS

our next generation fast and scalable CFD code
https://nek5000.mcs.anl.gov/
Other
284 stars 75 forks source link

Put prefix for the printed setup files. #489

Closed yslan closed 1 year ago

yslan commented 1 year ago

This is a feature request.

In V23-rc1, we start to print par / udf / oudf into the logfile. However, this makes the logfile a bit more messy to read. Also, the variable names in setup files can be anything so the usual way to grep <syntax> logfile will get extra irrelevant lines and it can be complicated to exclude them.

Describe the solution you'd like I propose putting syntax to every lines of the printed setup files so it's able to exclude the pattern by grep -v

For example,

[__SETUP__][OUDF] >>>
[__SETUP__][OUDF] void velocityDirichletConditions(bcData* bc)
[__SETUP__][OUDF] {
[__SETUP__][OUDF]   bc->u = 0.0;
[__SETUP__][OUDF]   bc->v = 0.0;
[__SETUP__][OUDF]   bc->w = 1.0;
[__SETUP__][OUDF] }
[__SETUP__][OUDF]
[__SETUP__][OUDF] void scalarDirichletConditions(bcData* bc)
[__SETUP__][OUDF] {
[__SETUP__][OUDF]   bc->s = 1.0;
[__SETUP__][OUDF] }
[__SETUP__][OUDF]
[__SETUP__][OUDF]
[__SETUP__][OUDF] void meshVelocityDirichletConditions(bcData *bc){
[__SETUP__][OUDF]   velocityDirichletConditions(bc);
[__SETUP__][OUDF] }
[__SETUP__][OUDF] void velocityNeumannConditions(bcData *bc){}
[__SETUP__][OUDF] void pressureDirichletConditions(bcData *bc){}
[__SETUP__][OUDF] void scalarNeumannConditions(bcData *bc){}
[__SETUP__][OUDF] <<<

Additional context It's also nice if we have loglevel to control this. We can have an env variable so the default script on big machines will print the info by default.

stgeke commented 1 year ago

Addressed in latest next.