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

Qtcreator cannot recongnize volScalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2021, 02:46
Default Qtcreator cannot recongnize volScalarField
  #1
Senior Member
 
ztdep's Avatar
 
p ding
Join Date: Mar 2009
Posts: 427
Rep Power: 19
ztdep is on a distinguished road
Send a message via Yahoo to ztdep Send a message via Skype™ to ztdep
Dear sir:
I setup a oenfoam project with Qtcreator. I have include the header file for the volScalarField, but Qtcreator still prompt the error about "unknown type name 'volScalarField'.Could you please give me some adives abouth which header file should i inlclude further?

Code:
#include <argList.H>
#include <fvMesh.H>
#include <GeometricField.H>
#include <volFields.H>
#include <fvCFD.H>
#include <mathematicalConstants.H>
#include <fvOption.H>
#include <volFieldsFwd.H>
#include <rhoThermo.H>
#include <pimpleControl.H>
#include <surfFields.H>
#include <cpuInfo.H>
#include <linear.H>
#include <CodedSource.H>

using namespace Foam;

int main(int argc, char *argv[])
{   
#include <setRootCase.H>
#include <createTime.H>

 fvMesh mesh
    (
        IOobject
        (
            fvMesh::defaultRegion,
            runTime.timeName(),
            runTime,
            IOobject::MUST_READ
           //IOobject::NO_READ
        )
    );


 volScalarField TA
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);
 Info<<TA.size();
}

// ************************************************************************* //
ztdep is offline   Reply With Quote

Old   June 12, 2021, 04:25
Default Debugging-OpenFOAM-with-Visual-Studio-Code
  #2
Member
 
Rahul Vadrabade
Join Date: Apr 2018
Posts: 46
Rep Power: 8
Rvadrabade is on a distinguished road
Hi,

Apologies as the answer is not directly related to Qt creator. However, I think it is easier to setup project with vscode, nowadays. Check out as needed .

https://github.com/Rvadrabade/Debugg...al-Studio-Code
Rvadrabade is offline   Reply With Quote

Reply


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
Error message Bruno_Jorge Main CFD Forum 1 February 5, 2019 12:12
namespace Foam Argen OpenFOAM 4 February 5, 2019 09:55
Adding new member function to GidaspowErgunWenYu.C of dragModel kiang OpenFOAM Programming & Development 0 June 21, 2017 06:23
execFlowFunctionObjects - unknown field problem Toorop OpenFOAM Post-Processing 16 March 14, 2016 04:25
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16


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