AdH Kraken 0.0.0
Next generation Adaptive Hydraulics
Loading...
Searching...
No Matches
newton_tools.c File Reference
#include "adh.h"

Functions

void initialize_system (SMODEL_SUPER *sm)
 This function initializes the SuperModel Newton solution. More...
 
void initialize_dirichlet_bc (SMODEL_SUPER *sm)
 This function initializes the SMODEL_SUPER bc mask for any dirichlet conditions. More...
 
void update_function (SMODEL_SUPER *sm)
 Updates any model specific non-solution quantities using fe_update routines. More...
 
void increment_function (SMODEL_SUPER *sm)
 Increments any model specific solution-dependent quantities after sucessful Newton iteration. More...
 
void get_residual_norms (double *resid_max_norm, double *resid_l2_norm, double *inc_max_norm, int *imax_dof, int *iinc_dof, int *include_dof, int my_ndofs, int ndofs, int macro_ndofs, double *residual, double *dsol, int *bc_mask)
 Returns a series of residual norms. More...
 

Detailed Description

This file contains miscellanious routines used in Newton solve

Function Documentation

◆ get_residual_norms()

void get_residual_norms ( double *  resid_max_norm,
double *  resid_l2_norm,
double *  inc_max_norm,
int *  imax_dof,
int *  iinc_dof,
int *  include_dof,
int  my_ndofs,
int  ndofs,
int  macro_ndofs,
double *  residual,
double *  dsol,
int *  bc_mask 
)

Returns a series of residual norms.

Author
Charlie Berger, Ph.D.
Gaurav Savant, Ph.D.
Gary Brown
Corey Trahan, Ph.D.
Mark Loveland
Bug:
none
Warning
none
Parameters
[out]resid_max_norm(double *) the max (L-infinity) residual error norm for local processor (myid)
[out]resid_l2_norm(double *) the l2 residual error norm maxed over all processors
[out]inc_max_norm(double *) the incremental max (L-infinity) norm for local processor (myid)
[out]imax_dof(int *) the dof at which the residual max occurs
[out]iinc_dof(int *) the dof at which the incremental max occurs
[in]include_dof(int *) an array of flags to determine whether the dofs are including in the norm calculations
[in]my_ndofs(int) number of locally owned dof
[in]ndofs(int) number of locally owned dof + number of ghosts
[in]macro_ndofs(int) number of all dofs across all processes
[in]residual(double *) the Newton residual
[in]dsol(double *) the Newton solution (array of solution increments)
[in]bc_mask(int*) array of flags determining what dofs are Dirichlet boundary conditions

◆ increment_function()

void increment_function ( SMODEL_SUPER sm)

Increments any model specific solution-dependent quantities after sucessful Newton iteration.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SMODEL_SUPER struct

◆ initialize_dirichlet_bc()

void initialize_dirichlet_bc ( SMODEL_SUPER sm)

This function initializes the SMODEL_SUPER bc mask for any dirichlet conditions.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SuperModel struct - adjusts the residual

◆ initialize_system()

void initialize_system ( SMODEL_SUPER sm)

This function initializes the SuperModel Newton solution.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SuperModel struct

◆ update_function()

void update_function ( SMODEL_SUPER sm)

Updates any model specific non-solution quantities using fe_update routines.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SMODEL_SUPER struct