Skip to content

Reports and Monitors

Reports are used to query data from the simulation generally using coefficient functions available in the Coefficient Manager.

Probe Report

A Probe Report (mufem.ProbeReport) is used to query data at a specific point in the mesh. It can be used to extract scalar or vector fields at a given position.

probe_report = mufem.ProbeReport.SinglePoint(
    name="Probe Report", cff_name="Position" , x=0.5, y=0.2, z=0.3,
)

print(probe_report.evaluate())

Volume Integral Report

A Volume Integral Report (mufem.VolumeIntegralReport) is used to compute integrals over a volume defined by a coefficient function.

volume_integral_report = mufem.VolumeIntegralReport(
    name="Volume Integral Report", marker=1 @ Vol,  cff_name="Cell Volume",
)

print(volume_integral_report.evaluate())

Surface Integral Report

A Surface Integral Report (mufem.SurfaceIntegralReport) is used to compute integrals over a surface defined by a coefficient function.

surface_integral_report = mufem.SurfaceIntegralReport(
    name="Surface Integral Report", marker=1 @ Bnd, cff_name="Cell Volume",
)

print(surface_integral_report.evaluate())

Surface Average Report

A Surface Average Report (mufem.SurfaceAverageReport) is used to compute the average value of a coefficient function over a surface.

surface_average_report = mufem.SurfaceAverageReport(
    name="Surface Average Report", marker=1 @ Bnd, cff_name="Cell Volume",
)

print(surface_average_report.evaluate())

MinMax Report

A MinMax Report (mufem.MinMaxReport) is used to compute the minimum and maximum values of a coefficient function over the mesh.

minmax_report = mufem.MinMaxReport(
    name="MinMax Report", marker=1 @ Vol, cff_name="Cell Volume",
)

print(minmax_report.evaluate())

Note

Currently only the maximum value is returned.

Example

The code below shows how to query data from the simulation using reports:

import mufem

from mufem import Vol, Bnd, Everywhere

sim = mufem.Simulation.New(
    name="My Case", mesh_path="data/geometry.mesh", print_only_warnings=True,
)

refinement_model = mufem.RefinementModel()
sim.get_model_manager().add_model(refinement_model)

volume_integral_report = mufem.VolumeIntegralReport(
    name="Volume Integral Report", marker=1 @ Vol,  cff_name="Cell Volume",
)
print(f"Volume Integral Report: {volume_integral_report.evaluate()}")

minmax_report = mufem.MinMaxReport(
    name="MinMax Report", marker=1 @ Vol, cff_name="Cell Volume",
)
print(f"MinMax Report: {minmax_report.evaluate()}")