mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: updates to Xfer after commit 49331bf917
This commit is contained in:
@ -83,7 +83,7 @@ PtrList<List<Type> > readFields
|
|||||||
{
|
{
|
||||||
Info<< " reading field " << obj.name() << endl;
|
Info<< " reading field " << obj.name() << endl;
|
||||||
IOField<Type> newField(obj);
|
IOField<Type> newField(obj);
|
||||||
values.set(fieldI++, new List<Type>(newField.xfer()));
|
values.set(fieldI++, new List<Type>(newField.xferList()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ Field<Type>::Field(const Xfer<List<Type> >& f)
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Field<Type>::Field(const Xfer<Field<Type> >& f)
|
Field<Type>::Field(const Xfer<Field<Type> >& f)
|
||||||
:
|
:
|
||||||
List<Type>(f)
|
List<Type>(f().xferList())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -585,6 +585,13 @@ Xfer<Field<Type> > Field<Type>::xfer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Xfer<List<Type> > Field<Type>::xferList()
|
||||||
|
{
|
||||||
|
return List<Type>::xfer();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Field<Type>::writeEntry(const word& keyword, Ostream& os) const
|
void Field<Type>::writeEntry(const word& keyword, Ostream& os) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -305,6 +305,9 @@ public:
|
|||||||
//- Transfer contents to the Xfer container
|
//- Transfer contents to the Xfer container
|
||||||
Xfer<Field<Type> > xfer();
|
Xfer<Field<Type> > xfer();
|
||||||
|
|
||||||
|
//- Transfer contents to a List Xfer container
|
||||||
|
Xfer<List<Type> > xferList();
|
||||||
|
|
||||||
//- Write the field as a dictionary entry
|
//- Write the field as a dictionary entry
|
||||||
void writeEntry(const word& keyword, Ostream& os) const;
|
void writeEntry(const word& keyword, Ostream& os) const;
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ bool Foam::fileFormats::STARCDCore::readPoints
|
|||||||
|
|
||||||
|
|
||||||
// reuse memory if possible
|
// reuse memory if possible
|
||||||
DynamicList<point> dynPoints(points.xfer());
|
DynamicList<point> dynPoints(points.xferList());
|
||||||
DynamicList<label> dynPointId(ids.xfer()); // STAR-CD index of points
|
DynamicList<label> dynPointId(ids.xfer()); // STAR-CD index of points
|
||||||
|
|
||||||
dynPoints.clear();
|
dynPoints.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user