fipy.meshes.factoryMeshes¶
Functions
|
Create a 2D cylindrical mesh |
|
Create a 2D cylindrical mesh |
|
Create a 1D Cartesian mesh |
|
Create a 2D Cartesian mesh |
|
Create a 3D Cartesian mesh |
|
Create a 1D spherical mesh |
- fipy.meshes.factoryMeshes.CylindricalGrid1D(dr=None, nr=None, Lr=None, dx=1.0, nx=None, Lx=None, origin=(0,), overlap=2, communicator=DummyComm())¶
Create a 2D cylindrical mesh
Factory function to select between
CylindricalUniformGrid1D
andCylindricalNonUniformGrid1D
. If Lr is specified the length of the domain is always Lr regardless of dr, unless dr is a list of spacings, in which case Lr will be the sum of dr.- Parameters:
dr (float) – Grid spacing in the radial direction. Alternative: dx.
nr (int) – Number of cells in the radial direction. Alternative: nx.
Lr (float) – Domain length in the radial direction. Alternative: Lx.
overlap (int) – the number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).
- fipy.meshes.factoryMeshes.CylindricalGrid2D(dr=None, dz=None, nr=None, nz=None, Lr=None, Lz=None, dx=1.0, dy=1.0, nx=None, ny=None, Lx=None, Ly=None, origin=((0,), (0,)), overlap=2, communicator=DummyComm())¶
Create a 2D cylindrical mesh
Factory function to select between
CylindricalUniformGrid2D
andCylindricalNonUniformGrid2D
. If Lr is specified the length of the domain is always Lr regardless of dr, unless dr is a list of spacings, in which case Lr will be the sum of dr.- Parameters:
dr (float) – Grid spacing in the radial direction. Alternative: dx.
dz (float) – grid spacing in the vertical direction. Alternative: dy.
nr (int) – Number of cells in the radial direction. Alternative: nx.
nz (int) – Number of cells in the vertical direction. Alternative: ny.
Lr (float) – Domain length in the radial direction. Alternative: Lx.
Lz (float) – Domain length in the vertical direction. Alternative: Ly.
overlap (int) – the number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).
- fipy.meshes.factoryMeshes.Grid1D(dx=1.0, nx=None, Lx=None, overlap=2, communicator=DummyComm())¶
Create a 1D Cartesian mesh
Factory function to select between
UniformGrid1D
andNonUniformGrid1D
. If Lx is specified the length of the domain is always Lx regardless of dx, unless dx is a list of spacings, in which case Lx will be the sum of dx and nx will be the count of dx.- Parameters:
dx (float) – Grid spacing in the horizontal direction
nx (int) – Number of cells in the horizontal direction
Lx (float) – Domain length in the horizontal direction
overlap (int) – Number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).
- fipy.meshes.factoryMeshes.Grid2D(dx=1.0, dy=1.0, nx=None, ny=None, Lx=None, Ly=None, overlap=2, communicator=DummyComm())¶
Create a 2D Cartesian mesh
Factory function to select between
UniformGrid2D
andNonUniformGrid2D
. If L{x,y} is specified, the length of the domain is always L{x,y} regardless of d{x,y}, unless d{x,y} is a list of spacings, in which case L{x,y} will be the sum of d{x,y} and n{x,y} will be the count of d{x,y}.>>> print(Grid2D(Lx=3., nx=2).dx) 1.5
- Parameters:
dx (float) – Grid spacing in the horizontal direction
dy (float) – Grid spacing in the vertical direction
nx (int) – Number of cells in the horizontal direction
ny (int) – Number of cells in the vertical direction
Lx (float) – Domain length in the horizontal direction
Ly (float) – Domain length in the vertical direction
overlap (int) – Number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).
- fipy.meshes.factoryMeshes.Grid3D(dx=1.0, dy=1.0, dz=1.0, nx=None, ny=None, nz=None, Lx=None, Ly=None, Lz=None, overlap=2, communicator=DummyComm())¶
Create a 3D Cartesian mesh
Factory function to select between
UniformGrid3D
andNonUniformGrid3D
. If L{x,y,z} is specified, the length of the domain is always L{x,y,z} regardless of d{x,y,z}, unless d{x,y,z} is a list of spacings, in which case L{x,y,z} will be the sum of d{x,y,z} and n{x,y,z} will be the count of d{x,y,z}.- Parameters:
dx (float) – Grid spacing in the horizontal direction
dy (float) – Grid spacing in the vertical direction
dz (float) – Grid spacing in the depth direction
nx (int) – Number of cells in the horizontal direction
ny (int) – Number of cells in the vertical direction
nz (int) – Number of cells in the depth direction
Lx (float) – Domain length in the horizontal direction
Ly (float) – Domain length in the vertical direction
Lz (float) – Domain length in the depth direction
overlap (int) – Number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).
- fipy.meshes.factoryMeshes.SphericalGrid1D(dr=None, nr=None, Lr=None, dx=1.0, nx=None, Lx=None, origin=(0,), overlap=2, communicator=DummyComm())¶
Create a 1D spherical mesh
Factory function to select between
SphericalUniformGrid1D
andSphericalNonUniformGrid1D
. If Lr is specified the length of the domain is always Lr regardless of dr, unless dr is a list of spacings, in which case Lr will be the sum of dr.- Parameters:
dr (float) – Grid spacing in the radial direction. Alternative: dx.
nr (int) – Number of cells in the radial direction. Alternative: nx.
Lr (float) – Domain length in the radial direction. Alternative: Lx.
overlap (int) – the number of overlapping cells for parallel simulations. Generally 2 is adequate. Higher order equations or discretizations require more.
communicator (CommWrapper) – MPI communicator to use. Select
serialComm
to create a serial mesh when running in parallel; mostly used for test purposes. (default:parallelComm
).