STORMM Source Documentation
|
This class will subdivide a series of simulatiion boxes, whose lengths are whole numbers on all sides, into a set of partitions which keep to specified limits and cover the entire space in a number of rectangular partitions as close as possible to a specified number. The partitions can be ordered by size. More...
#include <brickwork.h>
Public Member Functions | |
Brickwork (const std::vector< int3 > &system_dimensions_in={}, int a_span_max_in=7, int bc_cross_section_max_in=16, int halo_under_in=1, int halo_over_in=0, int max_nonhalo_volume_in=48, int target_multiple=1, const std::vector< int > &preferred_a_lengths={}, const std::vector< int > &discouraged_a_lengths={}) | |
The minimum necessary information is a series of tuples indicating the dimensions of each system. | |
int | getSystemCount () const |
Get the number of individual systems. | |
int3 | getBrickOrigin (int brick_index) const |
Get the origin of the volume partition, without consideration of the halo volume. | |
int3 | getBrickOriginWithHalo (int brick_index) const |
Get the origin of the volume partition, with the halo to the left along each axis subtracted. If this runs out of the primary unit cell, the origin coordinates will be wrapped. | |
int3 | getBrickLengths (int brick_index) const |
Get the lengths of a volume partition along all sides. | |
int3 | getBrickLengthsWithHalo (int brick_index) const |
Get the lengths of a volume partition along all sides, with accounting for its halo. | |
int | getSystemMembership (int brick_index) const |
Get the system index to which a particular brick pertains. | |
int3 | getSystemDimensions (int system_index) const |
Get the system dimensions. | |
void | subdivide (int target_work_unit_multiple=1, const std::vector< int > &preferred_a_lengths={}, const std::vector< int > &discouraged_a_lengths={}) |
Subdivide all systems into a series of bricks. This starts by creating the fewest possible bricks and then further subdividing until the target number, or something near to a multiple thereof, is hit. | |
Brickwork (const Brickwork &original)=default | |
With no pointers to repair, no const members, and any array data members taken from the Standard Template Library, the default copy and move constructors, as well as copy and move assignment operators, are appropriate. | |
Brickwork (Brickwork &&original)=default | |
Brickwork & | operator= (const Brickwork &original)=default |
Brickwork & | operator= (Brickwork &&original)=default |
int | getBrickCount () const |
Get the number of bricks, the number of volume partitions spanning one system or all systems. | |
int | getBrickCount (int system_index) const |
double2 | getAverageBrickLength (UnitCellAxis dim) const |
Get the average dimension of all bricks along one unit cell A axis, with its standard deviation. The results are returned in the "x" and "y" members of the tuple, respectively. | |
double2 | getAverageBrickLength (CartesianDimension dim) const |
This class will subdivide a series of simulatiion boxes, whose lengths are whole numbers on all sides, into a set of partitions which keep to specified limits and cover the entire space in a number of rectangular partitions as close as possible to a specified number. The partitions can be ordered by size.
stormm::synthesis::Brickwork::Brickwork | ( | const std::vector< int3 > & | system_dimensions_in = {}, |
int | a_span_max_in = 7, | ||
int | bc_cross_section_max_in = 16, | ||
int | halo_under_in = 1, | ||
int | halo_over_in = 0, | ||
int | max_nonhalo_volume_in = 48, | ||
int | target_multiple = 1, | ||
const std::vector< int > & | preferred_a_lengths = {}, | ||
const std::vector< int > & | discouraged_a_lengths = {} ) |
The minimum necessary information is a series of tuples indicating the dimensions of each system.
target_multiple | Work to bring the number of bricks as close to a multiple of this number as possible, without going over |
preferred_a_lengths | A list of preferred lengths for volume partitions along the unit cell A axis. |
discouraged_a_lengths | A list of discouraged lengths for volume partitions along the unit cell A axis |
|
default |
With no pointers to repair, no const members, and any array data members taken from the Standard Template Library, the default copy and move constructors, as well as copy and move assignment operators, are appropriate.
original | The original object to copy or move |
other | Another object placed on the right hand side of the assignment statement |
double2 stormm::synthesis::Brickwork::getAverageBrickLength | ( | UnitCellAxis | dim | ) | const |
Get the average dimension of all bricks along one unit cell A axis, with its standard deviation. The results are returned in the "x" and "y" members of the tuple, respectively.
Overloaded:
dim | The unit cell axis along which to take the average dimension |
int stormm::synthesis::Brickwork::getBrickCount | ( | ) | const |
Get the number of bricks, the number of volume partitions spanning one system or all systems.
Overloaded:
system_index | The system of interest |
int3 stormm::synthesis::Brickwork::getBrickLengths | ( | int | brick_index | ) | const |
Get the lengths of a volume partition along all sides.
brick_index | Index of the volume partition of interest |
int3 stormm::synthesis::Brickwork::getBrickLengthsWithHalo | ( | int | brick_index | ) | const |
Get the lengths of a volume partition along all sides, with accounting for its halo.
brick_index | Index of the volume partition of interest |
int3 stormm::synthesis::Brickwork::getBrickOrigin | ( | int | brick_index | ) | const |
Get the origin of the volume partition, without consideration of the halo volume.
brick_index | Index of the volume partition of interest |
int3 stormm::synthesis::Brickwork::getBrickOriginWithHalo | ( | int | brick_index | ) | const |
Get the origin of the volume partition, with the halo to the left along each axis subtracted. If this runs out of the primary unit cell, the origin coordinates will be wrapped.
brick_index | Index of the volume partition of interest |
int3 stormm::synthesis::Brickwork::getSystemDimensions | ( | int | system_index | ) | const |
Get the system dimensions.
system_index | The system of interest |
int stormm::synthesis::Brickwork::getSystemMembership | ( | int | brick_index | ) | const |
Get the system index to which a particular brick pertains.
brick_index | Index of the volume partition of interest |
void stormm::synthesis::Brickwork::subdivide | ( | int | target_work_unit_multiple = 1, |
const std::vector< int > & | preferred_a_lengths = {}, | ||
const std::vector< int > & | discouraged_a_lengths = {} ) |
Subdivide all systems into a series of bricks. This starts by creating the fewest possible bricks and then further subdividing until the target number, or something near to a multiple thereof, is hit.
target_work_unit_multiple | The ideal number of work units to create |
preferred_a_lengths | A list of preferred lengths for volume partitions along the unit cell A axis |
discouraged_a_lengths | A list of discouraged lengths for volume partitions along the unit cell A axis |