[MOAB-dev] coupler test can not work well

魏华祎 huayiwei1984 at gmail.com
Thu Jul 9 17:31:27 CDT 2015


Hi, Lulian,

Thanks very much for your help. It works well now.

I have another question, does mb coupler consider the conservation
law? For example, mass conservation.

In every quad of my mesh,  there is a constant mass density. When I
tansfer it from old mesh to new mesh, I need to keep the mass
conservation as much as possible.

In the above test, it is just a points interpolation. So I need to do
more work to keep the mass conservation, right?

Thanks again.

Best

Huayi

2015-07-09 22:47 GMT+08:00 Grindeanu, Iulian R. <iulian at mcs.anl.gov>:
> 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 魏华祎 [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 魏华祎 <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, 魏华祎 <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, 魏华祎 <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


More information about the moab-dev mailing list