Package by.andd3dfx.math.space
Record Class Area
java.lang.Object
java.lang.Record
by.andd3dfx.math.space.Area
- Record Components:
x
- spatial interval defining the domain boundaries and discretizationt
- temporal interval defining the time range and discretization
Represents a two-dimensional space-time domain for partial differential equations.
This record combines spatial and temporal intervals to define the computational
domain where the PDE is solved. It provides methods for coordinate-to-index
and index-to-coordinate conversions in both spatial and temporal dimensions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.t()
Returns the value of thet
record component.int
ti
(double time) Returns the temporal index closest to the specified time value.double
tLeft()
Returns the left boundary of the temporal domain.int
tn()
Returns the number of points in the temporal domain.final String
toString()
Returns a string representation of this record class.double
tRight()
Returns the right boundary of the temporal domain.double
tx
(int i) Returns the time value at the specified temporal index.x()
Returns the value of thex
record component.int
xi
(double x) Returns the spatial index closest to the specified coordinate.double
xLeft()
Returns the left boundary of the spatial domain.int
xn()
Returns the number of points in the spatial domain.double
xRight()
Returns the right boundary of the spatial domain.double
xx
(int i) Returns the spatial coordinate at the specified spatial index.
-
Constructor Details
-
Method Details
-
tLeft
public double tLeft()Returns the left boundary of the temporal domain.- Returns:
- left boundary of the time interval
-
tRight
public double tRight()Returns the right boundary of the temporal domain.- Returns:
- right boundary of the time interval
-
tn
public int tn()Returns the number of points in the temporal domain.- Returns:
- number of time points
-
tx
public double tx(int i) Returns the time value at the specified temporal index.- Parameters:
i
- temporal index (0 <= i <= tn)- Returns:
- time value at index i
- Throws:
IllegalArgumentException
- if i < 0 or i > tn
-
ti
public int ti(double time) Returns the temporal index closest to the specified time value.- Parameters:
time
- time value (tLeft <= time <= tRight)- Returns:
- index of the closest time point
- Throws:
IllegalArgumentException
- if time < tLeft or time > tRight
-
xLeft
public double xLeft()Returns the left boundary of the spatial domain.- Returns:
- left boundary of the spatial interval
-
xRight
public double xRight()Returns the right boundary of the spatial domain.- Returns:
- right boundary of the spatial interval
-
xn
public int xn()Returns the number of points in the spatial domain.- Returns:
- number of spatial points
-
xx
public double xx(int i) Returns the spatial coordinate at the specified spatial index.- Parameters:
i
- spatial index (0 <= i <= xn)- Returns:
- spatial coordinate at index i
- Throws:
IllegalArgumentException
- if i < 0 or i > xn
-
xi
public int xi(double x) Returns the spatial index closest to the specified coordinate.- Parameters:
x
- spatial coordinate (xLeft <= x <= xRight)- Returns:
- index of the closest spatial point
- Throws:
IllegalArgumentException
- if x < xLeft or x > xRight
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
x
Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
t
Returns the value of thet
record component.- Returns:
- the value of the
t
record component
-