Hello, this is my first attemp
Hello, this is my first attempt in the "thread" world you have here, I've seen pretty useful things, but nothing about this.
I don't know if i'm looking in the wrong thread... anyway...sorry if i am, I need to clone a case straight from the code, without using FoamX->Clone Case app.
I need this because I'm working with a slightly modified version of icoFoam that allows me to change BC's; Once a BC has changed, I pretend to set up a new cloned case and just edit the changed BC's, run the solver again, keeping the old case running in another process in the background, and starting to run the new one (the cloned one).
I know I'm a OpenFOAM beginner, and probably asking way more over me.. but does anyone know how to do it??
I've been checking the FoamX.C code, and theres a function
" void FoamXServer::CaseBrowser::ICaseBrowser_stub::clone Case( const FoamXServer::CaseDescriptor& _par_caseDesc, const char* _par_newCaseRootDir, const char* _par_newCaseName, const char* _par_newAppClassName, const char* _par_timeSel ) "
that i think is the one responsible for that, but i'm not quite sure which is the FoamXServer::CaseDescriptor& and how to obtain it.
Remember.. anything but using the GUI..thanks so much.
Can't you just do a 'cp' inste
Can't you just do a 'cp' instead? Just call e.g. system("cp -r cavity-orig cavity")
(Or use the 'cp' function in OSspecific.H but that has a bug in it in 1.3 when copying subdirectories)
Thanks Matttijs for the quick
Thanks Matttijs for the quick response, but is there no way to do it the way I intend to? the system calls were the thing i didn't want to do, but probably I'll end up doing that. Thanks again.
Even so, do you know how can i obtain the information from the caseDescriptor?
Thanks a lot,
caseDescriptor : see idl/FoamX
caseDescriptor : see idl/FoamX.idl in the FoamX source directory. In the ICaseBrowserImpl.C there are enough examples how to use it.
Thanks again, I'll look into i
Thanks again, I'll look into it...
Hi again, I'm still not there
Hi again, I'm still not there yet, I checked the code you told me to.
In the FoamX.idl file (which is newer than C++ to me...*sigh*) they define CaseDescriptor as a structure, ok so far.
Then in the ICaseBrowserImpl.C caseDescriptor is mentioned in several functions, in the .H file one can see how its created ( I think, please correct me if I'm wrong)
const fileName& rootDir,
const fileName& rawRootDir,
const fileName& caseName
That in the ICaseBrowserImpl.C file. The questions remain: is this created when FoamX is started, or when i double click on a case? how can I have the caseDescriptor available for me without starting FoamX? any piece of advice to have a function or something that returns me this?
Sorry for the persistence, thanks!
PS. Why in FoamX.C the cloneCase funtion is called like this:
void FoamXServer::CaseBrowser::ICaseBrowser_stub::clone Case(...)
why a stub.. hehe and what does that mean?
This is all Corba stuff. Haven
This is all Corba stuff. Haven't looked at it for a while. If you insist on going this way have a look at IHostBrowserImpl::openCaseBrowser. This function gets called by the Java client when you click on a machine.
So you'll have to do something similar, then get the reference of the started caseBrowser from the name server ('nsd', has to be running) and then you'll be able to construct one of those caseDescriptors and call cloneCase somehow.
Thanks.. I will look into it..
Thanks.. I will look into it... probably it will take me a while, so thanks a lot for the really useful tips you have given me. Will be back with more questions.. hehe
|All times are GMT -4. The time now is 00:28.|