decomp - Domain Decomposition python functionsΒΆ

  • nodeGrid(n,box_size,rc,skin,eh_size=0,ratioMS=0,idealGas=0,slabMSDims=[0,0,0]):

    It determines how the processors are distributed and how the cells are arranged. The algorithm is dimensional sensitive for both homogeneous and inhomogeneous setups. On top of such functionality it presents specific features for region divided heterogenous setups (e.g. for AdResS) [see H.V. Guzman et. al, Phys. Rev. E, 96, 053311 (2017)] Link to the paper: https://doi.org/10.1103/PhysRevE.96.053311

    box_size - 3D vector cointainig the size of the simulation box box_size [L_x,L_y,L_z] rc - cutoff radius of interaction skin - skin size for the verlet list calculation n - total number of processes eh_size - 1D length of the high-resolution region (e.g. for AdResS Atomistic/Explicit+Hybrid regions) ratioMS - spatial mapping ratio between high-resolution region and the low-resolution one

    (e.g. for AdResS mapping the atomistic water molecule to the CG-model; leads to a ratioMS=3)

    idealGas - this is a Flag for treating the low-resolution region as an Ideal Gas, when TRUE (no interactions included,

    thus none force computations load)

    slabMSDims - 3D vector cointainig flags describing the type of axis, if heterogeneous value is 1, else 0

  • nodeGridSimple(n):

    It determines how the processors are distributed and how the cells are arranged. Note: Use it exclusively for Lattice-Boltzmann simulations, or non-parallelized tests. n - number of processes

  • cherrypickTotalProcs(box_size,rc,skin,MnN,CpN,percTol=0.2,eh_size=0,ratioMS=0,idealGas=0,slabMSDims=[0,0,0]):

    To be used for heterogenous simulations where the spatial heterogeinity is known on an a-priori manner, where this function returns n as the total number of processes to be used for the best decomposition of the system as a function of a tolerance ratio which depending on the giving range [0, MnN*CpN] of processors availability different combinations of P_x,P_y and P_z can be found and hence several values of n this ‘n’ can become an array. Most of the parameters have been described for nodeGrid(...), except:

    MnN - M number of Nodes to be available (e.g. 128 processes/cores, 16 cores per Node gives a total of 8 Nodes) CpN - C number of Cores available in each Node (e.g. 16 Cores per Node or 20 Cores per Node) percTol - Axis base tolerance percentage to the ideal distribution of P-processors per axes P_x,P_y,P_z

  • neiListHom(node_grid,box,rc,skin):

    The new domain decomposition divides the subdomains in a neighborlist of corse in a grid of 3 arrays [N_x,N_y,N_z]. In this case, the neighbor list is homogeneous (non a-priori load imbalance). Most of the parameters have been described above, except:

    node_grid - M number of Nodes to be available (e.g. 128 processes/cores, 16 cores per Node gives a total of 8 Nodes)

  • neiListAdress(node_grid, cell_grid,rc,skin,eh_size,adrCenter,ratioMS,idealGasFlag=True,sphereAdr=False,slabMSDims=[1,0,0]):

    The new domain decomposition divides the subdomains in a neighborlist of corse in a grid of 3 arrays [N_x,N_y,N_z]. In this case, the neighbor list is homogeneous (non a-priori load imbalance). Most of the parameters have been described above, except:

    cell_grid - Based on the homogenous allocation of cells per subdomain, a referential value adrCenter - Box center of the heterogeneous simulation box [adrCenter_x,adrCenter_y,adrCenter_z], commonly the middle of

    high-resolution region.

    idealGasFlag - This is a Flag for treating the low-resolution region as an Ideal Gas (no interactions included,

    thus less load)

    sphereAdr - Geometry of the high-resolution region, if TRUE spherical, otherwise Slab-like

  • cellGrid(box_size, node_grid, rc, skin, halfCellInt):

    It returns an appropriate grid of cells. halfCellInt - controls the use of half-cells (value 2), third-cells (value 3) or higher. Implicit value 1 for full cells (normal functionality).

  • tuneSkin(system, integrator, minSkin=0.01, maxSkin=1.2, precision=0.001):

    It tunes the skin size for the current system

  • printTimeVsSkin(system, integrator, minSkin=0.01, maxSkin=1.5, skinStep = 0.01):

    It prints time of running versus skin size in the range [minSkin, maxSkin] with the step skinStep