Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2011-09-02 13:43:35 +01:00
6 changed files with 69 additions and 67 deletions

View File

@ -92,10 +92,6 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
);
if (elementList_.empty())
{
elementList_.setSize(probeLocations().size());
forAll(probeLocations(), probeI)
{
const point sample = probeLocations()[probeI];
@ -153,7 +149,6 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
}
}
}
}
// Find nearest.
@ -171,25 +166,21 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
Info<< " " << sampleI << " coord:"<< operator[](sampleI)
<< " found on processor:" << procI
<< " in local cell/face:" << localI
<< " with cc:" << nearest[sampleI].first().rawPoint() << endl;
<< " with fc:" << nearest[sampleI].first().rawPoint() << endl;
}
}
// Check if all patchProbes have been found.
// Extract any local faces to sample
elementList_.setSize(nearest.size(), -1);
forAll(nearest, sampleI)
{
label localI = -1;
if (nearest[sampleI].second().second() == Pstream::myProcNo())
{
localI = nearest[sampleI].first().index();
// Store the face to sample
elementList_[sampleI] = nearest[sampleI].first().index();
}
if (elementList_.empty())
{
elementList_.setSize(probeLocations().size());
}
elementList_[sampleI] = localI;
}
}
@ -206,6 +197,12 @@ Foam::patchProbes::patchProbes
:
probes(name, obr, dict, loadFromFiles)
{
// When constructing probes above it will have called the
// probes::findElements (since the virtual mechanism not yet operating).
// Not easy to workaround (apart from feeding through flag into constructor)
// so clear out any cells found for now.
elementList_.clear();
read(dict);
}
@ -230,6 +227,7 @@ void Foam::patchProbes::write()
void Foam::patchProbes::read(const dictionary& dict)
{
dict.lookup("patchName") >> patchName_;
probes::read(dict);
}

View File

@ -206,7 +206,7 @@ public:
}
//- Cells to be probed (obtained from the locations)
const labelList& elemets() const
const labelList& elements() const
{
return elementList_;
}

View File

@ -175,7 +175,9 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
const scalarField& gamma =
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
const scalarField Ep(emissivity()/(2.0*(2.0 - emissivity())));
const scalarField temissivity = emissivity();
const scalarField Ep(temissivity/(2.0*(2.0 - temissivity)));
// Set value fraction
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);

View File

@ -176,7 +176,9 @@ void Foam::MarshakRadiationFixedTMixedFvPatchScalarField::updateCoeffs()
const scalarField& gamma =
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
const scalarField Ep(emissivity()/(2.0*(scalar(2.0) - emissivity())));
const scalarField temissivity = emissivity();
const scalarField Ep(temissivity/(2.0*(scalar(2.0) - temissivity)));
// Set value fraction
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);

View File

@ -194,7 +194,7 @@ updateCoeffs()
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
scalarList temissivity = emissivity();
scalarField temissivity = emissivity();
forAll(Iw, faceI)
{

View File

@ -194,7 +194,7 @@ updateCoeffs()
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
);
scalarList temissivity = emissivity();
scalarField temissivity = emissivity();
forAll(Iw, faceI)
{