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

This commit is contained in:
andy
2013-03-27 15:51:30 +00:00
5 changed files with 129 additions and 18 deletions

View File

@ -156,6 +156,47 @@ timeVaryingMappedFixedValuePointPatchField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::autoMap
(
const pointPatchFieldMapper& m
)
{
fixedValuePointPatchField<Type>::autoMap(m);
if (startSampledValues_.size())
{
startSampledValues_.autoMap(m);
endSampledValues_.autoMap(m);
}
// Clear interpolator
mapperPtr_.clear();
startSampleTime_ = -1;
endSampleTime_ = -1;
}
template<class Type>
void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::rmap
(
const pointPatchField<Type>& ptf,
const labelList& addr
)
{
fixedValuePointPatchField<Type>::rmap(ptf, addr);
const timeVaryingMappedFixedValuePointPatchField<Type>& tiptf =
refCast<const timeVaryingMappedFixedValuePointPatchField<Type> >(ptf);
startSampledValues_.rmap(tiptf.startSampledValues_, addr);
endSampledValues_.rmap(tiptf.endSampledValues_, addr);
// Clear interpolator
mapperPtr_.clear();
startSampleTime_ = -1;
endSampleTime_ = -1;
}
template<class Type> template<class Type>
void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::checkTable() void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::checkTable()
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -167,6 +167,23 @@ public:
void checkTable(); void checkTable();
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const pointPatchFieldMapper&
);
//- Reverse map the given PointPatchField onto
// this PointPatchField
virtual void rmap
(
const pointPatchField<Type>&,
const labelList&
);
// Evaluation functions // Evaluation functions
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,12 +41,8 @@ void Foam::refinementFeatures::read
fileName featFileName(dict.lookup("file")); fileName featFileName(dict.lookup("file"));
set {
( IOobject featObj
featI,
new featureEdgeMesh
(
IOobject
( (
featFileName, // name featFileName, // name
io.time().constant(), // instance io.time().constant(), // instance
@ -55,9 +51,21 @@ void Foam::refinementFeatures::read
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) );
autoPtr<edgeMesh> eMeshPtr = edgeMesh::New(featObj.filePath());
set
(
featI,
new featureEdgeMesh
(
featObj,
eMeshPtr->points(),
eMeshPtr->edges()
) )
); );
}
const featureEdgeMesh& eMesh = operator[](featI); const featureEdgeMesh& eMesh = operator[](featI);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -191,6 +191,35 @@ externalWallHeatFluxTemperatureFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFvPatchScalarField::autoMap(m);
q_.autoMap(m);
h_.autoMap(m);
Ta_.autoMap(m);
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
const externalWallHeatFluxTemperatureFvPatchScalarField& tiptf =
refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
q_.rmap(tiptf.q_, addr);
h_.rmap(tiptf.h_, addr);
Ta_.rmap(tiptf.Ta_, addr);
}
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
{ {
if (updated()) if (updated())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -185,6 +185,22 @@ public:
// Member functions // Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchScalarField&,
const labelList&
);
// Evaluation functions // Evaluation functions
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field