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

Functions

void assemble_residual (SMODEL_SUPER *sm, SGRID *grid)
 This function assembles the global residual vector using elemental resid routines. More...
 
void add_replace_elem_rhs (double *elem_rhs, double *eq_rhs, int elem_nvars, int eq_nvars, int *eq_vars, int nnodes, double scale)
 This function adds the residual of one PDE into the elemental residual. More...
 
void load_global_resid (double *residual, double *elem_rhs, int nnodes, int elem_nvars, int *local_dofs)
 This function takes an elemental residual and loads into the global residual vector. More...
 

Detailed Description

This file has functions responsible for assembling the global residual vector

Function Documentation

◆ add_replace_elem_rhs()

void add_replace_elem_rhs ( double *  elem_rhs,
double *  eq_rhs,
int  elem_nvars,
int  eq_nvars,
int *  eq_vars,
int  nnodes,
double  scale 
)

This function adds the residual of one PDE into the elemental residual.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]elem_rhs(double*) - array containing the elemental residual
[in]eq_rhs(double*) - array containg the residual from a single PDE routine
[in]elem_nvars(int) - integer that is the length of *elem_nvars
[in]elem_vars(int*) - array containg the unique variable codes defined on an element
[in]eq_nvars(int) - integer that is the length of *eq_vars
[in]eq_vars(int*) - array containg the unique variable codes defined by the PDE
[in]nnodes(int) - integer that is the number of nodes on one element
[in]scale(double) - scalar factor to scale the residual
Note

◆ assemble_residual()

void assemble_residual ( SMODEL_SUPER sm,
SGRID grid 
)

This function assembles the global residual vector using elemental resid routines.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - the super model where the residual resides
[in]grid(SGRID*) - the grid over which the monolithic residual resides

◆ load_global_resid()

void load_global_resid ( double *  residual,
double *  elem_rhs,
int  nnodes,
int  elem_nvars,
int *  local_dofs 
)

This function takes an elemental residual and loads into the global residual vector.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]residual(double*) - the global residual
[in]elem_rhs(double*) - the local element right-hand-side
[in]nnodes(int) - the number of local nodes on the element
[in]elem_nvars(int) - the number of active variables on the element
[in]local_dofs(int*) - array of the degree of freedom numbers local to the processor

assembles global residual