openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | Public Attributes | List of all members
opencarp::equilibrium_solver Class Reference

#include <mechanics.h>

Collaboration diagram for opencarp::equilibrium_solver:

Public Member Functions

void init ()
 Initialize equlibirum solver. More...
 
void rebuild_matrices (MaterialType mtype, FILE_SPEC logger)
 rebuild the matrices More...
 
void rebuild_stiffness (MaterialType mtype, FILE_SPEC logger)
 rebuild stiffness matrix More...
 
void calc_internal_forces (MaterialType mtype, FILE_SPEC logger)
 Calculation of the internal forces based on the deformation. More...
 
void calc_internal_forces_jacobian (MaterialType mtype, FILE_SPEC logger)
 
void apply_external_forces (MaterialType mtype, FILE_SPEC logger, sf_mesh surfmesh, mech_bcs nmbcs)
 Applying external forces from Neumann boundary conditions. More...
 
void solve ()
 
void apply_bcs_forces ()
 
void apply_bcs_jacobian ()
 
void update_node_coords ()
 

Public Attributes

sf_vecposition
 position x More...
 
sf_vecreference_pos
 reference position X More...
 
sf_vecdisplacement
 absolute displacement u More...
 
sf_vecdu
 incremental displacement du More...
 
sf_vecinitial_guess
 needed for initial guess for nonlinear solver More...
 
sf_vecf_internal
 internal forces f_int More...
 
sf_vecf_external
 external forces f_ext More...
 
sf_vecf_surf
 external forces applied on surfaces More...
 
sf_vecresiduum
 residuum r More...
 
SF::vector< mesh_int_tdbc_idx
 Indices for Dirichlet boundary conditions. More...
 
SF::vector< mesh_int_tnbc_idx
 Indices for Neumann boundary conditions. More...
 
sf_vecdirichlet_bcs
 Dirichlet boundary conditions, 0 = dbc exists. More...
 
sf_vecdirichlet_bcs_1
 Dirichlet boundary conditions but with 1 = dbc exists. More...
 
sf_matK_eq = nullptr
 stiffness matrix for static equilibrium solver K More...
 
mech_bcs dmbcs [10]
 Dirichlet boundary condtions. More...
 
mech_bcs nmbcs [10]
 Neumann boundary conditions. More...
 
sf_nl_solnonlin_solver = nullptr
 the nonlinear solver More...
 
double tol = 1e-8
 CG stopping tolerance. More...
 
int max_it = 300
 maximum number of iterations More...
 

Detailed Description

@ brief Class for static mechanics solver Inspired by CBSolverEquilibrium-->CardioMechanics and elliptic_solver-->openCARP

Definition at line 68 of file mechanics.h.

Member Function Documentation

◆ apply_bcs_forces()

void opencarp::equilibrium_solver::apply_bcs_forces ( )
inline

Definition at line 102 of file mechanics.h.

Here is the caller graph for this function:

◆ apply_bcs_jacobian()

void opencarp::equilibrium_solver::apply_bcs_jacobian ( )
inline

Definition at line 120 of file mechanics.h.

Here is the caller graph for this function:

◆ apply_external_forces()

void opencarp::equilibrium_solver::apply_external_forces ( MaterialType  mtype,
FILE_SPEC  logger,
sf_mesh  surfmesh,
mech_bcs  nmbcs 
)

Applying external forces from Neumann boundary conditions.

Definition at line 610 of file mechanics.cc.

Here is the caller graph for this function:

◆ calc_internal_forces()

void opencarp::equilibrium_solver::calc_internal_forces ( MaterialType  mtype,
FILE_SPEC  logger 
)

Calculation of the internal forces based on the deformation.

Definition at line 596 of file mechanics.cc.

Here is the caller graph for this function:

◆ calc_internal_forces_jacobian()

void opencarp::equilibrium_solver::calc_internal_forces_jacobian ( MaterialType  mtype,
FILE_SPEC  logger 
)

◆ init()

void opencarp::equilibrium_solver::init ( )

Initialize equlibirum solver.

alloc vectors

alloc solver matrix

mappings and numberings

set position and reference position vector

setup of Dirichlet and Neumann boundary conditions

Definition at line 335 of file mechanics.cc.

◆ rebuild_matrices()

void opencarp::equilibrium_solver::rebuild_matrices ( MaterialType  mtype,
FILE_SPEC  logger 
)

rebuild the matrices

Definition at line 561 of file mechanics.cc.

Here is the caller graph for this function:

◆ rebuild_stiffness()

void opencarp::equilibrium_solver::rebuild_stiffness ( MaterialType  mtype,
FILE_SPEC  logger 
)

rebuild stiffness matrix

Definition at line 572 of file mechanics.cc.

Here is the caller graph for this function:

◆ solve()

void opencarp::equilibrium_solver::solve ( )

Definition at line 739 of file mechanics.cc.

Here is the caller graph for this function:

◆ update_node_coords()

void opencarp::equilibrium_solver::update_node_coords ( )
inline

Definition at line 126 of file mechanics.h.

Here is the caller graph for this function:

Member Data Documentation

◆ dbc_idx

SF::vector<mesh_int_t> opencarp::equilibrium_solver::dbc_idx

Indices for Dirichlet boundary conditions.

Definition at line 80 of file mechanics.h.

◆ dirichlet_bcs

sf_vec* opencarp::equilibrium_solver::dirichlet_bcs

Dirichlet boundary conditions, 0 = dbc exists.

Definition at line 82 of file mechanics.h.

◆ dirichlet_bcs_1

sf_vec* opencarp::equilibrium_solver::dirichlet_bcs_1

Dirichlet boundary conditions but with 1 = dbc exists.

Definition at line 83 of file mechanics.h.

◆ displacement

sf_vec* opencarp::equilibrium_solver::displacement

absolute displacement u

Definition at line 73 of file mechanics.h.

◆ dmbcs

mech_bcs opencarp::equilibrium_solver::dmbcs[10]

Dirichlet boundary condtions.

Definition at line 86 of file mechanics.h.

◆ du

sf_vec* opencarp::equilibrium_solver::du

incremental displacement du

Definition at line 74 of file mechanics.h.

◆ f_external

sf_vec* opencarp::equilibrium_solver::f_external

external forces f_ext

Definition at line 77 of file mechanics.h.

◆ f_internal

sf_vec* opencarp::equilibrium_solver::f_internal

internal forces f_int

Definition at line 76 of file mechanics.h.

◆ f_surf

sf_vec* opencarp::equilibrium_solver::f_surf

external forces applied on surfaces

Definition at line 78 of file mechanics.h.

◆ initial_guess

sf_vec* opencarp::equilibrium_solver::initial_guess

needed for initial guess for nonlinear solver

Definition at line 75 of file mechanics.h.

◆ K_eq

sf_mat* opencarp::equilibrium_solver::K_eq = nullptr

stiffness matrix for static equilibrium solver K

Definition at line 84 of file mechanics.h.

◆ max_it

int opencarp::equilibrium_solver::max_it = 300

maximum number of iterations

Definition at line 93 of file mechanics.h.

◆ nbc_idx

SF::vector<mesh_int_t> opencarp::equilibrium_solver::nbc_idx

Indices for Neumann boundary conditions.

Definition at line 81 of file mechanics.h.

◆ nmbcs

mech_bcs opencarp::equilibrium_solver::nmbcs[10]

Neumann boundary conditions.

Definition at line 87 of file mechanics.h.

◆ nonlin_solver

sf_nl_sol* opencarp::equilibrium_solver::nonlin_solver = nullptr

the nonlinear solver

Definition at line 89 of file mechanics.h.

◆ position

sf_vec* opencarp::equilibrium_solver::position

position x

Definition at line 71 of file mechanics.h.

◆ reference_pos

sf_vec* opencarp::equilibrium_solver::reference_pos

reference position X

Definition at line 72 of file mechanics.h.

◆ residuum

sf_vec* opencarp::equilibrium_solver::residuum

residuum r

Definition at line 79 of file mechanics.h.

◆ tol

double opencarp::equilibrium_solver::tol = 1e-8

CG stopping tolerance.

Definition at line 92 of file mechanics.h.


The documentation for this class was generated from the following files: