|
[Sponsors] |
February 1, 2017, 15:47 |
Faked mesh for internal program use
|
#1 |
Member
Join Date: Aug 2015
Posts: 37
Rep Power: 10 |
Background: there is a function I'm interested in reusing which takes the form
Code:
tmp<volScalarField> foo(const volScalarField& arg); Is this possible? Is there another workaround? |
|
February 2, 2017, 01:52 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hello,
I really do not get the point you want to do? Why you want to build a volScalarField with a single entry. Do it with a dimensionedScalar or just a scalar. Provide more information and you will see that we can help you. With the lack of information, it is not really understandable; especially for people who are not sitting in front of your computer and are not related to the things you do.
__________________
Keep foaming, Tobias Holzmann |
|
February 2, 2017, 14:55 |
|
#3 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello knuckles,
I totaly agree with Tobi, I have no clue what you want. But what I think is that you need to take a look at C++ templates, widely used in OpenFoam. This gives you the possibility to use the same function with different kind of arguments Hope this helps, Wouter |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SHM problem : KVLCC2 with appendage mesh | sc.park | OpenFOAM Meshing & Mesh Conversion | 1 | March 13, 2016 13:28 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 07:05 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 09:03 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |