Skip to content
Snippets Groups Projects
Commit 2b9ee49d authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Fixed bug when files not found

parent 1c1dacfd
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,10 @@ class ElasticParserInterface:
if method == 'energy':
strain, energy = self.properties.get_strain_energy()
if not strain:
self.logger.warn('Error getting strain and energy data')
return
n_strains = self.properties.info['n_strains']
sec_strain_diagram = sec_scc.m_create(x_elastic_section_strain_diagrams)
......@@ -45,6 +49,10 @@ class ElasticParserInterface:
'5th': poly_fit_2 - 2, '6th': poly_fit_2 - 2, '7th': poly_fit_2 - 3}
energy_fit = self.properties.get_energy_fit()
if not energy_fit:
self.logger.warn('Error getting energy fit data')
return
for diagram_type in ['cross-validation', 'd2e']:
for fit_order in energy_fit[diagram_type][0].keys():
sec_strain_diagram = sec_scc.m_create(x_elastic_section_strain_diagrams)
......@@ -73,6 +81,9 @@ class ElasticParserInterface:
stress_fit = self.properties.get_stress_fit()
for diagram_type in ['cross-validation', 'dtn']:
if stress_fit.get(diagram_type, None) is None:
continue
for si in range(6):
for fit_order in stress_fit[diagram_type][si][0].keys():
sec_strain_diagram = sec_scc.m_create(x_elastic_section_strain_diagrams)
......
......@@ -297,7 +297,7 @@ class ElasticProperties:
quantities = [
Quantity(
'voigt', r'Symmetry[\s\S]+\n\s*\n([C\d\s\n]+)\n',
'voigt', r'Symmetry[\s\S]+\n\s*\n([C\d\s\n\(\)\-\+\/\*]+)\n',
str_operation=reshape, dtype=str),
Quantity(
'elastic_constant', r'Elastic constant[\s\S]+in GPa\s*:\s*\n\n([\-\d\.\s\n]+)\n',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment