You are viewing the documentation for an older COMSOL version. The latest version is available here.
Switch for Functions
Use the Switch node () under the Global Definitions node () to switch between global functions during a solver sweep. You add the functions as subnodes under the Switch node. The switch for functions acts essentially as a switch statement in a programming language; that is, it dynamically chooses one of its underlying branches depending on a parameter that can be controlled from the solvers using a Function Sweep study.
In addition to the Label, you can also enter a name for the switch in the Function name field (default: sw1). Use that function name where you want to switch across the functions under the Switch node using a function sweep. Without a sweep, the function name for the switch uses the first function node under the Switch node by default.