View Issue Details

IDProjectCategoryView StatusLast Update
0004224OpenFOAMBugpublic2025-03-07 18:07
Reportercgoessni Assigned Tohenry  
PrioritylowSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0004224: timeVaryingMappedFixedValue crashes when used with meshToMesh mapping
DescriptionWhen using timeVaryingMappedFixedValue patch field type, it crashes after a meshToMesh mapping, although the map() and reset() methods seem to be implemented?

Steps To ReproduceRun the attached case. It produces the following stack trace / error (with debug build):

Constructing face momentum rhoUf
Courant Number mean: 0 max: 0
Mapping to mesh time 540
Creating cellsToCells between source mesh and target mesh region0 using intersection
    cellsToCells: Calculating couplings between 27544 source cells and 27544 target cells
        Overlapping volume = 0.000631298
        55144 couplings calculated in 284.52s
Creating patchToPatch between source patch piston and target patch piston using intersection
    patchToPatch: Calculating couplings between 1326 source faces and 1326 target faces
        Source min/average/max coverage = 1/1/1
        Target min/average/max coverage = 1/1/1
        Source average openness/error/depth/angle = 5.85117e-17/2.85021e-16/4.54773e-17/1.34824e-07
        Source max openness/error/depth/angle = 4.31924e-16/4.46657e-15/6.50994e-16/1.70755e-06
        2690 couplings calculated in 9.22s
Creating patchToPatch between source patch liner and target patch liner using intersection
    patchToPatch: Calculating couplings between 2710 source faces and 2710 target faces
        Source min/average/max coverage = 1/1/1
        Target min/average/max coverage = 1/1/1
        Source average openness/error/depth/angle = 6.67853e-17/1.40239e-15/3.97134e-16/2.93568e-07
        Source max openness/error/depth/angle = 5.25323e-16/6.05986e-14/5.65142e-15/1.70755e-06
        5456 couplings calculated in 20.02s
Creating patchToPatch between source patch cylinderHead and target patch cylinderHead using intersection
    patchToPatch: Calculating couplings between 2184 source faces and 2184 target faces
        Source min/average/max coverage = 0.991916/1.00033/1.76943
        Target min/average/max coverage = 0.849015/1.00003/1.10954
        Source average openness/error/depth/angle = 1.07309e-16/0.0103161/0.000376952/0.191026
        Source max openness/error/depth/angle = 1.85568e-15/3.67541/0.245106/68.4467
        4596 couplings calculated in 15.93s


--> FOAM FATAL ERROR:
attempt to access element from zero sized list

    From function void Foam::UList<T>::checkIndex(Foam::label) const [with T = double; Foam::label = int]
    in file /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UListI.H at line 100.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at /opt/OpenFOAM/OpenFOAM-dev/src/OSspecific/POSIX/printStack.C:218
#1 Foam::error::abort() at /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/error.C:206
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/errorManip.H:85 (discriminator 4)
#3 Foam::UList<double>::checkIndex(int) const at /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UListI.H:102
#4 Foam::UList<double>::operator[](int) const at /opt/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UListI.H:201
#5 ? at /opt/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude/patchToPatchToolsTemplates.C:121 (discriminator 3)
#6 Foam::tmp<Foam::Field<double> > Foam::patchToPatch::srcToTgt<double>(Foam::Field<double> const&) const at /opt/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude/patchToPatchTemplates.C:42
#7 void Foam::patchToPatchNormalisedFieldMapper::map<double>(Foam::Field<double>&, Foam::Field<double> const&) const at /opt/OpenFOAM/OpenFOAM-dev/src/meshTools/patchToPatchFieldMapper/patchToPatchNormalisedFieldMapper.C:37
#8 Foam::patchToPatchNormalisedFieldMapper::operator()(Foam::Field<double>&, Foam::Field<double> const&) const at /opt/OpenFOAM/OpenFOAM-dev/src/meshTools/patchToPatchFieldMapper/patchToPatchNormalisedFieldMapper.C:57
#9 Foam::timeVaryingMappedFvPatchField<double>::map(Foam::timeVaryingMappedFvPatchField<double> const&, Foam::fieldMapper const&) at /opt/OpenFOAM/OpenFOAM-dev/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFvPatchField.C:407
#10 Foam::timeVaryingMappedFixedValueFvPatchField<double>::map(Foam::fvPatchField<double> const&, Foam::fieldMapper const&) at /opt/OpenFOAM/OpenFOAM-dev/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C:105
#11 Foam::tmp<Foam::GeometricField<double, Foam::volMesh, Foam::Field> > Foam::fvMeshToFvMesh::srcToTgt<double>(Foam::GeometricField<double, Foam::volMesh, Foam::Field> const&) const at /opt/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude/fvMeshToFvMeshTemplates.C:194 (discriminator 2)
#12 void Foam::MeshToMeshMapVolFields<double>(Foam::fvMesh const&, Foam::fvMeshToFvMesh const&) at /opt/OpenFOAM/OpenFOAM-dev/src/fvMeshTopoChangers/meshToMesh/MeshToMeshMapGeometricFields.H:70 (discriminator 1)
#13 Foam::fvMeshTopoChangers::meshToMesh::update() at /opt/OpenFOAM/OpenFOAM-dev/src/fvMeshTopoChangers/meshToMesh/meshToMesh_fvMeshTopoChanger.C:276 (discriminator 1)
#14 Foam::fvMesh::update() at /opt/OpenFOAM/OpenFOAM-dev/src/finiteVolume/fvMesh/fvMesh.C:645
#15 Foam::solvers::isothermalFluid::preSolve() at /opt/OpenFOAM/OpenFOAM-dev/applications/modules/isothermalFluid/isothermalFluid.C:326
#16 ? at /opt/OpenFOAM/OpenFOAM-dev/applications/solvers/foamRun/foamRun.C:129
#17 __libc_start_main in "/lib64/libc.so.6"
#18 ? at ??:?
TagsNo tags attached.

Activities

cgoessni

2025-03-07 06:26

reporter  

henry

2025-03-07 18:07

manager   ~0013543

Resolved by commit a16bc2dbda90c401f848416de4201f639ea13cb9

Issue History

Date Modified Username Field Change
2025-03-07 06:26 cgoessni New Issue
2025-03-07 06:26 cgoessni File Added: kivaTest_timeVaryingMappedWall_meshToMesh.tgz
2025-03-07 18:07 henry Assigned To => henry
2025-03-07 18:07 henry Status new => resolved
2025-03-07 18:07 henry Resolution open => fixed
2025-03-07 18:07 henry Fixed in Version => dev
2025-03-07 18:07 henry Note Added: 0013543