# Use of equation-of-state

The equation-of-state (EOS) ID is used to determine the EOS used for the material model. We currently only support *EOS_GRUNEISEN.

## GPU

The EOS calculates the pressure at a given volume. This pressure is needed by the material model. You must handle this pressure manually in your material model, replacing the pressure that's normally part of the stress tensor.

To check if EOS is enabled, use the `eos` parameter and the `dp_eos_pressure` array in the `UserMatDevice` struct.

        // Pressure based on volumetric strain or EOS
        if (eos == 0) {
            pressure = -cmat.bulk * (dp_strain[offset + 0] + dp_strain[offset + 1] + dp_strain[offset + 2]);
        } else {
            pressure = dp_eos_pressure[idx];
        }

## CPU

The calculated pressure from EOS is applied automatically to the stress tensor and requires no actions in the implementation.