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

objectRegistry related problems

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   April 3, 2014, 21:55
Default objectRegistry related problems
  #1
New Member
 
Join Date: Dec 2012
Posts: 9
Rep Power: 4
burt is on a distinguished road
Hi there

this problem has been bothering me for days!

Info << newMesh().thisDb().lookupObject<dictionary>("fvSch emes") << endl;

error comes:
lookup of fvSchemes from objectRegistry background successful
but it is not a dictionary, it is a dictioanry

personally I think there is someting wrong with the ptr, just can not figure out the solution.

anyone has ever been through this??

thanks a lot for your attention!!!

burt
burt is offline   Reply With Quote

Old   April 6, 2014, 14:32
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quick questions:
  1. Which OpenFOAM version or variant are you using?
  2. How can we reproduce the same error?
wyldckat is offline   Reply With Quote

Old   April 10, 2014, 20:33
Default
  #3
New Member
 
Join Date: Dec 2012
Posts: 9
Rep Power: 4
burt is on a distinguished road
hi wyldckat
I am using OF 2.2.2
I got this problem after I wrote hundreds of codes, this error occur when it came to this line
fvm::ddt(U_subdomain)
I was trying to solve UEqn in a subdomain


Quote:
Originally Posted by wyldckat View Post
Quick questions:
  1. Which OpenFOAM version or variant are you using?
  2. How can we reproduce the same error?
burt is offline   Reply With Quote

Old   April 13, 2014, 16:07
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi burt,

This is an interesting result... it stating that it is a dictionary and not a dictionary

From what I figure out, you can have access to this particular dictionary like this:
Code:
Info << newMesh().schemesDict() << endl;
This is possible because the class "fvMesh" inherits directly from the class "fvSchemes".

Actually, this also works:
Code:
Info << newMesh().thisDb().lookupObject<IOdictionary>("fvSchemes") << endl;
The difference is that "IOdictionary" is derived from "dictionary" and essentially have the same type names, but "IOdictionary" is specific for handling the dictionary files.

Best regards,
Bruno
burt likes this.
wyldckat is offline   Reply With Quote

Old   April 14, 2014, 22:31
Default
  #5
New Member
 
Join Date: Dec 2012
Posts: 9
Rep Power: 4
burt is on a distinguished road
Hi Bruno

it is so nice of you, and obviously you are professional.
when I tried
Code:
Info << fluidRegions[0] .schemesDict() << endl;
the scheme shows well
when I typed
Code:
Info << newMesh() .schemesDict() << endl;
nothing useful appeared
newMesh is a subdomain of fluidRegion[0]
I will dig more!

thanks again for your kindly help!!

Quote:
Originally Posted by wyldckat View Post
Hi burt,

This is an interesting result... it stating that it is a dictionary and not a dictionary

From what I figure out, you can have access to this particular dictionary like this:
Code:
Info << newMesh().schemesDict() << endl;
This is possible because the class "fvMesh" inherits directly from the class "fvSchemes".

Actually, this also works:
Code:
Info << newMesh().thisDb().lookupObject<IOdictionary>("fvSchemes") << endl;
The difference is that "IOdictionary" is derived from "dictionary" and essentially have the same type names, but "IOdictionary" is specific for handling the dictionary files.

Best regards,
Bruno
burt is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 06:44
Problems downloading Openfoam related documents srinath OpenFOAM 3 June 16, 2008 10:14
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 12:00
combustion problems???? Vijesh Joshi CFX 1 July 24, 2006 03:25


All times are GMT -4. The time now is 12:29.