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:
@ -135,7 +135,7 @@ template<class Type>
|
||||
Foam::PatchFunction1Types::CodedField<Type>::CodedField
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& type,
|
||||
const word& redirectType,
|
||||
const word& entryName,
|
||||
const dictionary& dict,
|
||||
const bool faceValues
|
||||
@ -156,10 +156,7 @@ Foam::PatchFunction1Types::CodedField<Type>::CodedField
|
||||
const CodedField<Type>& rhs
|
||||
)
|
||||
:
|
||||
PatchFunction1<Type>(rhs),
|
||||
codedBase(),
|
||||
dict_(rhs.dict_),
|
||||
name_(rhs.name_)
|
||||
CodedField<Type>(rhs, rhs.patch())
|
||||
{}
|
||||
|
||||
|
||||
@ -202,7 +199,7 @@ Foam::PatchFunction1Types::CodedField<Type>::redirectFunction() const
|
||||
this->patch(),
|
||||
name_,
|
||||
dict,
|
||||
this->faceValues_
|
||||
this->faceValues()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -135,10 +135,6 @@ protected:
|
||||
// Get the dictionary to initialize the codeContext
|
||||
virtual const dictionary& codeDict() const;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const CodedField<Type>&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static Data Members
|
||||
@ -156,13 +152,19 @@ public:
|
||||
TypeName("coded");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const CodedField<Type>&) = delete;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
CodedField
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& type,
|
||||
const word& redirectType,
|
||||
const word& entryName,
|
||||
const dictionary& dict,
|
||||
const bool faceValues = true
|
||||
|
||||
Reference in New Issue
Block a user