Message: Re: Failed in creating a polyhedron Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Failed in creating a polyhedron 

Forum: Geometry
Re: Question Failed in creating a polyhedron (Yuefeng Qiu)
Re: None Re: Failed in creating a polyhedron (John Allison)
Re: None Re: Failed in creating a polyhedron (Yuefeng Qiu)
Date: 11 Aug, 2014
From: John Allison <John Allison>

Mmm. So you have coded an extension of GDML. Gosh, that's quite ambitious!! If so I'm sure will have the ability to debug code. Can you do that? So...you have written code that calls

  /**
   * Creates user defined polyhedron.
   * This function allows to the user to define arbitrary polyhedron.
   * The faces of the polyhedron should be either triangles or planar
   * quadrilateral. Nodes of a face are defined by indexes pointing to
   * the elements in the xyz array. Numeration of the elements in the
   * array starts from 1 (like in fortran). The indexes can be positive
   * or negative. Negative sign means that the corresponding edge is
   * invisible. The normal of the face should be directed to exterior
   * of the polyhedron. 
   * 
   * @param  Nnodes number of nodes
   * @param  Nfaces number of faces
   * @param  xyz    nodes
   * @param  faces  faces (quadrilaterals or triangles)
   * @return status of the operation - is non-zero in case of problem
   */
  G4int createPolyhedron(G4int Nnodes, G4int Nfaces,
                         const G4double xyz[][3], const G4int faces[][4]);
};

Are you sure you have filled the arrays xyz and faces correctly? Could you print them out? Can you be more precise about where it crashes in createPolyhedron? A line number? Could you compile in Debug mode and give a traceback? It's very difficult to find the problem without more information.

John

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Failed in creating a polyhedron   (Yuefeng Qiu - 11 Aug, 2014)
(_ None: Re: Failed in creating a polyhedron   (John Allison - 12 Aug, 2014)
(_ None: Re: Failed in creating a polyhedron   (Yuefeng Qiu - 13 Aug, 2014)
1 None: Re: Failed in creating a polyhedron   (John Allison - 13 Aug, 2014)
2 None: Re: Failed in creating a polyhedron   (John Allison - 13 Aug, 2014)
1 Ok: Re: Failed in creating a polyhedron   (Yuefeng Qiu - 14 Aug, 2014)
 Add Message Add Message
to: "Re: Failed in creating a polyhedron"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]