Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 17 fields pub linear_problem: bool, pub transient: bool, pub dynamics: bool, pub constant_tangent: bool, pub control: Control, pub gravity: Option<FnTime>, pub axisymmetric: bool, pub plane_stress: bool, pub thickness: f64, pub total_stress: bool, pub initialization: Init, pub param_fluids: Option<ParamFluids>, pub n_integ_point: HashMap<CellAttribute, usize>, pub sym_jacobian: bool, pub sym_pos_def_jacobian: bool, pub lin_sol_genie: Genie, pub lin_sol_params: LinSolParams,
}
Expand description

Holds configuration parameters

Fields§

§linear_problem: bool

Linear problem

§transient: bool

Transient analysis (with first time derivative of primary variables)

§dynamics: bool

Dynamics analysis (with second time derivative of primary variables)

§constant_tangent: bool

Pseudo-Newton method with constant-tangent operator

§control: Control

Holds control variables for the (pseudo) time integration over the simulation period

§gravity: Option<FnTime>

Gravity acceleration (positive variable)

Note: The corresponding acceleration vector will be directed against y in 2D or z in 3D; e.g., a_gravity = {0, -GRAVITY}ᵀ in 2D or a_gravity = {0, 0, -GRAVITY}ᵀ in 3D.

Example:

const GRAVITY: f64 = 10.0;
config.gravity = Some(|_| GRAVITY);
§axisymmetric: bool

Axisymmetric problem represented in 2D (instead of plane-strain)

§plane_stress: bool

Plane-stress problem instead of plane-strain iff 2D

§thickness: f64

Thickness for plane-stress or 1.0 otherwise

§total_stress: bool

Total stress analysis (instead of effective stresses)

§initialization: Init

Option to initialize stress state

§param_fluids: Option<ParamFluids>

Parameters for fluids

§n_integ_point: HashMap<CellAttribute, usize>

Number of integration points

§sym_jacobian: bool

The Jacobian (stiffness matrix) is symmetric

§sym_pos_def_jacobian: bool

The Jacobian (stiffness matrix) is symmetric and positive definite

§lin_sol_genie: Genie

Linear solver type

§lin_sol_params: LinSolParams

Parameters for the sparse solver

Implementations§

Source§

impl Config

Source

pub fn new() -> Self

Allocates a new instance

Source

pub fn validate(&self, ndim: usize) -> Option<String>

Validates all data

Returns a message with the inconsistent data, or returns None if everything is all right.

Source

pub fn validate_or_panic(&self, ndim: usize, verbose: bool)

Validate data or panics

Source

pub fn initial_overburden_stress(&self) -> f64

Returns the initial overburden stress (negative means compression)

Source

pub fn integ_point_data(&self, cell: &Cell) -> Result<IntegPointData, StrError>

Returns the integration (Gauss) points data

Trait Implementations§

Source§

impl Display for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V