Bases: esys.pycad.primitives.ArcBase, esys.pycad.primitives.Primitive
Defines an arc which is strictly smaller than pi.
Returns a new object by applying the transformation.
Returns the primitives used to construct the Arc.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the center point.
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Curve
A BSpline curve. Control points may be repeated.
Returns a new object by applying the transformation.
Returns the primitives used to construct the curve.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the points used to construct the primitive.
Returns a list of the points.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Curve
A Bezier curve.
Returns a new object by applying the transformation.
Returns the primitives used to construct the curve.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the points used to construct the primitive.
Returns a list of the points.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.PrimitiveBase
An oriented loop of one-dimensional manifolds (= curves and arcs).
The loop must be closed and the Manifold1D s should be oriented consistently.
Returns a new object by applying the transformation.
Returns primitives used to construct the CurveLoop.
Returns a deep copy of the object.
Returns the points used to construct the primitive.
Returns the curves defining the CurveLoop.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the primitive ID.
Returns a list of start/end points of the 1D manifold from the loop. If not closed an exception is thrown.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if each curve is collocated with a curve in primitive.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.design.AbstractDesign
Design for gmsh.
Adds items to the design.
Removes all items from the design.
generate output file
Note : | this method may be overwritten by a particular design implementation. |
---|
Returns a list of all primitives used to create the design. Each primitive appears once. The primitives are ordered by their order of generation.
Returns the gmsh command line.
Returns the spatial dimension.
Returns the element order.
Returns the global element size.
Returns the file format
Returns a list of the items used in the design.
Returns the name of the mesh file.
Returns a handle to a mesh meshing the design. In the current implementation a mesh file name in gmsh format is returned.
Returns the current options for the mesh generator.
Returns the name of the gmsh script file.
Returns a handler to the script file to generate the geometry. In the current implementation a script file name is returned.
Returns the gmsh script to generate the mesh.
Returns a TagMap to map the names of PropertySet s to tags.
Returns True if work files are kept, False otherwise.
Sets the spatial dimension.
Sets the element order.
Sets the global element size.
Sets the file format to be used.
Parameters: | format – format to be used. needs to be one of |
---|
Work files are deleted at the end of the generation
Work files are kept at the end of the generation.
Sets the name for the mesh file. If no name is given a name is generated.
Sets options for the mesh generator.
Parameters: |
|
---|
Sets the filename for the gmsh input script. If no name is given a name with extension I{geo} is generated.
Bases: esys.pycad.primitives.EllipseBase, esys.pycad.primitives.Primitive
Defines an ellipse which is strictly smaller than pi.
Returns a new object by applying the transformation.
Returns the primitives used to construct the ellipse.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the center.
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a point on the main axis.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Curve
A line is defined by two points.
Returns a new object by applying the transformation.
Returns the primitives used to construct the curve.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the points used to construct the primitive.
Returns a list of the points.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.Manifold2D
A plane surface with holes.
Returns a new object by applying the transformation.
Returns primitives used to construct the Surface.
Returns a deep copy of the object.
Returns a list of the one-dimensional manifolds forming the boundary of the Surface (including holes).
Returns the loop defining the boundary.
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the holes.
Returns the primitive ID.
returns a list of points used to define the boundary
Returns: | list of points used to define the boundary |
---|---|
Return type: | list of Point s |
Returns a list of primitives used to construct the primitive with no double entries.
returns max deviation from right angle in the recombination algorithm
Returns: | max deviation from right angle in the recombination algorithm. If recombination is switched off, None is returned. |
---|---|
Return type: | float or None |
returns the transfinite meshing settings. If transfinite meshing is not set, None is returned.
Returns: | a tuple of the tuple of points used to define the transfinite meshing and the orientation. If no points are set the points tuple is returned as None. If no transfinite meshing is not set, None is returned. |
---|---|
Return type: | tuple of a tuple of Point s (or None) and the orientation which is one of the values Manifold2D.LEFT , Manifold2D.RIGHT , Manifold2D.ALTERNATE |
Returns the underlying primitive.
Returns True if a hole is present.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if each curve is collocated with a curve in primitive.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the transfinite meshing from the surface
Defines the number of elements on the lines
Parameters: |
|
---|
Sets the local refinement factor.
Recombines triangular meshes on the surface into mixed triangular/quadrangular meshes. max_deviation specifies the maximum derivation of the largest angle in the quadrangle from the right angle. Use max_deviation``==``None to switch off recombination.
Parameters: | max_deviation (float or None.) – maximum derivation of the largest angle in the quadrangle from the right angle. |
---|
applies 2D transfinite meshing to the surface.
Parameters: | orientation (Manifold2D.LEFT, Manifold2D.RIGHT, Manifold2D.ALTERNATE) – sets the orientation of the triangles. It is only relevant if recombination is not used. |
---|---|
Note : | Transfinite meshing can not be applied if holes are present. |
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.PrimitiveBase
A three-dimensional point.
Returns a new object by applying the transformation.
Returns primitives used to construct the primitive.
Returns a deep copy of the object.
Returns the points used to construct the primitive.
Returns the coordinates of the point as a numpy.ndarray object.
Returns the coordinates of the point as a list object.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the primitive ID.
Returns the local refinement factor.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if the Point primitive is collocated (has the same coordinates) with self. That is, if |self - primitive| <= tol * max(|self|,|primitive|).
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying the given transformation.
Sets the coordinates of the point from a numpy.ndarray object x.
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.PrimitiveBase
Defines a group of Primitive s which can be accessed through a name.
Adds items. An item my be any Primitive but no PropertySet.
Adds items. An item my be any Primitive but no PropertySet.
Returns a new object by applying the transformation.
Clears the list of items.
Returns primitives used to construct the PropertySet.
Returns a deep copy of the object.
Returns the points used to construct the primitive.
Returns the dimensionality of the items.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the primitive ID.
Returns the list of items.
Returns the manifold class expected from items.
Returns the name of the set.
Returns the number of items in the property set.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the tag used for this property set.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if the two primitives are located at the same position.
Note : | This method is overwritten by subclasses. |
---|
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
Sets the local refinement factor.
Sets the name.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Note : | This method is overwritten by subclasses. |
---|
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.Manifold2D
A ruled surface, i.e. a surface that can be interpolated using transfinite interpolation.
Returns a new object by applying the transformation.
Returns primitives used to construct the Surface.
Returns a deep copy of the object.
Returns a list of the one-dimensional manifolds forming the boundary of the Surface (including holes).
Returns the loop defining the outer boundary.
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the primitive ID.
returns a list of points used to define the boundary
Returns: | list of points used to define the boundary |
---|---|
Return type: | list of Point s |
Returns a list of primitives used to construct the primitive with no double entries.
returns max deviation from right angle in the recombination algorithm
Returns: | max deviation from right angle in the recombination algorithm. If recombination is switched off, None is returned. |
---|---|
Return type: | float or None |
returns the transfinite meshing settings. If transfinite meshing is not set, None is returned.
Returns: | a tuple of the tuple of points used to define the transfinite meshing and the orientation. If no points are set the points tuple is returned as None. If no transfinite meshing is not set, None is returned. |
---|---|
Return type: | tuple of a tuple of Point s (or None) and the orientation which is one of the values Manifold2D.LEFT , Manifold2D.RIGHT , Manifold2D.ALTERNATE |
Returns the underlying primitive.
Returns True if a hole is present.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if each curve is collocated with a curve in primitive.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the transfinite meshing from the surface
Defines the number of elements on the lines
Parameters: |
|
---|
Sets the local refinement factor.
Recombines triangular meshes on the surface into mixed triangular/quadrangular meshes. max_deviation specifies the maximum derivation of the largest angle in the quadrangle from the right angle. Use max_deviation``==``None to switch off recombination.
Parameters: | max_deviation (float or None.) – maximum derivation of the largest angle in the quadrangle from the right angle. |
---|
applies 2D transfinite meshing to the surface.
Parameters: | orientation (Manifold2D.LEFT, Manifold2D.RIGHT, Manifold2D.ALTERNATE) – sets the orientation of the triangles. It is only relevant if recombination is not used. |
---|---|
Note : | Transfinite meshing can not be applied if holes are present. |
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Curve
A spline curve defined through a list of control points.
Returns a new object by applying the transformation.
Returns the primitives used to construct the curve.
Returns a deep copy of the object.
Returns a list of the zero-dimensional manifolds forming the boundary of the curve.
Returns the points used to construct the primitive.
Returns a list of the points.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the element distribution.
Returns: | the tuple of the number of elements, the progression factor and the bump flag. If no element distribution is set None is returned |
---|---|
Return type: | tuple |
Returns the end point.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the start point.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if curves are at the same position.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the a previously set element distribution from the line.
Defines the number of elements on the line. If set it overwrites the local length setting which would be applied. The progression factor progression defines the change of element size between neighboured elements. If createBump is set progression is applied towards the center of the line.
Parameters: |
|
---|
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Primitive, esys.pycad.primitives.PrimitiveBase
A loop of 2D primitives which defines the shell of a volume.
The loop must represent a closed shell, and the primitives should be oriented consistently.
Returns a new object by applying the transformation.
Returns primitives used to construct the SurfaceLoop.
Returns a deep copy of the object.
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the surfaces defining the SurfaceLoop.
Returns the underlying primitive.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if each surface is collocated with a curve in primitive and vice versa.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
Sets the local refinement factor.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Bases: esys.pycad.primitives.Manifold3D, esys.pycad.primitives.Primitive
A volume with holes.
Returns a new object by applying the transformation.
Returns primitives used to construct the surface.
Returns a deep copy of the object.
Returns a list of the 2-dimensional manifolds forming the surface of the Volume (including holes).
Returns the points used to construct the primitive.
Returns the primitive ID where a negative sign means that reversed ordering is used.
Returns the holes in the volume.
Returns the primitive ID.
Returns a list of primitives used to construct the primitive with no double entries.
Returns the loop forming the surface.
returns the transfinite meshing settings. If transfinite meshing is not set, None is returned.
Returns: | a tuple of the tuple of points used to define the transfinite meshing and the orientation. If no points are set the points tuple is returned as None. If no transfinite meshing is not set, None is returned. |
---|---|
Return type: | tuple of a tuple of Point s (or None) and the orientation which is one of the values Manifold2D.LEFT , Manifold2D.RIGHT , Manifold2D.ALTERNATE |
Returns the underlying primitive.
Returns True if a hole is present.
Returns True if other is the same primitive and has the same orientation, False otherwise.
Returns True if each curve is collocated with a curve in primitive.
returns True is the primitive is a reversed primitive.
Modifies the coordinates by applying a transformation.
removes the transfinite meshing from the volume but not from the surfaces
Defines the number of elements on the lines and surfaces
Parameters: |
|
---|
Sets the local refinement factor.
Recombines triangular meshes on all surface into mixed triangular/quadrangular meshes. These meshes are then used to generate the volume mesh if possible. Recombination requires 3D transfinite meshing.
max_deviation specifies the maximum derivation of the largest angle in the quadrangle from the right angle. Use max_deviation``==``None to switch off recombination.
Parameters: | max_deviation (float or None.) – maximum derivation of the largest angle in the quadrangle from the right angle. |
---|
applies 3D transfinite meshing to the volume and all surface. It requires transfinite meshing on all faces which will be enforced (except if orientation is equal to None). :param orientation: sets the orientation of the triangles on the surfaces. It is only relevant if recombination is not used. If orientation is equal to None, the transfinite meshing is not applied to the surfaces but must be set by the user. :type orientation: Manifold2D.LEFT, Manifold2D.RIGHT, Manifold2D.ALTERNATE :note: Transfinite meshing can not be applied if holes are present. :note: only five or six surfaces may be used. :warning: The functionality of transfinite meshing without recombination is not entirely clear in gmsh. So please apply this method with care.
Returns a copy of self with substitutes for the primitives used to construct it given by the dictionary sub_dict. If a substitute for the object is given by sub_dict the value is returned, otherwise a new instance with substituted arguments is returned.
Return the rank of this process in the MPI World.
Each MPI process calls this function with a value for arg1. The maximum value is computed and returned.
Return type: | int |
---|