Nek5000
SEM for Incompressible NS
|
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "c99.h"
#include "name.h"
#include "fail.h"
#include "types.h"
#include "mem.h"
#include "tensor.h"
#include "poly.h"
Go to the source code of this file.
Classes | |
struct | findpts_el_pt_2 |
struct | findpts_el_gedge_2 |
struct | findpts_el_gpt_2 |
struct | findpts_el_data_2 |
Macros | |
#define | findpts_el_setup_2 PREFIXED_NAME(findpts_el_setup_2) |
#define | findpts_el_free_2 PREFIXED_NAME(findpts_el_free_2 ) |
#define | findpts_el_2 PREFIXED_NAME(findpts_el_2 ) |
#define | findpts_el_eval_2 PREFIXED_NAME(findpts_el_eval_2 ) |
#define | DIAGNOSTICS_ITERATIONS 0 |
#define | CONVERGED_FLAG (1u<<4) |
#define | FLAG_MASK 0x1fu |
#define | DO_MAX(x) |
#define | SETDR(d) |
#define | SETR(d) |
#define | EVAL(dr) (dr*A-2*y)*dr |
Typedefs | |
typedef void | compute_edge_data_fun(struct findpts_el_data_2 *fd) |
typedef void | findpt_fun(struct findpts_el_pt_2 *const out, struct findpts_el_data_2 *const fd, const struct findpts_el_pt_2 *const p, const unsigned pn, const double tol) |
Functions | |
static void | lin_solve_2 (double x[2], const double A[4], const double y[2]) |
static unsigned | num_constrained (const unsigned flags) |
static unsigned | pt_flags_to_bin_noC (const unsigned flags) |
static unsigned | pt_flags_to_bin (const unsigned flags) |
static unsigned | plus_1_mod_2 (const unsigned x) |
static unsigned | which_bit (const unsigned x) |
static unsigned | edge_index (const unsigned x) |
static unsigned | point_index (const unsigned x) |
static unsigned | work_size (const unsigned nr, const unsigned ns, const unsigned npt_max) |
void | findpts_el_setup_2 (struct findpts_el_data_2 *const fd, const unsigned n[2], const unsigned npt_max) |
void | findpts_el_free_2 (struct findpts_el_data_2 *const fd) |
static void | compute_edge_data_r (struct findpts_el_data_2 *fd) |
static void | compute_edge_data_s (struct findpts_el_data_2 *fd) |
static const struct findpts_el_gedge_2 * | get_edge (struct findpts_el_data_2 *fd, unsigned ei) |
static void | compute_pt_data (struct findpts_el_data_2 *fd) |
static const struct findpts_el_gpt_2 * | get_pt (struct findpts_el_data_2 *fd, unsigned pi) |
static int | reject_prior_step_q (struct findpts_el_pt_2 *const out, const double resid[2], const struct findpts_el_pt_2 *const p, const double tol) |
static void | newton_area (struct findpts_el_pt_2 *const out, const double jac[4], const double resid[2], const struct findpts_el_pt_2 *const p, const double tol) |
static void | newton_edge (struct findpts_el_pt_2 *const out, const double jac[4], const double rhes, const double resid[2], const unsigned de, const unsigned dn, unsigned flags, const struct findpts_el_pt_2 *const p, const double tol) |
static void | findpt_area (struct findpts_el_pt_2 *const out, struct findpts_el_data_2 *const fd, const struct findpts_el_pt_2 *const p, const unsigned pn, const double tol) |
static void | findpt_edge (struct findpts_el_pt_2 *const out, struct findpts_el_data_2 *const fd, const struct findpts_el_pt_2 *const p, const unsigned pn, const double tol) |
static void | findpt_pt (struct findpts_el_pt_2 *const out, struct findpts_el_data_2 *const fd, const struct findpts_el_pt_2 *const p, const unsigned pn, const double tol) |
static void | seed (struct findpts_el_data_2 *const fd, struct findpts_el_pt_2 *const pt, const unsigned npt) |
void | findpts_el_2 (struct findpts_el_data_2 *const fd, const unsigned npt, const double tol) |
void | findpts_el_eval_2 (double *const out_base, const unsigned out_stride, const double *const r_base, const unsigned r_stride, const unsigned pn, const double *const in, struct findpts_el_data_2 *const fd) |
#define CONVERGED_FLAG (1u<<4) |
Definition at line 52 of file findpts_el_2.c.
Referenced by findpt_pt(), newton_area(), newton_edge(), and reject_prior_step_q().
#define DIAGNOSTICS_ITERATIONS 0 |
Definition at line 24 of file findpts_el_2.c.
#define DO_MAX | ( | x | ) |
Referenced by work_size().
Referenced by newton_edge().
#define findpts_el_2 PREFIXED_NAME(findpts_el_2 ) |
Definition at line 18 of file findpts_el_2.c.
#define findpts_el_eval_2 PREFIXED_NAME(findpts_el_eval_2 ) |
Definition at line 19 of file findpts_el_2.c.
#define findpts_el_free_2 PREFIXED_NAME(findpts_el_free_2 ) |
Definition at line 17 of file findpts_el_2.c.
#define findpts_el_setup_2 PREFIXED_NAME(findpts_el_setup_2) |
Definition at line 16 of file findpts_el_2.c.
#define FLAG_MASK 0x1fu |
Definition at line 53 of file findpts_el_2.c.
Referenced by findpt_edge(), findpt_pt(), findpts_el_2(), and reject_prior_step_q().
#define SETDR | ( | d | ) |
Referenced by newton_area().
#define SETR | ( | d | ) |
Referenced by newton_area().
typedef void compute_edge_data_fun(struct findpts_el_data_2 *fd) |
Definition at line 200 of file findpts_el_2.c.
typedef void findpt_fun(struct findpts_el_pt_2 *const out, struct findpts_el_data_2 *const fd, const struct findpts_el_pt_2 *const p, const unsigned pn, const double tol) |
Definition at line 559 of file findpts_el_2.c.
|
static |
Definition at line 203 of file findpts_el_2.c.
References findpts_el_data_2::edge, findpts_el_data_2::n, nr, ns, out, findpts_el_data_2::sides, tensor_mxm(), findpts_el_data_2::work, work, findpts_el_data_2::wtend, findpts_el_gedge_2::x, and findpts_el_data_2::x.
Referenced by get_edge().
|
static |
Definition at line 220 of file findpts_el_2.c.
References findpts_el_data_2::n, nr, ns, out, findpts_el_data_2::sides, tensor_mtxm, findpts_el_data_2::work, work, findpts_el_data_2::wtend, and findpts_el_data_2::x.
Referenced by get_edge().
|
static |
Definition at line 252 of file findpts_el_2.c.
References findpts_el_gpt_2::hes, i, findpts_el_gpt_2::jac, findpts_el_data_2::n, nr, ns, findpts_el_data_2::pt, tensor_mtxm, tensor_mxm(), findpts_el_data_2::work, work, findpts_el_data_2::wtend, findpts_el_gpt_2::x, and findpts_el_data_2::x.
Referenced by get_pt().
|
static |
Definition at line 84 of file findpts_el_2.c.
References which_bit().
Referenced by findpt_edge(), and newton_area().
|
static |
Definition at line 565 of file findpts_el_2.c.
References i, findpts_el_gpt_2::jac, findpts_el_data_2::lag, findpts_el_data_2::lag_data, findpts_el_data_2::n, newton_area(), nr, ns, findpts_el_pt_2::r, reject_prior_step_q(), tensor_i1(), tensor_ig1(), tensor_mxm(), findpts_el_data_2::work, findpts_el_pt_2::x, and findpts_el_data_2::x.
Referenced by findpts_el_2().
|
static |
Definition at line 598 of file findpts_el_2.c.
References findpts_el_gedge_2::dxdn, edge_index(), FLAG_MASK, findpts_el_pt_2::flags, get_edge(), findpts_el_gpt_2::hes, i, findpts_el_gpt_2::jac, findpts_el_data_2::lag, findpts_el_data_2::lag_data, findpts_el_data_2::n, n, newton_area(), newton_edge(), plus_1_mod_2(), findpts_el_pt_2::r, reject_prior_step_q(), tensor_mtxv(), findpts_el_data_2::work, findpts_el_pt_2::x, and findpts_el_gedge_2::x.
Referenced by findpts_el_2().
|
static |
Definition at line 661 of file findpts_el_2.c.
References CONVERGED_FLAG, findpts_el_pt_2::dist2p, FLAG_MASK, findpts_el_pt_2::flags, get_pt(), findpts_el_gpt_2::hes, i, findpts_el_gpt_2::jac, newton_area(), newton_edge(), point_index(), findpts_el_pt_2::r, reject_prior_step_q(), findpts_el_pt_2::x, x, and findpts_el_gpt_2::x.
Referenced by findpts_el_2().
void findpts_el_2 | ( | struct findpts_el_data_2 *const | fd, |
const unsigned | npt, | ||
const double | tol | ||
) |
Definition at line 734 of file findpts_el_2.c.
References findpt_area(), findpt_edge(), findpt_pt(), FLAG_MASK, findpts_el_pt_2::flags, i, findpts_el_pt_2::index, num_constrained(), p, findpts_el_data_2::p, pt_flags_to_bin(), pt_flags_to_bin_noC(), findpts_el_pt_2::r, seed(), sum(), and findpts_el_pt_2::x.
void findpts_el_eval_2 | ( | double *const | out_base, |
const unsigned | out_stride, | ||
const double *const | r_base, | ||
const unsigned | r_stride, | ||
const unsigned | pn, | ||
const double *const | in, | ||
struct findpts_el_data_2 *const | fd | ||
) |
Definition at line 798 of file findpts_el_2.c.
References i, findpts_el_data_2::lag, findpts_el_data_2::lag_data, findpts_el_data_2::n, nr, ns, out, findpts_el_pt_2::r, tensor_i1(), tensor_mxm(), and findpts_el_data_2::work.
void findpts_el_free_2 | ( | struct findpts_el_data_2 *const | fd | ) |
Definition at line 194 of file findpts_el_2.c.
References findpts_el_data_2::p, and findpts_el_data_2::z.
void findpts_el_setup_2 | ( | struct findpts_el_data_2 *const | fd, |
const unsigned | n[2], | ||
const unsigned | npt_max | ||
) |
Definition at line 143 of file findpts_el_2.c.
References findpts_el_gedge_2::dxdn, findpts_el_data_2::edge, gll_lag_setup, gll_lag_size, i, findpts_el_data_2::lag, findpts_el_data_2::lag_data, lobatto_nodes, findpts_el_data_2::n, n, findpts_el_data_2::npt_max, nr, ns, findpts_el_data_2::p, findpts_el_data_2::side_init, findpts_el_data_2::sides, tmalloc, findpts_el_data_2::work, work_size(), findpts_el_data_2::wtend, findpts_el_gedge_2::x, and findpts_el_data_2::z.
|
static |
Definition at line 236 of file findpts_el_2.c.
References compute_edge_data_r(), compute_edge_data_s(), findpts_el_data_2::edge, and findpts_el_data_2::side_init.
Referenced by findpt_edge().
|
static |
Definition at line 270 of file findpts_el_2.c.
References compute_pt_data(), findpts_el_data_2::pt, and findpts_el_data_2::side_init.
Referenced by findpt_pt().
|
static |
Definition at line 32 of file findpts_el_2.c.
Referenced by newton_area().
|
static |
Definition at line 344 of file findpts_el_2.c.
References CONVERGED_FLAG, findpts_el_pt_2::dist2p, edge_index(), findpts_el_pt_2::flags, lin_solve_2(), nr, num_constrained(), plus_1_mod_2(), findpts_el_pt_2::r, SETDR, SETR, findpts_el_pt_2::tr, and y.
Referenced by findpt_area(), findpt_edge(), and findpt_pt().
|
static |
Definition at line 504 of file findpts_el_2.c.
References A, CONVERGED_FLAG, findpts_el_pt_2::dist2p, EVAL, findpts_el_pt_2::flags, nr, findpts_el_pt_2::r, findpts_el_pt_2::tr, and y.
Referenced by findpt_edge(), and findpt_pt().
|
static |
Definition at line 55 of file findpts_el_2.c.
References y.
Referenced by findpts_el_2(), and newton_area().
|
static |
Definition at line 75 of file findpts_el_2.c.
Referenced by findpt_edge(), and newton_area().
|
static |
Definition at line 86 of file findpts_el_2.c.
Referenced by findpt_pt().
|
static |
Definition at line 68 of file findpts_el_2.c.
References pt_flags_to_bin_noC().
Referenced by findpts_el_2().
|
static |
Definition at line 61 of file findpts_el_2.c.
Referenced by findpts_el_2(), and pt_flags_to_bin().
|
static |
Definition at line 283 of file findpts_el_2.c.
References CONVERGED_FLAG, findpts_el_pt_2::dist2, findpts_el_pt_2::dist2p, FLAG_MASK, findpts_el_pt_2::flags, findpts_el_pt_2::index, findpts_el_pt_2::oldr, findpts_el_pt_2::r, findpts_el_pt_2::tr, and findpts_el_pt_2::x.
Referenced by findpt_area(), findpt_edge(), and findpt_pt().
|
static |
Definition at line 710 of file findpts_el_2.c.
References findpts_el_pt_2::dist2, i, findpts_el_data_2::n, nr, ns, p, findpts_el_pt_2::r, x, findpts_el_pt_2::x, findpts_el_data_2::x, y, findpts_el_data_2::z, zr, and zs.
Referenced by findpts_el_2().
|
static |
Definition at line 78 of file findpts_el_2.c.
References y.
Referenced by edge_index().
|
static |
Definition at line 128 of file findpts_el_2.c.
References DO_MAX, n, nr, and ns.
Referenced by findpts_el_setup_2().