SpECTRE  v2024.09.29
control_system::measurements Namespace Reference

Utilities for doing measurements needed by the control system. More...

Namespaces

namespace  Tags
 Tags used for control system measurements.
 

Classes

struct  BothHorizons
 A control_system::protocols::Measurement that relies on two apparent horizons. More...
 
struct  BothNSCenters
 Measurement providing the location of the center of mass of the matter in the \(x>0\) and \(x<0\) regions (assumed to correspond to the center of mass of the two neutron stars in a BNS merger). More...
 
struct  CharSpeed
 A control_system::protocols::Measurement that relies on one apparent horizon, the template parameter Object, and one excision surface. More...
 
struct  PostReductionSendBNSStarCentersToControlSystem
 Simple action called after reduction of the center of mass data. More...
 
struct  SingleHorizon
 A control_system::protocols::Measurement that relies on only one apparent horizon; the template parameter Horizon. More...
 

Functions

void center_of_mass_integral_on_element (const gsl::not_null< double * > mass_a, const gsl::not_null< double * > mass_b, const gsl::not_null< std::array< double, 3 > * > first_moment_A, const gsl::not_null< std::array< double, 3 > * > first_moment_B, const Mesh< 3 > &mesh, const Scalar< DataVector > &inv_det_jacobian, const Scalar< DataVector > &tilde_d, const tnsr::I< DataVector, 3, Frame::Grid > &x_grid)
 Factored Center of Mass calculation (for easier testing) More...
 

Detailed Description

Utilities for doing measurements needed by the control system.

Function Documentation

◆ center_of_mass_integral_on_element()

void control_system::measurements::center_of_mass_integral_on_element ( const gsl::not_null< double * >  mass_a,
const gsl::not_null< double * >  mass_b,
const gsl::not_null< std::array< double, 3 > * >  first_moment_A,
const gsl::not_null< std::array< double, 3 > * >  first_moment_B,
const Mesh< 3 > &  mesh,
const Scalar< DataVector > &  inv_det_jacobian,
const Scalar< DataVector > &  tilde_d,
const tnsr::I< DataVector, 3, Frame::Grid > &  x_grid 
)

Factored Center of Mass calculation (for easier testing)

Details

This function computes the integral of tildeD (assumed to be the conservative baryon density in the inertial frame), as well as its first moment in the grid frame. The integrals are limited to \(x>0\) (label A) or \(x<0\) (label B).

Parameters
mass_aIntegral of tildeD (x > 0)
mass_bIntegral of tildeD (x < 0)
first_moment_AFirst moment of integral of tildeD (x > 0)
first_moment_BFirst moment of integral of tildeD (x < 0)
meshThe mesh
inv_det_jacobianThe inverse determinant of the jacobian of the map between logical and inertial coordinates
tilde_dTildeD on the mesh
x_gridThe coordinates in the grid frame