|
[Sponsors] |
May 20, 2008, 09:27 |
Hello,
maybe you can sugges
|
#1 |
Senior Member
Kārlis Repsons
Join Date: Mar 2009
Location: Latvia
Posts: 111
Rep Power: 17 |
Hello,
maybe you can suggest a good solution for this problem: let F be an array of names and pointers (void*) to fields like volScalarField, surfaceVectorField etc; when adding a new entry to F, pointer type should be somehow memorised such a way, that it is as easy as possible to deal with that actual type of field later through pointer. For example, I could use volScalarField& f; string typeName__ = f.type();, but that means, whenever I need to do something, I need to build a ton of switches depending on typeName__. That is bad. Especially if I know, there is type() for each pointer... A template solution? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TurbDyMFoam Unknown dynamicFvMesh type mixerFvMesh | david | OpenFOAM Running, Solving & CFD | 11 | February 16, 2009 16:30 |
Unknown error | sivakumar | OpenFOAM Pre-Processing | 9 | September 9, 2008 12:53 |
Unknown faceTetPolyPatchCellDecomp | chris1980 | OpenFOAM Running, Solving & CFD | 2 | September 4, 2006 06:01 |
UNKNOWN ERROR | Robbie | FLUENT | 0 | July 15, 2005 19:27 |
Unknown Error | Robbie | FLUENT | 0 | July 12, 2005 17:05 |