https://mooseframework.inl.gov
Classes | Namespaces | Functions
LineSegment.h File Reference

Go to the source code of this file.

Classes

class  LineSegment
 The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff. More...
 

Namespaces

 libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

void dataStore (std::ostream &stream, LineSegment &l, void *context)
 
void dataLoad (std::istream &stream, LineSegment &l, void *context)
 
void to_json (nlohmann::json &json, const LineSegment &l)
 

Function Documentation

◆ dataLoad()

void dataLoad ( std::istream &  stream,
LineSegment l,
void context 
)

Definition at line 274 of file LineSegment.C.

Referenced by dataLoad< Moose::LibtorchArtificialNeuralNet >(), ReporterState< std::vector< T > >::loadInternal(), RestartableDataReader::readHeader(), and RedistributeProperties::redistribute().

275 {
276  Point p0;
277  dataLoad(stream, p0, context);
278  Point p1;
279  dataLoad(stream, p1, context);
280  l.set(p0, p1);
281 }
void set(const Point &p0, const Point &p1)
Sets the points on the line segment.
Definition: LineSegment.C:260
void dataLoad(std::istream &stream, LineSegment &l, void *context)
Definition: LineSegment.C:274

◆ dataStore()

void dataStore ( std::ostream &  stream,
LineSegment l,
void context 
)

Definition at line 267 of file LineSegment.C.

Referenced by dataStore< Moose::LibtorchArtificialNeuralNet >(), RedistributeProperties::redistribute(), ReporterState< std::vector< T > >::storeInternal(), and RestartableDataWriter::write().

268 {
269  dataStore(stream, l.start(), context);
270  dataStore(stream, l.end(), context);
271 }
const Point & end() const
Ending of the line segment.
Definition: LineSegment.h:90
void dataStore(std::ostream &stream, LineSegment &l, void *context)
Definition: LineSegment.C:267
const Point & start() const
Beginning of the line segment.
Definition: LineSegment.h:85

◆ to_json()

void to_json ( nlohmann::json &  json,
const LineSegment l 
)

Definition at line 284 of file LineSegment.C.

Referenced by JSONOutput::outputSystemInformation(), ReporterContext< std::vector< T > >::store(), and RestartableData< std::list< T > >::storeJSONValue().

285 {
286  to_json(json["start"], l.start());
287  to_json(json["end"], l.end());
288 }
const Point & end() const
Ending of the line segment.
Definition: LineSegment.h:90
void to_json(nlohmann::json &json, const LineSegment &l)
Definition: LineSegment.C:284
const Point & start() const
Beginning of the line segment.
Definition: LineSegment.h:85