CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Cannot refineMesh with useHexTopology true ver141 (

naoki December 5, 2007 05:03

I've used refineMesh utility o
I've used refineMesh utility of OpenFOAM-1.4, and it has worked well.
However, when I tried refineMesh utility using v.1.4.1, it didn't work well.

In system/refineMeshDict, "useHexTopology" is true, and "geometricCut" is false.

The error message I got is the following:

Exec : refineMesh . . -dict
Date : Dec 05 2007
Time : 17:11:33
Host : hoge
PID : 10800
Root : /home/ohnishi/test/refineTest
Case : .
Nprocs : 1
Create time

Create polyMesh for time = 0

Mesh edge statistics:
x aligned : number:4620 minLen:0.5 maxLen:0.5
y aligned : number:4410 minLen:0.5 maxLen:0.5
z aligned : number:4620 minLen:0.5 maxLen:0.5
other : number:0 minLen:1e+15 maxLen:-1e+15

Refining according to refineMeshDict

Read 2000 cells from cellSet "constant/polyMesh/sets/c0"

Writing refined cells (2537) to cellSet "0.005/polyMesh/sets/refinedCells"

#0 Foam::error::printStack(Foam: in "/home/ohnishi/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/ohnishi/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/"
#2 __restore_rt at sigaction.c:0
#3 main in "/home/ohnishi/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/refineMe sh"
#4 __libc_start_main in "/lib64/"
#5 Foam::regIOobject::readIfModified() in "/home/ohnishi/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/refineMe sh"

Then, now I try refineMesh with "useHexTopology false", and it looks working fine.
So, I wonder there are any bugs in somewhere concerned with "useHexTopylogy".



mattijs December 6, 2007 05:47

Can you send me a simple case
Can you send me a simple case where this happens?

mattijs December 7, 2007 06:53

Dear Naoki Onishi, thanks f
Dear Naoki Onishi,

thanks for the testcase. The bug was just in the picking up of the cells to refine. Replace 1.4.1 dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C with attached version multiDirRefinement.C

jaswi June 11, 2008 03:26

Dear Mattijs Good Morning (
Dear Mattijs

Good Morning (guess we are in same time zone)

I am having trouble with running nozzle2D test case and problem lies where the Allrun script executes the refineMesh . nozzle2D step.

The error says:

Exec : refineMesh . nozzleFlow2D -dict
Root : /home/openfoam/OpenFOAM/OpenFOAM-1.4.1/tutorials/lesInterFoam
Case : nozzleFlow2D
Nprocs : 1
Create time

Create polyMesh for time = 0

Mesh edge statistics:
x aligned : number:4987 minLen:4e-05 maxLen:4.0039947e-05
y aligned : number:15200 minLen:1.1640181e-06 maxLen:5.3384144e-05
z aligned : number:7600 minLen:6.2039102e-07 maxLen:0.00013971502
other : number:10088 minLen:4.0040048e-05 maxLen:4.0320766e-05

Refining according to refineMeshDict

Read 3537 cells from cellSet "constant/polyMesh/sets/c0"

Global Coordinate system:
normal : (0 0 1)
tan1 : (1 0 0)
tan2 : (0 1 0)

--> FOAM FATAL ERROR : Cannot move points: size of given point list smaller than the number of active points

From function primitiveMesh::movePoints(const pointField& newPoints, const pointField& oldPoints)
in file meshes/primitiveMesh/primitiveMesh.C at line 251.

FOAM aborting

Forum search lead me to this post where you have posted the corrected version of dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C

I did as suggested but recompiling the library gives the following error:

openfoam@nari:~/OpenFOAM/OpenFOAM-1.4.1/src/dynamicMesh> wmake libso
Making dependency list for source file meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C
SOURCE=meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/openfoam/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/openfoam/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/openfoam/OpenFOAM/OpenFOAM-1.4.1/src/triSurface/lnInclude -IlnInclude -I. -I/home/openfoam/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/multiDirRefinement.o
meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C: In member function 'void Foam::multiDirRefinement::refineHex8(Foam::polyMes h&, const Foam::labelList&, bool)':
meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C:351: error: 'class Foam::polyTopoChange' has no member named 'changeMesh'
make: *** [Make/linux64GccDPOpt/multiDirRefinement.o] Error 1


Please , any clues what I am doing wrong

With Best Regards

jaswi June 11, 2008 03:50

Hallo Mattijs Update to the
Hallo Mattijs

Update to the above posted message:

I am running the development version.

I just tried the same tutorial in the official version and it went through. No error messages as such from the refineMesh utility The log.refineMesh is clean and case is running.

Sorry for the incorrect post. Perhaps there is some incompatibilty between the src/dynamicMesh folders of official and development version. (Just a guess, apologies if that is not the case).

Please do not look into this matter for now. I will run diff over the related classes and report the outcome.


Best Regards

mattijs June 11, 2008 04:07

Thanks for letting me know. Th
Thanks for letting me know. The handling of retired points is probably not consistent in 1.4.1. If you don't care about them you can usually trim them by running subsetMesh with a cellset containing all cells.

All times are GMT -4. The time now is 20:59.