error DetectExtrudeStructure

Numerical methods and mathematical models of Elmer
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

error DetectExtrudeStructure

Post by denis.cohen »

Hello,

I am using the StructureMeshMapper to create a 3d mesh by interpolating between two DEMs.
I am getting this error:
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
StructuredMeshMapper: ---------------------------------------
StructuredMeshMapper: Performing mapping on a structured mesh
StructuredMeshMapper: ---------------------------------------
DetectExtrudedStructure: Determining extruded structure
DetectExtrudedStructure: Unit vector of direction: 0.000 0.000 1.000
DetectExtrudedStructure: determine up and down pointers
DetectExtrudedStructure: determine top and bottom pointers
DetectExtrudedStructure: Layered structure detected in 0 cycles
DetectExtrudedStructure: Try to increase value for > Dot Product Tolerance <
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
Before the StructureMeshMapper I am using the Grid2DInterpolator. Here is the relevant part of my sif file
Solver 1
!------------------------------------------
! Read DEMs
!------------------------------------------
Exec Solver = Before Simulation
Equation = "Read DEM"
Procedure = "ElmerIceSolvers" "Grid2DInterpolator"

! Ice thickness
Variable 1 = String "ZsDEM"
Variable 1 data file = File "/home/dcohen/research/projects/nagra/data/unepgrid/RhineBasin3/source/version1/icethick.xyz"
Variable 1 x0 = Real 645462.50d0
Variable 1 y0 = Real 114662.50d0
Variable 1 lx = Real 189750.0d0
Variable 1 ly = Real 227550.0d0
Variable 1 Nx = Integer 3796
Variable 1 Ny = Integer 4552

! Bedrock
Variable 2 = String "bedrockDEM"
Variable 2 data file = File "/home/dcohen/research/projects/nagra/data/unepgrid/RhineBasin3/source/version1/bed_pd.xyz"
Variable 2 x0 = Real 645462.50d0
Variable 2 y0 = Real 114662.50d0
Variable 2 lx = Real 189750.0d0
Variable 2 ly = Real 227550.0d0
Variable 2 Nx = Integer 3796
Variable 2 Ny = Integer 4552
End

Solver 2
!------------------------------------------
! Extrude mesh
!------------------------------------------
Exec Solver = "Before All"
Equation = "MapCoordinate"
Procedure = "StructuredMeshMapper" "StructuredMeshMapper"

Active Coordinate = Integer 3
Mesh Velocity Variable = String "dSdt"
Mesh Update Variable = String "dS"
Mesh Velocity First Zero = Logical True
End
The interpolator works fine I guess since I get the message "Grid2DInterpolator: ----------ALL DONE----------"

Thanks for any help on this.

Denis
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: error DetectExtrudeStructure

Post by raback »

Hi Denis

Yes, there seems to be a problem. Where does the initial mesh come from and can you confirm that it is extruded in the z-direction.

-Peter
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: error DetectExtrudeStructure

Post by denis.cohen »

Hi Peter,

Here is how I created the mesh.
1. Create a 2d mesh with gmsh
2. partition the 2d mesh with ElmerGrid 2 2
3. Run the sif file

I have added Extrude Coordinate Index = Integer 3 in the Simulation section and can confirm that it extrudes in the 3rd direction.

I have also increased the value of Dot Product Tolerance in the StructureMeshMapper section to some really high number but then Elmer crashed in the first iteration.
[Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
Grid2DInterpolator: ----------ALL DONE----------
StructuredMeshMapper: ---------------------------------------
StructuredMeshMapper: Performing mapping on a structured mesh
StructuredMeshMapper: ---------------------------------------
DetectExtrudedStructure: Determining extruded structure
DetectExtrudedStructure: Unit vector of direction: 0.000 0.000 1.000
DetectExtrudedStructure: determine up and down pointers
DetectExtrudedStructure: determine top and bottom pointers
DetectExtrudedStructure: Layered structure detected in 526 cycles
DetectExtrudedStructure: counting top and bottom bodes
DetectExtrudedStructure: Setting pointer structures
DetectExtrudedStructure: Top and bottom pointer init time: 0.0000000000000000
DetectExtrudedStructure: Top and bottom pointer init rounds: 526
DetectExtrudedStructure: Number of nodes at the top: 40
DetectExtrudedStructure: Number of nodes at the bottom: 50
StructuredMeshMapper: Active coordinate mapping time: 0.0000000000000000
ListToCRSMatrix: Matrix format changed from CRS to List
ListToCRSMatrix: Number of entries in coupled matrix: 29997
ListToCRSMatrix: Matrix format changed from List to CRS
ComputeNormalSolver: Computing Normal Vector for Nodes
ComputeNormalSolver: End
MAIN:
MAIN: -------------------------------------
MAIN: Time: 1/5 126230.39999999999
MAIN: -------------------------------------
MAIN:
StructuredProjectToPlane: ------------------------------------------
StructuredProjectToPlane: Performing projection on a structured mesh
StructuredProjectToPlane: ------------------------------------------
DetectExtrudedStructure: Determining extruded structure
DetectExtrudedStructure: Unit vector of direction: 0.000 0.000 1.000
DetectExtrudedStructure: determine up and down pointers
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
DetectExtrudedStructure: determine top and bottom pointers
DetectExtrudedStructure: Layered structure detected in 0 cycles
DetectExtrudedStructure: Try to increase value for > Dot Product Tolerance <
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
ERROR:: DetectExtrudedStructure: Zero rounds implies unsuccesfull operation
--------------------------------------------------------------------------
Thanks

Denis
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: error DetectExtrudeStructure

Post by raback »

Hi Denis

Ok, if your "dot product tolerance" is too large you may get something strange. The idea is that two nodes are assumed to be in the same line if the dot product between [0 0 1] and the vector has almost the length of the vector. So a tolerance should always be 0<eps<<1. Whether it is 1e-8 or 0.01 depends on the accuracy of the extrusion. Too small value might not detect all extruded lines while too big a value will detect wrong lines.

-Peter
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: error DetectExtrudeStructure

Post by denis.cohen »

Hello Peter,
Thanks for the tip, however, I've tried every value between 10-1 and 10-8 and get the same problem.
I've checked that the x,y coord are identical in the two DEM so I don't know what could be wrong.
Any other ideas?

Thanks

Denis
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: error DetectExtrudeStructure

Post by raback »

Hi Denis

Maybe you could sent the mesh and sif files to me for inspection. The routine should be robust and I'm somewhat puzzled that it can fail...

-Peter
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: error DetectExtrudeStructure

Post by denis.cohen »

Hi Peter,

I've attached the mesh2d.tar.gz and the sif file.
The DEMS are rather large (344 M).
May be my sif file has some obvious problem that you can spot.

Thanks

Denis
Attachments
test.sif
(25.69 KiB) Downloaded 305 times
mesh2d.tar.gz
(56.51 KiB) Downloaded 308 times
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: error DetectExtrudeStructure

Post by raback »

Hi Denis

The problem was rather small but often these are difficult to track: the keyword prefix is "Extruded" not "Extrude". These should work in the Simulation section:

Code: Select all

  Extruded Mesh Levels = 12 
  Extruded Mesh Ratio = Real 4.0
  Extruded Coordinate Index = Integer 3
  Extruded Min Coordinate = Real 0.0
  Extruded Max Coordinate = Real 1.0e5
The current trunk version has all keywords defined so you could leave the type unset. This is often a good solution to ensure that right keywords are used.

-Peter
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: error DetectExtrudeStructure

Post by denis.cohen »

Hi Peter,

Indeed a small stupid mistake.
That + playing with the dot product solved this problem.
However, I am puzzled by another, which again may have a simple answer:
In the NS solver I get this error:
FlowSolve: -------------------------------------
FlowSolve: NAVIER-STOKES ITERATION 1
FlowSolve: -------------------------------------
FlowSolve:
FlowSolve: Starting Assembly...
FlowSolve: Assembly:
DefaultFinishBulkAssembly: Saving bulk values for: navier-stokes
FlowSolve: Assembly done
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
SetNodalLoads: Checking loads for: velocity 1
SetNodalLoads: Checking loads for: velocity 2
SetNodalLoads: Checking loads for: velocity 3
SetNodalLoads: Checking loads for: pressure
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
FlowSolve: Dirichlet conditions done
SolveSystem: Solution trivially zero!
FlowSolve: iter: 1 Assembly: (s) 0.29 0.29
FlowSolve: iter: 1 Solve: (s) 0.01 0.01
FlowSolve: Result Norm : 0.0000000000000000
FlowSolve: Relative Change : 0.0000000000000000
ListToCRSMatrix: Matrix format changed from CRS to List
ListToCRSMatrix: Number of entries in coupled matrix: 222768
ListToCRSMatrix: Matrix format changed from List to CRS
FreeSurfaceSolver (fs): Velocity implicity (1=fully implicit)= 1.00
FreeSurfaceSolver (fs): Using Dirichlet method for limitation
FreeSurfaceSolver (fs): Using horizontal Eulerian Formulation
FreeSurfaceSolver (fs): Mesh dimension: 3
FreeSurfaceSolver (fs): Memory allocations done
FreeSurfaceSolver (fs): Non-linear Iteration 1 out of max. 100
FreeSurfaceSolver (fs): start assembly
ERROR:: ElementMetric: Degenerate 3D element: 1
ElementMetric: DetG: -1.241E-24
ElementMetric: Node: 1 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 2 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 3 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 4 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 5 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 6 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 2 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 3 dCoord: -2.166E+03 1.496E+03 0.000E+00
ElementMetric: Node: 4 dCoord: 0.000E+00 0.000E+00 0.000E+00
ElementMetric: Node: 5 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 6 dCoord: -2.166E+03 1.496E+03 0.000E+00
ERROR:: ElementMetric: Degenerate 3D element: 1
ElementMetric: DetG: -1.241E-24
ElementMetric: Node: 1 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 2 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 3 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 4 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 5 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 6 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 2 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 3 dCoord: -2.166E+03 1.496E+03 0.000E+00
ElementMetric: Node: 4 dCoord: 0.000E+00 0.000E+00 0.000E+00
ElementMetric: Node: 5 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 6 dCoord: -2.166E+03 1.496E+03 0.000E+00
ERROR:: ElementMetric: Degenerate 3D element: 1
ElementMetric: DetG: -1.241E-24
ElementMetric: Node: 1 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 2 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 3 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 4 Coord: 7.185E+05 2.206E+05 0.000E+00
ElementMetric: Node: 5 Coord: 7.165E+05 2.201E+05 0.000E+00
ElementMetric: Node: 6 Coord: 7.163E+05 2.221E+05 0.000E+00
ElementMetric: Node: 2 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 3 dCoord: -2.166E+03 1.496E+03 0.000E+00
ElementMetric: Node: 4 dCoord: 0.000E+00 0.000E+00 0.000E+00
ElementMetric: Node: 5 dCoord: -2.020E+03 -5.210E+02 0.000E+00
ElementMetric: Node: 6 dCoord: -2.166E+03 1.496E+03 0.000E+00
ERROR:: ElementInfo: Bubbles for element: 706 are not implemented.
ERROR:: ElementInfo: Please use p-element basis instead.
ERROR:: ElementMetric: Degenerate 3D element: 1
ERROR:: ElementMetric: Degenerate 3D element: 1
ERROR:: ElementInfo: Bubbles for element: 706 are not implemented.
ERROR:: ElementInfo: Please use p-element basis instead.
--------------------------------------------------------------------------


I've cheched that my lower DEM is always below my upper DEM.

How else can this happen?

Thanks

Denis
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: error DetectExtrudeStructure

Post by raback »

Hi Denis

Does this happen immediately after the SructuredMeshMapper solver? In the sif file there was also the MeshUpdate solver, it can also mess some things up.

Perhaps you can use the StructuredProjectToPlane to compute the height of the mesh.

-Peter
Post Reply