[MOAB-dev] coupler test can not work well

Grindeanu, Iulian R. iulian at mcs.anl.gov
Thu Jul 9 09:47:03 CDT 2015


you used a different scenario
parallel comm needs to know what is the source set

If you load from file, that gets populated automatically; in your case, you create mesh in memory

so one issue:
pc0->partition_sets().insert(src_mesh);

also, you delete pc0 before mb, also mbc needs to be new too, otherwise it crashes (basically, mbc will be deleted when it goes out of scope, by that time mb and pc0 are gone)

see attached t1.cpp, it works as expected


________________________________________
From: moab-dev-bounces at mcs.anl.gov [moab-dev-bounces at mcs.anl.gov] on behalf of 껪µt [huayiwei1984 at gmail.com]
Sent: Thursday, July 09, 2015 8:44 AM
To: Vijay S. Mahadevan
Cc: MOAB Dev
Subject: [MOAB-dev] coupler test can not work well

Hi, MOAB Developer,

I  code a very simple test , please see the attachment.  The source
mesh is  following:

(-1, 1) ------------(0, 1)--------------(1, 1)
    |                     |                    |
    |                     |                    |
(-1, 0)-------------(0, 0)-------------(1, 0)
    |                     |                   |
    |                     |                   |
(-1, -1)------------(0, -1)------------(1, -1)

In every quad, there is a constant. For example, [1.0, 2.0, 2.0, 3.0]
( from left to right and bottom to up) .

I just change point (0, 0)  as (0.3, 0.4) to get the target mesh.

I can compile it, but when I run it, it throw a segment error.

This is my first time to use mb coupler tool, and not sure what
mistake I have made, so I need your help.

Thanks very much.

Best

Huayi

2015-07-09 9:56 GMT+08:00 껪µt <huayiwei1984 at gmail.com>:
> My application mesh is a block structured mesh, which vertices will
> move and hence the mesh quality will become bad,  so I need to
> optimize the location of mesh vertices. Then I need to tansfer data
> from old mesh to new mesh. That's my problem.  My program is parallel
> and there is a structured quad mesh on each processor.  By the way,
> my program is not based on Moab. But I want to use
> the coupler tool in moab. So fristly I need transfer my mesh into Moab.
>
> At present, I explicityly transfer my every block mesh to the
> repesentation of vertices and coonecicity, just as your suggection. I
> am writing a test first. Dose you have better idea about it?
>
> 2015-07-09 9:36 GMT+08:00 Vijay S. Mahadevan <vijay.m at gmail.com>:
>> If you are asking about the ScdBox structure, I'm unsure. I don't
>> think we have a test for this. However, if you explicitly represent
>> the vertices and connectivity, usage of a structured grid is
>> transparent to MOAB interfaces and everything should work as is.
>>
>> What type of problems are you solving ? Are you using a logically
>> structured or performing stencil computations ?
>>
>> Vijay
>>
>> On Wed, Jul 8, 2015 at 8:33 PM, 껪µt <huayiwei1984 at gmail.com> wrote:
>>> Hi, Vijay,
>>>
>>> Thanks for your reply.  So it also work on Structured Mesh
>>> Representation of Moab?
>>>
>>> Best
>>>
>>> Huayi
>>>
>>> 2015-07-09 6:50 GMT+08:00 Vijay S. Mahadevan <vijay.m at gmail.com>:
>>>> No it should work for any dimension and is not restricted to 3-D. Have
>>>> you tried using the coupler for your problem ? If you have issues,
>>>> send us a test case and the meshes. You can also use mbcoupler_test to
>>>> verify whether the solution defined on your source mesh is being
>>>> transferred correctly onto the target mesh.
>>>>
>>>> Vijay
>>>>
>>>> On Wed, Jul 8, 2015 at 5:33 PM, 껪µt <huayiwei1984 at gmail.com> wrote:
>>>>> Hi, There,
>>>>>
>>>>> I am trying to use Moab Coupler transfer data between 2d meshes, but I
>>>>> am not sure if  it works on 2d mesh.
>>>>>
>>>>> Please give me some suggestion, thanks very much.
>>>>>
>>>>> Best
>>>>>
>>>>> Huayi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t1.cpp
Type: text/x-c++src
Size: 4254 bytes
Desc: t1.cpp
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150709/bcf936f5/attachment-0001.cpp>


More information about the moab-dev mailing list