Go to the documentation of this file.
37 offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
57 specialPosition_(
Zero),
58 potentialEnergy_(0.0),
67 if (is.
format() == IOstream::ASCII)
86 readRawScalar(is, Q_.data(), tensor::nComponents);
87 readRawScalar(is, v_.data(), vector::nComponents);
88 readRawScalar(is, a_.data(), vector::nComponents);
89 readRawScalar(is, pi_.data(), vector::nComponents);
90 readRawScalar(is, tau_.data(), vector::nComponents);
91 readRawScalar(is, specialPosition_.data(), vector::nComponents);
92 readRawScalar(is, &potentialEnergy_);
93 readRawScalar(is, rf_.data(), tensor::nComponents);
101 is.
read(
reinterpret_cast<char*
>(&Q_), sizeofFields);
104 is >> siteForces_ >> sitePositions_;
113 const bool valid = mC.size();
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);
256 Info<<
"writeFields " << mC.name() <<
endl;
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_;
static const word prefix
The prefix to local: lagrangian.
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...
molecule(const polyMesh &mesh, const barycentric &coordinates, 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.
A primitive field of type <T> with automated input and output.
static constexpr const zero Zero
Global zero (0)
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
streamFormat format() const noexcept
Get the current stream format.
static void readFields(TrackCloudType &c)
Read the fields associated with the owner cloud.
const vector & specialPosition() const
static void writeFields(const TrackCloudType &c)
Write the fields associated with the owner cloud.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const vector & tau() const
virtual Ostream & write(const char c)
Write character.
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
virtual bool endRawRead()=0
End of low-level raw binary read.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName timePath() const
Return current time path.
static const std::size_t sizeofFields
Size in bytes of the fields.
const polyMesh & mesh() const
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
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.
OBJstream os(runTime.globalPath()/outputName)
Vector< scalar > vector
A scalar version of the templated Vector.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
static void readFields(Cloud< molecule > &mC)
virtual bool beginRawRead()=0
Start of low-level raw binary read.
constexpr scalar pi(M_PI)
label readRawLabel(Istream &is)
Read raw label from binary stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Time & time() const noexcept
Return time registry.
const vector & pi() const
virtual Istream & read(token &)=0
Return next token from stream.