-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No SpecialSets for dQ0 mesh #7
Comments
Partly because we prefer to keep these operations at a high level through the FE variable interface. It's not obvious how to map the pressure to the v mesh unless you have access to the interpolation functions Sent from my iPhone On 30 Sep 2015, at 4:35 PM, Luke Mondy <notifications@github.commailto:notifications@github.com> wrote: Sorry for the spamming! Here's what I do: dim = 2 ires = 96 xmin, xmax = -200e3, 200e3 elementMesh = uw.mesh.FeMesh_Cartesian(elementType = 'Q1/dQ0', print linearMesh.specialSets.keys() Output: ['MaxI_VertexSet', 'MinI_VertexSet', 'AllWalls', 'MinJ_VertexSet', 'MaxJ_VertexSet', 'Empty'] I know it's more of cell than a vertex for dQ0, but it would be useful to have. For example, I'm trying to get the average pressure along a wall: np.average(pressureField[constantMesh.specialSets["MaxJ_VertexSet"]]) and it fails on a KeyError. — |
Right, I see, something more like this? np.average(pressureField.data.reshape((jres, ires))[-1,:]) # get the average pressure at the top of the domain. Just a note - the above is slightly confusing, as numpy uses matrix row col ordering, where as the elements are x y, so some backwards indexing is required. Cheers! |
Luke you can also do a volume integral, but only over the required element. Something like this perhaps
This will also work in parallel. We will have surface integrals up and running shortly. |
One real disadvantage of the numpy interface is having to handle communication explicitly (closely followed by loss of information about the context of the array data). The surface integral approach is the obvious way to go. The trickiness of the implementation is a warning to me that if we don’t do it in the C code, then it will be badly butchered in a thousand different python codes ! L On 30 September 2015 at 5:38:13 pm, jmansour (notifications@github.commailto:notifications@github.com) wrote: This will also work in parallel. We will have surface integrals up and running shortly. Professor Louis Moresi |
Sorry for the spamming!
Here's what I do:
Output:
I know it's more of cell than a vertex for dQ0, but it would be useful to have. For example, I'm trying to get the average pressure along a wall:
and it fails on a KeyError.
The text was updated successfully, but these errors were encountered: