ADD_TEST(ExampleWaveSystem_2DShock_Centered_DISK_hexagons ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemCentered.py ${MESH_FILE})
+ SET(MESH_FILE ../../../ressources/meshHexagonWithTriangles.med )
+
+ ADD_TEST(ExampleWaveSystem_2DShock_Centered_HEXAGON_triangles ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemCentered.py ${MESH_FILE})
+
endif (CDMATH_WITH_PYTHON AND CDMATH_WITH_PETSC AND CDMATH_WITH_POSTPRO)
print("Construction of the initial condition …")
if(dim==1 or filename.find("square")>-1 or filename.find("Square")>-1 or filename.find("cube")>-1 or filename.find("Cube")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,False)
- elif(filename.find("disk")>-1 or filename.find("Disk")>-1):
+ elif(filename.find("disk")>-1 or filename.find("Disk")>-1 or filename.find("Hexagon")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,True)
else:
print( "Mesh name : ", filename )
- raise ValueError("Mesh name should contain substring square, cube or disk")
+ raise ValueError("Mesh name should contain substring square, cube, Hexagon or disk")
for k in range(nbCells):
Un[k*(dim+1)+0] = pressure_field[k]
ADD_TEST(ExampleWaveSystem_2DShock_PStag_DISK_hexagons ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemPStag.py ${MESH_FILE})
+ SET(MESH_FILE ../../../ressources/meshHexagonWithTriangles.med )
+
+ ADD_TEST(ExampleWaveSystem_2DShock_PStag_HEXAGON_triangles ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemPStag.py ${MESH_FILE})
+
endif (CDMATH_WITH_PYTHON AND CDMATH_WITH_PETSC AND CDMATH_WITH_POSTPRO)
print("Construction of the initial condition …")
if(dim==1 or filename.find("square")>-1 or filename.find("Square")>-1 or filename.find("cube")>-1 or filename.find("Cube")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,False)
- elif(filename.find("disk")>-1 or filename.find("Disk")>-1):
+ elif(filename.find("disk")>-1 or filename.find("Disk")>-1 or filename.find("Hexagon")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,True)
else:
print( "Mesh name : ", filename )
- raise ValueError("Mesh name should contain substring square, cube or disk")
+ raise ValueError("Mesh name should contain substring square, cube, Hexagon or disk")
for k in range(nbCells):
Un[k*(dim+1)+0] = pressure_field[k]
ADD_TEST(ExampleWaveSystem_2DShock_UpwindExplicit_DISK_hexagons ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemUpwind.py ${MESH_FILE} ${IMPLICIT_SCHEME})
+ SET(MESH_FILE ../../../ressources/meshHexagonWithTriangles.med )
+
+ ADD_TEST(ExampleWaveSystem_2DShock_UpwindExplicit_HEXAGON_triangles ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/WaveSystemUpwind.py ${MESH_FILE} ${IMPLICIT_SCHEME})
+
SET(IMPLICIT_SCHEME 1 )
SET(MESH_FILE ../../../ressources/meshSquare.med )
nbCells = my_mesh.getNumberOfCells()
rayon = 0.15
- if(not isCircle):
+ if(not isCircle):#Case of a square domain
xcentre = 0.5
ycentre = 0.5
zcentre = 0.5
- else:
+ else:#Case of a disk or a hexagonal domain
xcentre = 0.
ycentre = 0.
zcentre = 0.
print("Construction of the initial condition …")
if(dim==1 or filename.find("square")>-1 or filename.find("Square")>-1 or filename.find("cube")>-1 or filename.find("Cube")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,False)
- elif(filename.find("disk")>-1 or filename.find("Disk")>-1):
+ elif(filename.find("disk")>-1 or filename.find("Disk")>-1 or filename.find("Hexagon")>-1):
pressure_field, velocity_field = initial_conditions_shock(my_mesh,True)
else:
print( "Mesh name : ", filename )
- raise ValueError("Mesh name should contain substring square, cube or disk")
+ raise ValueError("Mesh name should contain substring square, cube, hexagon or disk")
#iteration vectors
Un =cdmath.Vector(nbCells*(dim+1))
print("Construction of the initial condition …")
if(filename.find("square")>-1 or filename.find("Square")>-1 or filename.find("cube")>-1 or filename.find("Cube")>-1):
pressure_field, velocity_field = initial_conditions_square_vortex(my_mesh)
- elif(filename.find("disk")>-1 or filename.find("Disk")>-1):
+ elif(filename.find("disk")>-1 or filename.find("Disk")>-1 or filename.find("Hexagon")>-1):
pressure_field, velocity_field = initial_conditions_disk_vortex(my_mesh)
else:
print( "Mesh name : ", filename)
- raise ValueError("Mesh name should contain substring square, cube or disk")
+ raise ValueError("Mesh name should contain substring square, cube, Hexagon or disk")
for k in range(nbCells):
Un[k*(dim+1)+0] = pressure_field[k]