Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

add3
Element-wise addition of two 3D vectors.
allen_cahn_step
Advance the Allen-Cahn phase-field φ by one explicit time step.
arlequin_blend_energy
Handshake zone energy correction to remove double-counting in concurrent multiscale coupling.
atomistic_temperature
Compute the instantaneous temperature of a group of atoms via the equipartition theorem: T = 2 KE / (3 N k_B).
cauchy_born_modulus
Linear elasticity tangent modulus from a set of atom-pair bond stiffnesses.
cauchy_born_stress_1d
Cauchy-Born rule: compute the first Piola-Kirchhoff stress from a deformation gradient F using a linearised atomistic model.
cell_problem_1d
Solve the scalar periodic cell problem via finite differences to obtain the effective conductivity in the x-direction.
centre_of_mass_velocity
Compute the centre-of-mass velocity of a group of atoms.
cg_bond_force
Compute harmonic bond force between two CG beads.
check_scale_separation
Check scale separation: verifies that the micro length scale is at least factor times smaller than the macro length scale.
dot3
Dot product of two 3D vectors.
hill_mandel_error
Compute the Hill-Mandel macrohomogeneity condition error.
hmm_estimate_flux
Compress micro-scale simulation data into a macro-scale flux estimate.
homogenize_two_phase
Compute homogenized (effective) properties of a two-phase unit cell.
lennard_jones_force
Lennard-Jones force magnitude (scalar, positive = repulsive).
lennard_jones_potential
Lennard-Jones pair potential energy between two atoms.
mat3_add
Add two 3×3 matrices stored row-major.
mat3_frob
Frobenius norm of a 3×3 matrix.
mat3_identity
Identity 3×3 matrix.
mat3_scale
Scale a 3×3 matrix.
mat3_vec
Multiply a 3×3 row-major matrix by a 3-vector.
mean_squared_displacement
Compute the mean squared displacement (MSD) of atoms relative to their reference positions.
multigrid_vcycle
Multigrid V-cycle for a 1-D Poisson problem.
neb_step
Perform one NEB step with spring forces.
norm3
Euclidean norm of a 3D vector.
normalize3
Normalize a 3D vector to unit length.
prolongation_linear
Prolongation operator: interpolate a coarse-grid vector to the fine grid using piecewise-linear interpolation.
restriction_l2
Restriction operator: project a fine-grid vector onto a coarse grid by L2-projection (average over blocks).
scale3
Scale a 3D vector by a scalar.
solve_macro_diffusion_1d
Solve 1-D steady-state diffusion with heterogeneous effective conductivity using a finite-difference discretisation.
sub3
Element-wise subtraction of two 3D vectors.
umbrella_free_energy
Compute the coarse-grained potential energy surface along a reaction coordinate.
virial_stress_tensor
Hardy stress tensor estimator for the atomistic region.