赞
踩
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Switches the solver to LAYOUT mode. The LAYOUT mode allows you to add and modify simulation objects for a new simulation. Once a simulation is run, the solver goes into ANALYSIS mode and no simulation objects can be added or modified (Except for the "Analysis" tab of analysis groups). While in ANALYSIS mode, any commands to modify objects will return errors. You must switch to LAYOUT mode before modifying any objects. Note that any available results will be lost once the solver is switched back to LAYOUT mode.
Syntax | Description |
---|---|
switchtolayout; | Switches to LAYOUT mode from ANALYSIS mode. This function does not return any data. |
Example
The following script commands will first run an FDTD simulation. The solver will go to ANALYSIS mode. The "switchtolayout" command is then used to go to LAYOUT mode so that the simulation temperature can be changed in the next line.
run; switchtolayout; setnamed("FDTD","simulation temperature",400); # simulation temp. set to 400 K
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
This script command can be used to determine whether the simulation file is currently in LAYOUT mode or in ANALYSIS mode. It is important to use this command to check the status of the project file once it is opened to avoid running into an error during the subsequent operations if the file is not in the desired mode.
Syntax | Description |
---|---|
?layoutmode; | Returns 1 if in LAYOUT mode (DESIGN mode for INTERCONNECT), and 0 if in ANALYSIS mode. |
Example
The following script commands will first load a project file named "test.fsp". The aim of the script is to add a new rectangle to the existing geometry. However, if the file is in ANALYSIS mode then the "addrect" command will create an error. To avoid this, the script command "layoutmode" is first used to determine the status of the file. Then an "if/else" statement is used to add the rectangle directly if the file is already in LAYOUT mode or to add the rectangle after switching to LAYOUT mode first if the file is in ANALYSIS mode.
load("test.fsp"); status = layoutmode; if (status == 1) { addrect; } else { switchtolayout; addrect; }
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Run the current simulation. When the simulation finishes, all simulation data will be saved to the current simulation file. The updated simulation file will then be re-loaded by the GUI. This function does not return any data.
For FDTD, MODE, CHARGE, HEAT, FEEM, DGTD,
Syntax | Description |
---|---|
run; | Launch the simulation in parallel mode as defined in the resource manager. |
run([solver]); | Launch the simulation using [solver] in parallel mode as defined in the resource manager. |
For FDTD only,
Syntax | Description |
---|---|
run("FDTD", [resource type]) | Launch the FDTD simulation using [resource type]:
This allows to use the specified resource without affecting the CPU/GPU toggle in the resource configuration. |
For INTERCONNECT,
Syntax | Description |
---|---|
run; | Launch the simulation. The simulation will be run using the settings from the first active resource in the resource manager. |
Example
Create and run a new simulation in FDTD.
newproject; # create a new simulation file addfdtd; # add the FDTD simulation region adddipole; # add a diopole source run; # run the simulation in parallel mode
Launch the simulation in parallel mode. Equivalent to run and run(3). When the simulation finishes, all simulation data will be saved to the current file. This command has been deprecated. Use run.
Syntax | Description |
---|---|
runparallel; | Launch the simulation in parallel mode as defined in the resource manager. This function does not return any data. |
Example
newproject; addfdtd; adddipole; runparallel;
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Adds a simulation file to the job manager queue.
Syntax | Description |
---|---|
addjob(filename,"solver"); | Add the simulation file "filename" to the job manager queue. The "solver" argument is used to select the solver to add the job to and is optional if only one solver exists (or is active) in the simulation environment. The "solver" argument is not supported by INTERCONNECT. |
Example
Specify short file name. In this case, the current working directory path will be added to the filename.
addjob("mySimulation.fsp");
Specify filename with full path.
file="C:\working\mySimulation.fsp"; addjob(file);
Specify filename with the currentfilename script command.
addjob(currentfilename);
For a more complete example, see the runjobs script command page.
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Run all simulations in the job manager queue. The script execution will be paused while the jobs run, then resume when all of the simulations have completed successfully. If errors occur, the script will not proceed.
Syntax | Description |
---|---|
runjobs; | Run jobs in the Job queue for existing (active) solver. Use the computer resources and parallel settings that are specified in the Resource Manager. |
runjobs("solver", option); | Run jobs in the Job queue for specified solver. option=0: run jobs in single process mode using only the local computer. option=1: run jobs using the computer resources and parallel settings that are specified in the Resource Manager. (default) |
Example
The following script code illustrates how to use the addjob and runjobs script commands to do a parameter sweep. The initial for loop creates a simulation file for each point in the sweep and adds the simulations to the job queue. Next, the runjobs command will run all simulations in the job queue. If multiple computer resources are configured in the Resource Manager, then simulations will run concurrently. When all of the simulations are complete, a second for loop is used to re-load each simulation file and do the required analysis.
# create 10 simulation files and add them to the job queue newproject; addvarfdtd; adddipole; addcircle; rad=linspace(1e-6,10e-6,10); for(i=1:10) { setnamed("circle","radius",rad(i)); save("temp_"+num2str(i)); addjob(currentfilename); } runjobs; # run all jobs in the job queue runjobs; # load each simulation and do required analysis for(i=1:10) { load("temp_"+num2str(i)); ... }
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Remove all jobs from the job manager queue.
Syntax | Description |
---|---|
clearjobs("solver"); | Remove all jobs from the job queue of the specified solver. If no solver is specified, jobs for all solvers will be removed from job manager queue. No solver argument is needed for INTERCONNECT. |
Example
newproject; addfdtd; adddipole; addcircle; run; clearjobs;
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Runs a parameter sweep or optimization task.
Syntax | Description |
---|---|
runsweep; | Runs all sweeps and optimization tasks. |
runsweep("taskname"); | Runs only the sweep or optimization named taskname. |
Example
runsweep; runsweep("thickness_sweep");
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Adds a resource to the list of available resources in resource manager.
Syntax | Description |
---|---|
addresource("solver"); | Adds a resource to the list of available resources in resource manager. The "solver" argument is used to select the solver to add the resource to. The "solver" argument is not supported by INTERCONNECT. It also returns the resource number as an integer. |
Example
The following line will add a resource to the DGTD solver in Finite Element IDE.
addresource("DGTD");
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Removes the selected resource from the list of available resources in resource manager.
Syntax | Description |
---|---|
deleteresource("solver",resource_num); | Removes the selected resource from the list of available resources in resource manager. The "solver" argument is used to select the solver to delete the resource from. The "solver" argument is not supported by INTERCONNECT. resource_num is the number (row number in resource manager list) for the resource to be deleted. |
Example
The following line will delete the second resource from the DGTD solver in DEVICE.
deleteresource("DGTD","2");
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Returns the current setting for properties of the available resources in resource manager for the specified solver.
Syntax | Description |
---|---|
out=getresource("solver", resource_num, "property"); | Returns the current setting for properties of the available resources in resource manager for the specified solver. The "solver" argument is used to select the solver from which the resource is being selected. The "solver" argument is not supported by INTERCONNECT. resource_num is the number of the desired resource (row number in resource manager) and is optional. If not specified, the command will return the number of resources currently available for the specified solver. "property" is the desired property of the resource and is optional. If not specified, the command will return a list of all properties available for the resource. |
Example
This example will return the number of processes currently set for the second resource of the DGTD solver in Finite Element IDE
out=getresource("DGTD",2,"processes");
FDTD MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Sets properties of the available resources in resource manager for the specified solver.
Syntax | Description |
---|---|
setresource("solver", resource_num, "property", "value"); | Sets properties of the available resources in resource manager for the specified solver. The "solver" argument is used to select the solver from which the resource is being selected. The "solver" argument is not supported by INTERCONNECT. resource_num is the number of the desired resource (row number in resource manager). If not specified, the command will return the number of resources currently available for the specified solver. "property" is the desired property of the resource and "value" is the value to be set or the specified property. |
Example
This example will set the number of processes for the second resource of the DGTD solver to 4:
setresource("DGTD",2,"processes","4");
MODE DGTD CHARGE HEAT FEEM INTERCONNECT
Obtains the given license feature from the license server and holds it for the duration of the application's lifetime. Any additional checkout attempts by the application for the license will not increment the license count. Closing the application is the only way to release the license back into the pool.
Syntax | Description |
---|---|
checkout("licensefeature"); | Obtains the given license feature from the license server and holds it for the duration of the application's lifetime. |
Concurrent licenses features can be found by navigating to port 8095 on your license server. The Flexera dashboard will show how many of the specified licenses are available and currently in use. Case sensitive feature names listed here can be passed to the checkout function.
Example
This example obtains and holds the heat solver, FDTD engine, and the CML compiler license features from the license server.
checkout('heat_solver'); checkout('FDTD_Solutions_engine'); checkout('cml_compiler');
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。