If the domain were not so large and so sparse, I'd be inclined to create a
simple, rectilinear Grid2D of the full extent and then use known coefficients
to mask out (set B to zero?) the solution where you don't know/care.
Assuming the axes are labeled in grid spacings (?), then your mesh would have
around 5 million elements in it, with fewer than 1 million actually being
solved (although it looks like even less than 20% of the domain is active). I
don't think that would perform very well.
I'm not thinking of anything clever with Gmsh off the top of my head.
You could break the total domain into sub-grids, only instantiate the
corresponding Grid2D's if they're not empty, and then concatenate them
together. Sketching:
A B C D
+-----+-----+-----+-----+
1| | ** | | |
| | ** | | |
+-----+-----+-----+-----+
2| | *|** | |
| | |* * | |
+-----+-----+-----+-----+
3| | | *** | |
| | | ***| |
+-----+-----+-----+-----+
4| | | **|* |
| | | *| * |
+-----+-----+-----+-----+
mesh = gridB1 + gridB2 + gridC2 + gridC3 + gridC4 + gridD4
> On Jun 7, 2016, at 10:46 AM, James Pringle <[email protected]> wrote:
>
> Dear mailing list & developers --
>
> I am looking for hints on the best way to proceed in creating a grid/mesh
> for a rather complex geometry. I am just looking for which method (Gmsh or
> something else?) to start with, so I can most efficiently start coding
> without exploring blind alleys.
>
> I am solving an elliptic/advective problem of the form
>
> 0=J(Psi,A(x,y)) + \Del(B(x,y)*\Del Psi)
>
> where Psi is the variable to solve for, and A(x,y) and B(x,y) are
> coefficients known on a set of discrete points shown as black in
> https://dl.dropboxusercontent.com/u/382250/Grid01.png . The black appears
> solid because the grid is dense.
>
> The locations of the points where the coefficients are known define the grid.
> The number of points is large (911130 points) and they are evenly spaced
> where they exist. Note that there are holes in the domain that represent
> actual islands in the ocean.
>
> I am happy to keep the resolution of the grid/mesh equal to the spacing of
> the points where the coefficients are known.
>
> What is the best way to approach creating a grid for this problem? I would
> love code, of course, but would be very happy with suggestions of the best
> way to start.
>
> Thanks
> Jamie Pringle
> University of New Hampshire
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]