File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ This file includes tests for:
1818 import LinearAlgebra: norm
1919 using Meshes
2020 using MeshIntegrals
21- import Unitful: @u_str , Quantity
21+ import Unitful: @u_str , Quantity, ustrip
2222 import Enzyme
2323
2424 # Used for testing callable objects as integrand functions
272272 runtests (testable; rtol = 1e-6 )
273273end
274274
275+ @testitem " Meshes.CartesianGrid" setup= [Combinations] begin
276+ # Geometry
277+ a = π
278+ start = Point (0 , 0 )
279+ finish = Point (a, a)
280+ dims = (4 , 4 )
281+ grid = CartesianGrid (start, finish, dims= dims)
282+
283+ # Integrand & Solution
284+ function integrand (p:: Meshes.Point )
285+ x₁, x₂ = ustrip .(to (p))
286+ (√ (a^ 2 - x₁^ 2 ) + √ (a^ 2 - x₂^ 2 )) * u " A"
287+ end
288+ solution = 2 a * (π * a^ 2 / 4 ) * u " A*m^2"
289+
290+ # Package and run tests
291+ testable = TestableGeometry (integrand, grid, solution)
292+ runtests (testable)
293+ end
294+
275295@testitem " Meshes.Circle" setup= [Combinations] begin
276296 # Geometry
277297 center = Point (1 , 2 , 3 )
You can’t perform that action at this time.
0 commit comments