From 2838c4554cbc07e0d83f0cdbdddf277ec35fc062 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 24 May 2017 14:28:28 +0100 Subject: [PATCH] BUG: pointConstraints: resize all constraints arrays. Fixes #480. --- .../volPointInterpolation/pointConstraints.C | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C index 47d9ab90d9..cd4090a7c8 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -233,7 +233,16 @@ void Foam::pointConstraints::makePatchPatchAddressing() // Allocate new constraint if (patchPatchPoints.size() <= pppi) { + // Check if not enough space. This + // can occasionally happen if -coupled points connect + // to the inside of a patch -these coupled points also + // carry a constraint patchPatchPoints.setSize(pppi+100); + patchPatchPointConstraints_.setSize + ( + pppi+100, + pointConstraint() + ); } patchPatchPointSet.insert(meshPointi, pppi); patchPatchPoints[pppi] = meshPointi;