ermeel86 / sweeny

Efficient implementations of Sweeny's Monte Carlo algorithm for the Random Cluster Model
MIT License
6 stars 1 forks source link

Extract other observables #1

Open DanteCpp opened 6 years ago

DanteCpp commented 6 years ago

Dear Sir, first of all I have to thank you for making your code freely available, and second: I would need to extract the time series of other observables such as: the size of the box containing the biggest cluster, or more generally whether or not two opposite sides of the lattice are connected by an open path.

If I could find the datastructure where the configuration are stored I think I can easily extract those observables by myself. However I could not find it.

I am writing hoping to get some starting point from which I can try to extract what I need.

Looking forward to hearing from you, Dante.

ermeel86 commented 6 years ago

Hi Dante,

are you familiar with C? If so I would actually prefer to provide you with an improved (w.r.t. runtime scaling at criticality) and more update-to-date dynamic connectivity implementation (see my phd thesis). It is also designed so that you can simulate hypercubes for arbitrary positive integer dimension (with p.b.c.).

With a bit of effort one could wrap this into a Python library, too...

Cheers,

Eren.

DanteCpp commented 6 years ago

Dear Eren, Yes, I can code in C. It'd be great! I've read your paper about the density of bridges, and it is exactly what I need for my application. I'm studying a fabrication process capable of generating structures, morphologically equivalent to those sampled accordingly with the RCM. My goal is to engineer the fabrication process so that it generates structures with the wanted bridge density. Till I found your code, I was simulating by means of a classical Swendsen–Wang algorithm, then I've managed to extract the simulated configuration from the adjacency matrix of your implementation, although I'm not sure how I should interpret the edge.type == 2 in case of the Ising Model. Anyway, if you can share the up-to-date code it would be very useful.

Cheers, Dante.

ermeel86 commented 6 years ago

Hi Dante,

this sounds like a very exciting project, I would love to learn more (if that's ok for you). I am happy to give you my code and some instructions. What about we continue this "offline", i.e. via email? My mail is elci@posteo.de, feel free to send me an email. I would also be happy to have a Skype/hangout/facetime call if it works for you.

Cheers,

Eren

ermeel86 commented 6 years ago

how I should interpret the edge.type == 2

In the dynamic connectivity algorithm, an edge can have three types:

Any non-tree edge is also a non-bridge, however not all non-bridges are non-tree edges (i.e. some edges in the spanning forest can also be part of a cycle in the actual spanning subgraph).

The different values edge.type can attain are 0,1,2. I need to check the code from back then how they map to the above classification. What I know for sure is that an edge is open (occupied) if and only if edge.type >0.

DanteCpp commented 6 years ago

Awesome!