GridSetVecBoundaryDifference

his function sets Dirchlet boundary conditions on the linear Rhs arising from the underlying grid, but actually sets it to the difference of the function value and the value in the given vector. This is commonly used in a time dependent, nonlinear problem for which we would like the rhs boundary values to be:

Synopsis

#include "grid.h" 
#include "gvec.h" 
int GridSetVecBoundaryDifference(int bd, int field, GVec u, PointFunction f, GVec b, void *ctx)
U^{n+1}_k - U^{n+1}_{k+1}

where n is the time iteration index, and k is the Newton iteration index. This means that the solution will be updated to U^{n+1}_{k+1} if the Jacobian is the identity for that row. This is very useful for time dependent boundary conditions for which the traditional method of letting the rhs value be zero does not work.

Collective on GVec

Input Parameters

bd - The marker for the boundary to apply conditions along
u - A grid vector, usually the previous solution
field - The field to which the conditions apply
f - The function which defines the boundary condition
ctx - The user-supplied context

Output Parameter

b -The Rhs vector

Keywords

boundary conditions, finite element

See Also

MeshGetBoundaryStart

Level:advanced
Location:
src/grid/interface/gridBC.c
Index of all Grid routines
Table of Contents for all manual pages
Index of all manual pages