mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: group info about particle output with "{}" etc
- The only reasonable means of mirroring the data layout.
The '{}' delimiters mark the extent of the binary writes.
The primitives 'label' and 'scalar' are directly supported and correspond
to known byte widths.
Using "List<scalar>" was a bad choice, since this triggers unpleasant
tokenizing behaviour. Instead use 'scalars' as a provisional placeholder
to indicates a list of scalar values. However, there is currently no
support for actually handling lists of scalars, for several reasons:
* The information is not available at compile-time.
The cloud or parcel must be queried. And it must be guaranteed
that this value is consistent for the entire cloud.
* Binary output of lists is currently not great for determining the
the encoded width:
- A zero-size list is a single '0'.
- The leading size is a non-constant number of digits.
- There are prefix/suffix newlines need to be tagged and
skipped.
The special '*' (glob) token indicates that the remaining content
has a dynamic variable length and nothing reasonable can be known
about their sizes. This is exemplified by the collision records.
This commit is contained in:
@ -322,7 +322,7 @@ public:
|
||||
//- String representation of property types
|
||||
DefinePropertyTypes
|
||||
(
|
||||
"vector label label scalar label label label label"
|
||||
"{vector label label scalar label label label label}"
|
||||
);
|
||||
|
||||
//- Cumulative particle counter - used to provode unique ID
|
||||
|
||||
@ -66,6 +66,7 @@ namespace Foam
|
||||
|
||||
|
||||
//- Define a static 'propertyTypes' for the types of particle properties
|
||||
// Brace brackets are used to delimit binary write groups
|
||||
// \sa AddToPropertyTypes
|
||||
#define DefinePropertyTypes(str) \
|
||||
\
|
||||
@ -78,6 +79,7 @@ namespace Foam
|
||||
|
||||
|
||||
//- Add to existing static 'propertyTypes' for the types of particle properties
|
||||
// Brace brackets are used to delimit binary write groups
|
||||
// \sa AddToPropertyTypes
|
||||
#define AddToPropertyTypes(ParcelType, str) \
|
||||
\
|
||||
|
||||
@ -162,12 +162,11 @@ public:
|
||||
);
|
||||
|
||||
//- String representation of property types
|
||||
static string propertyTypes()
|
||||
{
|
||||
// TODO: collision information types
|
||||
NotImplemented;
|
||||
return string::null;
|
||||
}
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
"{vector vector vector} *"
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
@ -325,7 +325,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" label"
|
||||
"{label"
|
||||
+ " label"
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
@ -334,7 +334,7 @@ public:
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
+ " vector"
|
||||
+ " vector}"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" vector"
|
||||
"{vector}"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -272,9 +272,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" List<scalar>"
|
||||
+ " List<scalar>"
|
||||
+ " List<Scalar>"
|
||||
" scalars scalars scalars"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -226,8 +226,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" scalar"
|
||||
+ " List<scalar>"
|
||||
"{scalar} scalars"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -282,8 +282,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" scalar"
|
||||
+ " scalar"
|
||||
"{scalar scalar}"
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ public:
|
||||
AddToPropertyTypes
|
||||
(
|
||||
ParcelType,
|
||||
" scalar"
|
||||
"{scalar"
|
||||
+ " vector"
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
@ -213,7 +213,7 @@ public:
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
+ " scalar"
|
||||
+ " scalar}"
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user