36 #include "constitutive_model_library.h"
37 #include "constitutive_model.h"
132 for(std::size_t i = 0; i < alg_nod.
size(); i++)
136 mesh.
xyz_Euler[3 * alg_nod[i] + k] = pos[3 * i + k];
142 void setup_nonlinear_solver(
FILE_SPEC logger);
191 void setup_solvers();
194 void setup_mappings();
200 void dump_matrices();
203 void checkpointing();
206 void register_material_model();
virtual void mult_LR(const abstract_vector< T, S > &L, const abstract_vector< T, S > &R)=0
virtual void diag_add(const abstract_vector< T, S > &diag)=0
virtual void release_ptr(S *&p)=0
virtual T lsize() const =0
int dpn
d.o.f. per mesh vertex.
overlapping_layout< T > pl
nodal parallel layout
vector< S > xyz_Euler
node coordinates in Euler formulation
vector< T > & get_numbering(SF_nbr nbr_type)
Get the vector defining a certain numbering.
size_t size() const
The current size of the vector.
The abstract physics interface we can use to trigger all physics.
const char * name
The name of the physic, each physic should have one.
void destroy()
Currently we only need to close the file logger.
std::string timer_unit(const int timer_id)
figure out units of a signal linked to a given timer
double timer_val(const int timer_id)
figure out current value of a signal linked to a given timer
Mechanics()
Most of the initialization is done with initialize()
equilibrium_solver eq_solver
void initialize()
Initialize the Mechanics.
igb_output_manager output_manager
class handling the igb output
void compute_step()
Main function for every compute step.
void calc_internal_forces(MaterialType mtype, FILE_SPEC logger)
Calculation of the internal forces based on the deformation.
void rebuild_stiffness(MaterialType mtype, FILE_SPEC logger)
rebuild stiffness matrix
sf_vec * dirichlet_bcs_1
Dirichlet boundary conditions but with 1 = dbc exists.
sf_vec * position
position x
sf_vec * du
incremental displacement du
sf_mat * K_eq
stiffness matrix for static equilibrium solver K
int max_it
maximum number of iterations
sf_vec * f_surf
external forces applied on surfaces
double tol
CG stopping tolerance.
sf_vec * residuum
residuum r
sf_vec * displacement
absolute displacement u
void apply_external_forces(MaterialType mtype, FILE_SPEC logger, sf_mesh surfmesh, mech_bcs nmbcs)
Applying external forces from Neumann boundary conditions.
sf_vec * f_internal
internal forces f_int
sf_vec * dirichlet_bcs
Dirichlet boundary conditions, 0 = dbc exists.
SF::vector< mesh_int_t > dbc_idx
Indices for Dirichlet boundary conditions.
sf_nl_sol * nonlin_solver
the nonlinear solver
void update_node_coords()
void rebuild_matrices(MaterialType mtype, FILE_SPEC logger)
rebuild the matrices
SF::vector< mesh_int_t > nbc_idx
Indices for Neumann boundary conditions.
void apply_bcs_jacobian()
sf_vec * initial_guess
needed for initial guess for nonlinear solver
mech_bcs nmbcs[10]
Neumann boundary conditions.
mech_bcs dmbcs[10]
Dirichlet boundary condtions.
void init()
Initialize equlibirum solver.
void calc_internal_forces_jacobian(MaterialType mtype, FILE_SPEC logger)
sf_vec * reference_pos
reference position X
sf_vec * f_external
external forces f_ext
void setup(int idx)
Setup of both Neumann and Dirichlet mechanics boundary conditions.
SF::Point direction
direction in which the bc is applied
dbc_t dbc_type
fixed coordinates
SF::vector< mesh_int_t > vertices
list of nodes that bc is active on
std::string input_filename
filename with list of nodes
SF::vector< SF_real > scaling
scaling for Neumann bcs
nbc_t nbc_type
pressure given for elements, force given for nodes
def_t definition
type of boundary condition
@ NBR_REF
The nodal numbering of the reference mesh (the one stored on HD).
sf_mesh & get_mesh(const mesh_t gt)
Get a mesh by specifying the gridID.
Simulator-level utility execution control functions.
Electrical stimulation functions.
NOTE: A LOT OF THESE THINGS NEED TO BE CHANGED AT A LATER STAGE. THEY ARE CURRENTLY COPIED FROM THE A...
description of materal properties in a mesh