idaholab / MontePy

MontePy is the most user friendly Python library (API) to read, edit, and write MCNP input files.
https://www.montepy.org/
MIT License
32 stars 7 forks source link

Preserve case when writing surface cards #522

Open tjlaboss opened 2 months ago

tjlaboss commented 2 months ago

Is your feature request related to a problem? Please describe. Presently, MontePy converts surface cards to UPPERCASE when writing out an input.

Describe the solution you'd like Preserve the original case.

MCNP input file snippet

original:

Case-sensitive example
C Cells
1   1 -1.0    -1  
2   1 -0.5    -2 +1
3   0            +2

c Surfaces get changed
1    sO 0
2    So 2

c Data
m1      8016.71c  2-02 $ comment 1
        8017.71c  9-09 $ comment 2
imp:p   2 1 0 
mode p
nps 1

after writing:

Case-sensitive example
C Cells
1   1 -1.0    -1  
2   1 -0.5    -2 +1
3   0            +2

c Surfaces get changed
1    SO 0
2    SO 2

c Data
m1      8016.71c  2-02 $ comment 1
        8017.71c  9-09 $ comment 2
imp:p   2 1 0 
mode p
nps 1