pub fn gen_scratchpad_with_coords(space_ndim: usize, kind: GeoKind) -> Scratchpad {
        let geo_ndim = kind.ndim();
        let nnode = kind.nnode();
        let mut x = Vector::new(space_ndim);
        let mut ksi_aux = vec![0.0; space_ndim];
        let mut pad = Scratchpad::new(space_ndim, kind).unwrap();
        let (ksi_min, ksi_del) = kind.ksi_min_ksi_del();
        for m in 0..nnode {
            let ksi = kind.reference_coords(m);
            if geo_ndim == space_ndim {
                // SOLID case: 2D or 3D
                map_point_coords(&mut x, ksi, ksi_min, ksi_del);
            } else if geo_ndim == 1 && space_ndim == 2 {
                // CABLE case: line in 2D
                ksi_aux[0] = ksi[0];
                ksi_aux[1] = 1.0;
                map_point_coords(&mut x, &ksi_aux, ksi_min, ksi_del);
            } else {
                // CABLE or SHELL in 3D
                ksi_aux[0] = ksi[0];
                ksi_aux[1] = ksi[1];
                ksi_aux[2] = 1.0;
                map_point_coords(&mut x, &ksi_aux, ksi_min, ksi_del);
            }
            for j in 0..space_ndim {
                pad.set_xx(m, j, x[j])
            }
        }
        pad
    }
/// Returns a new scratchpad with coordinates set
///
/// Notes:
///
/// * For cables, the line will be along AMAX
/// * For shells, the surface will be at ZMAX
Returns a new scratchpad with coordinates set
Notes.

For cables, the line will be along AMAX
For shells, the surface will be at ZMAX
Returns a new scratchpad with coordinates set Notes . For cables the line will be along AMAX For shells the surface will be at ZMAX
pub fn gen_scratchpad_with_coords(space_ndim: usize, kind: GeoKind) -> Scratchpad {
        let geo_ndim = kind.ndim();
        let nnode = kind.nnode();
        let mut x = Vector::new(space_ndim);
        let mut ksi_aux = vec![0.0; space_ndim];
        let mut pad = Scratchpad::new(space_ndim, kind).unwrap();
        let (ksi_min, ksi_del) = kind.ksi_min_ksi_del();
        for m in 0..nnode {
            let ksi = kind.reference_coords(m);
            if geo_ndim == space_ndim {
                // SOLID case: 2D or 3D
                map_point_coords(&mut x, ksi, ksi_min, ksi_del);
            } else if geo_ndim == 1 && space_ndim == 2 {
                // CABLE case: line in 2D
                ksi_aux[0] = ksi[0];
                ksi_aux[1] = 1.0;
                map_point_coords(&mut x, &ksi_aux, ksi_min, ksi_del);
            } else {
                // CABLE or SHELL in 3D
                ksi_aux[0] = ksi[0];
                ksi_aux[1] = ksi[1];
                ksi_aux[2] = 1.0;
                map_point_coords(&mut x, &ksi_aux, ksi_min, ksi_del);
            }
            for j in 0..space_ndim {
                pad.set_xx(m, j, x[j])
            }
        }
        pad
    }
pub fn gen_scratchpad_with_coords ( space_ndim : usize , kind : GeoKind ) -> Scratchpad { let geo_ndim = kind . ndim ( ) ; let nnode = kind . nnode ( ) ; let mut x = Vector :: new ( space_ndim ) ; let mut ksi_aux = vec ! [ 0.0 space_ndim ] ; let mut pad = Scratchpad :: new ( space_ndim , kind ) . unwrap ( ) ; let ( ksi_min , ksi_del ) = kind . ksi_min_ksi_del ( ) ; for m in 0 .. nnode { let ksi = kind . reference_coords ( m ) ; if geo_ndim == space_ndim { // SOLID case: 2D or 3D map_point_coords ( & mut x , ksi , ksi_min , ksi_del ) ; } else if geo_ndim == 1 && space_ndim == 2 { // CABLE case: line in 2D ksi_aux [ 0 ] = ksi [ 0 ] ; ksi_aux [ 1 ] = 1.0 ; map_point_coords ( & mut x , & ksi_aux , ksi_min , ksi_del ) ; } else { // CABLE or SHELL in 3D ksi_aux [ 0 ] = ksi [ 0 ] ; ksi_aux [ 1 ] = ksi [ 1 ] ; ksi_aux [ 2 ] = 1.0 ; map_point_coords ( & mut x , & ksi_aux , ksi_min , ksi_del ) ; } for j in 0 .. space_ndim { pad . set_xx ( m , j , x [ j ] ) } } pad }
Returns a new scratchpad with coordinates set
Notes:
Returns a new scratchpad with coordinates set Notes :
space_ndim
usize
kind
GeoKind
space_ndim
usize
kind
GeoKind