Input File
To access a user-defined function in AcuTrace, you must reference it in the input file.
USER_EQUATION( "energy" ) {
num_variables = 1
user_values = {5.0, 0.015}
user_string = {"test"}
type = evolve
}
This user equation command defines a user equation with one component governed by an evolution equation. The right hand side of the evolution equation is found by evaluating usrEner. The value of the user_function parameter is exactly the name of the function (routine) used in the C program written by you. The parameters user_values and user_strings are used to pass parameters to the user function. In this example, two floating-point numbers and one string are passed to the function. The order of these parameters is preserved, for example the first user value is 5.0 and the second is 0.015.
particle = massless
user_equations = {energy}
}
USER_EQUATION_INITIAL_CONDITION (energy) {
particle_seed = seeds
user_equation = energy
type = constant
constant_values = { 10.0 }
}
AUTO_SOLUTION_STRATEGY {
max_time = 0.0
max_segments = 10000
}
TIME_SEQUENCE {
...
staggers = {particle, energy}
...
}
STAGGER(energy) {
equation = user_equation
user_equation = energy
}
If the user equation is not so referenced, it simply retains its initial values throughout the analysis. See the AcuTrace Command Reference Manual for more details on the inputs for user-defined functions.