A file reader.
More...
#include <FileReader.h>
A file reader.
The file reader realises one big table
Definition at line 25 of file FileReader.h.
◆ clear()
| void toolbox::particles::FileReader::clear |
( |
| ) |
|
◆ empty()
| bool toolbox::particles::FileReader::empty |
( |
| ) |
const |
◆ getNumberOfCoordinates()
| bool toolbox::particles::FileReader::getNumberOfCoordinates |
( |
| ) |
const |
◆ getParticlesWithinVoxel()
Take particles from database which fall into given voxel.
Overlapping vs. non-overlapping domain decomposition
In an SPMD environment, it is convenient to make each rank maintain its own input database. As a consequence, ranks have redundant particles and we will have to clean up eventually. To mirror this behaviour in the multithreaded context, we can remove particles whenever we assign them to an inner vertex, but we should also hand them out redundantly for boundary vertices.
- Parameters
-
| x | Center of voxel. If you use this within touchVertexFirstTime(), you can use the vertex position, i.e. the x() operation of the marker. If you use this function within a cell event, you can use x() as well, as it returns the centre. |
| h | Size of voxel. If you use this function within a cell event, just pass in h(). If you use it within a vertex event, you should scale h with 0.5. |
| remove | Remove a particle form the internal database if it is a match. In most cases, removing the particles immediately speeds up things, even though we then have a lot of (uneccessary) locks. |
- See also
- peano4::datamanagement::CellMarker::x()
-
peano4::datamanagement::VertexMarker::x()
◆ readDatFile()
| void toolbox::particles::FileReader::readDatFile |
( |
const std::string & | filename, |
|
|
const double | scale ) |
Read DAT file.
A dat file is a simple text file where we have one particle description per line. Each line holds exactly Dimensions double values.
◆ _data
| std::list< tarch::la::Vector<Dimensions,double> > toolbox::particles::FileReader::_data |
|
private |
◆ _log
The documentation for this class was generated from the following file: