-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do much polishing on HighReGrader. Also, bugfixes
- Loading branch information
1 parent
5c21dbb
commit 2c0edc1
Showing
12 changed files
with
268 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
|
||
import classy_blocks as cb | ||
from classy_blocks.construct.flat.sketches.disk import QuarterDisk | ||
from classy_blocks.grading.autograding.grader import HighReGrader | ||
from classy_blocks.grading.autograding.params import HighReChopParams | ||
from classy_blocks.util import functions as f | ||
|
||
mesh = cb.Mesh() | ||
|
||
axis_point_1 = f.vector(0.0, 0.0, 0.0) | ||
axis_point_2 = f.vector(5.0, 5.0, 0.0) | ||
radius_point_1 = f.vector(0.0, 0.0, 2.0) | ||
|
||
# make a disk with small core block - yields particularly bad cell sizes with normal chops | ||
QuarterDisk.core_ratio = 0.4 | ||
|
||
quarter_disk = QuarterDisk(axis_point_1, radius_point_1, axis_point_1 - axis_point_2) | ||
quarter_cylinder = cb.ExtrudedShape(quarter_disk, f.norm(axis_point_2 - axis_point_1)) | ||
|
||
mesh.add(quarter_cylinder) | ||
|
||
mesh.assemble() | ||
# TODO: automate or something | ||
mesh.block_list.update() | ||
|
||
params = HighReChopParams(0.05) | ||
grader = HighReGrader(mesh, params) | ||
grader.grade() | ||
|
||
|
||
mesh.write(os.path.join("..", "case", "system", "blockMeshDict"), debug_path="debug.vtk") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.