GEOS-DEV / GEOS-DEV/GEOS

VTK mesh redistribution with default partitionRefinement (segmentatation fault)

Open
#2,821 24 comments 0 reactions 4 assignees View on GitHub

@castelletto1 is already working on this.

Since Oct 22, 2024.

type: bug
Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

Describe the bug
Running GEOS in serial providing the mesh as VTK produces segmentation fault if the number of partitioning refinement iterations (partitionRefinement) is not 0 (default value 1).

To Reproduce
See incompressible single-phase flow example below.

@francoishamon, @klevzoff, @untereiner : have you observed this behavior before?

<?xml version="1.0" ?>

<Problem>
  <Solvers
    gravityVector="{ 0.0, 0.0, 0.0 }">
    <SinglePhaseFVM
      name="SinglePhaseFlow"
      logLevel="1"
      discretization="singlePhaseTPFA"
      targetRegions="{ Domain }">
      <NonlinearSolverParameters
        newtonTol="1.0e-6"
        newtonMaxIter="8"/>
      <LinearSolverParameters
        directParallel="0"/>
    </SinglePhaseFVM>
  </Solvers>

  <Mesh>
    <VTKMesh
      name="mesh"
      partitionRefinement="1"
      file="mesh.vtk"/>
  </Mesh>

  <Events
    maxTime="1.0">
    <PeriodicEvent
      name="outputs"
      timeFrequency="1.0"
      target="/Outputs/vtkOutput"/>

    <PeriodicEvent
      name="solverApplications"
      forceDt="1.0"
      target="/Solvers/SinglePhaseFlow"/>

  </Events>

  <NumericalMethods>
    <FiniteVolume>
      <TwoPointFluxApproximation
        name="singlePhaseTPFA"/>
    </FiniteVolume>
  </NumericalMethods>

  <ElementRegions>
    <CellElementRegion
      name="Domain"
      cellBlocks="{ 0_hexahedra, 1_hexahedra, 2_hexahedra }"
      materialList="{ water, rock }"/>
  </ElementRegions>

  <Constitutive>
    <CompressibleSinglePhaseFluid
      name="water"
      defaultDensity="1000"
      defaultViscosity="0.001"
      referencePressure="0.0"
      compressibility="0.0"
      viscosibility="0.0"/>

    <CompressibleSolidConstantPermeability
      name="rock"
      solidModelName="nullSolid"
      porosityModelName="rockPorosity"
      permeabilityModelName="rockPerm"/>

    <NullModel
      name="nullSolid"/>

    <PressurePorosity
      name="rockPorosity"
      defaultReferencePorosity="0.05"
      referencePressure="0.0"
      compressibility="0.0"/>

    <ConstantPermeability
      name="rockPerm"
      permeabilityComponents="{ 1.0e-15, 1.0e-15, 1.0e-15 }"/>
  </Constitutive>

  <FieldSpecifications>

   <FieldSpecification
      name="sourceTerm"
      objectPath="ElementRegions/Domain/0_hexahedra"
      fieldName="pressure"
      scale="5e6"
      setNames="{ all }"/>

   <FieldSpecification
      name="sinkTerm"
      objectPath="ElementRegions/Domain/2_hexahedra"
      fieldName="pressure"
      scale="-5e6"
      setNames="{ all }"/>
  </FieldSpecifications>

  <Outputs>
    <VTK
      name="vtkOutput"/>
  </Outputs>
</Problem>
# vtk DataFile Version 5.0
vtk domain
ASCII
DATASET STRUCTURED_POINTS

FIELD FieldData 1
CellLabels 2 3 string
0
injector
1
domain
2 
producer

DIMENSIONS 6 6 2
ORIGIN 0 0 0
SPACING 1 1 1

CELL_DATA 25
SCALARS attribute int 1
LOOKUP_TABLE default
0 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.