Finding the corresponding debug switch
Hi all,
I never got the point of the correct debug switch name that we can manipulate either global or local. In some particular cases it is obvious e.g. ODE solvers have the ODE or ODESolver debug switch. Lets assume we want to activate the debug output in the fvMatrix class e.g. to output the stuff in the relax(const scalar alpha) function. Right now, I was always checking the TypeName info to activate the debug output (this is also mentioned by sourceflux here http://www.sourceflux.de/blog/openfoam-debug-switch/). However, for the fvMatrix class there is actually no debug switch that I could figure out which is responsible for that class. I also went through older threads but there it was obvious which debug switch we should use. In the following thread (https://www.cfd-online.com/Forums/op...ug-switch.html) it is mentioned that we build the debug switch using: Code:
defineTypeNameAndDebug |
Hello Tobias,
fvMatrix<Type> is a class template. I believe the debug switches are controlled by the specialization of fvMatrix<Type>, e.g., fvScalarMatrix, fvVectorMatrix and fvTensorMatrix etc. Examples can be found in $FOAM_ETC/controlDict. Best, Weiwen |
Hi Weiwen,
well that is really funny. So simple. I was thinking about the template character but I never searched for a fv<Type>Matrix debug switch in the controlDict. Thank you very much. That is the solution. |
Hi all,
I am facing again the same situation for the compressible::turbulentTemperatureCoupledBaffleMix ed boundary condition. In the source code, we find the debug switch: Code:
if (debug) |
Hi Tobi,
As far as I can tell in general the debug switch for a patchField is defined through the makePatchTypeField macro at the end of the .C file as you know. so even though the debug switch for turbulentTemperatureCoupledBaffleMixedFvPatchScala rField isn't in the controlDict it should still be that as far as i can tell. I haven't tested it though so.... Andrew |
Dear Tobi,
I think you should add "compressible::turbulentTemperatureCoupledBaffleMi xed 1;" to DebugSwitches sub-dictionary in system/controlDict. Best, Weiwen |
Hi all,
I am trying to turn on the debug switch in cyclicAMIPolyPatch.C. As far as I understood Code:
namespace Foam if I set cyclicAMIPolyPatch to 1 in controlDict DebugSwitches subDictionary it will turn the debug switches on for that part of the code. Is this correct? Or do I have to compile the openfoam with certain debug definitions turned on? I am on OpenFoam 5.x by the way. Cheers, Orçun |
I ran into a weird debug switch error when I run MPPICFoam. It didn't happen until yesterday.
Code:
$ MPPICFoam Today I was tinkering around with how to run MPI over multiple machines and setting up an NFS directory to place a clone case directory there. As soon as I tried running mpirun -np 7 --hosts <machinesfile> MPPICFoam -parallel, I got this error. So I tried running just MPPICFoam without MPI, still the same error. And it's not just in this NFS directory, but happens also on a similar clone directory elsewhere on the same node. But running MPPICFoam from the clone node on the same NFS directory ran just fine. It could be a file corruption somewhere under the OpenFoam directory. I still have the tarball for the OpenFoam build cloning purpose, so I could untar to overwrite my OpenFoam-7 directory and try again. But perhaps before I take that drastic step someone in this thread could give me a tip-off as to where to look for the offending file? =============== The problem went away as mysteriously as it had arrived. After powering it down, powering back up to do some unrelated work, powering down again, and finally powering back up 2nd time to re-try MPPICFoam, it runs without a hitch. |
Quote:
Code:
$FOAM_ETC/system/controlDict Code:
DebugSwitches |
All times are GMT -4. The time now is 18:14. |