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

"template argument 1 is invalid" when including a specific header

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2020, 09:51
Default "template argument 1 is invalid" when including a specific header
  #1
New Member
 
Mohammad Khojastehmehr
Join Date: Jul 2020
Posts: 20
Rep Power: 6
MCrossover97 is on a distinguished road
Hey everybody, hope you are doing great!

I am trying to make a solver:

Code:
#include "fvCFD.H"
#include <ThermoFun/ThermoFun.h>
#include <Reaktoro/Reaktoro.hpp>

int main(int argc, char *argv[])
{	
    #include "setRootCaseLists.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "createFields.H"

    Reaktoro::ChemicalEditor editor;
    editor.addAqueousPhaseWithElements("H O Cl C Ca F Al Si K");
    editor.addMineralPhaseWithElements("H O Cl C Ca F Al Si K");

    Reaktoro::ChemicalSystem system(editor);

    Reaktoro::EquilibriumProblem problem(system);
    problem.add("H2O",1000,"g");

    Reaktoro::ChemicalState state = equilibrate(problem);

    state.output("result.txt");
}
And it gives me this error:
Code:
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/setRootCaseLists.H:3:0,
                 from reakTest.C:8:
/opt/openfoam8/src/OpenFOAM/lnInclude/listOutput.H: In function ‘int main(int, char**)’:
/opt/openfoam8/src/OpenFOAM/lnInclude/listOutput.H:33:31: error: template argument 1 is invalid
         << fvPatchField<vector>::dictionaryConstructorTablePtr_->sortedToc()
This happens when I #include <ThermoFun/ThermoFun.h>. If I comment this line, everything works fine.
I would be very appreciative if someone can help me with this!
Best,
Mohammad
MCrossover97 is offline   Reply With Quote

Old   November 22, 2020, 09:58
Default The solution
  #2
New Member
 
Mohammad Khojastehmehr
Join Date: Jul 2020
Posts: 20
Rep Power: 6
MCrossover97 is on a distinguished road
Quote:
Originally Posted by MCrossover97 View Post

Code:
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/setRootCaseLists.H:3:0,
                 from reakTest.C:8:
/opt/openfoam8/src/OpenFOAM/lnInclude/listOutput.H: In function ‘int main(int, char**)’:
/opt/openfoam8/src/OpenFOAM/lnInclude/listOutput.H:33:31: error: template argument 1 is invalid
         << fvPatchField<vector>::dictionaryConstructorTablePtr_->sortedToc()
I just replaced vector with Foam::vector and now it works.
MCrossover97 is offline   Reply With Quote

Reply

Tags
error, header, solver


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
error message cuteapathy CFX 14 March 20, 2012 07:45
Constant velocity of the material Sas CFX 15 July 13, 2010 09:56
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02


All times are GMT -4. The time now is 14:08.