Read raw Silvaco .str/.sta directly in mesh_converter

Hello @simonspa @mbomben,

I wrote a MeshParser subclass that lets mesh_converter read raw ATLAS/ATHENA output directly, the tagged c/n/s records in the .str/.sta files. You select it with parser = “silvaco-ssf”. No intermediate extraction step and no Silvaco tools at conversion time. It is meant to complement @mbomben’s TonyPlot3D and deckbuild protocol, which is still the right approach when you need to recompute observables from a 3D solution.

It handles the format quirks (0 based node ids vs 1 based coordinate ids, and duplicated interface nodes at region boundaries where it keeps the semiconductor side) and maps ElectricField, ElectrostaticPotential, DopingConcentration, and Donor and Acceptor Concentration to their Silvaco codes.

I have tested on real 2D LGAD and AC-LGAD ATLAS files, around 60k nodes, converting in a few seconds, and verified the whole way into a full Allpix2 simulation. The 3D path is implemented but I have only had 2D files to test, so it would need confirming on a real 3D file.

It’s about 230 lines, self contained in tools/mesh_converter/parsers/, with only the factory and CMakeLists touched otherwise. Happy to open a merge request if it is worth including.

Best,

Don

Hi @dwong

This sounds great! Please open a merge request, I will review your code and merge it. If possible, add an example field file since I’m not using Silvaco over here.

Cheers
Simon

Hello @dwong , these are great news, thank you! Please tag me in the merge request so I can test it with a 3D file.

Best regards,

Marco Bomben

Done, thanks both! I opened the merge request here Add Silvaco-SSF parser to read raw .str/.sta files in mesh_converter (!1257) · Merge requests · Allpix Squared / Allpix Squared · GitLab. @simonspa I made and included a small mock example file under tools/mesh_converter/examples/, since the real Silvaco files carry a copyright notice I did not want to commit. @mbomben I tagged you on the merge request as well.

Best,

Don