13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, 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 8*947f93aaSJed Brown use clap::Parser; 9ded9b81dSJeremy L Thompson 10ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 11ded9b81dSJeremy L Thompson // Command line arguments 12ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 13*947f93aaSJed Brown #[derive(Debug, Parser)] 14*947f93aaSJed 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 )] 18954a6033SJeremy L Thompson #[cfg(not(tarpaulin_include))] 19ded9b81dSJeremy L Thompson pub(crate) struct Opt { 20ded9b81dSJeremy L Thompson /// libCEED backend resource to use 21*947f93aaSJed Brown #[arg(name = "CEED", short, long = "ceed", default_value = "/cpu/self")] 22ded9b81dSJeremy L Thompson pub(crate) ceed_spec: String, 23ded9b81dSJeremy L Thompson /// Mesh dimension 24*947f93aaSJed Brown #[arg(short, long = "dimension", default_value = "3")] 25ded9b81dSJeremy L Thompson pub(crate) dim: usize, 26ded9b81dSJeremy L Thompson /// Polynomial degree for the mesh 27*947f93aaSJed Brown #[arg(short, long, default_value = "4")] 28ded9b81dSJeremy L Thompson pub(crate) mesh_degree: usize, 29ded9b81dSJeremy L Thompson /// Polynomial degree for the solution 30*947f93aaSJed Brown #[arg(short = 'p', long, default_value = "4")] 31ded9b81dSJeremy L Thompson pub(crate) solution_degree: usize, 32ded9b81dSJeremy L Thompson /// Number of quadrature points in 1D 33*947f93aaSJed Brown #[arg(short = 'q', long, default_value = "6")] 34ded9b81dSJeremy L Thompson pub(crate) num_qpts: usize, 35ded9b81dSJeremy L Thompson /// Approximate problem size 36*947f93aaSJed Brown #[arg(name = "DoF", short = 's', long = "problem_size", default_value = "-1")] 37ded9b81dSJeremy L Thompson pub(crate) problem_size_requested: i64, 38ded9b81dSJeremy L Thompson /// Test mode 39*947f93aaSJed Brown #[arg(short, long)] 40ded9b81dSJeremy L Thompson pub(crate) test: bool, 41ded9b81dSJeremy L Thompson /// Quiet mode 42*947f93aaSJed Brown #[arg(short = 'x', long)] 43ded9b81dSJeremy L Thompson pub(crate) quiet: bool, 44*947f93aaSJed Brown /// Use QFunctions from the Gallery instead of example 45*947f93aaSJed Brown #[arg(short, long)] 46ded9b81dSJeremy L Thompson pub(crate) gallery: bool, 47ded9b81dSJeremy L Thompson } 48ded9b81dSJeremy L Thompson 49ded9b81dSJeremy L Thompson // ---------------------------------------------------------------------------- 50