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
|
//- String representation of property types
|
||||||
DefinePropertyTypes
|
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
|
//- Cumulative particle counter - used to provode unique ID
|
||||||
|
|||||||
@ -66,6 +66,7 @@ namespace Foam
|
|||||||
|
|
||||||
|
|
||||||
//- Define a static 'propertyTypes' for the types of particle properties
|
//- Define a static 'propertyTypes' for the types of particle properties
|
||||||
|
// Brace brackets are used to delimit binary write groups
|
||||||
// \sa AddToPropertyTypes
|
// \sa AddToPropertyTypes
|
||||||
#define DefinePropertyTypes(str) \
|
#define DefinePropertyTypes(str) \
|
||||||
\
|
\
|
||||||
@ -78,6 +79,7 @@ namespace Foam
|
|||||||
|
|
||||||
|
|
||||||
//- Add to existing static 'propertyTypes' for the types of particle properties
|
//- Add to existing static 'propertyTypes' for the types of particle properties
|
||||||
|
// Brace brackets are used to delimit binary write groups
|
||||||
// \sa AddToPropertyTypes
|
// \sa AddToPropertyTypes
|
||||||
#define AddToPropertyTypes(ParcelType, str) \
|
#define AddToPropertyTypes(ParcelType, str) \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -162,12 +162,11 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- String representation of property types
|
//- String representation of property types
|
||||||
static string propertyTypes()
|
AddToPropertyTypes
|
||||||
{
|
(
|
||||||
// TODO: collision information types
|
ParcelType,
|
||||||
NotImplemented;
|
"{vector vector vector} *"
|
||||||
return string::null;
|
);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|||||||
@ -325,7 +325,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" label"
|
"{label"
|
||||||
+ " label"
|
+ " label"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
@ -334,7 +334,7 @@ public:
|
|||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " vector"
|
+ " vector}"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -184,7 +184,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" vector"
|
"{vector}"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -272,9 +272,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" List<scalar>"
|
" scalars scalars scalars"
|
||||||
+ " List<scalar>"
|
|
||||||
+ " List<Scalar>"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -226,8 +226,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" scalar"
|
"{scalar} scalars"
|
||||||
+ " List<scalar>"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -282,8 +282,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" scalar"
|
"{scalar scalar}"
|
||||||
+ " scalar"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -201,7 +201,7 @@ public:
|
|||||||
AddToPropertyTypes
|
AddToPropertyTypes
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
" scalar"
|
"{scalar"
|
||||||
+ " vector"
|
+ " vector"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
@ -213,7 +213,7 @@ public:
|
|||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar"
|
||||||
+ " scalar"
|
+ " scalar}"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user