32 const std::size_t Foam::molecule::sizeofFields_
34 offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
53 specialPosition_(
Zero),
54 potentialEnergy_(0.0),
63 if (is.
format() == IOstream::ASCII)
70 is >> specialPosition_;
80 is.
read(reinterpret_cast<char*>(&Q_), sizeofFields_);
81 is >> siteForces_ >> sitePositions_;
88 "Foam::molecule::molecule" 89 "(const Cloud<molecule>& cloud, Foam::Istream&), bool" 213 piGlobal[i] = mol.Q_ & mol.pi_;
214 tauGlobal[i] = mol.Q_ & mol.tau_;
216 orientation1[i] = mol.Q_ &
vector(1,0,0);
217 orientation2[i] = mol.Q_ &
vector(0,1,0);
218 orientation3[i] = mol.Q_ &
vector(0,0,1);
235 orientation1.write();
236 orientation2.write();
237 orientation3.write();
241 if (isA<moleculeCloud>(mC))
259 os << token::SPACE << static_cast<const particle&>(mol)
275 os << static_cast<const particle&>(mol);
278 reinterpret_cast<const char*>(&mol.Q_),
279 molecule::sizeofFields_
281 os << mol.siteForces_ << mol.sitePositions_;
287 "Foam::Ostream& Foam::operator<<" 288 "(Foam::Ostream&, const Foam::molecule&)"
molecule(const polyMesh &mesh, const vector &position, const label celli, const label tetFacei, const label tetPtI, const tensor &Q, const vector &v, const vector &a, const vector &pi, const vector &tau, const vector &specialPosition, const constantProperties &constProps, const label special, const label id)
Construct from components.
const Time & time() const
Return time.
streamFormat format() const
Return current stream format.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const polyMesh & mesh() const
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
void writeXYZ(const fileName &fName) const
Write molecule sites in XYZ format.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
static void readFields(CloudType &c)
Read the fields associated with the owner cloud.
static void writeFields(const Cloud< molecule > &mC)
static void readFields(Cloud< molecule > &mC)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
virtual Istream & read(token &)=0
Return next token from stream.
static void writeFields(const CloudType &c)
Write the fields associated with the owner cloud.
const vector & tau() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
label readLabel(Istream &is)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static const word prefix
The prefix to local: lagrangian.
const vector & specialPosition() const
const vector & pi() const
Ostream & operator<<(Ostream &, const ensightPart &)
virtual Ostream & write(const token &)=0
Write next token to stream.
Mesh consisting of general polyhedral cells.
IOobject fieldIOobject(const word &fieldName, const IOobject::readOption r) const
Helper to construct IOobject for field and current time.
fileName timePath() const
Return current time path.
A primitive field of type <T> with automated input and output.
const word & name() const
Return name.