CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

List of plane

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2012, 11:05
Default List of plane
  #1
New Member
 
Join Date: Sep 2009
Posts: 15
Rep Power: 0
Mjoelnir is on a distinguished road
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);
but the compiler yells at me:

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
but the list works fine i write

Code:
    scalar a(1);

    List<scalar> b;

    b.append(a);
Thank you for your help

Best regards

Henning
Mjoelnir is offline   Reply With Quote

Old   January 31, 2012, 11:15
Default
  #2
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
The plane is missing an empty constructor, just add

Code:
plane() {};
in the public interface part of the class plane, or better yet, check out the latest version of OpenFOAM-1.6-ext (if this is what you are on), it has been fixed in the meantime, and compile the library only.

Code:
error: no matching function for call to ‘Foam::plane::plane()’
Means: I really need the function (constructor) plane(), but I can't find one.

Now, tell me, what are you using this for?
tomislav_maric is offline   Reply With Quote

Old   January 31, 2012, 11:48
Default
  #3
New Member
 
Join Date: Sep 2009
Posts: 15
Rep Power: 0
Mjoelnir is on a distinguished road
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.
Mjoelnir is offline   Reply With Quote

Old   January 31, 2012, 12:03
Default
  #4
New Member
 
Join Date: Sep 2009
Posts: 15
Rep Power: 0
Mjoelnir is on a distinguished road
Thank you for the quick response

im trying to change plane.C and plane.H
Mjoelnir is offline   Reply With Quote

Old   July 4, 2013, 05:37
Default
  #5
Member
 
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15
levka is on a distinguished road
Did you manage to figure out how to define a object of "class plane"??

Quote:
Originally Posted by Mjoelnir View Post
Thank you for the quick response

im trying to change plane.C and plane.H
levka is offline   Reply With Quote

Old   July 4, 2013, 06:42
Default
  #6
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
Use PtrList<plane>.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 4, 2013, 07:06
Default
  #7
Member
 
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15
levka is on a distinguished road
Quote:
Originally Posted by l_r_mcglashan View Post
Use PtrList<plane>.
Code:
const point& p1=vector(0,0,0 );
const point& p2=vector(0,0,10 );
const point& p3=vector(0,0,20 );

PtrList<plane> Myplane(p1,p2,p3);
where is mistake?
levka is offline   Reply With Quote

Old   July 4, 2013, 07:09
Default
  #8
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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)));
Good luck!
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 4, 2013, 08:05
Default
  #9
Member
 
Lev
Join Date: Dec 2010
Posts: 31
Rep Power: 15
levka is on a distinguished road
Quote:
Originally Posted by l_r_mcglashan View Post
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)));
Good luck!
Code:
 error: ‘plane’ was not declared in this scope
And another code
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);
gives an error:
Quote:
error: ‘plane’ does not name a type
error: ‘cuttingPlane’ does not name a type
levka is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 06:27.