Right. I remember. You can extrude from any 2D mesh. I fixed all that
when you were here.
This is from help(Grid2D().extrude)
Help on method extrude in module fipy.meshes.numMesh.mesh2D:
extrude(self, extrudeFunc=<function <lambda>>, layers=1) method of
fipy.meshes.numMesh.uniformGrid2D.UniformGrid2D instance
This function returns a new 3D mesh. The 2D mesh is extruded
using the extrudeFunc and the number of layers.
:Parameters:
- `extrudeFunc`: function that takes the vertex coordinates and
returns the displaced values
- `layers`: the number of layers in the extruded mesh (number of
times extrudeFunc will be called)
>>> from fipy.meshes.grid2D import Grid2D
>>> print Grid2D(nx=2,ny=2).extrude(layers=2).getCellCenters()
[[ 0.5 1.5 0.5 1.5 0.5 1.5 0.5 1.5]
[ 0.5 0.5 1.5 1.5 0.5 0.5 1.5 1.5]
[ 0.5 0.5 0.5 0.5 1.5 1.5 1.5 1.5]]
>>> from fipy.meshes.tri2D import Tri2D
>>> print Tri2D().extrude(layers=2).getCellCenters()
[[ 0.83333333 0.5 0.16666667 0.5 0.83333333 0.5
0.16666667 0.5 ]
[ 0.5 0.83333333 0.5 0.16666667 0.5 0.83333333
0.5 0.16666667]
[ 0.5 0.5 0.5 0.5 1.5
1.5 1.5
1.5 ]]
On Nov 28, 2007 3:12 PM, asreeve <[EMAIL PROTECTED]> wrote:
>
> Daniel,
>
> We're doing this so that we can use the extrude function to
> create a mesh with irregular layer thicknesses. Can one use extrude on a
> mesh generated with Grid2D? A second reason for going this route is
> based on what I hope to do with this in the future.
>
> Andy
>
> ----------------------
> Andrew Reeve
> Dept. of Earth Science
> University of Maine
>
>
> On Wed, 28 Nov 2007, Daniel Wheeler wrote:
>
> >
> > On Nov 27, 2007 5:51 PM, asreeve <[EMAIL PROTECTED]> wrote:
> >> Daniel,
> >>
> >> Attached is the script that my grad student made to create a simple 2-D
> >> quadralateral mesh file you asked for. We did not use a gmsh directly as I
> >> was unable to quickly figure out how to use it to make a uniform
> >> quadralateral mesh.
> >
> > Why not just use Grid2D if you can't get gmsh to work?
> >
> > --
> > Daniel Wheeler
> >
>
>
--
Daniel Wheeler