Differences

This shows you the differences between two versions of the page.

en:ivutils [2012/11/24 04:21]
deinega [Geometry objects]
en:ivutils [2014/05/11 18:58] (current)
deinega
Line 1: Line 1:
-======ivutils======+======Basic utilities library ivutils======
  
 is free C++ library for numerical applications development. ivutils was used in EMTL (electromagnetic modeling) and [[https://sites.physics.utoronto.ca/sajeevjohn/software/transport|Microvolt]] (semiconductor device modeling) is free C++ library for numerical applications development. ivutils was used in EMTL (electromagnetic modeling) and [[https://sites.physics.utoronto.ca/sajeevjohn/software/transport|Microvolt]] (semiconductor device modeling)
  
-To use ivutils you need to download it and compile with your code: {{:ivutils.zip}} +To use ivutils you need to download it and compile with your code: {{:ivutils.zip}}
  
 ivutils include: ivutils include:
Line 15: Line 15:
 | | | | | |
 | grid | uniform and uniform meshes to store and interpolate data | | grid | uniform and uniform meshes to store and interpolate data |
-linsysn | interface to solve system of linear equations using LAPACK and PARDISO |+linsolv | interface to solve system of linear equations using LAPACK and PARDISO |
 | | | | | |
 | refobj\\ pencil | smart pointers to manage dynamic memory | | refobj\\ pencil | smart pointers to manage dynamic memory |
Line 59: Line 59:
      
 All geometry classes are derived from the class Region_3. All geometry classes are derived from the class Region_3.
-Class Region_3 and its derived classes has the following functionality: +Class Region_3 (as well as its derived classeshas the following functionality: 
- * it can test, if some chosen point is inside or outside +  *it can test, if some chosen point is inside or outside 
- * it can find the point on the region surface closest to the given one +  *it can find the point on the region surface closest to the given one 
- * it can find intersection with some line  +  *it can find intersection with some line  
- * it can find intersection with planar contours+  *it can find intersection with planar contours
  
-Here we present examples of mostly useful regions.+Below we present examples of functions which can be used to create some common regions.
  
 <code cpp> <code cpp>
   Region_3 *GetHalfSpace(const Vector_3 &n, const Vector_3 &pos);   Region_3 *GetHalfSpace(const Vector_3 &n, const Vector_3 &pos);
 </code> </code>
-returns half-space, n is normal to the boundary plane, pos is chosen position at this plane. +returns half-space, n is normal to the boundary plane, pos is chosen position at this plane. For example
-For example:+
 <code cpp> <code cpp>
-  Region_3 *reg = GetHalfSpace(Vector_3(0,0,1), Vector_3(0,0,0)); // half-space corresponding to positive side of z-axis+  Region_3 *reg = GetHalfSpace(Vector_3(0,0,1), Vector_3(0,0,0));
 </code> </code>
 +returns half-space corresponding to positive side of z-axis.
  
 <code cpp> <code cpp>
   Region_3 *GetPlate(const Vector_3 &n, const Vector_3 &pos, vec_type width);   Region_3 *GetPlate(const Vector_3 &n, const Vector_3 &pos, vec_type width);
 </code>   </code>  
-returns plate (space between to parallel planes), n is normal to the planes, pos is position at some plane, width is distance between this plane and other plane+returns infinite plate (space between to parallel planes), n is normal to the planes, pos is position at some plane, width is distance between this plane and other plane.
  
 <code cpp> <code cpp>
-Region_3 *getBox b(const &Vector_3 a, const &Vector_3 b);+Region_3 *getBox(const &Vector_3 a, const &Vector_3 b);
 </code> </code>
 returns parallelepiped with edges parallel to coordinate axes. a and b are opposite vertexes. returns parallelepiped with edges parallel to coordinate axes. a and b are opposite vertexes.
Line 89: Line 90:
 Region_3 *GetSphere(vec_type R, const &Vector_3 center); Region_3 *GetSphere(vec_type R, const &Vector_3 center);
 </code> </code>
- 
 returns sphere of a chosen radius R and center position. returns sphere of a chosen radius R and center position.
  
Line 95: Line 95:
 Region_3 *GetCylinder(const Vector_3 &origin, Vector_3 n, vec_type R, valtype h); Region_3 *GetCylinder(const Vector_3 &origin, Vector_3 n, vec_type R, valtype h);
 </code> </code>
- +returns cylinder, origin is point at cylinder axis, n is axis direction, R is radius, h is cylinder height (if h=0 than cylinder is infinite).
-returns Cylinder, origin is point at cylinder axis, n is axis direction, R is radius, h is cylinder height (if h=0 than cylinder is infinite)+
  
 <code cpp> <code cpp>
 Region *GetCone(const Vector_3 &origin, Vector_3 n, vec_type R, vec_type h); Region *GetCone(const Vector_3 &origin, Vector_3 n, vec_type R, vec_type h);
 </code> </code>
-returns cone, all parameters has the same meaning as for GetCylinder+returns cone, all parameters have the same meaning as for GetCylinder.
  
 There are also classes for polyhedron, prism, pyramid, etc. There are also classes for polyhedron, prism, pyramid, etc.
Line 107: Line 106:
 Sophisticated objects with curved surface can be specified by polyhedra with sufficient number of sides.  Sophisticated objects with curved surface can be specified by polyhedra with sufficient number of sides. 
 See detailed reference in region.h See detailed reference in region.h
 +/**
 Parallelepiped with edges parallel to coordinate axes is constructed by class Box. Parallelepiped with edges parallel to coordinate axes is constructed by class Box.
 Constructor arguments are opposite vertexes coordinates. Constructor arguments are opposite vertexes coordinates.
Line 124: Line 123:
 Objects can be rotated, stretched and narrowed, you can take their intersection and sum (detailed reference is [[en/documentation|here]]).  Objects can be rotated, stretched and narrowed, you can take their intersection and sum (detailed reference is [[en/documentation|here]]). 
 Smooth object can be interpolated by polyhedron with sufficient number of sides. Smooth object can be interpolated by polyhedron with sufficient number of sides.
 +*/
 ======Script to run jobs at any supercomputer====== ======Script to run jobs at any supercomputer======
  
Line 188: Line 187:
 Parameters of this function have the same meaning as for function qsub. Parameters of this function have the same meaning as for function qsub.
 The only difference between qsub_appl and qsub is that qsub_appl creates workdir/worksubdir in your work directory, and looks for files prog and fname in your home directory. The only difference between qsub_appl and qsub is that qsub_appl creates workdir/worksubdir in your work directory, and looks for files prog and fname in your home directory.
- 
 
/home/kintechlab/fdtd.kintechlab.com/docs/data/attic/en/ivutils.1353716462.txt.gz · Last modified: 2012/11/24 04:21 by deinega     Back to top