32 template<
class ListType>
33 int Foam::CStringList::resetContent(
const ListType&
input)
46 for (
const auto&
s :
input)
48 nbytes_ +=
s.length() + 1;
52 argv_ =
new char*[
input.size()+1];
53 data_ =
new char[nbytes_+1];
57 for (
const auto&
s :
input)
59 char *next = stringCopy(argv_[argc_],
s);
60 argv_[++argc_] = next;
63 argv_[argc_] =
nullptr;
71 template<
class StringType>
77 for (
int i=0; i < argc; ++i)
79 if (argv[i]) list[i] = argv[i];
86 template<
class StringType>
90 return asList<StringType>(
count(argv), argv);
void clear()
Clear contents and free memory.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static Istream & input(Istream &is, IntRange< T > &range)
static List< StringType > asList(int argc, const char *const argv[])
Create a list from argc/argv parameters.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))