GVecEvaluateFunctionCollective

Evaluates a function over the specified fields on the locations defined by the underlying grid and its discretization. The only difference between it and GVecEvaluateFunction(), is that each processor is guaranteed to call f at each iteration, possibly with null arguments.

Synopsis

#include "gvec.h" 
int GVecEvaluateFunctionCollective(GVec v, int numFields, int *fields, PointFunction f, PetscScalar alpha, void *ctx)

Input Parameters

v - The grid vector
numFields - The number of fields to evaluate
fields - The fields
f - The user provided function
alpha - The scalar multiplier
ctx - [Optional] The user provided context for the function

The function f should return ordered first by node and then by component.

For instance, if superscripts denote components and subscripts denote nodes

v^0_0 v^1_0 v^2_0 v^0_1 v^1_1 v^2_1 ... v^0_n v^1_n v^2_n This is the standard for PointFunctions. Also, this function is typically used with an f that has a barrier. In this way you can guarantee that any collective operation will complete inside f.

See Also

GVecEvaluateFunctionGalerkin,GMatEvaluateOperatorGalerkin

Level:intermediate
Location:
src/gvec/interface/gvec.c
Index of all GVec routines
Table of Contents for all manual pages
Index of all manual pages