optimus.source.common
Common functionality for acoustic sources.
Module Contents
Classes
- class optimus.source.common.Source(source_type, frequency)
- abstract pressure_field(medium, locations)
Calculate the pressure field in the specified locations.
This function needs to be overridden by specific source type.
- abstract normal_pressure_gradient(medium, locations, normals)
Calculate the normal gradient of the pressure field in the specified locations.
This function needs to be overridden by specific source type.
- pressure_field_and_normal_gradient(medium, locations, normals)
Calculate the pressure field and the normal gradient of the pressure field in the specified locations.
- abstract calc_surface_traces(medium, space_dirichlet=None, space_neumann=None, dirichlet_trace=True, neumann_trace=True)
Calculate the surface traces of the source field on the mesh.
This function needs to be overridden by specific source type.
- _calc_surface_traces_from_function(medium, space_dirichlet=None, space_neumann=None, dirichlet_trace=True, neumann_trace=True)
Calculate the surface traces of the source field from explicit functions for the pressure and its normal gradient.
- Parameters
- mediumoptimus.material.Material
The propagating medium.
- space_dirichlet, space_neumannbempp.api.FunctionSpace
The discrete spaces on the surface grid.
- dirichlet_trace, neumann_tracebool
Calculate the Dirichlet or Neumann trace of the field.
- Returns
- tracebempp.api.GridFunction
The surface traces.
- _calc_surface_traces_from_coefficients(medium, space_dirichlet=None, space_neumann=None, dirichlet_trace=True, neumann_trace=True)
Calculate the surface traces of the source field from values of the pressure and its normal gradient in the degrees of freedom.
- Parameters
- mediumoptimus.material.Material
The propagating medium.
- space_dirichlet, space_neumannbempp.api.FunctionSpace
The discrete spaces on the surface grid.
- dirichlet_trace, neumann_tracebool
Calculate the Dirichlet or Neumann trace of the field.
- Returns
- tracebempp.api.GridFunction
The surface traces.