2.10 FEBio Tasks¶
At its core, FEBio always executes a task. You can think of a task as the outer loop that instructs FEBio what to do. The default task will run the FEBio input file provided on the command line and calculate the solution. Other tasks perform a restart, solve an optimization problem, or run a diagnostic. Users can also create custom tasks via plugins and direct FEBio what exactly it should do. Many of these tasks perform tests on specific FEBio features and thus can be helpful for plugin developers to ensure that their plugin works correctly with these specific FEBio features.
The task to execute can be specified on the command line using the -task command line option. The name of the task is specified as follows.
>febio4 -i input.feb -task=task_name [task_input_file]
The name of the task follows after an equal sign ('=') (Notice that there are no spaces before or after the equal sign). Some tasks require an additional input file, which can be specified directly following the -task command line option. (There should be a space between the -task command line option and the optional task input file.)
In this section we'll document the tasks that are currently supported by FEBio. The following table lists the available tasks.
| task | description |
|---|---|
diagnose |
Run a diagnostic. |
jfnk tangent test |
Runs a tangent test on the JFNK solver |
optimize |
Runs an optimization problem. |
param_run |
Runs a parameter study |
parameter_sweep |
Runs a parameter study |
quick_restart_test |
Runs a restart test |
rci_solve |
Runs a model using the RCI solver |
reset_test |
Runs a test on the FEBio reset functionality |
restart |
Runs a cold restart problem. |
restart_test |
Runs a test on the restart feature. |
solve |
Runs the forward model (default task) |
stiffness_test |
Allows users to export the stiffness matrix from FEBio. |
test |
Runs the model as a test suite problem. |
Table 1. Table of available FEBio tasks.
Some more details about these tasks follow.
-
diagnose: The diagnose task runs a diagnostic.
-
jfnk_tangent_test: The “jfnk tangent test” runs a test on the tangent produced by the JFNK linear solver. The JFNK linear solver is an iterative solver that aims to solve the nonlinear Newton problem without ever evaluating the stiffness matrix explicitly.
-
optimize: Runs an optimization problem. (See 6 or more details on how to run optimization problems in FEBio.)
-
param_run: The param_run task runs a parameter study on the input model. In other words, it runs the input file multiple times, each time using a different value for certain parameters.
-
parameter_sweep: This tasks runs a parameter study on the input file.
-
quick_restart_test: The quick_restart_test runs a test on the restart feature after model initialization. This task initializes the model and then writes a dump file. After that, the model is cleared and the dump file is read to re-initialize the model. Any issues that occur during re-initialization will be reported. If no problems are encountered, the task finishes. (Note that the model is not solved.)
-
rci_solve: The _rci_solve _task solves a model using the RCI solver. The RCI (Reverse Communication Interface) solver is a feature that allows users more control over how FEBio solves the model. This feature was added to give plugins that interface with third party solvers the ability to transfer some of the solution progress decisions (e.g. when to advance the time step) to the third party library. This tasks tests that interface and ensures that it produces the same result as the standard solver.
-
reset_test: FEBio's reset feature restores the original state of the model. This feature is used in several other tasks that need to solve the forward model repeatedly (e.g. optimization, parameter study). This task can be used to test the reset feature and ensure that it indeed properly resets the model. The test will run the forward model twice. After the first run, some stats are collected. The model is then reset and run again. The same stats are collected after the second run and compared with those from the first run. If the model reset was successful, the stats should be identical. If not, there is a problem with model reset. This task also produces a separate log file for each run that can be compared.
-
restart: Runs a cold restart of a previously run model. See 5 for more details on how to run restart problems.
-
restart_test: This task tests the restart feature to ensure that it indeed correctly restarts a model. After each converged time step, the model's state is serialized (in memory) to a dump stream and then immediately read back from the dump stream. If the restart feature is working properly, the model should produce the exact same output to both log and plot file as the forward model (i.e. the model run with that default task). Users can compare outputs to see if there might be any problem with the restart feature.
-
solve: This solves the forward model provided by the FEBio input file. This is the default task when the -task command line option is not provided.
-
stiffness_test: The _stiffness_test _task allows users to export the stiffness matrix and right-hand-side vector out of FEBio.
-
test: This task is used by the FEBio test suite and adds the solution norm as a log variable that can be queried once the model completes. (This is used in the test suite to see if the solution norm has changed compared to a golden standard.)