|
[Sponsors] |
January 31, 2012, 11:05 |
List of plane
|
#1 |
New Member
Join Date: Sep 2009
Posts: 15
Rep Power: 0 |
Hi Everyone,
i want to create a list of planes ==> Code:
vector n (0, 0, 1); point d (0.25,0.25,0.25); plane cutPlane(d,n); scalar a(1); List<plane> b; b.append(cutPlane); Code:
In file included from /opt/openfoam201/src/OpenFOAM/lnInclude/List.H:259:0, from /opt/openfoam201/src/OpenFOAM/lnInclude/HashTable.C:30, from /opt/openfoam201/src/OpenFOAM/lnInclude/Istream.H:184, from /opt/openfoam201/src/OpenFOAM/lnInclude/ISstream.H:40, from /opt/openfoam201/src/OpenFOAM/lnInclude/IOstreams.H:38, from /opt/openfoam201/src/OpenFOAM/lnInclude/VectorSpace.C:27, from /opt/openfoam201/src/OpenFOAM/lnInclude/VectorSpace.H:167, from /opt/openfoam201/src/OpenFOAM/lnInclude/Vector.H:44, from /opt/openfoam201/src/OpenFOAM/lnInclude/vector.H:39, from /opt/openfoam201/src/OpenFOAM/lnInclude/point.H:35, from /opt/openfoam201/src/OpenFOAM/lnInclude/tetPointRef.H:34, from /opt/openfoam201/src/meshTools/lnInclude/momentOfInertia.H:40, from volFoam.C:32: /opt/openfoam201/src/OpenFOAM/lnInclude/List.C: In member function ‘void Foam::List<T>::setSize(Foam::label) [with T = Foam::plane, Foam::label = int]’: /opt/openfoam201/src/OpenFOAM/lnInclude/List.C:367:5: instantiated from ‘void Foam::List<T>::setSize(Foam::label, const T&) [with T = Foam::plane, Foam::label = int]’ /opt/openfoam201/src/OpenFOAM/lnInclude/ListI.H:99:5: instantiated from ‘void Foam::List<T>::append(const T&) [with T = Foam::plane]’ volFoam.C:120:19: instantiated from here /opt/openfoam201/src/OpenFOAM/lnInclude/List.C:331:41: error: no matching function for call to ‘Foam::plane::plane()’ /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:139:9: note: candidates are: Foam::plane::plane(Foam::Istream&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:136:9: note: Foam::plane::plane(const Foam::dictionary&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:133:9: note: Foam::plane::plane(const Foam::scalarList&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:129:9: note: Foam::plane::plane(const Foam::point&, const Foam::point&, const Foam::point&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:126:9: note: Foam::plane::plane(const Foam::point&, const Foam::vector&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:123:9: note: Foam::plane::plane(const Foam::vector&) /opt/openfoam201/src/OpenFOAM/lnInclude/plane.H:62:1: note: Foam::plane::plane(const Foam::plane&) make: *** [Make/linuxGccDPOpt/volFoam.o] Fehler 1 Code:
scalar a(1); List<scalar> b; b.append(a); Best regards Henning |
|
January 31, 2012, 11:15 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
The plane is missing an empty constructor, just add
Code:
plane() {}; Code:
error: no matching function for call to ‘Foam::plane::plane()’ Now, tell me, what are you using this for? |
|
January 31, 2012, 11:48 |
|
#3 |
New Member
Join Date: Sep 2009
Posts: 15
Rep Power: 0 |
i want to create the class cellcuts. For that i need the list of plane for the consructor.
In the end i want to calculate the volume of the cell cutted by the plane. |
|
January 31, 2012, 12:03 |
|
#4 |
New Member
Join Date: Sep 2009
Posts: 15
Rep Power: 0 |
Thank you for the quick response
im trying to change plane.C and plane.H |
|
July 4, 2013, 05:37 |
|
#5 |
Member
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15 |
||
July 4, 2013, 07:06 |
|
#7 |
Member
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15 |
||
July 4, 2013, 07:09 |
|
#8 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Code:
PtrList<plane> planes(3); planes.set(0, new plane(point(0,0,0))); planes.set(1, new plane(point(0,0,10))); planes.set(2, new plane(point(0,0,20)));
__________________
Laurence R. McGlashan :: Website |
|
July 4, 2013, 08:05 |
|
#9 | ||
Member
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15 |
Quote:
Code:
error: ‘plane’ was not declared in this scope Code:
point xyz(0,0,0) ;// choose the point through which //the plane goes vector dir(0,0,1) ;// normal direction plane plane1(xyz,dir); cuttingPlane plane1(mesh, plane1); Quote:
|
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 02:09 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |