1 // Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC. 2 // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 3 // All Rights reserved. See files LICENSE and NOTICE for details. 4 // 5 // This file is part of CEED, a collection of benchmarks, miniapps, software 6 // libraries and APIs for efficient high-order finite element and spectral 7 // element discretizations for exascale applications. For more information and 8 // source code availability see http://github.com/ceed. 9 // 10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC, 11 // a collaborative effort of two U.S. Department of Energy organizations (Office 12 // of Science and the National Nuclear Security Administration) responsible for 13 // the planning and preparation of a capable exascale ecosystem, including 14 // software, applications, hardware, advanced system engineering and early 15 // testbed platforms, in support of the nation's exascale computing imperative. 16 17 use structopt::StructOpt; 18 19 // ---------------------------------------------------------------------------- 20 // Command line arguments 21 // ---------------------------------------------------------------------------- 22 #[derive(Debug, StructOpt)] 23 #[structopt( 24 name = "libCEED Rust Example 2 - Surface Area", 25 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." 26 )] 27 pub(crate) struct Opt { 28 /// libCEED backend resource to use 29 #[structopt(name = "ceed", short = "c", long = "ceed", default_value = "/cpu/self")] 30 pub(crate) ceed_spec: String, 31 /// Mesh dimension 32 #[structopt( 33 name = "dimension", 34 short = "d", 35 long = "dimension", 36 default_value = "3" 37 )] 38 pub(crate) dim: usize, 39 /// Polynomial degree for the mesh 40 #[structopt( 41 name = "mesh degree", 42 short = "m", 43 long = "mesh_degree", 44 default_value = "4" 45 )] 46 pub(crate) mesh_degree: usize, 47 /// Polynomial degree for the solution 48 #[structopt( 49 name = "solution degree", 50 short = "p", 51 long = "solution_degree", 52 default_value = "4" 53 )] 54 pub(crate) solution_degree: usize, 55 /// Number of quadrature points in 1D 56 #[structopt( 57 name = "number of quadrature points", 58 short = "q", 59 long = "num_qpts", 60 default_value = "6" 61 )] 62 pub(crate) num_qpts: usize, 63 /// Approximate problem size 64 #[structopt( 65 name = "problem size", 66 short = "s", 67 long = "problem_size", 68 default_value = "-1" 69 )] 70 pub(crate) problem_size_requested: i64, 71 /// Test mode 72 #[structopt(name = "test mode", short = "t", long = "test")] 73 pub(crate) test: bool, 74 /// Quiet mode 75 #[structopt(name = "quiet mode", short = "q", long = "quiet")] 76 pub(crate) quiet: bool, 77 /// Gallery QFunctions 78 #[structopt(name = "gallery QFunctions", short = "g", long = "gallery")] 79 pub(crate) gallery: bool, 80 } 81 82 // ---------------------------------------------------------------------------- 83