diff --git a/interfaces/python/ctml_writer.py b/interfaces/python/ctml_writer.py index df569cd2f..1ad63d341 100644 --- a/interfaces/python/ctml_writer.py +++ b/interfaces/python/ctml_writer.py @@ -2016,7 +2016,7 @@ class incompressible_solid(phase): elements = '', species = '', note = '', - density = -1.0, + density = None, transport = 'None', initial_state = None, options = []): @@ -2025,7 +2025,7 @@ class incompressible_solid(phase): initial_state, options) self._dens = density self._pure = 0 - if self._dens < 0.0: + if self._dens is None: raise CTI_Error('density must be specified.') self._tr = transport @@ -2054,7 +2054,7 @@ class lattice(phase): transport = 'None', initial_state = None, options = [], - site_density = -1.0, + site_density = None, vacancy_species = ''): phase.__init__(self, name, 3, elements, species, note, 'none', initial_state, options) @@ -2066,7 +2066,7 @@ class lattice(phase): raise CTI_Error('sublattice name must be specified') if species == '': raise CTI_Error('sublattice species must be specified') - if site_density < 0.0: + if site_density is None: raise CTI_Error('sublattice '+name +' site density must be specified')