-
Notifications
You must be signed in to change notification settings - Fork 1
threePlusOneBuilder
threePlusOneBuilder, is designed to construct a metric tensor for a 3+1 decomposition of spacetime given the lapse rate (alpha), shift vector (beta), and spatial term (gamma). Let's break down the function step by step:
Logging Initialization: It sets up logging to output information at the INFO level.
Input Data Inspection: It logs the shapes of alpha, beta, and each component of gamma to provide insight into the dimensions of the input data.
Gamma Calculation: It calculates the inverse or pseudoinverse of each component of gamma based on their determinants. If a component's determinant is below the threshold, indicating singularity, it issues a warning and uses the pseudoinverse instead. It also logs the condition number of each component to assess the stability of the inversion process.
Metric Tensor Construction: It constructs the components of the metric tensor based on the provided data. It calculates the time-time component first (metricTensor[(1, 1)]) using the provided data. Then, it constructs the time-space components (metricTensor[(1, i)] and metricTensor[(i, 1)]) using the shift vector (beta). Finally, it constructs the space-space components (metricTensor[(i, j)]) using the spatial term (gamma).
Logging Metric Tensor: It logs the constructed metric tensor to provide visibility into its components.
Symmetry Verification: It checks if the constructed metric tensor is symmetric using the is_symmetric() function. If the tensor is not symmetric, an error is logged, and a ValueError is raised.
Tensor Verification: It verifies the metric tensor using the verifyTensor() function. If the tensor fails verification, an error is logged, and a ValueError is raised.
Return: If the metric tensor passes all checks, it is returned as a dictionary.
This function ensures that the constructed metric tensor satisfies necessary criteria and provides logging to aid in debugging and understanding the process.
In the context of general relativity and the specific implementation in threePlusOneBuilder, alpha, beta, and gamma are components of the 3+1 decomposition of the metric tensor. Here's what each of them represents:
Alpha (α): Alpha represents the lapse function, denoted as α. It describes the rate at which proper time advances along a given coordinate time direction. In simpler terms, it characterizes the stretching or compression of time intervals.
Beta (β): Beta represents the shift vector, denoted as β<sup>i</sup>. It describes the spatial displacement of coordinate lines from one hypersurface of constant coordinate time to another. In other words, it characterizes how spatial coordinates change as time progresses.
Gamma (γ): Gamma represents the spatial metric, denoted as γ. It describes the spatial geometry of the hypersurfaces of constant coordinate time. In essence, it characterizes the spatial distances and angles between points in space.
In the context of the 3+1 decomposition of the metric tensor, these components are used to represent spacetime geometry in a way that facilitates numerical simulations, especially in the study of phenomena like gravitational waves, black holes, and cosmology. The threePlusOneBuilder function constructs the full metric tensor using these components based on the chosen coordinate system and spacetime geometry.