CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

check in a uniformInterpolationTable without destroying it

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2014, 09:29
Default check in a uniformInterpolationTable without destroying it
  #1
New Member
 
Join Date: Dec 2012
Posts: 13
Rep Power: 13
Vesposo is on a distinguished road
Hi,

in the constructor of my boundary condition I'm trying to construct an uniformInterpolationTable and check it into the objectRegistry.

Code:
    myUniformInterpolationTable_
    (
        IOobject
        (
            tableName_,
            this->patch().boundaryMesh().mesh().time().constant(),
            this->patch().boundaryMesh().mesh(),
            IOobject::MUST_READ,
            IOobject::NO_WRITE,
            true
        ),
        true
    )
The problem is, I can't look it up

Code:
const uniformInterpolationTable<scalar>& myTable = 
               db().lookupObject<uniformInterpolationTable<scalar> >(tableName_);
results in an error:

Code:
--> FOAM FATAL ERROR: 

    request for IOobject myUniformInterpolationTable_ from objectRegistry region0 failed
    available objects of type IOobject are
0()
If I set the debug flag objectRegistry=1, it shows that the regIOobject will be destroyed after constructing and checking in.

Code:
Constructing IOobject called myUniformInterpolationTable_ of type IOobject
objectRegistry::checkIn(regIOobject&) : region0 : checking in myUniformInterpolationTable_
Destroying regIOobject called myUniformInterpolationTable_ of type regIOobject in directory
Is there a way which lets the uniformInterpolationTable accessable?

Thanks
Vesposo is offline   Reply With Quote

Old   March 13, 2014, 14:45
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Are you sure you are checking it in to the object registry with the call to this->patch().boundaryMesh().mesh()? Following the function calls seems like you're returning pointers and references. Can you try use a more direct access to mesh and see if it improves things?
mturcios777 is offline   Reply With Quote

Old   March 14, 2014, 03:38
Default
  #3
New Member
 
Join Date: Dec 2012
Posts: 13
Rep Power: 13
Vesposo is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
Are you sure you are checking it in to the object registry with the call to this->patch().boundaryMesh().mesh()? Following the function calls seems like you're returning pointers and references. Can you try use a more direct access to mesh and see if it improves things?
Thank you for your answer.

The debug information says

Code:
objectRegistry::checkIn(regIOobject&) : region0 : checking in myUniformInterpolationTable_
So I assume it's checking in.

I don't know how to access it in a more direct way, due to I'm in my boundary condition. Can you give me a hint.

Thanks
Vesposo is offline   Reply With Quote

Old   March 14, 2014, 12:39
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
If its checking in and then out, then maybe its more the time you are asking it to be created. Try this->db().time().constant(). It seems most boundary conditions use that for finding the time. Similarly, maybe try this->db().mesh().
mturcios777 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh check failed subhas.hunasikatti@gmail. FLUENT 0 January 19, 2014 05:09
[ICEM] Understanding check mesh output kotimari ANSYS Meshing & Geometry 0 July 15, 2012 09:33
faceZones and topological check mturcios777 OpenFOAM Programming & Development 0 June 15, 2012 14:48
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 11:46
Cell check and Boundary check errors AB Siemens 4 October 28, 2004 14:04


All times are GMT -4. The time now is 06:41.