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

How to access keywords from dictionaries

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By tomislav_maric

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 31, 2012, 06:10
Default How to access keywords from dictionaries
  #1
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16
francesco_capuano is on a distinguished road
Hi all,

I'm writing a custom application in OF and, just after the typical "include" list of files, I would like to access a keyword from a dictionary, e.g. the divergence scheme for div(phi,U). So I write

const dictionary& fvSchemes = db().lookupObject("fvSchemes")

so that, afterwards, I could call fvSchemes.lookup("div(phi,U)")

However, the compiler complains: db not declared in this scope

How can I define the database object?

Thanks in advance.
francesco_capuano is offline   Reply With Quote

 


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
Online libraries - with access to Journals momentum_waves Main CFD Forum 2 December 12, 2007 10:08
UDF Data Access Macro Woo Meng Wai FLUENT 0 November 6, 2007 20:23
Error: access: unbound variable,HELP sudhakar FLUENT 0 January 15, 2007 23:21
Access Density Allan Walsh FLUENT 3 October 4, 2005 07:55
access to variables at interface of porous media? Mazyar FLUENT 0 October 10, 2003 14:59


All times are GMT -4. The time now is 01:05.