1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use super::Gauss;
use crate::shapes::Scratchpad;
/// Holds common arguments for the numerical integration functions
pub struct CommonArgs<'a> {
/// The temporary interpolation, Jacobian, gradient variables computed at an integration point
pub pad: &'a mut Scratchpad,
/// Integration points
pub gauss: &'a Gauss,
/// Fills the output vector or matrix with zeros, otherwise accumulate values
pub clear: bool,
/// Specifies an axisymmetric model
///
/// Performs the integration for 1 radian.
pub axisymmetric: bool,
/// Extra coefficient that can be used to define the thickness of plane-stress models
pub alpha: f64,
/// Stride marking the first row in the output vector/matrix where to add components
pub ii0: usize,
/// Stride marking the first column in the output matrix where to add components
pub jj0: usize,
}
impl<'a> CommonArgs<'a> {
/// Allocates new instance
pub fn new(pad: &'a mut Scratchpad, gauss: &'a Gauss) -> Self {
CommonArgs {
pad,
gauss,
clear: true,
axisymmetric: false,
alpha: 1.0,
ii0: 0,
jj0: 0,
}
}
}