@@ -207,8 +207,8 @@ export function Decapodes(props: DiagramAnalysisProps<DecapodesContent>) {
207207 return ;
208208 }
209209 content . domain = domain ;
210- content . mesh = options ( ) ?. domains . get ( domain ) ?. meshes [ 0 ] ?? null ;
211- content . initialConditions = { } ;
210+ content . mesh = options ( ) ?. domains ? .get ( domain ) ?. meshes [ 0 ] ?? null ;
211+ console . log ( domains ) ;
212212 } )
213213 }
214214 >
@@ -235,6 +235,45 @@ export function Decapodes(props: DiagramAnalysisProps<DecapodesContent>) {
235235 </ >
236236 ) }
237237 </ Show >
238+ < Show when = { props . content . domain && props . content . mesh } >
239+ { ( ( ) => {
240+ const mesh = props . content . mesh ;
241+ const domain = props . content . domain ;
242+ if ( ! mesh || ! domain ) return null ;
243+
244+ const config = domains . get ( domain ) ;
245+ if ( ! config ?. meshConfig ) return null ;
246+
247+ const meshConfigData = ( config . meshConfig as any ) [ mesh ! ] ;
248+ if ( ! meshConfigData ) return null ;
249+
250+ const entries = Object . entries ( meshConfigData ) ;
251+
252+ return (
253+ < For each = { entries } >
254+ { ( [ key , value ] ) => (
255+ < >
256+ < Show when = { Array . isArray ( value ) } >
257+ < select >
258+ < For each = { value } >
259+ { ( x ) => < option value = { x } > { x } </ option > }
260+ </ For >
261+ </ select >
262+ </ Show >
263+ < Show when = { ! Array . isArray ( value ) } >
264+ < input
265+ type = "number"
266+ placeholder = { key }
267+ value = { value }
268+ onInput = { ( e ) => console . log ( value , e ) }
269+ />
270+ </ Show >
271+ </ >
272+ ) }
273+ </ For >
274+ ) ;
275+ } ) ( ) }
276+ </ Show >
238277 </ div >
239278 ) ;
240279
@@ -301,6 +340,9 @@ type Domain = {
301340
302341 /** Initial/boundary conditions supported for the domain. */
303342 initialConditions : string [ ] ;
343+
344+ /** Dimension configuration */
345+ meshConfig : Map < string , Record < string , number | number [ ] > > ;
304346} ;
305347
306348/** Data sent to the Julia kernel defining a simulation. */
@@ -371,6 +413,7 @@ const makeSimulationData = (
371413 return undefined ;
372414 }
373415
416+ // console.log("CONFIG: ", content);
374417 const { domain, mesh, initialConditions, plotVariables, scalars, duration } = content ;
375418 if ( domain === null || mesh === null || ! Object . values ( plotVariables ) . some ( ( x ) => x ) ) {
376419 return undefined ;
0 commit comments