|
[Sponsors] |
March 16, 2022, 10:13 |
Error using lookupObject()
|
#1 |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 6 |
Hi everyone,
I am working on a modified Version of the PaSR combustion model. In that I need to access a volScalarField which is being generated by my solver called "f". I am trying to do this using the code Code:
const volScalarField& F = this->mesh().lookupObject<volScalarField>("f"); Code:
Error: Expected primary-expression before ">" token Thank you very much! |
|
March 16, 2022, 11:52 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Check that you have "volFields.H" included somewhere, it could be that it simply does not know what volScalarField is in your chunk of code.
|
|
March 23, 2022, 04:21 |
|
#3 | |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 6 |
Quote:
PaSR combustion model allready uses references to other volScalarFields, but those are stored in the turbulence model and can be accessed differently. |
||
March 23, 2022, 04:51 |
|
#4 |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 6 |
Ok, I seemingly managed to solve the problem.
When I change the code to Code:
const volScalarField& F = this->mesh().objectRegistry::lookupObject<volScalarField>("f"); Problem with lookupObject functionality I still don't understand the issue, as my C++ knowledge is very slim, but maybe this helps others who encounter this problem. |
|
Tags |
lookupobject |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing old fields: lookupObject at user defined time | em17 | OpenFOAM Programming & Development | 5 | August 11, 2024 19:20 |
Problem with lookupObject functionality | Tobi | OpenFOAM Programming & Development | 9 | May 19, 2021 06:46 |
Question about lookupObject function | NewKid | OpenFOAM Programming & Development | 13 | February 14, 2019 04:32 |
lookupObject | nimasam | OpenFOAM Running, Solving & CFD | 3 | June 15, 2012 13:23 |
lookupObject | nimasam | OpenFOAM Bugs | 0 | July 3, 2011 08:55 |