Skip to content
Snippets Groups Projects
Commit 732872b9 authored by Mark OLESEN's avatar Mark OLESEN Committed by Kutalmış Berçin
Browse files

REGRESSION: missing "value" handling for some surface fields (#3144)

- changes in 8a8b5db9 were overly aggressive.
  Only need to suppress "value" IO for empty patches types
parent c6501b79
No related branches found
No related tags found
2 merge requests!695OpenFOAM v2406,!691REGRESSION: missing "value" handling for some surface fields (#3144)
Showing
with 129 additions and 21 deletions
......@@ -137,4 +137,14 @@ void Foam::emptyFaPatchField<Type>::updateCoeffs()
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::emptyFaPatchField<Type>::write(Ostream& os) const
{
faPatchField<Type>::write(os);
// Never write "value"
}
// ************************************************************************* //
......@@ -186,6 +186,12 @@ public:
{
return tmp<Field<Type>>::New();
}
// Member Functions
//- Write without "value" entry!
virtual void write(Ostream&) const;
};
......
......@@ -131,4 +131,14 @@ Foam::slicedFaePatchField<Type>::~slicedFaePatchField()
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::slicedFaePatchField<Type>::write(Ostream& os) const
{
faePatchField<Type>::write(os);
faePatchField<Type>::writeValueEntry(os);
}
// ************************************************************************* //
......@@ -141,6 +141,9 @@ public:
//- True: this patch field fixes a value.
virtual bool fixesValue() const { return true; }
//- Write includes "value" entry
virtual void write(Ostream&) const;
// Member Operators
......
......@@ -108,4 +108,14 @@ Foam::emptyFaePatchField<Type>::emptyFaePatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::emptyFaePatchField<Type>::write(Ostream& os) const
{
faePatchField<Type>::write(os);
// Never write "value"
}
// ************************************************************************* //
......@@ -124,9 +124,9 @@ public:
virtual ~emptyFaePatchField() = default;
// Member functions
// Member Functions
// Mapping functions
// Mapping Functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
......@@ -142,6 +142,12 @@ public:
const labelList&
)
{}
// Member Functions
//- Write without "value" entry!
virtual void write(Ostream&) const;
};
......
......@@ -123,4 +123,12 @@ void Foam::emptyFvPatchField<Type>::updateCoeffs()
}
template<class Type>
void Foam::emptyFvPatchField<Type>::write(Ostream& os) const
{
fvPatchField<Type>::write(os);
// Never write "value"
}
// ************************************************************************* //
......@@ -42,7 +42,7 @@ Usage
\verbatim
<patchName>
{
type empty;
type empty;
}
\endverbatim
......@@ -194,6 +194,12 @@ public:
{
return tmp<Field<Type>>::New();
}
// Member Functions
//- Write without "value" entry!
virtual void write(Ostream&) const;
};
......
......@@ -43,8 +43,8 @@ Usage
\verbatim
<patchName>
{
type calculated;
value uniform (0 0 0); // Required value entry
type calculated;
value uniform (0 0 0); // Required value entry
}
\endverbatim
......@@ -88,6 +88,7 @@ public:
);
//- Construct from patch, internal field and dictionary
//- The "value" entry is MUST_READ.
calculatedFvsPatchField
(
const fvPatch&,
......
......@@ -123,7 +123,7 @@ public:
// Member Functions
//- True if this patch field is derived from coupledFvsPatchField
//- True: this patch field is derived from coupledFvsPatchField
virtual bool coupled() const
{
return true;
......
......@@ -43,8 +43,8 @@ Usage
\verbatim
<patchName>
{
type fixedValue;
value uniform 0; // Example for scalar field usage
type fixedValue;
value uniform 0; // Example for scalar field usage
}
\endverbatim
......@@ -151,7 +151,7 @@ public:
virtual void write(Ostream&) const;
// Evaluation functions
// Evaluation Functions
//- Return the matrix diagonal coefficients corresponding to the
// evaluation of the value of this patchField with given weights
......
......@@ -88,7 +88,7 @@ public:
);
//- Construct from patch, internal field and dictionary.
//- The "value" entry is NO_READ.
//- The "value" entry is MUST_READ.
cyclicFvsPatchField
(
const fvPatch&,
......
......@@ -54,7 +54,6 @@ class cyclicSlipFvsPatchField
:
public cyclicFvsPatchField<Type>
{
public:
//- Runtime type information
......
......@@ -110,4 +110,14 @@ Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::emptyFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
// Never write "value"
}
// ************************************************************************* //
......@@ -37,7 +37,7 @@ Usage
\verbatim
<patchName>
{
type empty;
type empty;
}
\endverbatim
......@@ -146,6 +146,12 @@ public:
const labelList&
)
{}
// Member Functions
//- Write without "value" entry!
virtual void write(Ostream&) const;
};
......
......@@ -54,7 +54,6 @@ class nonuniformTransformCyclicFvsPatchField
:
public cyclicFvsPatchField<Type>
{
public:
//- Runtime type information
......
......@@ -49,7 +49,7 @@ Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
const dictionary& dict
)
:
fvsPatchField<Type>(p, iF, dict, IOobjectOption::NO_READ)
fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
{
if (!isType<symmetryFvPatch>(p))
{
......@@ -105,4 +105,14 @@ Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::symmetryFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
fvsPatchField<Type>::writeValueEntry(os);
}
// ************************************************************************* //
......@@ -30,14 +30,15 @@ Class
Description
This boundary condition enforces a symmetry constraint
The "value" entry is NO_READ, NO_WRITE.
The "value" entry is MUST_READ.
Usage
Example of the boundary condition specification:
\verbatim
<patchName>
{
type symmetry;
type symmetry;
value ...;
}
\endverbatim
......@@ -82,7 +83,7 @@ public:
);
//- Construct from patch, internal field and dictionary
//- The "value" entry is NO_READ.
//- The "value" entry is MUST_READ.
symmetryFvsPatchField
(
const fvPatch&,
......@@ -126,6 +127,12 @@ public:
{
return fvsPatchField<Type>::Clone(*this, iF);
}
// Member Functions
//- Write includes "value" entry
virtual void write(Ostream&) const;
};
......
......@@ -49,7 +49,7 @@ Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
const dictionary& dict
)
:
fvsPatchField<Type>(p, iF, dict, IOobjectOption::NO_READ)
fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
{
if (!isType<symmetryPlaneFvPatch>(p))
{
......@@ -105,4 +105,14 @@ Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::symmetryPlaneFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
fvsPatchField<Type>::writeValueEntry(os);
}
// ************************************************************************* //
......@@ -29,14 +29,15 @@ Class
Description
This boundary condition enforces a symmetryPlane constraint
The "value" entry is NO_READ, NO_WRITE.
The "value" entry is MUST_READ.
Usage
Example of the boundary condition specification:
\verbatim
<patchName>
{
type symmetryPlane;
type symmetryPlane;
value ...;
}
\endverbatim
......@@ -81,7 +82,7 @@ public:
);
//- Construct from patch, internal field and dictionary.
//- The "value" entry is NO_READ.
//- The "value" entry is MUST_READ.
symmetryPlaneFvsPatchField
(
const fvPatch&,
......@@ -125,6 +126,12 @@ public:
{
return fvsPatchField<Type>::Clone(*this, iF);
}
// Member Functions
//- Write includes "value" entry
virtual void write(Ostream&) const;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment