MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / MakePrismMesh

Function MakePrismMesh

python/meshes.py:532–569  ·  view source on GitHub ↗

Generate a structured prism 3D mesh Parameters ---------- nx : int Number of cells in x-direction. ny : int Number of cells in y-direction. nz : int Number of cells in z-direction. periodic_x: bool If True, the left and right boundaries are id

(nx=10, ny=None, nz=None, secondorder=False, periodic_x=False, periodic_y=False, periodic_z=False, mapping = None, cuboid_mapping=False)

Source from the content-addressed store, hash-verified

530 return MakeStructured3DMesh(hexes=True, nx=nx, ny=ny, nz=nz, secondorder=secondorder, periodic_x=periodic_x, periodic_y=periodic_y, periodic_z=periodic_z, mapping=mapping, cuboid_mapping=cuboid_mapping)
531
532def MakePrismMesh(nx=10, ny=None, nz=None, secondorder=False, periodic_x=False, periodic_y=False, periodic_z=False, mapping = None, cuboid_mapping=False):
533 """
534 Generate a structured prism 3D mesh
535
536 Parameters
537 ----------
538 nx : int
539 Number of cells in x-direction.
540
541 ny : int
542 Number of cells in y-direction.
543
544 nz : int
545 Number of cells in z-direction.
546
547 periodic_x: bool
548 If True, the left and right boundaries are identified to generate a periodic mesh in x-direction.
549
550 periodic_y: bool
551 If True, the top and bottom boundaries are identified to generate a periodic mesh in y-direction.
552
553 periodic_z: bool
554 If True, the top and bottom boundaries are identified to generate a periodic mesh in z-direction.
555
556 mapping: lambda
557 Mapping to transform the generated points. If None, the identity mapping is used.
558
559 cuboid_mapping: bool
560 If True, a straight geometry is assumed.
561
562
563 Returns
564 -------
565 (ngsolve.mesh)
566 Returns generated 3D NGSolve mesh consisting of only prism
567
568 """
569 return MakeStructured3DMesh(hexes=False, nx=nx, ny=ny, nz=nz, secondorder=secondorder, periodic_x=periodic_x, periodic_y=periodic_y, periodic_z=periodic_z, mapping=mapping, cuboid_mapping=cuboid_mapping, prism=True)
570
571from math import pi
572from ngsolve import Draw, sin, cos

Callers

nothing calls this directly

Calls 1

MakeStructured3DMeshFunction · 0.85

Tested by

no test coverage detected