1 // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 8 use clap::Parser; 9 10 // ---------------------------------------------------------------------------- 11 // Command line arguments 12 // ---------------------------------------------------------------------------- 13 #[derive(Debug, Parser)] 14 #[command( 15 name = "libCEED Rust Example 1 - Volume", 16 about = "This example uses the mass matrix to compute the length, area, or volume of a region, depending upon runtime parameters." 17 )] 18 #[cfg(not(tarpaulin_include))] 19 pub(crate) struct Opt { 20 /// libCEED backend resource to use 21 #[arg(name = "CEED", short, long = "ceed", default_value = "/cpu/self")] 22 pub(crate) ceed_spec: String, 23 /// Mesh dimension 24 #[arg(short, long = "dimension", default_value = "3")] 25 pub(crate) dim: usize, 26 /// Polynomial degree for the mesh 27 #[arg(short, long, default_value = "4")] 28 pub(crate) mesh_degree: usize, 29 /// Polynomial degree for the solution 30 #[arg(short = 'p', long, default_value = "4")] 31 pub(crate) solution_degree: usize, 32 /// Number of quadrature points in 1D 33 #[arg(short = 'q', long, default_value = "6")] 34 pub(crate) num_qpts: usize, 35 /// Approximate problem size 36 #[arg(name = "DoF", short = 's', long = "problem_size", default_value = "-1")] 37 pub(crate) problem_size_requested: i64, 38 /// Test mode 39 #[arg(short, long)] 40 pub(crate) test: bool, 41 /// Quiet mode 42 #[arg(short = 'x', long)] 43 pub(crate) quiet: bool, 44 /// Use QFunctions from the Gallery instead of example 45 #[arg(short, long)] 46 pub(crate) gallery: bool, 47 } 48 49 // ---------------------------------------------------------------------------- 50