Go to the source code of this file.
Data Structures | |
class | IFEM_Solve_shared_comm |
Interface between the basic "matrix-style" interface expected by the ILSI solvers, the FEM framework, and the local matrix-multiply function passed in by the user. More... | |
class | BCapplier |
Wrapper for user matrix-vector multiply that applies "essential" boundary conditions. More... | |
Functions | |
double | localDotProduct (int nRecords, int nFields, const unsigned char *goodRecord, const double *a, const double *b) |
Implicit FEM: C- and fortran-callable interface. | |
CLINKAGE 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. | |
FLINKAGE void | FTN_NAME (IFEM_SOLVE_SHARED, ifem_solve_shared) |
void | BCapplier_multiply (void *ptr, int length, int width, const double *src, double *dest) |
CLINKAGE 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. | |
FLINKAGE void | FTN_NAME (IFEM_SOLVE_SHARED_BC, ifem_solve_shared_bc) |
double localDotProduct | ( | int | nRecords, | |
int | nFields, | |||
const unsigned char * | goodRecord, | |||
const double * | a, | |||
const double * | b | |||
) |
Implicit FEM: C- and fortran-callable interface.
Orion Sky Lawlor, olawlor@acm.org, 1/17/2003 Sum the dot product of the fields of a and b marked with 1's in goodRecords
Definition at line 15 of file ifem.C.
References r.
Referenced by IFEM_Solve_shared_comm::dotProduct().
CLINKAGE 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.
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().
FLINKAGE void FTN_NAME | ( | IFEM_SOLVE_SHARED | , | |
ifem_solve_shared | ||||
) |
Definition at line 196 of file ifem.C.
References BCapplier::multiply().
Referenced by BCapplier::solve().
CLINKAGE 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.
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().
FLINKAGE void FTN_NAME | ( | IFEM_SOLVE_SHARED_BC | , | |
ifem_solve_shared_bc | ||||
) |
Definition at line 249 of file ifem.C.
References PUP::b, BCapplier::bcCount, BCapplier::bcDOF, BCapplier::bcValue, length, p, BCapplier::ptr, PUP::s, BCapplier::set_f(), BCapplier::solve(), width(), and x.