|
[Sponsors] |
March 19, 2012, 03:11 |
Writing IOdictionary to user-defined folder
|
#1 | |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
Hi foamers,
I would like to create a specific (new) IOdictionary to store some values and save it in a used-defined folder. Generating the IOdictionary itself works, saving it to the folder does not fully work. I so far did Quote:
So I guess I have to register this boundaryField folder somehow? Btw: This is done in a post-processing tool, so not during runtime of a solver. Arne |
||
March 20, 2012, 02:14 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
If you *really* know what you are doing, and want to bypass the usual mechanisms, you can also experiment with the following constructor form ... but you are really on your own here (there is a large potential of creating something stupid if you are not careful): Code:
//- Construct from path, registry, io options // Uses fileNameComponents() to split path into components. IOobject ( const fileName& path, const objectRegistry& registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true ); |
||
March 20, 2012, 02:31 |
|
#3 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
Thanks Mark,
maybe its not that complicated/bad as it sounds. The only reason of using an IOdictionary is that I did not know a better structure for storing several List<vectorField> object entries within one file (including header). It does not really matter where this dictionary is saved, but I just want to keep the structure clear. Therefore a subfolder with several dictionaries in it. This came to my mind because the folder structure created by the sample tool (folder "surfaces" with subfolders) is similar and I want to create something like that. Arne |
|
June 16, 2021, 04:04 |
|
#4 |
New Member
Tushar Survase
Join Date: Nov 2020
Posts: 7
Rep Power: 5 |
fileName writeDirectory = "constant/boundaryField";
IOdictionary vectorDict ( IOobject ( "a", runTime.constant(), writeDirectory, runTime, IOobject::NO_READ, IOobject::AUTO_WRITE ) ); vectorDict.Foam::regIOobject::write(); This will work. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User Defined function for scalar gradient caculation with Star ccm+ V4 | coolio | STAR-CCM+ | 4 | August 11, 2023 05:38 |
Creating new user defined material | Vidya | FLUENT | 4 | August 26, 2013 09:26 |
user defined sourcen term | xck1986 | CFX | 1 | July 8, 2010 08:35 |
user defined turbulence model | manuutin | STAR-CD | 5 | October 14, 2009 05:29 |
Usage of user defined functions | Gowrish | FLUENT | 1 | October 26, 2005 07:44 |