Commit dc59c633 authored by Henry Weller's avatar Henry Weller
Browse files

processorFvPatchField: Reinstate 'value' as an optional entry

parent fdece9b2
......@@ -70,13 +70,12 @@ Foam::processorFvPatchField<Type>::processorFvPatchField
template<class Type>
Foam::processorFvPatchField<Type>::processorFvPatchField
(
const processorFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
const dictionary& dict
)
:
coupledFvPatchField<Type>(ptf, p, iF, mapper),
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
procPatch_(refCast<const processorFvPatch>(p)),
sendBuf_(0),
receiveBuf_(0),
......@@ -85,33 +84,31 @@ Foam::processorFvPatchField<Type>::processorFvPatchField
scalarSendBuf_(0),
scalarReceiveBuf_(0)
{
if (!isA<processorFvPatch>(this->patch()))
if (!isA<processorFvPatch>(p))
{
FatalErrorInFunction
FatalIOErrorInFunction
(
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< exit(FatalIOError);
}
if (debug && !ptf.ready())
{
FatalErrorInFunction
<< "On patch " << procPatch_.name() << " outstanding request."
<< abort(FatalError);
}
}
template<class Type>
Foam::processorFvPatchField<Type>::processorFvPatchField
(
const processorFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
const fvPatchFieldMapper& mapper
)
:
coupledFvPatchField<Type>(p, iF, dict),
coupledFvPatchField<Type>(ptf, p, iF, mapper),
procPatch_(refCast<const processorFvPatch>(p)),
sendBuf_(0),
receiveBuf_(0),
......@@ -120,18 +117,21 @@ Foam::processorFvPatchField<Type>::processorFvPatchField
scalarSendBuf_(0),
scalarReceiveBuf_(0)
{
if (!isA<processorFvPatch>(p))
if (!isA<processorFvPatch>(this->patch()))
{
FatalIOErrorInFunction
(
dict
) << "\n patch type '" << p.type()
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< exit(FatalIOError);
}
if (debug && !ptf.ready())
{
FatalErrorInFunction
<< "On patch " << procPatch_.name() << " outstanding request."
<< abort(FatalError);
}
}
......
......@@ -47,68 +47,68 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const Field<Type>& f
const dictionary& dict
)
:
processorFvPatchField<Type>(p, iF, f),
processorFvPatchField<Type>(p, iF, dict),
procPatch_(refCast<const processorCyclicFvPatch>(p))
{}
{
if (!isType<processorCyclicFvPatch>(p))
{
FatalIOErrorInFunction
(
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< exit(FatalIOError);
}
if (Pstream::defaultCommsType == Pstream::scheduled)
{
WarningInFunction
<< "Scheduled communication with split cyclics not supported."
<< endl;
}
}
template<class Type>
Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
(
const processorCyclicFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
const Field<Type>& f
)
:
processorFvPatchField<Type>(ptf, p, iF, mapper),
processorFvPatchField<Type>(p, iF, f),
procPatch_(refCast<const processorCyclicFvPatch>(p))
{
if (!isType<processorCyclicFvPatch>(this->patch()))
{
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< exit(FatalIOError);
}
}
{}
template<class Type>
Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
(
const processorCyclicFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
const fvPatchFieldMapper& mapper
)
:
processorFvPatchField<Type>(p, iF, dict),
processorFvPatchField<Type>(ptf, p, iF, mapper),
procPatch_(refCast<const processorCyclicFvPatch>(p))
{
if (!isType<processorCyclicFvPatch>(p))
if (!isType<processorCyclicFvPatch>(this->patch()))
{
FatalIOErrorInFunction
(
dict
) << "\n patch type '" << p.type()
FatalErrorInFunction
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->internalField().name()
<< " in file " << this->internalField().objectPath()
<< exit(FatalIOError);
}
if (Pstream::defaultCommsType == Pstream::scheduled)
{
WarningInFunction
<< "Scheduled communication with split cyclics not supported."
<< endl;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment