| main.rs (edfeb50c95a06f21dab77ce465c4ffe1a99c95ee) | main.rs (6f97ff0a4d72c7c52f536a363fa2fb4866807b9a) |
|---|---|
| 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. --- 227 unchanged lines hidden (view full) --- 236 &basis_mesh, 237 VectorOpt::None, 238 )? 239 .field( 240 "qdata", 241 &restr_qdata, 242 BasisOpt::Collocated, 243 VectorOpt::Active, | 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. --- 227 unchanged lines hidden (view full) --- 236 &basis_mesh, 237 VectorOpt::None, 238 )? 239 .field( 240 "qdata", 241 &restr_qdata, 242 BasisOpt::Collocated, 243 VectorOpt::Active, |
| 244 )?; | 244 )? 245 .check()?; |
| 245 246 // Compute the quadrature data for the diff operator 247 let elem_qpts = num_qpts.pow(dim as u32); 248 let num_elem: usize = num_xyz.iter().take(dim).product(); 249 let mut qdata = ceed.vector(num_elem * elem_qpts * dim * (dim + 1) / 2)?; 250 op_build.apply(&mesh_coords, &mut qdata)?; 251 252 // QFunction that applies the diff operator --- 57 unchanged lines hidden (view full) --- 310 QFunctionOpt::SomeQFunction(&qf_diff_closure) 311 }; 312 313 // Diff Operator 314 let op_diff = ceed 315 .operator(qf_diff, QFunctionOpt::None, QFunctionOpt::None)? 316 .field("du", &restr_solution, &basis_solution, VectorOpt::Active)? 317 .field("qdata", &restr_qdata, BasisOpt::Collocated, &qdata)? | 246 247 // Compute the quadrature data for the diff operator 248 let elem_qpts = num_qpts.pow(dim as u32); 249 let num_elem: usize = num_xyz.iter().take(dim).product(); 250 let mut qdata = ceed.vector(num_elem * elem_qpts * dim * (dim + 1) / 2)?; 251 op_build.apply(&mesh_coords, &mut qdata)?; 252 253 // QFunction that applies the diff operator --- 57 unchanged lines hidden (view full) --- 311 QFunctionOpt::SomeQFunction(&qf_diff_closure) 312 }; 313 314 // Diff Operator 315 let op_diff = ceed 316 .operator(qf_diff, QFunctionOpt::None, QFunctionOpt::None)? 317 .field("du", &restr_solution, &basis_solution, VectorOpt::Active)? 318 .field("qdata", &restr_qdata, BasisOpt::Collocated, &qdata)? |
| 318 .field("dv", &restr_solution, &basis_solution, VectorOpt::Active)?; | 319 .field("dv", &restr_solution, &basis_solution, VectorOpt::Active)? 320 .check()?; |
| 319 320 // Solution vectors 321 let mut u = ceed.vector(solution_size)?; 322 let mut v = ceed.vector(solution_size)?; 323 324 // Initialize u with sum of node coordinates 325 let coords = mesh_coords.view()?; 326 u.view_mut()?.iter_mut().enumerate().for_each(|(i, u)| { --- 137 unchanged lines hidden --- | 321 322 // Solution vectors 323 let mut u = ceed.vector(solution_size)?; 324 let mut v = ceed.vector(solution_size)?; 325 326 // Initialize u with sum of node coordinates 327 let coords = mesh_coords.view()?; 328 u.view_mut()?.iter_mut().enumerate().for_each(|(i, u)| { --- 137 unchanged lines hidden --- |