Merge branch 'regression-3144-fvsPatchField' into 'develop'

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

See merge request Development/openfoam!691
This commit is contained in:
Kutalmış Berçin 2024-06-12 07:58:03 +00:00
commit 7b5e605b29
22 changed files with 150 additions and 25 deletions

View File

@ -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"
}
// ************************************************************************* //

View File

@ -186,6 +186,12 @@ public:
{
return tmp<Field<Type>>::New();
}
// Member Functions
//- Write without "value" entry!
virtual void write(Ostream&) const;
};

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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

View File

@ -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"
}
// ************************************************************************* //

View File

@ -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;
};

View File

@ -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"
}
// ************************************************************************* //

View File

@ -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;
};

View File

@ -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&,

View File

@ -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;

View File

@ -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

View File

@ -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&,

View File

@ -54,7 +54,6 @@ class cyclicSlipFvsPatchField
:
public cyclicFvsPatchField<Type>
{
public:
//- Runtime type information

View File

@ -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"
}
// ************************************************************************* //

View File

@ -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;
};

View File

@ -54,7 +54,6 @@ class nonuniformTransformCyclicFvsPatchField
:
public cyclicFvsPatchField<Type>
{
public:
//- Runtime type information

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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;
};

View File

@ -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);
}
// ************************************************************************* //

View File

@ -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;
};

View File

@ -49,7 +49,7 @@ Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
const dictionary& dict
)
:
fvsPatchField<Type>(p, iF, dict, IOobjectOption::NO_READ)
fvsPatchField<Type>(p, iF, dict, IOobjectOption::MUST_READ)
{
if (!isType<wedgeFvPatch>(p))
{
@ -105,4 +105,14 @@ Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::wedgeFvsPatchField<Type>::write(Ostream& os) const
{
fvsPatchField<Type>::write(os);
fvsPatchField<Type>::writeValueEntry(os);
}
// ************************************************************************* //

View File

@ -31,14 +31,15 @@ Description
This boundary condition is similar to the cyclic condition, except that
it is applied to 2-D geometries.
The "value" entry is NO_READ, NO_WRITE.
The "value" entry is MUST_READ.
Usage
Example of the boundary condition specification:
\verbatim
<patchName>
{
type wedge;
type wedge;
value uniform ...; // Required value entry
}
\endverbatim
@ -83,7 +84,7 @@ public:
);
//- Construct from patch, internal field and dictionary.
//- The "value" entry is NO_READ.
//- The "value" entry is MUST_READ.
wedgeFvsPatchField
(
const fvPatch&,
@ -127,6 +128,12 @@ public:
{
return fvsPatchField<Type>::Clone(*this, iF);
}
// Member Functions
//- Write includes "value" entry
virtual void write(Ostream&) const;
};