mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify generic patch field code
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
genericPatchFieldBase/genericPatchFieldBase.C
|
common/genericPatchFieldBase.C
|
||||||
|
|
||||||
genericFaPatchField/genericFaPatchFields.C
|
genericFaPatchField/genericFaPatchFields.C
|
||||||
|
/* not yet needed: genericFaePatchField/genericFaePatchFields.C */
|
||||||
genericFvPatchField/genericFvPatchFields.C
|
genericFvPatchField/genericFvPatchFields.C
|
||||||
genericFvsPatchField/genericFvsPatchFields.C
|
genericFvsPatchField/genericFvsPatchFields.C
|
||||||
genericPointPatchField/genericPointPatchFields.C
|
genericPointPatchField/genericPointPatchFields.C
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -88,7 +88,7 @@ void Foam::genericPatchFieldBase::genericFatalSolveError
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalError
|
FatalError
|
||||||
<< " (actual type " << actualTypeName_ << ')'
|
<< " (Actual type " << actualTypeName_ << ')'
|
||||||
<< "\n on patch " << patchName
|
<< "\n on patch " << patchName
|
||||||
<< " of field " << io.name() << " in file " << io.objectPath() << nl
|
<< " of field " << io.name() << " in file " << io.objectPath() << nl
|
||||||
<< nl
|
<< nl
|
||||||
@ -161,10 +161,6 @@ bool Foam::genericPatchFieldBase::processEntry
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef FIELDSIZE_CHECK
|
|
||||||
#define FIELDSIZE_CHECK(fieldLen) \
|
|
||||||
checkFieldSize(fieldLen, patchSize, patchName, key, io)
|
|
||||||
|
|
||||||
|
|
||||||
// First token
|
// First token
|
||||||
token tok(is);
|
token tok(is);
|
||||||
@ -179,6 +175,7 @@ bool Foam::genericPatchFieldBase::processEntry
|
|||||||
// without a compound type.
|
// without a compound type.
|
||||||
// Just treat as scalar and hope for the best.
|
// Just treat as scalar and hope for the best.
|
||||||
scalarFields_.insert(key, autoPtr<scalarField>::New());
|
scalarFields_.insert(key, autoPtr<scalarField>::New());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (!tok.isCompound())
|
else if (!tok.isCompound())
|
||||||
{
|
{
|
||||||
@ -190,130 +187,50 @@ bool Foam::genericPatchFieldBase::processEntry
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if
|
|
||||||
(
|
|
||||||
tok.compoundToken().type()
|
|
||||||
== token::Compound<List<scalar>>::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
auto fPtr = autoPtr<scalarField>::New();
|
|
||||||
|
|
||||||
fPtr->transfer
|
#undef doLocalCode
|
||||||
(
|
#define doLocalCode(ValueType, Member) \
|
||||||
dynamicCast<token::Compound<List<scalar>>>
|
if \
|
||||||
(
|
( \
|
||||||
tok.transferCompoundToken(is)
|
tok.compoundToken().type() \
|
||||||
)
|
== token::Compound<List<ValueType>>::typeName \
|
||||||
);
|
) \
|
||||||
|
{ \
|
||||||
if (!FIELDSIZE_CHECK(fPtr->size()))
|
auto fPtr = autoPtr<Field<ValueType>>::New(); \
|
||||||
{
|
\
|
||||||
return false;
|
fPtr->transfer \
|
||||||
}
|
( \
|
||||||
|
dynamicCast<token::Compound<List<ValueType>>> \
|
||||||
scalarFields_.insert(key, fPtr);
|
( \
|
||||||
|
tok.transferCompoundToken(is) \
|
||||||
|
) \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
if (!checkFieldSize(fPtr->size(), patchSize, patchName, key, io)) \
|
||||||
|
{ \
|
||||||
|
return false; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
this->Member.insert(key, fPtr); \
|
||||||
|
return true; \
|
||||||
}
|
}
|
||||||
else if
|
|
||||||
(
|
|
||||||
tok.compoundToken().type()
|
|
||||||
== token::Compound<List<vector>>::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
auto fPtr = autoPtr<vectorField>::New();
|
|
||||||
|
|
||||||
fPtr->transfer
|
//doLocalCode(label, labelFields_);
|
||||||
(
|
doLocalCode(scalar, scalarFields_);
|
||||||
dynamicCast<token::Compound<List<vector>>>
|
doLocalCode(vector, vectorFields_);
|
||||||
(
|
doLocalCode(sphericalTensor, sphTensorFields_);
|
||||||
tok.transferCompoundToken(is)
|
doLocalCode(symmTensor, symmTensorFields_);
|
||||||
)
|
doLocalCode(tensor, tensorFields_);
|
||||||
);
|
#undef doLocalCode
|
||||||
|
|
||||||
if (!FIELDSIZE_CHECK(fPtr->size()))
|
// Fall-through
|
||||||
{
|
FatalIOErrorInFunction(dict_)
|
||||||
return false;
|
<< "\n unsupported compound " << tok.compoundToken() << nl
|
||||||
}
|
<< "\n on patch " << patchName << " of field "
|
||||||
vectorFields_.insert(key, fPtr);
|
<< io.name() << " in file "
|
||||||
}
|
<< io.objectPath() << nl
|
||||||
else if
|
<< exit(FatalIOError);
|
||||||
(
|
return false;
|
||||||
tok.compoundToken().type()
|
|
||||||
== token::Compound<List<sphericalTensor>>::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
auto fPtr = autoPtr<sphericalTensorField>::New();
|
|
||||||
|
|
||||||
fPtr->transfer
|
|
||||||
(
|
|
||||||
dynamicCast<token::Compound<List<sphericalTensor>>>
|
|
||||||
(
|
|
||||||
tok.transferCompoundToken(is)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!FIELDSIZE_CHECK(fPtr->size()))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sphTensorFields_.insert(key, fPtr);
|
|
||||||
}
|
|
||||||
else if
|
|
||||||
(
|
|
||||||
tok.compoundToken().type()
|
|
||||||
== token::Compound<List<symmTensor>>::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
auto fPtr = autoPtr<symmTensorField>::New();
|
|
||||||
|
|
||||||
fPtr->transfer
|
|
||||||
(
|
|
||||||
dynamicCast<token::Compound<List<symmTensor>>>
|
|
||||||
(
|
|
||||||
tok.transferCompoundToken(is)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!FIELDSIZE_CHECK(fPtr->size()))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
symmTensorFields_.insert(key, fPtr);
|
|
||||||
}
|
|
||||||
else if
|
|
||||||
(
|
|
||||||
tok.compoundToken().type()
|
|
||||||
== token::Compound<List<tensor>>::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
auto fPtr = autoPtr<tensorField>::New();
|
|
||||||
|
|
||||||
fPtr->transfer
|
|
||||||
(
|
|
||||||
dynamicCast<token::Compound<List<tensor>>>
|
|
||||||
(
|
|
||||||
tok.transferCompoundToken(is)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!FIELDSIZE_CHECK(fPtr->size()))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
tensorFields_.insert(key, fPtr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict_)
|
|
||||||
<< "\n unsupported compound " << tok.compoundToken()
|
|
||||||
<< "\n on patch " << patchName << " of field "
|
|
||||||
<< io.name() << " in file "
|
|
||||||
<< io.objectPath() << nl
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (tok.isWord("uniform"))
|
else if (tok.isWord("uniform"))
|
||||||
{
|
{
|
||||||
@ -321,6 +238,9 @@ bool Foam::genericPatchFieldBase::processEntry
|
|||||||
|
|
||||||
if (!tok.isPunctuation())
|
if (!tok.isPunctuation())
|
||||||
{
|
{
|
||||||
|
// Unfortunately cannot distinguish between
|
||||||
|
// labelField and scalarField...
|
||||||
|
|
||||||
scalarFields_.insert
|
scalarFields_.insert
|
||||||
(
|
(
|
||||||
key,
|
key,
|
||||||
@ -413,8 +333,6 @@ bool Foam::genericPatchFieldBase::processEntry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef FIELDSIZE_CHECK
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,30 +348,27 @@ void Foam::genericPatchFieldBase::putEntry
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
e.isStream()
|
e.isStream()
|
||||||
&& e.stream().size()
|
&& e.stream().peek().isWord("nonuniform")
|
||||||
&& e.stream()[0].isWord("nonuniform")
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (scalarFields_.found(key))
|
#undef doLocalCode
|
||||||
{
|
#define doLocalCode(ValueType, Member) \
|
||||||
scalarFields_.cfind(key)()->writeEntry(key, os);
|
{ \
|
||||||
}
|
const auto iter = this->Member.cfind(key); \
|
||||||
else if (vectorFields_.found(key))
|
if (iter.good()) \
|
||||||
{
|
{ \
|
||||||
vectorFields_.cfind(key)()->writeEntry(key, os);
|
iter.val()->writeEntry(key, os); \
|
||||||
}
|
return; \
|
||||||
else if (sphTensorFields_.found(key))
|
} \
|
||||||
{
|
|
||||||
sphTensorFields_.cfind(key)()->writeEntry(key, os);
|
|
||||||
}
|
|
||||||
else if (symmTensorFields_.found(key))
|
|
||||||
{
|
|
||||||
symmTensorFields_.cfind(key)()->writeEntry(key, os);
|
|
||||||
}
|
|
||||||
else if (tensorFields_.found(key))
|
|
||||||
{
|
|
||||||
tensorFields_.cfind(key)()->writeEntry(key, os);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//doLocalCode(label, labelFields_);
|
||||||
|
doLocalCode(scalar, scalarFields_);
|
||||||
|
doLocalCode(vector, vectorFields_);
|
||||||
|
doLocalCode(sphericalTensor, sphTensorFields_);
|
||||||
|
doLocalCode(symmTensor, symmTensorFields_);
|
||||||
|
doLocalCode(tensor, tensorFields_);
|
||||||
|
#undef doLocalCode
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -492,55 +407,25 @@ void Foam::genericPatchFieldBase::rmapGeneric
|
|||||||
const labelList& addr
|
const labelList& addr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAllIters(scalarFields_, iter)
|
#undef doLocalCode
|
||||||
{
|
#define doLocalCode(ValueType, Member) \
|
||||||
const auto iter2 = rhs.scalarFields_.cfind(iter.key());
|
forAllIters(this->Member, iter) \
|
||||||
|
{ \
|
||||||
if (iter2.good())
|
const auto iter2 = rhs.Member.cfind(iter.key()); \
|
||||||
{
|
\
|
||||||
(*iter)->rmap(*iter2(), addr);
|
if (iter2.good()) \
|
||||||
}
|
{ \
|
||||||
|
iter.val()->rmap(*iter2.val(), addr); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIters(vectorFields_, iter)
|
//doLocalCode(label, labelFields_);
|
||||||
{
|
doLocalCode(scalar, scalarFields_);
|
||||||
const auto iter2 = rhs.vectorFields_.cfind(iter.key());
|
doLocalCode(vector, vectorFields_);
|
||||||
|
doLocalCode(sphericalTensor, sphTensorFields_);
|
||||||
if (iter2.good())
|
doLocalCode(symmTensor, symmTensorFields_);
|
||||||
{
|
doLocalCode(tensor, tensorFields_);
|
||||||
(*iter)->rmap(*iter2(), addr);
|
#undef doLocalCode
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllIters(sphTensorFields_, iter)
|
|
||||||
{
|
|
||||||
const auto iter2 = rhs.sphTensorFields_.cfind(iter.key());
|
|
||||||
|
|
||||||
if (iter2.good())
|
|
||||||
{
|
|
||||||
(*iter)->rmap(*iter2(), addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllIters(symmTensorFields_, iter)
|
|
||||||
{
|
|
||||||
const auto iter2 = rhs.symmTensorFields_.cfind(iter.key());
|
|
||||||
|
|
||||||
if (iter2.good())
|
|
||||||
{
|
|
||||||
(*iter)->rmap(*iter2(), addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllIters(tensorFields_, iter)
|
|
||||||
{
|
|
||||||
const auto iter2 = rhs.tensorFields_.find(iter.key());
|
|
||||||
|
|
||||||
if (iter2.good())
|
|
||||||
{
|
|
||||||
(*iter)->rmap(*iter2(), addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,8 +35,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericPatchFieldBase_H
|
#ifndef Foam_genericPatchFieldBase_H
|
||||||
#define genericPatchFieldBase_H
|
#define Foam_genericPatchFieldBase_H
|
||||||
|
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "primitiveFields.H"
|
#include "primitiveFields.H"
|
||||||
@ -54,6 +54,26 @@ namespace Foam
|
|||||||
|
|
||||||
class genericPatchFieldBase
|
class genericPatchFieldBase
|
||||||
{
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- The non-generic patch name
|
||||||
|
word actualTypeName_;
|
||||||
|
|
||||||
|
//- Copy of the input dictionary (used for transcribing)
|
||||||
|
dictionary dict_;
|
||||||
|
|
||||||
|
|
||||||
|
// The data fields read.
|
||||||
|
// Do not need to handle generic for 'label' since these
|
||||||
|
// will be limited to known field types.
|
||||||
|
|
||||||
|
HashPtrTable<scalarField> scalarFields_;
|
||||||
|
HashPtrTable<vectorField> vectorFields_;
|
||||||
|
HashPtrTable<sphericalTensorField> sphTensorFields_;
|
||||||
|
HashPtrTable<symmTensorField> symmTensorFields_;
|
||||||
|
HashPtrTable<tensorField> tensorFields_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
bool checkFieldSize
|
bool checkFieldSize
|
||||||
@ -68,20 +88,6 @@ class genericPatchFieldBase
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Data
|
|
||||||
|
|
||||||
//- The non-generic patch name
|
|
||||||
word actualTypeName_;
|
|
||||||
|
|
||||||
dictionary dict_;
|
|
||||||
|
|
||||||
HashPtrTable<scalarField> scalarFields_;
|
|
||||||
HashPtrTable<vectorField> vectorFields_;
|
|
||||||
HashPtrTable<sphericalTensorField> sphTensorFields_;
|
|
||||||
HashPtrTable<symmTensorField> symmTensorFields_;
|
|
||||||
HashPtrTable<tensorField> tensorFields_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Add error message to FatalError about solving with
|
//- Add error message to FatalError about solving with
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,50 +36,24 @@ void Foam::genericPatchFieldBase::mapGeneric
|
|||||||
const MapperType& mapper
|
const MapperType& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAllConstIters(rhs.scalarFields_, iter)
|
#undef doLocalCode
|
||||||
{
|
#define doLocalCode(ValueType, Member) \
|
||||||
scalarFields_.insert
|
forAllIters(rhs.Member, iter) \
|
||||||
(
|
{ \
|
||||||
iter.key(),
|
this->Member.insert \
|
||||||
autoPtr<scalarField>::New(*iter(), mapper)
|
( \
|
||||||
);
|
iter.key(), \
|
||||||
|
autoPtr<Field<ValueType>>::New(*iter.val(), mapper) \
|
||||||
|
); \
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllConstIters(rhs.vectorFields_, iter)
|
//doLocalCode(label, labelFields_);
|
||||||
{
|
doLocalCode(scalar, scalarFields_);
|
||||||
vectorFields_.insert
|
doLocalCode(vector, vectorFields_);
|
||||||
(
|
doLocalCode(sphericalTensor, sphTensorFields_);
|
||||||
iter.key(),
|
doLocalCode(symmTensor, symmTensorFields_);
|
||||||
autoPtr<vectorField>::New(*iter(), mapper)
|
doLocalCode(tensor, tensorFields_);
|
||||||
);
|
#undef doLocalCode
|
||||||
}
|
|
||||||
|
|
||||||
forAllConstIters(rhs.sphTensorFields_, iter)
|
|
||||||
{
|
|
||||||
sphTensorFields_.insert
|
|
||||||
(
|
|
||||||
iter.key(),
|
|
||||||
autoPtr<sphericalTensorField>::New(*iter(), mapper)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllConstIters(rhs.symmTensorFields_, iter)
|
|
||||||
{
|
|
||||||
symmTensorFields_.insert
|
|
||||||
(
|
|
||||||
iter.key(),
|
|
||||||
autoPtr<symmTensorField>::New(*iter(), mapper)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllConstIters(rhs.tensorFields_, iter)
|
|
||||||
{
|
|
||||||
tensorFields_.insert
|
|
||||||
(
|
|
||||||
iter.key(),
|
|
||||||
autoPtr<tensorField>::New(*iter(), mapper)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -89,30 +63,20 @@ void Foam::genericPatchFieldBase::autoMapGeneric
|
|||||||
const MapperType& mapper
|
const MapperType& mapper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAllIters(scalarFields_, iter)
|
#undef doLocalCode
|
||||||
{
|
#define doLocalCode(ValueType, Member) \
|
||||||
(*iter)->autoMap(mapper);
|
forAllIters(this->Member, iter) \
|
||||||
|
{ \
|
||||||
|
iter.val()->autoMap(mapper); \
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIters(vectorFields_, iter)
|
//doLocalCode(label, labelFields_);
|
||||||
{
|
doLocalCode(scalar, scalarFields_);
|
||||||
(*iter)->autoMap(mapper);
|
doLocalCode(vector, vectorFields_);
|
||||||
}
|
doLocalCode(sphericalTensor, sphTensorFields_);
|
||||||
|
doLocalCode(symmTensor, symmTensorFields_);
|
||||||
forAllIters(sphTensorFields_, iter)
|
doLocalCode(tensor, tensorFields_);
|
||||||
{
|
#undef doLocalCode
|
||||||
(*iter)->autoMap(mapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllIters(symmTensorFields_, iter)
|
|
||||||
{
|
|
||||||
(*iter)->autoMap(mapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
forAllIters(tensorFields_, iter)
|
|
||||||
{
|
|
||||||
(*iter)->autoMap(mapper);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ Foam::genericFaPatchField<Type>::genericFaPatchField
|
|||||||
parent_bctype(p, iF)
|
parent_bctype(p, iF)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Trying to construct genericFaPatchField on patch "
|
<< "Trying to construct generic patchField on patch "
|
||||||
<< this->patch().name()
|
<< this->patch().name()
|
||||||
<< " of field " << this->internalField().name() << nl
|
<< " of field " << this->internalField().name() << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -63,7 +63,7 @@ Foam::genericFaPatchField<Type>::genericFaPatchField
|
|||||||
const word& patchName = this->patch().name();
|
const word& patchName = this->patch().name();
|
||||||
const IOobject& io = this->internalField();
|
const IOobject& io = this->internalField();
|
||||||
|
|
||||||
if (!dict.found("value"))
|
if (!dict.findEntry("value", keyType::LITERAL))
|
||||||
{
|
{
|
||||||
reportMissingEntry("value", patchName, io);
|
reportMissingEntry("value", patchName, io);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ Foam::genericFaPatchField<Type>::valueInternalCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFaPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -169,7 +169,7 @@ Foam::genericFaPatchField<Type>::valueBoundaryCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFaPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -187,7 +187,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFaPatchField<Type>::gradientInternalCoeffs() const
|
Foam::genericFaPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFaPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -205,7 +205,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFaPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::genericFaPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFaPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
|
|||||||
@ -29,17 +29,11 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "areaFields.H"
|
#include "areaFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
makeFaPatchFields(generic);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
makeFaPatchFields(generic);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -25,8 +25,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericFaPatchFields_H
|
#ifndef Foam_genericFaPatchFields_H
|
||||||
#define genericFaPatchFields_H
|
#define Foam_genericFaPatchFields_H
|
||||||
|
|
||||||
#include "genericFaPatchField.H"
|
#include "genericFaPatchField.H"
|
||||||
#include "fieldTypes.H"
|
#include "fieldTypes.H"
|
||||||
|
|||||||
@ -0,0 +1,142 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 "genericFaePatchField.H"
|
||||||
|
#include "faPatchFieldMapper.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::genericFaePatchField<Type>::genericFaePatchField
|
||||||
|
(
|
||||||
|
const faPatch& p,
|
||||||
|
const DimensionedField<Type, edgeMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
parent_bctype(p, iF)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Trying to construct generic patchField on patch "
|
||||||
|
<< this->patch().name()
|
||||||
|
<< " of field " << this->internalField().name()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::genericFaePatchField<Type>::genericFaePatchField
|
||||||
|
(
|
||||||
|
const faPatch& p,
|
||||||
|
const DimensionedField<Type, edgeMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
parent_bctype(p, iF, dict),
|
||||||
|
genericPatchFieldBase(dict)
|
||||||
|
{
|
||||||
|
const label patchSize = this->size();
|
||||||
|
const word& patchName = this->patch().name();
|
||||||
|
const IOobject& io = this->internalField();
|
||||||
|
|
||||||
|
if (!dict.findEntry("value", keyType::LITERAL))
|
||||||
|
{
|
||||||
|
reportMissingEntry("value", patchName, io);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle "value" separately
|
||||||
|
processGeneric(patchSize, patchName, io, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::genericFaePatchField<Type>::genericFaePatchField
|
||||||
|
(
|
||||||
|
const genericFaePatchField<Type>& rhs,
|
||||||
|
const faPatch& p,
|
||||||
|
const DimensionedField<Type, edgeMesh>& iF,
|
||||||
|
const faPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
parent_bctype(rhs, p, iF, mapper),
|
||||||
|
genericPatchFieldBase(zero{}, rhs)
|
||||||
|
{
|
||||||
|
this->mapGeneric(rhs, mapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::genericFaePatchField<Type>::genericFaePatchField
|
||||||
|
(
|
||||||
|
const genericFaePatchField<Type>& rhs,
|
||||||
|
const DimensionedField<Type, edgeMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
parent_bctype(rhs, iF),
|
||||||
|
genericPatchFieldBase(rhs)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::genericFaePatchField<Type>::write(Ostream& os) const
|
||||||
|
{
|
||||||
|
// Handle "value" separately
|
||||||
|
genericPatchFieldBase::writeGeneric(os, true);
|
||||||
|
faePatchField<Type>::writeValueEntry(os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::genericFaePatchField<Type>::autoMap
|
||||||
|
(
|
||||||
|
const faPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
parent_bctype::autoMap(m);
|
||||||
|
this->autoMapGeneric(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::genericFaePatchField<Type>::rmap
|
||||||
|
(
|
||||||
|
const faePatchField<Type>& rhs,
|
||||||
|
const labelList& addr
|
||||||
|
)
|
||||||
|
{
|
||||||
|
parent_bctype::rmap(rhs, addr);
|
||||||
|
|
||||||
|
const auto* base = isA<genericPatchFieldBase>(rhs);
|
||||||
|
if (base)
|
||||||
|
{
|
||||||
|
this->rmapGeneric(*base, addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,165 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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::genericFaePatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
This boundary condition provides a generic version of the \c calculated
|
||||||
|
condition, useful as a fallback for handling unknown patch types. Not
|
||||||
|
generally applicable as a user-specified condition.
|
||||||
|
|
||||||
|
See also
|
||||||
|
Foam::calculatedFaePatchField
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
genericFaePatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef genericFaePatchField_H
|
||||||
|
#define genericFaePatchField_H
|
||||||
|
|
||||||
|
#include "calculatedFaePatchField.H"
|
||||||
|
#include "genericPatchFieldBase.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class genericFaePatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class genericFaePatchField
|
||||||
|
:
|
||||||
|
public calculatedFaePatchField<Type>,
|
||||||
|
public genericPatchFieldBase
|
||||||
|
{
|
||||||
|
//- The parent boundary condition type
|
||||||
|
typedef calculatedFaePatchField<Type> parent_bctype;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("generic");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
genericFaePatchField
|
||||||
|
(
|
||||||
|
const faPatch&,
|
||||||
|
const DimensionedField<Type, edgeMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
genericFaePatchField
|
||||||
|
(
|
||||||
|
const faPatch&,
|
||||||
|
const DimensionedField<Type, edgeMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given patch field onto a new patch
|
||||||
|
genericFaePatchField
|
||||||
|
(
|
||||||
|
const genericFaePatchField<Type>&,
|
||||||
|
const faPatch&,
|
||||||
|
const DimensionedField<Type, edgeMesh>&,
|
||||||
|
const faPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Default copy construct
|
||||||
|
genericFaePatchField(const genericFaePatchField<Type>&) = default;
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<faePatchField<Type>> clone() const
|
||||||
|
{
|
||||||
|
return tmp<faePatchField<Type>>
|
||||||
|
(
|
||||||
|
new genericFaePatchField<Type>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
genericFaePatchField
|
||||||
|
(
|
||||||
|
const genericFaePatchField<Type>&,
|
||||||
|
const DimensionedField<Type, edgeMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<faePatchField<Type>> clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, edgeMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<faePatchField<Type>>
|
||||||
|
(
|
||||||
|
new genericFaePatchField<Type>(*this, iF)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write(Ostream&) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Mapping Functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap(const faPatchFieldMapper&);
|
||||||
|
|
||||||
|
//- Reverse map the given faPatchField onto this faPatchField
|
||||||
|
virtual void rmap
|
||||||
|
(
|
||||||
|
const faePatchField<Type>&,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "genericFaePatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 "genericFaePatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "edgeFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
makeFaePatchFields(generic);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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 Foam_genericFaePatchFields_H
|
||||||
|
#define Foam_genericFaePatchFields_H
|
||||||
|
|
||||||
|
#include "genericFaePatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeFaePatchTypeFieldTypedefs(generic);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -41,7 +41,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
|||||||
parent_bctype(p, iF)
|
parent_bctype(p, iF)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Trying to construct an genericFvPatchField on patch "
|
<< "Trying to construct generic patchField on patch "
|
||||||
<< this->patch().name()
|
<< this->patch().name()
|
||||||
<< " of field " << this->internalField().name()
|
<< " of field " << this->internalField().name()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -63,7 +63,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
|||||||
const word& patchName = this->patch().name();
|
const word& patchName = this->patch().name();
|
||||||
const IOobject& io = this->internalField();
|
const IOobject& io = this->internalField();
|
||||||
|
|
||||||
if (!dict.found("value"))
|
if (!dict.findEntry("value", keyType::LITERAL))
|
||||||
{
|
{
|
||||||
reportMissingEntry("value", patchName, io);
|
reportMissingEntry("value", patchName, io);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ Foam::genericFvPatchField<Type>::valueInternalCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -169,7 +169,7 @@ Foam::genericFvPatchField<Type>::valueBoundaryCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -187,7 +187,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
|
Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -204,7 +204,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
|
|||||||
@ -29,17 +29,11 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
makePatchFields(generic);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
makePatchFields(generic);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,11 +26,10 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericFvPatchFields_H
|
#ifndef Foam_genericFvPatchFields_H
|
||||||
#define genericFvPatchFields_H
|
#define Foam_genericFvPatchFields_H
|
||||||
|
|
||||||
#include "genericFvPatchField.H"
|
#include "genericFvPatchField.H"
|
||||||
#include "fieldTypes.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Foam::genericFvsPatchField<Type>::genericFvsPatchField
|
|||||||
parent_bctype(p, iF)
|
parent_bctype(p, iF)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Trying to construct an genericFvsPatchField on patch "
|
<< "Trying to construct generic patchField on patch "
|
||||||
<< this->patch().name()
|
<< this->patch().name()
|
||||||
<< " of field " << this->internalField().name()
|
<< " of field " << this->internalField().name()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -62,7 +62,7 @@ Foam::genericFvsPatchField<Type>::genericFvsPatchField
|
|||||||
const word& patchName = this->patch().name();
|
const word& patchName = this->patch().name();
|
||||||
const IOobject& io = this->internalField();
|
const IOobject& io = this->internalField();
|
||||||
|
|
||||||
if (!dict.found("value"))
|
if (!dict.findEntry("value", keyType::LITERAL))
|
||||||
{
|
{
|
||||||
reportMissingEntry("value", patchName, io);
|
reportMissingEntry("value", patchName, io);
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ Foam::genericFvsPatchField<Type>::valueInternalCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvsPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -169,7 +169,7 @@ Foam::genericFvsPatchField<Type>::valueBoundaryCoeffs
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvsPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -187,7 +187,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFvsPatchField<Type>::gradientInternalCoeffs() const
|
Foam::genericFvsPatchField<Type>::gradientInternalCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvsPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
@ -204,7 +204,7 @@ Foam::tmp<Foam::Field<Type>>
|
|||||||
Foam::genericFvsPatchField<Type>::gradientBoundaryCoeffs() const
|
Foam::genericFvsPatchField<Type>::gradientBoundaryCoeffs() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot be called for a genericFvsPatchField";
|
<< "Cannot be called for a generic patchField";
|
||||||
|
|
||||||
genericFatalSolveError
|
genericFatalSolveError
|
||||||
(
|
(
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -30,17 +30,11 @@ License
|
|||||||
#include "fvsPatchFields.H"
|
#include "fvsPatchFields.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
makeFvsPatchFields(generic);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
makeFvsPatchFields(generic);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,8 +25,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericFvsPatchFields_H
|
#ifndef Foam_genericFvsPatchFields_H
|
||||||
#define genericFvsPatchFields_H
|
#define Foam_genericFvsPatchFields_H
|
||||||
|
|
||||||
#include "genericFvsPatchField.H"
|
#include "genericFvsPatchField.H"
|
||||||
#include "fieldTypes.H"
|
#include "fieldTypes.H"
|
||||||
@ -40,6 +40,7 @@ namespace Foam
|
|||||||
|
|
||||||
makeFvsPatchTypeFieldTypedefs(generic);
|
makeFvsPatchTypeFieldTypedefs(generic);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Foam::genericPointPatchField<Type>::genericPointPatchField
|
|||||||
parent_bctype(p, iF)
|
parent_bctype(p, iF)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Trying to construct genericPointPatchField on patch "
|
<< "Trying to construct generic patchField on patch "
|
||||||
<< this->patch().name()
|
<< this->patch().name()
|
||||||
<< " of field " << this->internalField().name() << nl
|
<< " of field " << this->internalField().name() << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|||||||
@ -36,8 +36,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericPointPatchField_H
|
#ifndef Foam_genericPointPatchField_H
|
||||||
#define genericPointPatchField_H
|
#define Foam_genericPointPatchField_H
|
||||||
|
|
||||||
#include "calculatedPointPatchField.H"
|
#include "calculatedPointPatchField.H"
|
||||||
#include "genericPatchFieldBase.H"
|
#include "genericPatchFieldBase.H"
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,17 +30,11 @@ License
|
|||||||
#include "pointPatchFields.H"
|
#include "pointPatchFields.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
makePointPatchFields(generic);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
}
|
||||||
|
|
||||||
makePointPatchFields(generic);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,8 +26,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef genericPointPatchFields_H
|
#ifndef Foam_genericPointPatchFields_H
|
||||||
#define genericPointPatchFields_H
|
#define Foam_genericPointPatchFields_H
|
||||||
|
|
||||||
#include "genericPointPatchField.H"
|
#include "genericPointPatchField.H"
|
||||||
#include "fieldTypes.H"
|
#include "fieldTypes.H"
|
||||||
|
|||||||
Reference in New Issue
Block a user