1*9ba83ac0SJeremy L Thompson // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3ded9b81dSJeremy L Thompson // 43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 5ded9b81dSJeremy L Thompson // 63d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 7ded9b81dSJeremy L Thompson 8947f93aaSJed Brown use clap::Parser; 9ded9b81dSJeremy L Thompson 10ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 11ded9b81dSJeremy L Thompson // Command line arguments 12ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 13947f93aaSJed Brown #[derive(Debug, Parser)] 14947f93aaSJed Brown #[command( 15ded9b81dSJeremy L Thompson name = "libCEED Rust Example 2 - Surface Area", 16ded9b81dSJeremy L Thompson about = "This example illustrates a simple usage of libCEED to compute the surface area of a body using matrix-free application of a diffusion operator." 17ded9b81dSJeremy L Thompson )] 18ded9b81dSJeremy L Thompson pub(crate) struct Opt { 19ded9b81dSJeremy L Thompson /// libCEED backend resource to use 20947f93aaSJed Brown #[arg(name = "CEED", short, long = "ceed", default_value = "/cpu/self")] 21ded9b81dSJeremy L Thompson pub(crate) ceed_spec: String, 22ded9b81dSJeremy L Thompson /// Mesh dimension 23947f93aaSJed Brown #[arg(short, long = "dimension", default_value = "3")] 24ded9b81dSJeremy L Thompson pub(crate) dim: usize, 25ded9b81dSJeremy L Thompson /// Polynomial degree for the mesh 26947f93aaSJed Brown #[arg(short, long, default_value = "4")] 27ded9b81dSJeremy L Thompson pub(crate) mesh_degree: usize, 28ded9b81dSJeremy L Thompson /// Polynomial degree for the solution 29947f93aaSJed Brown #[arg(short = 'p', long, default_value = "4")] 30ded9b81dSJeremy L Thompson pub(crate) solution_degree: usize, 31ded9b81dSJeremy L Thompson /// Number of quadrature points in 1D 32947f93aaSJed Brown #[arg(short = 'q', long, default_value = "6")] 33ded9b81dSJeremy L Thompson pub(crate) num_qpts: usize, 34ded9b81dSJeremy L Thompson /// Approximate problem size 35947f93aaSJed Brown #[arg(name = "DoF", short = 's', long = "problem_size", default_value = "-1")] 36ded9b81dSJeremy L Thompson pub(crate) problem_size_requested: i64, 37ded9b81dSJeremy L Thompson /// Test mode 38947f93aaSJed Brown #[arg(short, long)] 39ded9b81dSJeremy L Thompson pub(crate) test: bool, 40ded9b81dSJeremy L Thompson /// Quiet mode 41947f93aaSJed Brown #[arg(short = 'x', long)] 42ded9b81dSJeremy L Thompson pub(crate) quiet: bool, 43947f93aaSJed Brown /// Use QFunctions from the Gallery instead of example 44947f93aaSJed Brown #[arg(short, long)] 45ded9b81dSJeremy L Thompson pub(crate) gallery: bool, 46ded9b81dSJeremy L Thompson } 47ded9b81dSJeremy L Thompson 48ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 49