STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::synthesis::Brickwork Class Reference

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
 
Brickworkoperator= (const Brickwork &original)=default
 
Brickworkoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Brickwork() [1/2]

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.

Parameters
target_multipleWork to bring the number of bricks as close to a multiple of this number as possible, without going over
preferred_a_lengthsA list of preferred lengths for volume partitions along the unit cell A axis.
discouraged_a_lengthsA list of discouraged lengths for volume partitions along the unit cell A axis

◆ Brickwork() [2/2]

stormm::synthesis::Brickwork::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.

Parameters
originalThe original object to copy or move
otherAnother object placed on the right hand side of the assignment statement

Member Function Documentation

◆ getAverageBrickLength()

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:

  • Provide one of the unit cell axis desginations (A, B, C)
  • Provide one of the Cartesian dimensions (x ~ A, y ~ B, z ~ C)
Parameters
dimThe unit cell axis along which to take the average dimension

◆ getBrickCount()

int stormm::synthesis::Brickwork::getBrickCount ( ) const

Get the number of bricks, the number of volume partitions spanning one system or all systems.

Overloaded:

  • Get the number of bricks in the synthesis of all systems
  • Get the number of bricks in a particular system
Parameters
system_indexThe system of interest

◆ getBrickLengths()

int3 stormm::synthesis::Brickwork::getBrickLengths ( int brick_index) const

Get the lengths of a volume partition along all sides.

Parameters
brick_indexIndex of the volume partition of interest

◆ getBrickLengthsWithHalo()

int3 stormm::synthesis::Brickwork::getBrickLengthsWithHalo ( int brick_index) const

Get the lengths of a volume partition along all sides, with accounting for its halo.

Parameters
brick_indexIndex of the volume partition of interest

◆ getBrickOrigin()

int3 stormm::synthesis::Brickwork::getBrickOrigin ( int brick_index) const

Get the origin of the volume partition, without consideration of the halo volume.

Parameters
brick_indexIndex of the volume partition of interest

◆ getBrickOriginWithHalo()

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.

Parameters
brick_indexIndex of the volume partition of interest

◆ getSystemDimensions()

int3 stormm::synthesis::Brickwork::getSystemDimensions ( int system_index) const

Get the system dimensions.

Parameters
system_indexThe system of interest

◆ getSystemMembership()

int stormm::synthesis::Brickwork::getSystemMembership ( int brick_index) const

Get the system index to which a particular brick pertains.

Parameters
brick_indexIndex of the volume partition of interest

◆ subdivide()

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.

Parameters
target_work_unit_multipleThe ideal number of work units to create
preferred_a_lengthsA list of preferred lengths for volume partitions along the unit cell A axis
discouraged_a_lengthsA list of discouraged lengths for volume partitions along the unit cell A axis

The documentation for this class was generated from the following files: