-
-
Notifications
You must be signed in to change notification settings - Fork 4
Solver algorithms
All algorithms are executed inside the main trials loop. Basic structure of PXO is given below.
for trial_count = 1:TOTAL_TRIALS
Initialization of parameters
Monte Carlo Solver
Analyze the grain structure
end
TOTAL_TRIALS
defines the total number of repeats to be cariied out. Inside the Monte Carlo Solver
, process branches out to different algorithms in a switch case statement. Each algorithm of the Monte Carlo Solver
is described below.
Solver algorithm 01, [][][] Solver algorithm 0101
ALG 01
is one of the basic algorithm described in many research papers. Matrix access routes has been optimized for speed. Number of Calculations needed have also been kept at a bare minimum. Performance can be found here. Structure is below.
for ms = start:finalmcs % Number of Monte-Carlo time steps
for pt = 1:numel(s) % Size of the domain = number of available lattice sites
Energy minimization attempt will is here (generate a rand(1) for every lattice site (pt))
Change site orientation if energy reduces
Record the state variables if necessary
end
end
Energy minimization attempt
generates random number and depending on whther reduces energy or not, the orientation at a site is either updated with the new random orientation or the old is retained. In ALG 01
, this is done for every point seperately.
ALG 0101
is ALG 01
with far fewer number of calculations than ALG 01
. Basic structure is the same. But, instead of generating a random number for every point inside the inner loop, a matrix of random numbers is generated in every time step.
for ms = start:finalmcs % Number of Monte-Carlo time steps
Generate a random orientation matrix for the lattice
for pt = 1:numel(s) % Size of the domain = number of available lattice sites
Energy minimization attempt will is here (access the previosuly made random matrix at location pt)
Change site orientation if energy reduces
Record the state variables if necessary
end
end
This allows a speed up of almst 40%. More on performance is here. Usually, the 3rd step is commented out to reduce branching and to save time. You may uncomment as and when needed.
Solver algorithm 02, [][][] Solver algorithm 0201, [][][] Solver algorithm 0202
Solver algorithm 03, [][][] Solver algorithm 0301, [][][] Solver algorithm 0302
03 considers transition probability. 301 is 102 with transition probability. So this is faster than 3. 302 considers spatial distribution of transition probabilities. Does not work on rejection sampling, and is a bit slow.
- Codes and documentations by Sunil Anandatheertha, PhD
General info
- Capabilities
- Image gallery
- Cited in
- Requirements
- Installation instructions
- Using PXO
- Licensing
- Sponsorship appeal
- Contributor: SA
- Acknowledgements
Space partitioning users
Grain structure users
- Start here
- Image gallery
- Video gallery
- Limitations
- Performance
- Validation
- Tutorials & test cases
- Voronoi Tessellation
- Best practices
- GUI
- PXO-mtex
- PXO-mtex-mtex2gmsh
Theory reference
- Ising model
- Pott's model
- Boundary conditions
- Kernel functions
- Material defs. and params.
- Space partitioning
REFERENCES
Listings