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

IOobject

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 16, 2005, 05:28
Default Hi Guys, If I created an arr
  #1
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17
r2d2 is on a distinguished road
Hi Guys,
If I created an array of volScalarFields with this syntax:

PtrList<volscalarfield> fields(2);
for (int i =0; i<2; i++)
{
word fieldName = "field" + Foam::name(i);
Info<< "Reading field " << fieldName<< endl;
fields.hook(
volScalarField
(
IOobject
(
fieldName,
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);

}

and then I solve some equation for these (two fields for now), at runtime

runTime.write();
won´t print out these field values? Am I doing something wrong?
Cheers,
Radu
mm.abdollahzadeh likes this.
r2d2 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
A question on IOObject ivan_cozza OpenFOAM 0 September 16, 2008 03:24
Create GeometricField without IOobject nadine OpenFOAM Running, Solving & CFD 3 August 15, 2008 09:24
IOobject and IOfield in OpenFoam xiao OpenFOAM Running, Solving & CFD 0 April 2, 2008 21:56
Use of IOobject to Output irishdave OpenFOAM Pre-Processing 1 January 8, 2008 11:12
IOobject constructor problem iyer_arvind OpenFOAM Running, Solving & CFD 3 November 19, 2006 06:39


All times are GMT -4. The time now is 23:17.