FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Marine Environment Library

Synchronized marine environment models for distributed simulations. More...

+ Collaboration diagram for Marine Environment Library:

Modules

 Wave Models
 Wave field computations and surface elevation models.
 
 Current Models
 Ocean current velocity fields at arbitrary locations and depths.
 
 Seafloor Models
 Bathymetry and seafloor geometry representations.
 
 Wake Models
 Velocity deficit fields behind nets and other porous structures.
 
 Calculation Utilities
 Low-level mathematical utilities and helper functions.
 

Classes

class  marenv::Environment
 
struct  marenv::WakedFlow
 
class  marenv::EnvironmentFacade
 
class  marenv::grid::UniformGrid3< T >
 

Enumerations

enum class  marenv::Status {
  marenv::Status::OK , marenv::Status::OUT_OF_RANGE_INACCURATE , marenv::Status::NOT_APPLICABLE_NOT_SET , marenv::Status::ERROR_NOT_SET ,
  marenv::Status::NOT_IMPLEMENTED
}
 

Functions

constexpr bool marenv::IsUsable (Status status) noexcept
 

Detailed Description

The marenv library provides deterministic, time-dependent models for marine environment processes including waves, ocean currents, and seafloor geometry. It enables synchronized environment states across distributed simulation systems without continuous inter-process communication.

Enumeration Type Documentation

◆ Status

enum class marenv::Status
strong

Return values to specify if an method call was successful or not.

This can be used shown below, where the final value of status will be Status::OK if no error occurred, otherwise it will be the first error returned.

Status status = methodCall1(); status += methodCall2(); status &= methodCall3(); status = status & methodCall4(); if (status == Status::OK) { do something }

Enumerator
OK 

The value is valid.

OUT_OF_RANGE_INACCURATE 

The query lay outside the data, and the value was clamped to its edge (a depth profile above its first or below its last layer): usable, but less accurate. The facade sums such a current and returns this status (owner ruling R122, MENV-0053); see IsUsable().

NOT_APPLICABLE_NOT_SET 

The quantity does not apply here or is not configured; the value is not set (zero).

ERROR_NOT_SET 

No valid data (outside a field's horizontal extent, a NaN position, no field); the value is not set (zero) and must not be used.

NOT_IMPLEMENTED 

Not implemented; the value is not set.

Function Documentation

◆ IsUsable()

constexpr bool marenv::IsUsable ( Status  status)
constexprnoexcept

Returns true if a value returned with this status may be used: Status::OK or Status::OUT_OF_RANGE_INACCURATE (owner ruling R122, MENV-0053).

An inaccurate value is a clamped one, still the best estimate there; the other statuses leave the value unset. EnvironmentFacade sums a current field whose status is usable and returns the first status that is not, else Status::OUT_OF_RANGE_INACCURATE if any field returned it.