Square Domain Module
The square_domain
module provides functionality to work with square domains.
Available Functions
Main.square_domain.square_domain_boundary_condition
— Functionsquare_domain_boundary_condition(points::Vector{Tuple{Float64, Float64}}) -> Vector{Float64}
Compute the boundary condition for a square domain problem.
Arguments
points::Vector{Tuple{Float64, Float64}}
: A vector of tuples representing the x and y coordinates of the points on the boundary.
Returns
- A
Vector{Float64}
representing the boundary condition at the corresponding points, calculated using the formula:(1 - x) * y * sin(π * x)
.
Example
```julia
points = [(0.1, 0.2), (0.3, 0.4), (0.5, 0.6)]
g = square_domain_boundary_condition(points)
```
Main.square_domain.square_domain_rhs
— Functionsquare_domain_rhs(points::Matrix{Float64}) -> Float64
Compute the right-hand side function for a square domain problem.
Arguments
points::Matrix{Float64}
: A matrix where each row represents the x and y coordinates of a point.
Returns
- A
Float64
value representing the right-hand side of the equation, computed using the formula:15 * sin(π * sum(x)) * sin(π * sum(y))
.
Example
```julia
points = [0.1 0.2; 0.3 0.4; 0.5 0.6]
f = square_domain_rhs(points)
```