Skip to contents

Aggregates detailed list of elementary damaging functions by category (total, building and furniture) .

Usage

compute_damage_from_detail(
  x,
  category,
  hazard_range = getOption("floodam_building_hazard_range")
)

Arguments

x,

list of elementary_damaging objects

category,

character indicating the model category

hazard_range

list, default to getOption("floodam_building_hazard_range")

Value

a list of objects of class "damaging"

Details

This funtion is meant to be called during the execution of the function compute_damage(). It ensures that damages are calculated consistently across levels of aggregation : external wall segments, external walls, rooms and building level.

It serves as a bridge between `compute_damage()` and `sumup_damage()`,

providing the latter the right list of elementary damaging components to use

Examples

if (FALSE) { # \dontrun{
  result[["absolute"]] = compute_damage_from_detail(
    x = result[["detail"]],
    category = category,
    hazard_range = hazard_range
  )
} # }