Skip to content

Commit

Permalink
Remove duplicated materials
Browse files Browse the repository at this point in the history
PWPA-1933
  • Loading branch information
Gabriel Antão committed Jun 20, 2024
1 parent a555dd4 commit feee35b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,102 +34,6 @@
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 65.5035
heat_capacity: 460.9
name: SDSS/125KSI
thermal_conductivity: 45.345257
thermal_expansion: 1.2e-05
type: solid
- density: 1.0
heat_capacity: 5.0
name: Folhelho
Expand Down
7 changes: 3 additions & 4 deletions src/alfasim_score/converter/alfacase/convert_alfacase.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ def filter_duplicated_materials(
material_list: List[MaterialDescription],
) -> List[MaterialDescription]:
"""Remove the duplicated materials parsed by the reader"""
# TODO: implement it to filter the duplicated materials
# TODO: remember to get all cements (???)
return material_list
filtered = {material.name: material for material in material_list}
return list(filtered.values())


class ScoreAlfacaseConverter:
Expand Down Expand Up @@ -69,7 +68,7 @@ def convert_materials(self) -> List[MaterialDescription]:
expansion=data["thermal_expansion"],
)
)
return material_descriptions
return filter_duplicated_materials(material_descriptions)

# TODO PWPA-1937: implement this method
def _convert_annulus(self) -> AnnulusDescription:
Expand Down

0 comments on commit feee35b

Please sign in to comment.