|
[Sponsors] |
November 26, 2012, 22:18 |
How to treat autoPtr<psiChemistryModel> ?
|
#1 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 15 |
Hello together,
I have a question about a certain line of createFields.H of chemFoam: http://foam.sourceforge.net/docs/cpp/a03249_source.html Code:
00026 Info<< nl << "Reading thermophysicalProperties" << endl; 00027 autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh)); 00028 00029 psiChemistryModel& chemistry = pChemistry(); 00030 scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0]; However, in line 29, what is pChemistry(); doing ? Actually, what I want to do is: create a list of autoPtr<psiChemistryModel> and then perform line 29 for each entry of that list. Here is my code which does not work: Code:
// this part works pChemistry.set ( i, autoPtr<psiChemistryModel> ( psiChemistryModel::New ( fluidRegions[i] ) ).ptr() ); // but this step does not work psiChemistryModel& chemistry = (pChemistry[i])(); Code:
fluid/createFluidFields.H:108: error: no match for call to ‘(Foam::psiChemistryModel) ()’ |
|
November 28, 2012, 04:53 |
|
#2 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 15 |
Okay, found it. Just had to look at the implementation of
PtrList, List and psiChemistryModel |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to treat plasma sheath? | lucy | FLUENT | 1 | December 6, 2016 15:34 |
How to treat the jump-periodic boundaries with the fluent!please help me! | ChenZhan | FLUENT | 12 | March 20, 2016 12:59 |
Is reactingParcelFilmFoam able to treat cases of two gas-liquid interfaces | mitsuru | OpenFOAM Running, Solving & CFD | 0 | January 20, 2012 05:20 |
Fluent:How to treat catalyst in surface reaction? | gahquq | FLUENT | 0 | June 1, 2010 22:16 |
how to treat RF heating in ANSYS Fluent | Jiuan | FLUENT | 0 | May 5, 2010 05:14 |