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:
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user