CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Self-defined IOobject variable not in objectRegistry (http://www.cfd-online.com/Forums/openfoam-programming-development/75105-self-defined-ioobject-variable-not-objectregistry.html)

lama April 16, 2010 07:06

Self-defined IOobject variable not in objectRegistry
 
Hello,

I have implemented two new variables of the same kind as

Code:

volScalarField m0
(
IOobject
    (
    "m0",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

and

Code:

volScalarField m1
(
    IOobject
    (
        "m1",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

m0 will be only overwritten during the simulation but for m1 a kind of continuity equation is solved with relax() and solve()

The problem now is that m1 is not in the regObjects list but m0. Therefore I have problems with runtime.write() where m1 won't be written and with fieldAverage, because fieldAverage doesn't know m1:

Code:

Calculating averages                       

    request for volScalarField m1 from objectRegistry region0 failed
    available objects of type volScalarField are

The curious thing is, that on one cluster it works and on another one not.
At the second cluster the code is vectorized during the compilation.

I have no idea, can anybody help me, at least some hints how to force m1 into the objectRegistry?

Thanks in advance!

lama April 20, 2010 06:49

Problem gone by changing from version 1.5 to 1.6
 
Don't know why but using version 1.6 it works. That's what I call good work in software improvement!


All times are GMT -4. The time now is 13:44.