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 structopt::StructOpt; 9 10 // ---------------------------------------------------------------------------- 11 // Command line arguments 12 // ---------------------------------------------------------------------------- 13 #[derive(Debug, StructOpt)] 14 #[structopt( 15 name = "libCEED Rust Example 2 - Surface Area", 16 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." 17 )] 18 #[cfg(not(tarpaulin_include))] 19 pub(crate) struct Opt { 20 /// libCEED backend resource to use 21 #[structopt(name = "ceed", short = "c", long = "ceed", default_value = "/cpu/self")] 22 pub(crate) ceed_spec: String, 23 /// Mesh dimension 24 #[structopt( 25 name = "dimension", 26 short = "d", 27 long = "dimension", 28 default_value = "3" 29 )] 30 pub(crate) dim: usize, 31 /// Polynomial degree for the mesh 32 #[structopt( 33 name = "mesh degree", 34 short = "m", 35 long = "mesh_degree", 36 default_value = "4" 37 )] 38 pub(crate) mesh_degree: usize, 39 /// Polynomial degree for the solution 40 #[structopt( 41 name = "solution degree", 42 short = "p", 43 long = "solution_degree", 44 default_value = "4" 45 )] 46 pub(crate) solution_degree: usize, 47 /// Number of quadrature points in 1D 48 #[structopt( 49 name = "number of quadrature points", 50 short = "q", 51 long = "num_qpts", 52 default_value = "6" 53 )] 54 pub(crate) num_qpts: usize, 55 /// Approximate problem size 56 #[structopt( 57 name = "problem size", 58 short = "s", 59 long = "problem_size", 60 default_value = "-1" 61 )] 62 pub(crate) problem_size_requested: i64, 63 /// Test mode 64 #[structopt(name = "test mode", short = "t", long = "test")] 65 pub(crate) test: bool, 66 /// Quiet mode 67 #[structopt(name = "quiet mode", short = "x", long = "quiet")] 68 pub(crate) quiet: bool, 69 /// Gallery QFunctions 70 #[structopt(name = "gallery QFunctions", short = "g", long = "gallery")] 71 pub(crate) gallery: bool, 72 } 73 74 // ---------------------------------------------------------------------------- 75