does not name a type

Lucy0833 2017-07-06 11:09:32

我在做openfoam的求解器,在编译的时候我加入了
Info<< "Creating combustion model\n" << endl;

autoPtr<combustionModels::psiChemistryCombustionModel> combustion
(
combustionModels::psiChemistryCombustionModel::New
(
mesh
)
);

psiChemistryModel& chemistry = combustion->pChemistry();

hsCombustionThermo& thermo = chemistry.thermo();

basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

word inertSpecie(thermo.lookup("inertSpecie"));

,并且在主程序中加入了#include "psiChemistryCombustionModel.H",编译读到这一段时显示报错,错误的文件是combustionModel,程序如下
#ifndef combustionModel_H
#define combustionModel_H

#include "IOdictionary.H"
#include "turbulenceModel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/*---------------------------------------------------------------------------*\
Class combustionModel Declaration
\*---------------------------------------------------------------------------*/

class combustionModel
:
public IOdictionary
{

protected:

// Protected data

//- Reference to the turbulence model
compressible::turbulenceModel* turbulencePtr_;

//- Reference to the mesh database
const fvMesh& mesh_;

//- Active
Switch active_;

//- Dictionary of the model
dictionary coeffs_;

//- Model name
const word modelType_;


private:

// Private Member Functions

//- Disallow copy construct
combustionModel(const combustionModel&);

//- Disallow default bitwise assignment
void operator=(const combustionModel&);


public:

//- Runtime type information
TypeName("combustionModel");


// Constructors


//- Construct from components
combustionModel(const word& modelType, const fvMesh& mesh);


//- Destructor
virtual ~combustionModel();


// Member Functions

// Access


//- Return const access to the mesh database
inline const fvMesh& mesh() const;

//- Return const access to phi
inline const surfaceScalarField& phi() const;

//- Return const access to rho
virtual tmp<volScalarField> rho() const = 0;

//- Return access to turbulence
inline const compressible::turbulenceModel& turbulence() const;

//- Set turbulence
inline void setTurbulence
(
compressible::turbulenceModel& turbModel
);

//- Is combustion active?
inline const Switch& active() const;

//- Return const dictionary of the model
inline const dictionary& coeffs() const;


// Evolution

//- Correct combustion rate
virtual void correct() = 0;

//- Fuel consumption rate matrix, i.e. source term for fuel equation
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const = 0;

//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const = 0;

//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;


// I-O

//- Update properties from given dictionary
virtual bool read();
};


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//#include "combustionModelI.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

// ************************************************************************* //
但是显示说compressible没有定义,请问这个应该要怎么改啊,这个文档是自带的我没有修改过,为什么程序就不能识别呢?
万分感谢!
...全文
582 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
will_jiang 2017-07-10
  • 打赏
  • 举报
回复
compressible 在哪里声明的?不包含头文件当然编译不过

65,180

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧