mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -506,6 +506,7 @@ $(constraintPointPatchFields)/empty/emptyPointPatchFields.C
|
|||||||
$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C
|
$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C
|
||||||
$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C
|
$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C
|
||||||
$(constraintPointPatchFields)/cyclic/cyclicPointPatchFields.C
|
$(constraintPointPatchFields)/cyclic/cyclicPointPatchFields.C
|
||||||
|
$(constraintPointPatchFields)/cyclicSlip/cyclicSlipPointPatchFields.C
|
||||||
$(constraintPointPatchFields)/processor/processorPointPatchFields.C
|
$(constraintPointPatchFields)/processor/processorPointPatchFields.C
|
||||||
|
|
||||||
derivedPointPatchFields = $(pointPatchFields)/derived
|
derivedPointPatchFields = $(pointPatchFields)/derived
|
||||||
|
|||||||
@ -36,6 +36,7 @@ SourceFiles
|
|||||||
#define basicSymmetryPointPatchField_H
|
#define basicSymmetryPointPatchField_H
|
||||||
|
|
||||||
#include "pointPatchField.H"
|
#include "pointPatchField.H"
|
||||||
|
#include "symmetryPointPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -120,6 +121,12 @@ public:
|
|||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return symmetryPointPatch::typeName;
|
||||||
|
}
|
||||||
|
|
||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
|
|||||||
@ -127,6 +127,14 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
//- Constraint handling
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return cyclicPointPatch::typeName;
|
||||||
|
}
|
||||||
|
|
||||||
//- Cyclic coupled interface functions
|
//- Cyclic coupled interface functions
|
||||||
|
|
||||||
//- Does the patch field perform the transfromation
|
//- Does the patch field perform the transfromation
|
||||||
|
|||||||
@ -0,0 +1,122 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "cyclicSlipPointPatchField.H"
|
||||||
|
#include "pointConstraint.H"
|
||||||
|
#include "transformField.H"
|
||||||
|
#include "symmTransformField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
cyclicSlipPointPatchField<Type>::cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(p, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
cyclicSlipPointPatchField<Type>::cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(p, iF, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
cyclicSlipPointPatchField<Type>::cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const cyclicSlipPointPatchField<Type>& ptf,
|
||||||
|
const pointPatch& p,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF,
|
||||||
|
const pointPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(ptf, p, iF, mapper)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
cyclicSlipPointPatchField<Type>::cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const cyclicSlipPointPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
cyclicPointPatchField<Type>(ptf, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void cyclicSlipPointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
|
{
|
||||||
|
const vectorField& nHat = this->patch().pointNormals();
|
||||||
|
|
||||||
|
tmp<Field<Type> > tvalues =
|
||||||
|
(
|
||||||
|
(
|
||||||
|
this->patchInternalField()
|
||||||
|
+ transform(I - 2.0*sqr(nHat), this->patchInternalField())
|
||||||
|
)/2.0
|
||||||
|
);
|
||||||
|
|
||||||
|
// Get internal field to insert values into
|
||||||
|
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
||||||
|
|
||||||
|
setInInternalField(iF, tvalues());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void cyclicSlipPointPatchField<Type>::applyConstraint
|
||||||
|
(
|
||||||
|
const label pointi,
|
||||||
|
pointConstraint& pc
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
pc.applyConstraint(this->patch().pointNormals()[pointi]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,154 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::cyclicSlipPointPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Specialisation of cyclic that constrains to the patch
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
cyclicSlipPointPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef cyclicSlipPointPatchField_H
|
||||||
|
#define cyclicSlipPointPatchField_H
|
||||||
|
|
||||||
|
#include "cyclicPointPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class cyclicSlipPointPatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class cyclicSlipPointPatchField
|
||||||
|
:
|
||||||
|
public cyclicPointPatchField<Type>
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("cyclicSlip");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given patchField<Type> onto a new patch
|
||||||
|
cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const cyclicSlipPointPatchField<Type>&,
|
||||||
|
const pointPatch&,
|
||||||
|
const DimensionedField<Type, pointMesh>&,
|
||||||
|
const pointPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual autoPtr<pointPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<pointPatchField<Type> >
|
||||||
|
(
|
||||||
|
new cyclicSlipPointPatchField<Type>
|
||||||
|
(
|
||||||
|
*this
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
cyclicSlipPointPatchField
|
||||||
|
(
|
||||||
|
const cyclicSlipPointPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, pointMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual autoPtr<pointPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, pointMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return autoPtr<pointPatchField<Type> >
|
||||||
|
(
|
||||||
|
new cyclicSlipPointPatchField<Type>
|
||||||
|
(
|
||||||
|
*this, iF
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- Update the patch field
|
||||||
|
virtual void evaluate
|
||||||
|
(
|
||||||
|
const Pstream::commsTypes commsType=Pstream::blocking
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
|
virtual void applyConstraint
|
||||||
|
(
|
||||||
|
const label pointi,
|
||||||
|
pointConstraint&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "cyclicSlipPointPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "cyclicSlipPointPatchFields.H"
|
||||||
|
#include "pointPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePointPatchFields(cyclicSlip);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef cyclicSlipPointPatchFields_H
|
||||||
|
#define cyclicSlipPointPatchFields_H
|
||||||
|
|
||||||
|
#include "cyclicSlipPointPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePointPatchFieldTypedefs(cyclicSlip);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -119,6 +119,17 @@ public:
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- Constraint handling
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -158,6 +158,15 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Constraint handling
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
|
|||||||
@ -122,6 +122,14 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
|
//- Constraint handling
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
|
|||||||
@ -336,9 +336,15 @@ public:
|
|||||||
const Field<Type1>& pF
|
const Field<Type1>& pF
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the type of the calculated for of pointPatchField
|
//- Return the type of the calculated form of pointPatchField
|
||||||
static const word& calculatedType();
|
static const word& calculatedType();
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatchField implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return word::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mapping functions
|
// Mapping functions
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
|
|||||||
(
|
(
|
||||||
"PointPatchField<Type>::New"
|
"PointPatchField<Type>::New"
|
||||||
"(const word&, const pointPatch&, const Field<Type>&)"
|
"(const word&, const pointPatch&, const Field<Type>&)"
|
||||||
) << "Unknown patchTypefield type "
|
) << "Unknown patchFieldType type "
|
||||||
<< patchFieldType
|
<< patchFieldType
|
||||||
<< endl << endl
|
<< endl << endl
|
||||||
<< "Valid patchField types are :" << endl
|
<< "Valid patchField types are :" << endl
|
||||||
@ -58,16 +58,32 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename pointPatchConstructorTable::iterator patchTypeCstrIter =
|
autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF));
|
||||||
pointPatchConstructorTablePtr_->find(p.type());
|
|
||||||
|
|
||||||
if (patchTypeCstrIter != pointPatchConstructorTablePtr_->end())
|
if (pfPtr().constraintType() == p.constraintType())
|
||||||
{
|
{
|
||||||
return autoPtr<pointPatchField<Type> >(patchTypeCstrIter()(p, iF));
|
// Compatible (constraint-wise) with the patch type
|
||||||
|
return pfPtr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return autoPtr<pointPatchField<Type> >(cstrIter()(p, iF));
|
// Use default constraint type
|
||||||
|
typename pointPatchConstructorTable::iterator patchTypeCstrIter =
|
||||||
|
pointPatchConstructorTablePtr_->find(p.type());
|
||||||
|
|
||||||
|
if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"PointPatchField<Type>::New"
|
||||||
|
"(const word&, const pointPatch&, const Field<Type>&)"
|
||||||
|
) << "inconsistent patch and patchField types for \n"
|
||||||
|
<< " patch type " << p.type()
|
||||||
|
<< " and patchField type " << patchFieldType
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return patchTypeCstrIter()(p, iF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,20 +131,27 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Construct (but not necesarily returned)
|
||||||
|
autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF, dict));
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!dict.found("patchType")
|
!dict.found("patchType")
|
||||||
|| word(dict.lookup("patchType")) != p.type()
|
|| word(dict.lookup("patchType")) != p.type()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (pfPtr().constraintType() == p.constraintType())
|
||||||
|
{
|
||||||
|
// Compatible (constraint-wise) with the patch type
|
||||||
|
return pfPtr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Use default constraint type
|
||||||
typename dictionaryConstructorTable::iterator patchTypeCstrIter
|
typename dictionaryConstructorTable::iterator patchTypeCstrIter
|
||||||
= dictionaryConstructorTablePtr_->find(p.type());
|
= dictionaryConstructorTablePtr_->find(p.type());
|
||||||
|
|
||||||
if
|
if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end())
|
||||||
(
|
|
||||||
patchTypeCstrIter != dictionaryConstructorTablePtr_->end()
|
|
||||||
&& patchTypeCstrIter() != cstrIter()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
@ -140,9 +163,12 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
|
|||||||
<< " and patchField type " << patchFieldType
|
<< " and patchField type " << patchFieldType
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return patchTypeCstrIter()(p, iF, dict);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<pointPatchField<Type> >(cstrIter()(p, iF, dict));
|
return cstrIter()(p, iF, dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +211,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<pointPatchField<Type> >(cstrIter()(ptf, p, iF, pfMapper));
|
return cstrIter()(ptf, p, iF, pfMapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -113,6 +113,12 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the underlying cyclicPolyPatch
|
//- Return the underlying cyclicPolyPatch
|
||||||
const cyclicPolyPatch& cyclicPatch() const
|
const cyclicPolyPatch& cyclicPatch() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -73,6 +73,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
//- Accumulate the effect of constraint direction of this patch
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
virtual void applyConstraint
|
virtual void applyConstraint
|
||||||
(
|
(
|
||||||
|
|||||||
@ -129,6 +129,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
//- Return processor number
|
//- Return processor number
|
||||||
int myProcNo() const
|
int myProcNo() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -73,6 +73,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
//- Accumulate the effect of constraint direction of this patch
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
virtual void applyConstraint
|
virtual void applyConstraint
|
||||||
(
|
(
|
||||||
|
|||||||
@ -73,6 +73,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
|
||||||
//- Accumulate the effect of constraint direction of this patch
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
virtual void applyConstraint
|
virtual void applyConstraint
|
||||||
(
|
(
|
||||||
|
|||||||
@ -157,6 +157,12 @@ public:
|
|||||||
//- Return point normals
|
//- Return point normals
|
||||||
virtual const vectorField& pointNormals() const = 0;
|
virtual const vectorField& pointNormals() const = 0;
|
||||||
|
|
||||||
|
//- Return the constraint type this pointPatch implements.
|
||||||
|
virtual const word& constraintType() const
|
||||||
|
{
|
||||||
|
return word::null;
|
||||||
|
}
|
||||||
|
|
||||||
//- Accumulate the effect of constraint direction of this patch
|
//- Accumulate the effect of constraint direction of this patch
|
||||||
virtual void applyConstraint
|
virtual void applyConstraint
|
||||||
(
|
(
|
||||||
|
|||||||
@ -620,6 +620,7 @@ volPointInterpolation::~volPointInterpolation()
|
|||||||
void volPointInterpolation::updateMesh()
|
void volPointInterpolation::updateMesh()
|
||||||
{
|
{
|
||||||
makeWeights();
|
makeWeights();
|
||||||
|
makePatchPatchAddressing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ void Foam::particleForces::cacheFields(const bool store)
|
|||||||
{
|
{
|
||||||
if (store && pressureGradient_)
|
if (store && pressureGradient_)
|
||||||
{
|
{
|
||||||
const volVectorField U = mesh_.lookupObject<volVectorField>(UName_);
|
const volVectorField& U = mesh_.lookupObject<volVectorField>(UName_);
|
||||||
gradUPtr_ = fvc::grad(U).ptr();
|
gradUPtr_ = fvc::grad(U).ptr();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user