Skip to content

Commit 4285c6e

Browse files
authored
Merge pull request #228499 from Aadhi2012/master
damask-grid 3.0.2 (new formula)
2 parents f0dacf0 + d9b2f6d commit 4285c6e

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

Formula/d/damask-grid.rb

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
class DamaskGrid < Formula
2+
desc "Grid solver of DAMASK - Multi-physics crystal plasticity simulation package"
3+
homepage "https://damask-multiphysics.org"
4+
url "https://damask-multiphysics.org/download/damask-3.0.2.tar.xz"
5+
sha256 "82f9b3aefde87193c12a7c908f42b711b278438f6cad650918989e37fb6dbde4"
6+
license "AGPL-3.0-only"
7+
8+
bottle do
9+
sha256 cellar: :any, arm64_sequoia: "0b18ca183c5b10361923e36624cd0dd48200735b9e294da7fcb669c835a58d99"
10+
sha256 cellar: :any, arm64_sonoma: "638f168e4c065d244b6d6fa8b060651058c17a87e6cc1af946cd6d97064a4c5c"
11+
sha256 cellar: :any, arm64_ventura: "8b17bcdfc98a445fa66706bea7dcb980004b6445619d8db416579fc31bd2510f"
12+
sha256 cellar: :any, sonoma: "407856987aa7e2facc13e48dafa1422427b3e641204e5086e359082de837723f"
13+
sha256 cellar: :any, ventura: "899688e732738e9bfa9f1002b34deaf379c899e87c3561bf779fef5baf83c6af"
14+
sha256 cellar: :any_skip_relocation, x86_64_linux: "44b4d4d3d26e0f059b2d5a7a1e31086929d9183f365b45fb9894623d022d2a9c"
15+
end
16+
17+
depends_on "cmake" => :build
18+
depends_on "pkgconf" => :build
19+
depends_on "petsc"
20+
21+
uses_from_macos "zlib"
22+
23+
resource "testfiles" do
24+
url "https://damask-multiphysics.org/download/damask-3.0.2.tar.xz"
25+
sha256 "82f9b3aefde87193c12a7c908f42b711b278438f6cad650918989e37fb6dbde4"
26+
end
27+
28+
def install
29+
ENV["PETSC_DIR"] = Formula["petsc"].opt_prefix
30+
args = %w[
31+
-DDAMASK_SOLVER=grid
32+
]
33+
system "cmake", "-S", ".", "-B", "build-grid", *args, *std_cmake_args
34+
system "cmake", "--build", "build-grid", "--target", "install"
35+
end
36+
37+
test do
38+
resource("testfiles").stage do
39+
inreplace "examples/grid/tensionX.yaml" do |s|
40+
s.gsub! " t: 10", " t: 1"
41+
s.gsub! " t: 60", " t: 1"
42+
s.gsub! "N: 60", "N: 1"
43+
s.gsub! "N: 40", "N: 1"
44+
end
45+
46+
args = %w[
47+
-w examples/grid
48+
-m material.yaml
49+
-g 20grains16x16x16.vti
50+
-l tensionX.yaml
51+
-j output
52+
]
53+
system "#{bin}/DAMASK_grid", *args
54+
assert_path_exists "examples/grid/output.hdf5", "output.hdf5 must exist"
55+
end
56+
end
57+
end

0 commit comments

Comments
 (0)