PPL Logo

libs/ck-libs/ifem/ifemc.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* IFEM_Matrix_product_c )(void *ptr, int length, int width, const double *src, double *dest)
 Performs a parallel matrix-vector multiply.
typedef void(* IFEM_Matrix_product_f )(void *ptr, const int *length, const int *width, const double *src, double *dest)

Functions

void IFEM_Solve_shared (ILSI_Solver s, ILSI_Param *p, int fem_mesh, int fem_entity, int length, int width, IFEM_Matrix_product_c A, void *ptr, const double *b, double *x)
 Solve the matrix equation A x = b for the unknown node value x.
void IFEM_Solve_shared_bc (ILSI_Solver s, ILSI_Param *p, int fem_mesh, int fem_entity, int length, int width, int bcCount, const int *bcDOF, const double *bcValue, IFEM_Matrix_product_c A, void *ptr, const double *b, double *x)
 Solve the matrix equation A x = b for the unknown node value x, with the given values as known-x boundary conditions.


Typedef Documentation

typedef void(* IFEM_Matrix_product_c)(void *ptr, int length, int width, const double *src, double *dest)

Performs a parallel matrix-vector multiply.

This type of routine is typically written by the user to: -Zero out node values in dest -Apply each element stiffness matrix to node values in source -Call FEM_Update_field to collect non-local elements -Apply boundary conditions to dest

Parameters:
ptr User-defined pointer value.
length Number of entries in dest and src vectors.
width Number of double per entries in dest and src vectors.
src Source vector--multiply this with the matrix.
dest Destination vector--initially zero; fill this with the product of the local elements and src.

Definition at line 30 of file ifemc.h.

typedef void(* IFEM_Matrix_product_f)(void *ptr, const int *length, const int *width, const double *src, double *dest)

Definition at line 32 of file ifemc.h.


Function Documentation

void IFEM_Solve_shared ( ILSI_Solver  s,
ILSI_Param p,
int  fem_mesh,
int  fem_entity,
int  length,
int  width,
IFEM_Matrix_product_c  A,
void *  ptr,
const double *  b,
double *  x 
)

Solve the matrix equation A x = b for the unknown node value x.

The matrix is assumed to be partitioned by element, and the unknown and known vectors are listed by node.

This version uses the shared-node solution formulation; so the matrix-product function takes a vector of local node values and returns a vector of local node values.

Parameters:
s The solver to use (e.g., ILSI_CG_Solver)
param Assorted input and output parameters for the solver.
fem_mesh Readable FEM mesh object to solve over.
fem_entity FEM mesh entity to solve over (typically FEM_NODE).
length The number of shared entities.
width The number of unknowns per shared entity. b and x must have length*width entries.
A The user function that applies the matrix.
ptr User-defined pointer value passed to A.
b The local part of the known vector. Never modified.
x On input, the initial guess for the solution. During execution, the intermediate solution values. On output, the final solution.

Definition at line 97 of file ifem.C.

References comm, n, and IFEM_Solve_shared_comm::set_c().

Referenced by BCapplier::solve().

Here is the call graph for this function:

Here is the caller graph for this function:

void IFEM_Solve_shared_bc ( ILSI_Solver  s,
ILSI_Param p,
int  fem_mesh,
int  fem_entity,
int  length,
int  width,
int  bcCount,
const int bcDOF,
const double *  bcValue,
IFEM_Matrix_product_c  A,
void *  ptr,
const double *  b,
double *  x 
)

Solve the matrix equation A x = b for the unknown node value x, with the given values as known-x boundary conditions.

The matrix is assumed to be partitioned by element, and the unknown and known vectors are listed by node.

Parameters:
s The solver to use (e.g., ILSI_CG_Solver)
param Assorted input and output parameters for the solver.
fem_mesh Readable FEM mesh object to solve over.
fem_entity FEM mesh entity to solve over (typically FEM_NODE).
length The number of shared entities.
width The number of unknowns per shared entity. b and x must have length*width entries.
bcCount Number of essential boundary conditions to apply. bcDOF and bcValues must have bcCount entries.
bcDOF Degree of freedom to impose unknown value on.
bcValue Value to impose on this DOF--i.e., x[bcDOF[i]]=bcValue[i].
A The user function that applies the matrix.
ptr User-defined pointer value passed to A.
b The local part of the known vector. Never modified.
x On input, the initial guess for the solution. During execution, the intermediate solution values. On output, the final solution, including boundary conditions.

Definition at line 237 of file ifem.C.

References BCapplier::set_c(), and BCapplier::solve().

Here is the call graph for this function:


Generated on Mon Sep 21 08:07:30 2020 for Charm++ by  doxygen 1.5.5