Crate gmt_fem_code_builder

Crate gmt_fem_code_builder 

Source
Expand description

§GMT FEM Code Generator

Generate code based on the input and output tables of the GMT Finite Element Model (FEM)

The crate is used by other crates to generate interfaces to the FEM inputs and outputs.

gmt-fem build script calls upon generate_fem to generate the FEM Inputs and Outputs enums.

gmt_dos-clients_io build script invokes generate_io to generate the UIDs Enums that matches the inputs and outputs of the FEM.

gmt_dos-clients_fem build script uses generate_interface to generate the traits implementation for the FEM inputs and outputs Enums in gmt-dos-clients_io.

Invoking rustc_config in a build script retrieves the FEM inputs and outputs from the inputs and outputs tables using io_names, and creates some compilation flags to enable conditional compilation according to the availability of some inputs or outputs.

The compilation flags that rustc_config creates are:

  • mount
  • m1
  • m1_hp_force_extension
  • m2
  • top-end="ASM"
  • top-end="FSM"
  • m2_rbm="MCM2Lcl6D"
  • m2_rbm="MCM2Lcl"
  • cfd2021
  • cfd2025
  • ground_acceleration

The full path to the FEM data must be set to the environment variable FEM_REPO.

Structs§

Name
FEM inputs/ouputs names & descriptions
Names
A list of FEM inputs or outputs Name

Enums§

Error

Functions§

generate_fem
Generate the FEM Inputs and Outputs enums for gmt-fem
generate_interface
Generate the code for gmt_dos-clients_fem interfaces
generate_io
Generate the list of inputs and outputs of the FEM as UIDs Enum in gmt_dos-clients_io
io_names
Returns the list of inputs and outputs of the FEM
rustc_config
Creates rustc compilation flags