FISH Functions
FISH language intrinsics are listed by group below. Beneath these, for convenience, the groups of general element intrinsics and FLAC3D-specific intrinsics are also listed.
The type specifiers used in the FISH function signatures are given in the “FISH Type Index” section.
- Array Utilities
- Component Utilities
- Constructors
- Creep Process Utilities
- Dynamic Process Utilities
- File Utilities
- Fluid Process Utilities
- Global Utilities
- IO Utilities
- List Utilities
- Mail Utilities
- Map Utilities
- Math Utilities
- Matrix Utilities
- Mechanical Process Utilities
- Memory Utilities
- Socket Utilities
- String Utilities
- Structure Utilities
- System Utilities
- Tensor Utilities
- Thermal Process Utilities
- Time Utilities
- Type Utilities
- Version Utilities
Array Utilities
Arrays are described under Arrays in the FISH “Data Types” section.
| array.command(ARR_PNT) | Run commands in an array. |
| array.convert(MAT_PNT/TEN_PNT) | Convert a matrix or tensor to an array. |
| array.copy(ARR_PNT) | Copy an array. |
| array.create(INT<,NUM>) | Create an array. |
| array.delete(ARR_PNT) | Delete an array. |
| array.dim(ARR_PNT) | Get the array dimension. |
| array.size(ARR_PNT,INT) | Get the size of an array dimension. |
Component Utilities
Vectors are described under Vectors in the FISH “Data Types” section.
| comp(VEC/MAT_PNT/TEN_PNT,INT<,INT>) | Get/set the vector/tensor component. |
Constructors
| boolean(BOOL/NUM/PNT) | Create a Boolean. |
| false | Create a false Boolean. |
| float(BOOL/NUM/STR) | Create a float. |
| index(NUM/STR) | Create a positive integer. |
| int(BOOL/NUM/STR) | Create an integer. |
| null | Create a null pointer. |
| true | Create a true Boolean. |
| vector(ARR_PNT/MAT_PNT/NUM<,NUM><,NUM>) | Create a vector. |
Creep Process Utilities
| creep.active | Get the status of creep calculations in the current cycle. |
| creep.age | Get the accumulated age. |
| creep.cycle | Get the current step/cycle number. |
| creep.safety.factor | Get the factor of safety. |
| creep.solve(STR) | Get a current solve limit. |
| creep.step | Get the current step/cycle number. |
| creep.time.total | Get the accumulated age. |
| creep.timestep | Get the creep timestep. |
| creep.timestep.given | Get the given timestep. |
| creep.timestep.max | Get the maximum allowed timestep. |
Dynamic Process Utilities
| dynamic.active | Get the status of dynamic calculations in the current cycle. |
| dynamic.age | Get the accumulated age. |
| dynamic.cycle | Get the current step/cycle number. |
| dynamic.safety.factor | Get the factor of safety. |
| dynamic.solve(STR) | Get a current solve limit. |
| dynamic.step | Get the current step/cycle number. |
| dynamic.time.total | Get the accumulated age. |
| dynamic.timestep | Get the dynamic timestep. |
| dynamic.timestep.given | Get the given timestep. |
| dynamic.timestep.max | Get the maximum allowed timestep. |
File Utilities
| file.close(<FILE_PNT>) | Close a file. |
| file.open(STR,INT,INT) | Open a file for reading/writing. |
| file.open.pointer(STR,INT,INT) | Open a file for reading/writing. |
| file.pos(<FILE_PNT>) | Get/set the current position in bytes. |
| file.read(ARR_PNT/STR,INT<,FILE_PNT/ARR_PNT><,INT><,INT>) | Read the contents of a file. |
| file.write(ARR_PNT/STR,INT<,FILE_PNT/ARR_PNT><,INT><,INT>) | Write data to a file. |
Fluid Process Utilities
| fluid.active | Get the status of fluid calculations in the current cycle. |
| fluid.age | Get the accumulated age. |
| fluid.cycle | Get the current step/cycle number. |
| fluid.safety.factor | Get the factor of safety. |
| fluid.solve(STR) | Get a current solve limit. |
| fluid.step | Get the current step/cycle number. |
| fluid.time.total | Get the accumulated age. |
| fluid.timestep | Get the fluid timestep. |
| fluid.timestep.given | Get the given timestep. |
| fluid.timestep.max | Get the maximum allowed timestep. |
Global Utilities
| global.cycle | Get the cycle/step number. |
| global.deterministic | Get/set deterministic mode. |
| global.dim | Get the program dimensionality. |
| global.fos | Get the global factor of safety. |
| global.gravity(<INT>) | Get/set the gravity. |
| global.step | Get the cycle/step number. |
| global.threads | Get/set the number of threads used during calculations. |
| global.timestep | Get the global timestep. |
| global.title | Get/set the job title of the model. |
IO Utilities
| io.dialog.in(STR<,STR>) | Dialog to input a string. |
| io.dialog.message(STR,STR,INT) | Make a message dialog. |
| io.dialog.notify(INT,INT,STR) | General notification event. |
| io.in(STR) | Get input from the console. |
| io.input(STR) | Get input from the current input source. |
| io.out(ANY) | Output a string. |
List Utilities
| list.find(LIST,INT) | Find an element in a list by ID. |
| list.find.name(LIST,INT/STR) | Find an element in a list by name. |
| list.size(LIST) | Get the list size. |
Mail Utilities
| mail.account(STR) | Set the outgoing email account. |
| mail.attachment.add(STR) | Add an attachment. |
| mail.attachment.delete(STR) | Delete an attachment. |
| mail.body(BOOL,STR) | Set the email body. |
| mail.clear | Clear the email. |
| mail.domain(STR) | Set the domain name of the sender’s email account. |
| mail.from(STR) | Set the address from which the email is sent. |
| mail.host(STR) | Set the SMTP server name. |
| mail.password(STR) | Specify the email password. |
| mail.port(INT) | Set the SMTP port number. |
| mail.recipient.add(STR,STR) | Add a recipient. |
| mail.recipient.delete(STR,STR) | Delete a recipient. |
| mail.send | Send the current email. |
| mail.subject(STR) | Set the subject line text. |
Map Utilities
Maps are described under Maps in the FISH “Data Types” section.
| map(NUM/STR,ANY<,NUM/STR/ANY>) | Create a map. |
| map.add(MAP,NUM/STR,ANY) | Add a value to a map. |
| map.has(MAP,NUM/STR) | Query whether a map contains a key. |
| map.keys(MAP) | Get the keys of a map. |
| map.remove(MAP,NUM/STR) | Remove a value from a map. |
| map.size(MAP) | Get the map size. |
| map.value(MAP,NUM/STR) | Get a value. |
Math Utilities
| math.aangle.to.euler(VEC) | Get Euler angles from the axis-angle representation. |
| math.abs(NUM) | Get the absolute value of a number or a vector. |
| math.acos(NUM) | Get the arc-cosine. |
| math.and(INT,INT) | Get the result of the bitwise logical AND operation. |
| math.area.intersect.poly.poly(MAP,MAP) | Get the area of overlap of polygons. |
| math.area.poly(MAP) | Get the area of a polygon. |
| math.asin(NUM) | Get the arc-sine. |
| math.atan(NUM) | Get the arc-tangent. |
| math.atan2(NUM,NUM) | Get the arc-tangent. |
| math.ceiling(NUM) | Get the next integer by rounding up. |
| math.closest.segment.point(VEC,VEC,VEC) | Get the closest point on the line segment to the... |
| math.closest.triangle.point(VEC,VEC,VEC,VEC) | Get the closest point on the triangle to the point. |
| math.cos(NUM) | Get the cosine. |
| math.cosh(NUM) | Get the hyperbolic cosine. |
| math.cross(VEC,VEC) | Get the cross product of vectors. |
| math.ddir.from.normal(VEC) | Get the dip direction. |
| math.degrad | Get the degree-to-radian conversion. |
| math.dip.from.normal(VEC) | Get the dip. |
| math.dist.segment.point(VEC,VEC,VEC) | Get the distance between the line segment and the point. |
| math.dist.segment.segment(VEC,VEC,VEC,VEC) | Get the distance between two line segments. |
| math.dist.triangle.segment(VEC,VEC,VEC,VEC,VEC) | Get the shortest distance between a triangle and a line... |
| math.dot(VEC,VEC) | Get the dot product of vectors. |
| math.euler.to.aangle(VEC) | Get the axis-angle representation from Euler angles. |
| math.exp(NUM) | Get the exponential. |
| math.floor(NUM) | Get the previous integer by rounding down. |
| math.ln(NUM) | Get the natural logarithm. |
| math.log(NUM) | Get the base 10 logarithm. |
| math.lshift(INT,INT) | Get the result of a left bit shift. |
| math.mag(VEC) | Get the vector magnitude. |
| math.mag2(VEC) | Get the squared vector magnitude. |
| math.max(NUM,NUM<,NUM>) | Get the maximum. |
| math.min(NUM,NUM<,NUM>) | Get the minimum. |
| math.normal.from.dip(FLT) | Get the normal to a plane in 2D. |
| math.normal.from.dip.ddir(FLT,FLT) | Get the normal to a plane in 3D. |
| math.not(INT,INT) | Get the result of the bitwise logical NOT operation. |
| math.or(INT,INT) | Get the result of the bitwise logical OR operation. |
| math.outer.product(MAT_PNT/VEC,MAT_PNT/VEC) | Get the outer product of matrices or vectors. |
| math.pi | Get the number pi. |
| math.random.gauss | Get a Gaussian random number. |
| math.random.uniform | Get a uniform random number. |
| math.round(NUM) | Get the nearest integer. |
| math.rshift(INT,INT) | Get the result of a right bit shift. |
| math.sgn(NUM) | Get the sign. |
| math.sin(NUM) | Get the sine. |
| math.sinh(NUM) | Get the hyperbolic sine. |
| math.sqrt(NUM) | Get the square root. |
| math.tan(NUM) | Get the tangent. |
| math.tanh(NUM) | Get the hyperbolic tangent. |
| math.triangle.inside(VEC,VEC,VEC,VEC) | Determine if a point falls inside a 2D triangle. |
| math.triangle.interp(VEC,FLT,VEC,FLT,VEC,FLT,VEC) | Return interpolated value at vIn based on triangle interpolation. |
| math.unit(VEC) | Get a unit vector. |
Matrix Utilities
Matrices are described under Matrices in the FISH “Data Types” section.
| matrix(ARR_PNT/VEC/TEN_PNT/INT<,INT>) | Create a matrix. |
| matrix.cols(MAT_PNT) | Get the number of columns. |
| matrix.det(MAT_PNT/TEN_PNT) | Get the matrix determinant. |
| matrix.from.aangle(VEC) | Get a rotation matrix from axis angles. |
| matrix.from.euler(VEC) | Get a rotation matrix from Euler angles. |
| matrix.identity(INT) | Get an identity matrix. |
| matrix.inverse(ARR_PNT/MAT_PNT/TEN_PNT) | Get the matrix inverse. |
| matrix.lubksb(ARR_PNT/MAT_PNT/TEN_PNT,ARR_PNT) | Get the LU decomposition via backwards substitution. |
| matrix.ludcmp(ARR_PNT/MAT_PNT/TEN_PNT,ARR_PNT) | Get the LU decomposition. |
| matrix.rows(MAT_PNT) | Get the number of rows. |
| matrix.to.aangle(MAT_PNT) | Convert a rotation matrix to axis angle. |
| matrix.to.euler(MAT_PNT) | Convert a rotation matrix to Euler angles. |
| matrix.transpose(MAT_PNT) | Transpose a matrix. |
Mechanical Process Utilities
| mech.active | Get the status of mechanical calculations in the current cycle. |
| mech.cycle | Get the current step/cycle number. |
| mech.energy(STR) | Get a mechanical process energy. |
| mech.safety.factor | Get the factor of safety. |
| mech.solve(STR) | Get the current value of a solve limit. |
| mech.step | Get the current step/cycle number. |
| mech.time.total | Get the accumulated age. |
| mech.timestep | Get the mechanical timestep. |
| mech.timestep.given | Get the given timestep. |
| mech.timestep.max | Get the maximum allowed timestep. |
Memory Utilities
| memory(MEM_PNT) | Get/set a value in a memory chunk. |
| memory.create(INT) | Create a chunk of memory. |
| memory.delete(MEM_PNT) | Delete a memory chunk. |
Socket Utilities
| socket.close(SOCK_PNT/INT) | Close communication on a socket. |
| socket.create | Create a new socket. |
| socket.delete(SOCK_PNT) | Delete a socket. |
| socket.open(INT/STR,SOCK_PNT/INT<,INT><,INT>) | Open communication on a socket. |
| socket.read(ARR_PNT,INT,SOCK_PNT/INT<,INT>) | Read FISH variables through a socket. |
| socket.read.array(ARR_PNT,SOCK_PNT/INT) | Read FISH variables into an array through a socket. |
| socket.write(ARR_PNT,INT,SOCK_PNT/INT) | Write FISH variables through a socket. |
| socket.write.array(ARR_PNT,SOCK_PNT/INT) | Write FISH variables from an array through a socket. |
String Utilities
Strings are described under Strings in the FISH “Data Types” section.
| string(ANY<,INT><,STR><,INT><,STR>) | Create a string. |
| string.build(STR<,ANY><,ANY>) | Build a string using token replacement. |
| string.char(STR,INT) | Get a character from a string. |
| string.len(STR) | Get the string length. |
| string.lower(STR) | Get a string in lowercase. |
| string.sub(STR,INT<,INT>) | Get a sub-string. |
| string.token(STR,INT) | Get the item at a given position. |
| string.token.type(STR,INT) | Get the character type at a given position. |
| string.upper(STR) | Get a string in uppercase. |
Structure Utilities
Structures are described under Structures in the FISH “Data Types” section.
| struct.check(STRUCT_PNT,STRUCT_PNT) | Check that structures are of the same type. |
| struct.name(STRUCT_PNT) | Get the name of a structure. |
System Utilities
| system.beep(<INT><,INT>) | Emit a beep. |
| system.clone(STR<,INT>) | A new instance of the code is launched, and the... |
| system.command(STR/ARR_PNT/MAP) | Execute the string contents of the arguments as commands. |
| system.directory(<STR><,STR>) | Set and retrieve the current system directory. |
| system.environment(STR) | Get/set an environment variable. |
| system.error | Throw a FISH exception. |
| system.os(STR<,INT>) | The contents of string s is sent to an operating... |
| system.sleep(INT) | Pause execution. |
Tensor Utilities
Tensors are described under Tensors in the FISH “Data Types” section.
| tensor(MAT/ARR_PNT/VEC/NUM<,NUM><,NUM><,NUM><,NUM><,NUM>) | Create a tensor. |
| tensor.i2(TEN) | Get the second stress invariant. |
| tensor.j2(TEN) | Get the second deviatoric stress invariant. |
| tensor.prin(TEN<,ARR_PNT>) | Get the principal values. |
| tensor.prin.from(VEC,ARR_PNT) | Get the tensor from principal axes. |
| tensor.total(TEN) | Get the tensor measure. |
| tensor.trace(TEN) | Get the trace of a tensor. |
Thermal Process Utilities
| thermal.active | Get the status of thermal calculations in the current cycle. |
| thermal.age | Get the accumulated age. |
| thermal.cycle | Get the current step/cycle number. |
| thermal.safety.factor | Get the factor of safety. |
| thermal.solve(STR) | Get a current solve limit. |
| thermal.step | Get the current step/cycle number. |
| thermal.timestep | Get the thermal timestep. |
| thermal.timestep.given | Get the given timestep. |
| thermal.timestep.max | Get the maximum allowed timestep. |
Time Utilities
| time.clock(<INT>) | Get the number of hundredths of a second since code... |
| time.cpu | Get the CPU time. |
| time.real | Get the current date time. |
Type Utilities
| type(ANY) | Get the type. |
| type.index(PNT) | Get the type index. |
| type.name(ANY) | Get the type name. |
| type.pointer(PNT) | Get the type name of a pointer. |
| type.pointer.id(PNT) | Get the ID of a pointer. |
| type.pointer.name(PNT) | Get the name of a pointer. |
Version Utilities
| code.debug | Get the code debug status. |
| code.name | Get the code name. |
| version.code.major | Get the code major version. |
| version.code.minor | Get the code minor version. |
| version.fish.major | Get the FISH major version. |
| version.fish.minor | Get the FISH minor version. |
| General Element | PFC-Specific |
|---|---|
| Brick Functions | Ball Functions |
| Data Functions | Clump Functions |
| DFN Functions | Wall Functions |
| Domain Functions | Contact Functions |
| Fragment Functions | |
| Geometry Functions | |
| Globals Functions | |
| Measure Functions | |
| Table Functions |
|
|---|
| Creep Process Utilities |
| Dynamic Process Utilities |
| Fluid Process Utilities |
| Mechanical Process Utilities |
| Thermal Process Utilities |
| Was this helpful? ... | PFC © 2019, Itasca | Updated: Apr 26, 2019 |