mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function1 and PatchFunction1 improvements (#1917)
- easier support for non-mandatory functions. In some boundary conditions it can be desirable to support additional functions, but not necessarily require them. Make this easier to support with a Function1, PatchFunction1 NewIfPresent() selector. - support for compatibility lookups - harmonize branching logic and error handling between Function1 and PatchFunction1. ENH: refactor a base class for Function1, PatchFunction1 - includes base characteristics, patch or scalar information ENH: additional creation macros - makeConcreteFunction1, makeConcretePatchFunction1Type for adding a non-templated function into the correct templated selection table. makeScalarPatchFunction1 for similarity with makeScalarFunction1
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -61,6 +62,14 @@ Foam::Function1Types::Scale<Type>::Scale(const Scale<Type>& rhs)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::Function1Types::Scale<Type>::writeEntries(Ostream& os) const
|
||||
{
|
||||
scale_->writeData(os);
|
||||
value_->writeData(os);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::Function1Types::Scale<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
@ -68,10 +77,7 @@ void Foam::Function1Types::Scale<Type>::writeData(Ostream& os) const
|
||||
os << token::END_STATEMENT << nl;
|
||||
|
||||
os.beginBlock(word(this->name() + "Coeffs"));
|
||||
|
||||
scale_->writeData(os);
|
||||
value_->writeData(os);
|
||||
|
||||
writeEntries(os);
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user