CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Field Mapper- Mesh refinment (http://www.cfd-online.com/Forums/openfoam-programming-development/112176-field-mapper-mesh-refinment.html)

mm.abdollahzadeh January 23, 2013 07:36

Field Mapper- Mesh refinment
 
1 Attachment(s)
Dear All

I was trying to change the map field utility to some sort of application for run time mapping the fields between different meshes. But I have some error.

Code:

plasmamapFields.H:33:1: warning: "/*" within comment
In file included from plasmamapFields.C:36:
plasmamapFields.H:120: error: ISO C++ forbids declaration of ‘file’ with no type
plasmamapFields.H:120: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.C:112: error: ISO C++ forbids declaration of ‘file’ with no type
plasmamapFields.C:112: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.C: In constructor ‘Foam::plasmamapFields::plasmamapFields(Foam::word, Foam::word, int)’:
plasmamapFields.C:152: error: ‘casePath’ was not declared in this scope
plasmamapFields.C:154: error: ‘casePatht’ was not declared in this scope
In file included from plasmamapFields.C:159:
setTimeIndex.H:2: error: ‘timemoment’ was not declared in this scope
setTimeIndex.H:2: error: ‘timeindex’ was not declared in this scope
plasmamapFields.C:131: warning: unused variable ‘consistent’

attached is also a code for field mapping.
wish to hear from u all soon.

Best
Mahdi

kmooney January 24, 2013 09:42

Hi Mahdi,

Did you start with another similar library before implementing your custom plasma aspects? I'm just trying to see if this might be a compiler-linker issue and not a source code issue.

Cheers!

Kyle

mm.abdollahzadeh January 24, 2013 10:18

1 Attachment(s)
Quote:

Originally Posted by kmooney (Post 403775)
Hi Mahdi,

Did you start with another similar library before implementing your custom plasma aspects? I'm just trying to see if this might be a compiler-linker issue and not a source code issue.

Cheers!

Kyle

Dear Kyle

thanks for your reply. In fact I didnt understand what you mean by similar library. but mapfield utility exsit in open foam. I have tried to make it library to be able to use it for runtime use.
I have rechecked I guess i didnt define some member function correctly. but I defined them now but I have still error.
Code:

plasmamapFields.H:33:1: warning: "/*" within comment
In file included from plasmamapFields.C:36:
plasmamapFields.H:99: error: ISO C++ forbids declaration of ‘IOobjectList’ with no type
plasmamapFields.H:99: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.H:97: error: extra qualification ‘Foam::plasmamapFields::’ on member ‘UnMapped’
plasmamapFields.H:104: error: ISO C++ forbids declaration of ‘IOobjectList’ with no type
plasmamapFields.H:104: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.H:102: error: extra qualification ‘Foam::plasmamapFields::’ on member ‘MapConsistentVolFields’
plasmamapFields.H:128: error: ISO C++ forbids declaration of ‘file’ with no type
plasmamapFields.H:128: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.C: In member function ‘void Foam::plasmamapFields::mapConsistentMesh(const Foam::fvMesh&, const Foam::fvMesh&, const Foam::meshToMesh::order&)’:
plasmamapFields.C:71: error: expected primary-expression before ‘>’ token
plasmamapFields.C:71: warning: left-hand operand of comma has no effect
plasmamapFields.C:71: warning: right-hand operand of comma has no effect
plasmamapFields.C:72: error: expected primary-expression before ‘>’ token
plasmamapFields.C:72: warning: left-hand operand of comma has no effect
plasmamapFields.C:72: warning: right-hand operand of comma has no effect
plasmamapFields.C:73: error: expected primary-expression before ‘>’ token
plasmamapFields.C:76: warning: left-hand operand of comma has no effect
plasmamapFields.C:77: warning: right-hand operand of comma has no effect
plasmamapFields.C:79: error: expected primary-expression before ‘>’ token
plasmamapFields.C:79: warning: left-hand operand of comma has no effect
plasmamapFields.C:79: warning: right-hand operand of comma has no effect
plasmamapFields.C:80: error: expected primary-expression before ‘>’ token
plasmamapFields.C:80: warning: left-hand operand of comma has no effect
plasmamapFields.C:80: warning: right-hand operand of comma has no effect
plasmamapFields.C:89: error: expected primary-expression before ‘>’ token
plasmamapFields.C:90: error: expected primary-expression before ‘>’ token
plasmamapFields.C:91: error: expected primary-expression before ‘>’ token
plasmamapFields.C:92: error: expected primary-expression before ‘>’ token
plasmamapFields.C:93: error: expected primary-expression before ‘>’ token
plasmamapFields.C:97: error: expected primary-expression before ‘>’ token
plasmamapFields.C:98: error: expected primary-expression before ‘>’ token
plasmamapFields.C:99: error: expected primary-expression before ‘>’ token
plasmamapFields.C:100: error: expected primary-expression before ‘>’ token
plasmamapFields.C:101: error: expected primary-expression before ‘>’ token
plasmamapFields.C: At global scope:
plasmamapFields.C:105: error: prototype for ‘void Foam::plasmamapFields::UnMapped(const Foam::IOobjectList&)’ does not match any in class ‘Foam::plasmamapFields’
plasmamapFields.H:97: error: candidate is: void Foam::plasmamapFields::UnMapped(int)
plasmamapFields.C:118: error: prototype for ‘void Foam::plasmamapFields::MapConsistentVolFields(const Foam::IOobjectList&, const Foam::meshToMesh&, const Foam::meshToMesh::order&)’ does not match any in class ‘Foam::plasmamapFields’
plasmamapFields.H:102: error: candidate is: void Foam::plasmamapFields::MapConsistentVolFields(int)
plasmamapFields.C:193: error: ISO C++ forbids declaration of ‘file’ with no type
plasmamapFields.C:193: error: expected ‘,’ or ‘...’ before ‘&’ token
plasmamapFields.C: In constructor ‘Foam::plasmamapFields::plasmamapFields(Foam::word, Foam::word, int)’:
plasmamapFields.C:233: error: ‘casePath’ was not declared in this scope
plasmamapFields.C:235: error: ‘casePatht’ was not declared in this scope
In file included from plasmamapFields.C:240:
setTimeIndex.H:2: error: ‘timemoment’ was not declared in this scope
setTimeIndex.H:2: error: ‘timeindex’ was not declared in this scope
plasmamapFields.C:212: warning: unused variable ‘consistent’
make: *** [Make/linux64GccDPOpt/plasmamapFields.o] Error 1

I am using to multidriectionrefinment for refining my mesh. then I want to map the fields from the coarse mesh to the refined mesh.

Attached is the new code.


Best
Mahdi


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