[MOAB-dev] Mesh Element Center Coordinates

Kevin McLaughlin mclaughlink at fusion.gat.com
Tue Feb 7 10:57:27 CST 2023


Vijay, 

Great, that's what I was looking for, thank you!

Kevin McLaughlin
office: 858-455-3641
mclaughlink at fusion.gat.com

----- Original Message -----
From: "Vijay S. Mahadevan" <vijay.m at gmail.com>
To: "Kevin McLaughlin" <mclaughlink at fusion.gat.com>, "moab-dev" <moab-dev at mcs.anl.gov>
Sent: Tuesday, February 7, 2023 8:50:52 AM
Subject: Re: [MOAB-dev] Mesh Element Center Coordinates

The PyMOAB interface for the method is straightforward. Take a look at the
test [1].

Vijay

[1]
https://bitbucket.org/fathomteam/moab/src/9b4ab4aefc2a7a1445a9fa8e9b992e3eda580b24/pymoab/tests/test_core.py#lines-624

On Tue, Feb 7, 2023, 11:40 Kevin McLaughlin <mclaughlink at fusion.gat.com>
wrote:

> Thank you Vijay. One follow up question: is get_coords accessible from
> pymoab, and if so, how can I do that? Thanks!
>
> Best,
>
> Kevin McLaughlin
> office: 858-455-3641
> mclaughlink at fusion.gat.com
>
> ----- Original Message -----
> From: "Vijay S. Mahadevan" <vijay.m at gmail.com>
> To: "Kevin McLaughlin" <mclaughlink at fusion.gat.com>
> Cc: "moab-dev" <moab-dev at mcs.anl.gov>
> Sent: Monday, February 6, 2023 5:37:46 PM
> Subject: Re: [MOAB-dev] Mesh Element Center Coordinates
>
> You should be able to just pass in element entity handles to get_coords and
> get the centroid directly. It already computes the vertex averages for you.
>
> Vijay
>
>
> On Mon, Feb 6, 2023, 16:58 Kevin McLaughlin <mclaughlink at fusion.gat.com>
> wrote:
>
> > Hello,
> >
> > Is there an easy way to get the center coordinates of mesh elements from
> a
> > MOAB mesh? I could write a script to parse the data and find the average
> > x,y,z coordinates of each node, or something like that, but I'm wondering
> > if a functionality like that already exists.
> >
> > Thank you for your help!
> >
> > Best,
> >
> > Kevin McLaughlin
> > office: 858-455-3641
> > mclaughlink at fusion.gat.com
> >
>


More information about the moab-dev mailing list