fvPatchFields: Added "assignable()" attribute

which returns true if the fvPatchField type provides an assignment operator
This commit is contained in:
Henry Weller
2016-02-12 14:26:49 +00:00
parent 25f98bf7cf
commit 298cf122dd
22 changed files with 250 additions and 47 deletions

View File

@ -138,7 +138,7 @@ public:
// Member functions // Member functions
// Access // Attributes
//- Return true if this patch field fixes a value. //- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving // Needed to check if a level has to be specified while solving

View File

@ -130,9 +130,9 @@ public:
// Member functions // Member functions
// Access // Attributes
//- Return true if this patch field fixes a value. //- Return true: this patch field fixes a value.
// Needed to check if a level has to be specified while solving // Needed to check if a level has to be specified while solving
// Poissons equations. // Poissons equations.
virtual bool fixesValue() const virtual bool fixesValue() const
@ -140,6 +140,12 @@ public:
return true; return true;
} }
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions // Mapping functions

View File

@ -150,7 +150,7 @@ public:
// Member functions // Member functions
// Access // Attributes
//- Return true if this patch field fixes a value. //- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving // Needed to check if a level has to be specified while solving
@ -160,6 +160,12 @@ public:
return true; return true;
} }
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Evaluation functions // Evaluation functions

View File

@ -179,6 +179,12 @@ public:
return true; return true;
} }
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Return defining fields // Return defining fields

View File

@ -131,7 +131,7 @@ public:
// Member functions // Member functions
// Access // Attributes
//- Return true if this patch field fixes a value. //- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving // Needed to check if a level has to be specified while solving
@ -141,6 +141,12 @@ public:
return true; return true;
} }
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Evaluation functions // Evaluation functions

View File

@ -113,6 +113,16 @@ public:
// Member functions // Member functions
// Attributes
//- Return true if the value of the patch field
// is altered by assignment
virtual bool assignable() const
{
return true;
}
// Evaluation functions // Evaluation functions
//- Return gradient at boundary //- Return gradient at boundary

View File

@ -186,6 +186,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of phi //- Return the name of phi

View File

@ -149,6 +149,15 @@ public:
// Member functions // Member functions
// Access
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions // Mapping functions
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object

View File

@ -165,6 +165,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -150,6 +150,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions // Mapping functions
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -185,6 +185,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the phaseName //- Return the phaseName

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -177,6 +177,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of rho //- Return the name of rho

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -173,6 +173,14 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of rho //- Return the name of rho

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -173,6 +173,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of rho //- Return the name of rho

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -163,6 +163,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of phi //- Return the name of phi

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -138,6 +138,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -156,6 +156,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of rho //- Return the name of rho

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -172,6 +172,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of rho //- Return the name of rho

View File

@ -130,6 +130,40 @@ public:
new slipFvPatchField<Type>(*this, iF) new slipFvPatchField<Type>(*this, iF)
); );
} }
// Member functions
// Attributes
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Member operators
// virtual void operator=(const UList<Type>&) {}
// virtual void operator=(const fvPatchField<Type>&) {}
// virtual void operator+=(const fvPatchField<Type>&) {}
// virtual void operator-=(const fvPatchField<Type>&) {}
// virtual void operator*=(const fvPatchField<scalar>&) {}
// virtual void operator/=(const fvPatchField<scalar>&) {}
// virtual void operator+=(const Field<Type>&) {}
// virtual void operator-=(const Field<Type>&) {}
// virtual void operator*=(const Field<scalar>&) {}
// virtual void operator/=(const Field<scalar>&) {}
// virtual void operator=(const Type&) {}
// virtual void operator+=(const Type&) {}
// virtual void operator-=(const Type&) {}
// virtual void operator*=(const scalar) {}
// virtual void operator/=(const scalar) {}
}; };

View File

@ -166,6 +166,17 @@ public:
} }
// Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Mapping functions // Mapping functions
//- Map (and resize as needed) from self given a mapping object //- Map (and resize as needed) from self given a mapping object
@ -182,8 +193,6 @@ public:
); );
// Member functions
//- Update the coefficients associated with the patch field //- Update the coefficients associated with the patch field
virtual void updateCoeffs(); virtual void updateCoeffs();

View File

@ -300,6 +300,33 @@ public:
// Member functions // Member functions
// Attributes
//- Return the type of the calculated for of fvPatchField
static const word& calculatedType();
//- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving
// Poissons equations.
virtual bool fixesValue() const
{
return false;
}
//- Return true if the value of the patch field
// is altered by assignment (the default)
virtual bool assignable() const
{
return true;
}
//- Return true if this patch field is coupled
virtual bool coupled() const
{
return false;
}
// Access // Access
//- Return local objectRegistry //- Return local objectRegistry
@ -336,23 +363,6 @@ public:
return patchType_; return patchType_;
} }
//- Return the type of the calculated for of fvPatchField
static const word& calculatedType();
//- Return true if this patch field fixes a value.
// Needed to check if a level has to be specified while solving
// Poissons equations.
virtual bool fixesValue() const
{
return false;
}
//- Return true if this patch field is coupled
virtual bool coupled() const
{
return false;
}
//- Return true if the boundary condition has already been updated //- Return true if the boundary condition has already been updated
bool updated() const bool updated() const
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -177,6 +177,15 @@ public:
// Member functions // Member functions
// Attributes
//- Return true: this patch field is altered by assignment
virtual bool assignable() const
{
return true;
}
// Access // Access
//- Return the name of phi //- Return the name of phi