37 offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
57 specialPosition_(Zero),
58 potentialEnergy_(0.0),
92 readRawScalar(is, &potentialEnergy_);
104 is >> siteForces_ >> sitePositions_;
113 const bool valid = mC.
size();
157 mol.specialPosition_ = specialPosition[i];
158 mol.special_ = special[i];
170 const label np = mC.
size();
171 const bool valid = np;
226 specialPosition[i] = mol.specialPosition_;
227 special[i] = mol.special_;
230 piGlobal[i] = mol.Q_ & mol.pi_;
231 tauGlobal[i] = mol.Q_ & mol.tau_;
233 orientation1[i] = mol.Q_ &
vector(1,0,0);
234 orientation2[i] = mol.Q_ &
vector(0,1,0);
235 orientation3[i] = mol.Q_ &
vector(0,0,1);
245 specialPosition.
write(valid);
246 special.
write(valid);
249 piGlobal.
write(valid);
250 tauGlobal.
write(valid);
252 orientation1.
write(valid);
253 orientation2.
write(valid);
254 orientation3.
write(valid);
258 if (isA<moleculeCloud>(mC))
276 os << token::SPACE << static_cast<const particle&>(mol)
292 os << static_cast<const particle&>(mol);
295 reinterpret_cast<const char*
>(&mol.Q_),
298 os << mol.siteForces_ << mol.sitePositions_;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Base cloud calls templated on particle type.
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
IOobject fieldIOobject(const word &fieldName, const IOobject::readOption r) const
Helper to construct IOobject for field and current time.
label size() const noexcept
The number of elements in table.
A primitive field of type <T> with automated input and output.
const word & name() const noexcept
Return the object name.
streamFormat format() const noexcept
Get the current stream format.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
virtual bool check(const char *operation) const
Check IOstream status for given operation.
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual bool endRawRead()=0
End of low-level raw binary read.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
virtual Istream & read(token &)=0
Return next token from stream.
virtual Ostream & write(const char c)
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
fileName timePath() const
Return current time path.
Cmpt * data() noexcept
Return pointer to the first data element.
static const word prefix
The prefix to local: lagrangian.
void writeFields() const
Write fields.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
const polyMesh & mesh() const
void writeXYZ(const fileName &fName) const
Write molecule sites in XYZ format.
static const std::size_t sizeofFields
Size in bytes of the fields.
static void readFields(Cloud< molecule > &mC)
const Time & time() const noexcept
Return time registry.
static constexpr direction nComponents
Number of components in bool is 1.
Mesh consisting of general polyhedral cells.
virtual bool write(const bool valid=true) const
Write using setting from DB.
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label readRawLabel(Istream &is)
Read raw label from binary stream.