Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode plugin could output fill-in template #27510

Open
GiudGiud opened this issue Apr 30, 2024 · 1 comment
Open

VSCode plugin could output fill-in template #27510

GiudGiud opened this issue Apr 30, 2024 · 1 comment
Labels
C: Framework C: WASP Tickets pertaining to the WASP submodule T: task An enhancement to the software.

Comments

@GiudGiud
Copy link
Contributor

GiudGiud commented Apr 30, 2024

Motivation

Some objects, like actions and physics, have a longer list of parameters. It would be much easier if a template to be filled could be spawned by the VSCode plugin, rather than relying on auto-complete to fetch the required parameters one by one

Design

Some command (maybe ctrl T?) could spawn all the required parameters of an object, with an empty field to fill.

(another idea: Alternatively, we could spawn these templates by parameter groups)

The parameters should be sorted by parameter group for readability, and parameter groups would be separated by a line break. Maybe the name of the parameter group would be included as a header for the group of parameters. Maybe users could decide how 'verbose' the templates should be

Achieving something like this:

    # General control parameters
    compressibility =
    add_energy_equation =

    # Material property parameters
    density = 
    dynamic_viscosity =
    thermal_conductivity = 
    specific_heat = 

    # Initial condition parameters
    initial_velocity = 
    initial_pressure = 
    initial_temperature = 

    # Boundary condition parameters
    inlet_boundaries = 
    momentum_inlet_types = 
    momentum_inlet_function = 
    energy_inlet_types = 'heatflux'
    energy_inlet_function = 
    wall_boundaries = 
    momentum_wall_types = 
    energy_wall_types = 
    energy_wall_function = 
    outlet_boundaries = 
    momentum_outlet_types =
    pressure_function = 

    # Ambient convection parameters
    ambient_convection_alpha =
    ambient_temperature =

    # Numerical scheme
    mass_advection_interpolation =
    momentum_advection_interpolation = 
    energy_advection_interpolation =

NB: the action being what it is, most of these parameters are actually not required. But the physics have more required parameters due to not turning off equations with booleans

One question: do we include parameters with a default already?
I think it could be confusing. For example for the NSFVAction, if 'add_scalar_equation' is kept to false, then spawning the ten parameters for the scalar equation in the input would not be great.
If we spawn parameters-to-fill by parameter groups rather than all-the-required-ones-at-once, then I could see us adding the pre-filled parameters with defaults

Impact

Better usability.
Easier time using these large actions

@brandonlangley @dschwen @loganharbour

@GiudGiud GiudGiud added C: Framework T: task An enhancement to the software. C: WASP Tickets pertaining to the WASP submodule labels Apr 30, 2024
@brandonlangley
Copy link
Contributor

Added this to the NEAMS LSP / Frontend project and pinging @lefebvrera here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework C: WASP Tickets pertaining to the WASP submodule T: task An enhancement to the software.
Development

No branches or pull requests

2 participants