Go to the documentation of this file.
34 offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
53 specialPosition_(vector::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);
228 specialPosition.
write();
235 orientation1.
write();
236 orientation2.
write();
237 orientation3.
write();
239 Info<<
"writeFields " << mC.name() <<
endl;
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_),
287 "Foam::Ostream& Foam::operator<<"
288 "(Foam::Ostream&, const Foam::molecule&)"
static const std::size_t sizeofFields_
Size in bytes of the fields.
streamFormat format() const
Return current stream format.
static void writeFields(const Cloud< molecule > &mC)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
A primitive field of type <T> with automated input and output.
List< vector > siteForces_
const Time & time() const
Return time.
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
virtual void write()
Calculate the Q and write.
virtual bool write() const
Write using setting from DB.
Ostream & endl(Ostream &os)
Add newline and flush stream.
This function object reads fields from the time directories and adds them to the mesh database for fu...
IOobject fieldIOobject(const word &fieldName, const IOobject::readOption r) const
Helper to construct IOobject for field and current time.
Mesh consisting of general polyhedral cells.
const vector & tau() const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Ostream & write(const token &)=0
Write next token to stream.
fileName timePath() const
Return current time path.
const polyMesh & mesh() const
Ostream & operator<<(Ostream &, const edgeMesh &)
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.
void writeXYZ(const fileName &fName) const
Write molecule sites in XYZ format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
List< vector > sitePositions_
Vector< scalar > vector
A scalar version of the templated Vector.
static const word prefix
The prefix to local: lagrangian.
static void readFields(Cloud< molecule > &mC)
const vector & specialPosition() const
label readLabel(Istream &is)
static void readFields(CloudType &c)
Read the fields associated with the owner cloud.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static void writeFields(const CloudType &c)
Write the fields associated with the owner cloud.
const vector & pi() const
virtual Istream & read(token &)=0
Return next token from stream.