Go to the documentation of this file.
37 int main(
int argc,
char *argv[])
45 testField[0] = testField2[0] =
vector(1.0, 4.5, 6.3);
46 testField[1] = testField2[1] =
vector(5.2, 2.3, 3.5);
47 testField[2] = testField2[2] =
vector(7.5, 4.7, 7.7);
48 testField[3] = testField2[3] =
vector(2.8, 8.2, 2.3);
49 testField[4] = testField2[4] =
vector(6.1, 1.7, 8.8);
51 Info <<
"testField:" << testField <<
endl;
55 Info <<
"testField after appending:" << testField <<
endl;
59 Info <<
"testField after appending:" << testField <<
endl;
63 Info <<
"removed element:" << elem <<
endl;
64 Info <<
"testField:" << testField <<
endl;
68 Info <<
"testField:" << testField <<
endl;
72 Info <<
"testField after setSize:" << testField <<
endl;
74 testField.
append(testField2);
76 Info <<
"testField after appending testField2:" << testField <<
endl;
78 testField = testField2;
80 Info <<
"testField after assignment:" << testField <<
endl;
82 testField += testField2;
84 Info <<
"testField after field algebra:" << testField <<
endl;
90 Info <<
"testField after clear and append:" << testField <<
endl;
94 Info <<
"testField after clearStorage:" << testField <<
endl;
void clear()
Clear the addressed list, i.e. set the size to zero.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
void clearStorage()
Clear the list and delete storage.
void setSize(const label)
Alter the addressed list size.
Ostream & endl(Ostream &os)
Add newline and flush stream.
DynamicField< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Vector< scalar > vector
A scalar version of the templated Vector.
T remove()
Remove and return the top element.
int main(int argc, char *argv[])