IOList, GlobalIOList, CompactIOList: Templated on container type

This reduces duplication and inconsistency between the List, Field, Map,
and PtrList variants. It also allows for future extension to other
container types such as DynamicList.
This commit is contained in:
Will Bainbridge
2022-09-14 16:30:38 +01:00
parent b0450ccd25
commit fef0206bdb
56 changed files with 1266 additions and 2385 deletions

View File

@ -69,7 +69,7 @@ tmp<IOField<Type>> reconstructLagrangianField
template<class Type>
tmp<CompactIOField<Field<Type>, Type>> reconstructLagrangianFieldField
tmp<CompactIOField<Field<Type>>> reconstructLagrangianFieldField
(
const word& cloudName,
const polyMesh& mesh,

View File

@ -89,7 +89,7 @@ Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
template<class Type>
Foam::tmp<Foam::CompactIOField<Foam::Field<Type>, Type>>
Foam::tmp<Foam::CompactIOField<Foam::Field<Type>>>
Foam::reconstructLagrangianFieldField
(
const word& cloudName,
@ -99,9 +99,9 @@ Foam::reconstructLagrangianFieldField
)
{
// Construct empty field on mesh
tmp<CompactIOField<Field<Type>, Type >> tfield
tmp<CompactIOField<Field<Type>>> tfield
(
new CompactIOField<Field<Type>, Type>
new CompactIOField<Field<Type>>
(
IOobject
(
@ -132,7 +132,7 @@ Foam::reconstructLagrangianFieldField
if (localIOobject.headerOk())
{
CompactIOField<Field<Type>, Type> fieldi(localIOobject);
CompactIOField<Field<Type>> fieldi(localIOobject);
label offset = field.size();
field.setSize(offset + fieldi.size());
@ -203,7 +203,7 @@ void Foam::reconstructLagrangianFieldFields
)
{
{
const word fieldClassName(CompactIOField<Field<Type>, Type>::typeName);
const word fieldClassName(CompactIOField<Field<Type>>::typeName);
IOobjectList fields = objects.lookupClass(fieldClassName);