View Issue Details

IDProjectCategoryView StatusLast Update
0000052OpenFOAMBugpublic2010-10-07 17:59
Reporteruser47Assigned Touser4 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version9.10
Summary0000052: Crash using mapField -consistent with directMappedVelocityFlux patch type for U
DescriptionThe crash occurs when using mapField, to map the fields of 32^3 case to a 64^3 case.
My domain has dimensions 6 x 2 x 4.
The U inlet patch is defined as directMappedVelocityFlux.
When defining the patchType information in ./constant/polyMesh/boundary as:

inlet1
{
    type directMappedPatch;
    nFaces 2048;
    startFace 774144;
    sampleMode nearestPatchFace;
    sampleRegion region0;
    samplePatch outlet1;
    offset (0 0 0);
}

mapField crashes with the error:

--> FOAM FATAL ERROR:
Did not find sample (0 0.015625 0.03125) on any processor of region region0

    From function directMappedPatchBase::findSamples(const pointField&, labelList&, labelList&, pointField&)
    in file directMapped/directMappedPolyPatch/directMappedPatchBase.C at line 364.

Specifying a dummy offset of (1 0 0) does not work either and crashes with error:
--> FOAM FATAL ERROR:
Did not find sample (1 0.015625 0.03125) on any processor of region region0

    From function directMappedPatchBase::findSamples(const pointField&, labelList&, labelList&, pointField&)
    in file directMapped/directMappedPolyPatch/directMappedPatchBase.C at line 364.

Specifying a dummy offset of (2 0 0) DOES work..
Specifying a dummy offset of (10 0 0) -which is outside my computational domain- works as well.....

Please let me know if more information is need.

Kind regards,

Francois.
TagsMesh, Utility

Activities

user4

2010-10-04 14:18

  ~0000063

Can you attach a case so we can try it over here?

Thanks,

Mattijs

user47

2010-10-04 20:43

  ~0000064

Steps to reproduce:
- run blockMesh in channelFlow_32
- edit ./constant/polyMesh/boundary to change samplePatch from none to outlet1 for the inlet1 definition and from none to outlet2 in the inlet2 definition.
- run blockMesh in channelFlow_64
- edit ./constant/polyMesh/boundary to change samplePatch from none to outlet1 for the inlet1 definition and from none to outlet2 in the inlet2 definition.
- run mapFields -consistent ../channelFlow_32

By the way: pisoFoam will not run either, when the offset is specified as (0 0 0) for the cases described here-above

user47

2010-10-04 20:48

 

channelFlow.tar.gz (781,327 bytes)

user4

2010-10-05 09:26

  ~0000065

Your inlet and outlet patches are (6 0 0) m apart. If I specify the offset as (6 0 0) mapFields runs fine. The problem is that the 'nearestPatchFace' has no limit to its search span.

You can switch on the debug flag for directMappedPatchBase to see which face gets matched to which other face.

Mattijs

user47

2010-10-06 13:35

  ~0000070

Ok, I'm very sorry to reopen this topic, but I really think there is a bug somewhere.
The problem is, I can't fully understand why/where it comes from since I don't understand the relation between "offset" and "samplePatch".

Anyways, as Mattijs advised, I changed my ./constant/polyMesh/boundary file to:
    
inlet1
{
    type directMappedPatch;
    nFaces 2048;
    startFace 774144;
    sampleMode nearestPatchFace;
    sampleRegion region0;
    samplePatch outlet1;
    offset (6 0 0);
}
inlet2
{
    type directMappedPatch;
    nFaces 2048;
    startFace 776192;
    sampleMode nearestPatchFace;
    sampleRegion region0;
    samplePatch outlet2;
    offset (6 0 0);
}

Then, I decomposed my domain using decomposePar, and ran it with pisoFoam without a problem.
However, when reconstructing my domain with reconstructPar, it get the following error:

--> FOAM FATAL ERROR:
Did not find sample (6 1.01562 0.03125) on any processor of region region0

    From function directMappedPatchBase::findSamples(const pointField&, labelList&, labelList&, pointField&)
    in file directMapped/directMappedPolyPatch/directMappedPatchBase.C at line 364.

FOAM exiting

I didn't change anything from the files I uploaded except the offset definition, so you should be able to reproduce the error.

Please let me know if you need extra information.
Looking forward to your reply!

Francois.

user4

2010-10-06 14:35

  ~0000071

The patch tries to find a matching face or cell to for every face centre by adding the specified offset to the face centre and then finding the nearest cell or face.

I've pushed a fix to 17x so now reconstructPar should work.

(Commit a654f2c8b4fb35b86fd6a799c7e25080763a9137)

user4

2010-10-06 15:36

  ~0000074

commit a654f2c8b4fb35b86fd6a799c7e25080763a9137

Issue History

Date Modified Username Field Change
2010-10-04 14:11 user47 New Issue
2010-10-04 14:18 user4 Note Added: 0000063
2010-10-04 20:43 user47 Note Added: 0000064
2010-10-04 20:48 user47 File Added: channelFlow.tar.gz
2010-10-05 09:09 user4 Assigned To => user4
2010-10-05 09:09 user4 Status new => assigned
2010-10-05 09:26 user4 Note Added: 0000065
2010-10-05 09:26 user4 Status assigned => closed
2010-10-05 09:26 user4 Resolution open => no change required
2010-10-06 13:35 user47 Note Added: 0000070
2010-10-06 13:35 user47 Status closed => feedback
2010-10-06 13:35 user47 Resolution no change required => reopened
2010-10-06 14:35 user4 Note Added: 0000071
2010-10-06 15:36 user4 Note Added: 0000074
2010-10-06 15:36 user4 Status feedback => resolved
2010-10-06 15:36 user4 Fixed in Version => 1.7.x
2010-10-06 15:36 user4 Resolution reopened => fixed
2010-10-07 17:59 user2 Tag Attached: Mesh
2010-10-07 17:59 user2 Tag Attached: Utility