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