Ensure fields are initialized before mapping to avoid SIGFPE caused by uninitialized values

This commit is contained in:
Henry 2014-12-16 14:32:39 +00:00
parent 24c80b1e4d
commit 46bf38d5de
5 changed files with 97 additions and 1 deletions

View File

@ -9,6 +9,6 @@ cleanCase
cd ../hopperEmptying
cleanCase
rm -rf 0/lagrangian
rm -rf 0
# ----------------------------------------------------------------- end-of-file

View File

@ -12,6 +12,8 @@ runApplication reconstructPar -latestTime
cd ..
cd hopperEmptying
rm -rf 0
cp -r 0.org 0
runApplication blockMesh
runApplication mapFields ../hopperInitialState -sourceTime latestTime
runApplication decomposePar

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object mu;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 1.2e-05;
boundaryField
{
walls
{
type calculated;
value uniform 1.2e-05;
}
frontAndBack
{
type calculated;
value uniform 1.2e-05;
}
inlet
{
type calculated;
value uniform 1.2e-05;
}
outlet
{
type calculated;
value uniform 1.2e-05;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField uniform 1.2;
boundaryField
{
walls
{
type calculated;
value uniform 1.2;
}
frontAndBack
{
type calculated;
value uniform 1.2;
}
inlet
{
type calculated;
value uniform 1.2;
}
outlet
{
type calculated;
value uniform 1.2;
}
}
// ************************************************************************* //