-
Notifications
You must be signed in to change notification settings - Fork 61
t8_time_fractal.cxx
t8_time_fractal is a benchmarking and visualization tool included in the t8code adaptive mesh refinement (AMR) library. It generates fractal-like meshes using various element types (e.g., triangles, quadrilaterals, hexahedra) and supports both 2D and 3D configurations.
The tool is valuable for:
- Evaluating AMR performance.
- Visualizing refinement patterns.
- Testing recursive and iterative refinement strategies.
The basic syntax for running t8_time_fractal is:
./t8_time_fractal [OPTIONS]
| Option(s) | Argument(s) | Description | Values/Defaults |
|---|---|---|---|
| -h, --help | Display help message | ||
| -u, --uniform_level | INT | Initial uniform refinement level (must be even and > 0 for quads/hexahedra) | |
| -f, --final_level | INT | Final refinement level (must be greater than -u) | |
| -e, --elements | INT | Element type: | 2: Quadrilateral 3: Triangle 4: Hexahedron (default) 5: Tetrahedron 6: Prism 7: Pyramid |
| -r, --runs | INT | Number of fractal construction iterations | Default: 1 |
| -i, --iterative | INT | Refinement method: | 0: Recursive (default) 1: Iterative |
| -d, --delete | INT | Element deletion after refinement: | 0: Never delete 1: Delete elements (default) |
| -t, --trees | INT | Number of trees in the forest (must be 1 if -o 1 is set) | Default: 512 |
| -o, --output | INT | Output mesh: | 0: No visual output (default) 1: Visual output (VTK) |
| -c, --coarse | INT | Number of coarsening steps applied to holes |
- For quadrilateral and hexahedral elements (-e 2 or -e 4), both -u and -f must be even numbers greater than 0.
- If visual output is enabled (-o 1), the number of trees (-t) must be set to 1.
./t8_time_fractal -u 2 -f 4 -e 2 -r 1 -o 1 -t 1
Generates a quadrilateral mesh with:
-
-u 2: Starts with a 2-level uniformly refined square mesh. -
-f 4: Refines to level 4 (higher resolution). -
-e 2: Uses quadrilateral elements (squares). -
-r 1: Applies the fractal hole-cutting process once. -
-o 1 & -t 1: Enables VTK visual output for a single tree (a single, centered structure).
./t8_time_fractal -u 2 -f 4 -e 3 -i 1 -r 2 -d 1 -o 1 -t 1
-
-u 2: Start with uniform refinement level 2. -
-f 4: Refine up to level 4. -
-e 3: Use triangle elements. -
-i 1: Use iterative (not recursive) refinement. -
-r 2: Apply two fractal refinement passes. -
-d 1: Delete elements during fractal pattern creation. -
-o 1 -t 1: Output to VTK file (requires only 1 tree).

Creates a triangular mesh using one iterative refinement pass, where elements are deleted according to a fractal pattern. The resulting mesh is written to a .vtu file for visualization (requires one tree).
If visual output is enabled (-o 1), the program generates a VTK file (e.g., output.vtu) that can be opened with visualization tools like ParaView to inspect the mesh structure and refinement patterns.
-
Invalid Option or Missing Argument:
Ensure all options are provided with the required arguments. For example,-rmust be followed by an integer. -
Refinement Level Errors:
For quadrilateral and hexahedral elements, both-uand-fmust be even numbers greater than 0, with-fgreater than-u. -
Visual Output Constraints:
When enabling visual output (-o 1), set the number of trees (-t) to 1.
General
Step 0 Hello World
Step 1 Creating a coarse mesh
Step 2 Creating a uniform forest
Step 3 Adapting a forest
Step 4 Partition,-Balance,-Ghost
Step 5 Store element data
Step 6 Computing stencils
Step 7 Interpolation
Features
Prerequisites & Compilation
t8_time_forest_partition
t8_time_fractal
t8_time_new_refine
t8_time_partition
t8_time_prism
t8_time_set_join_by_vertices