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