File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 11
11
HOTSINGLE ,
12
12
HOTMULTIPLE ,
13
13
SIDE ,
14
+ SIDES ,
14
15
SEGMENT ,
15
16
PAR ,
16
17
CONSTANTPAR ,
@@ -112,20 +113,26 @@ class BOUNDSPEC(BaseComponent):
112
113
default = "boundspec" ,
113
114
description = "Model type discriminator" ,
114
115
)
115
- shapespec : SHAPESPEC = Field (
116
- default_factory = SHAPESPEC ,
116
+ shapespec : Optional [ SHAPESPEC ] = Field (
117
+ default = None ,
117
118
description = "Spectral shape specification" ,
118
119
)
119
- location : SIDE | SEGMENT = Field (
120
+ location : SIDE | SEGMENT | SIDES = Field (
120
121
description = "Location to apply the boundary" ,
121
122
)
122
123
data : CONSTANTPAR | CONSTANTFILE | VARIABLEPAR | VARIABLEFILE = Field (
123
124
description = "Spectral data" ,
124
125
)
125
126
126
127
def cmd (self ) -> list :
127
- repr = [f"{ self .shapespec .render ()} " ]
128
- repr += [f"BOUNDSPEC { self .location .render ()} { self .data .render ()} " ]
128
+ repr = []
129
+ if self .shapespec is not None :
130
+ repr += [f"{ self .shapespec .render ()} " ]
131
+ if self .location .model_type in ["side" , "segment" ]:
132
+ repr += [f"BOUNDSPEC { self .location .render ()} { self .data .render ()} " ]
133
+ elif self .location .model_type == "sides" :
134
+ for side in self .location .sides :
135
+ repr += [f"BOUNDSPEC { side .render ()} { self .data .render ()} " ]
129
136
return repr
130
137
131
138
You can’t perform that action at this time.
0 commit comments