Peano
Loading...
Searching...
No Matches
TP_Utilities.h
Go to the documentation of this file.
1#pragma once
2
3/* TwoPunctures: File "utilities.h"*/
4/* these functions have no dependency on the TP parameters */
5
6
7#include <math.h>
9
10namespace TP {
11namespace Utilities {
12
13#define Pi 3.14159265358979323846264338328
14#define Pih 1.57079632679489661923132169164 /* Pi/2*/
15#define Piq 0.78539816339744830961566084582 /* Pi/4*/
16
17#define TINY 1.0e-20
18#define SWAP(a,b) {double temp=(a);(a)=(b);(b)=temp;}
19
20void nrerror (char error_text[]);
21int *ivector (long nl, long nh);
22double *dvector (long nl, long nh);
23int **imatrix (long nrl, long nrh, long ncl, long nch);
24double **dmatrix (long nrl, long nrh, long ncl, long nch);
25double ***d3tensor (long nrl, long nrh, long ncl, long nch, long ndl,
26 long ndh);
27void free_ivector (int *v, long nl, long nh);
28void free_dvector (double *v, long nl, long nh);
29void free_imatrix (int **m, long nrl, long nrh, long ncl, long nch);
30void free_dmatrix (double **m, long nrl, long nrh, long ncl, long nch);
31void free_d3tensor (double ***t, long nrl, long nrh, long ncl, long nch,
32 long ndl, long ndh);
33
34int minimum2 (int i, int j);
35int minimum3 (int i, int j, int k);
36int maximum2 (int i, int j);
37int maximum3 (int i, int j, int k);
38int pow_int (int mantisse, int exponent);
39
40void chebft_Zeros (double u[], int n, int inv);
41void chebft_Extremes (double u[], int n, int inv);
42void chder (double *c, double *cder, int n);
43double chebev (double a, double b, double c[], int m, double x);
44void fourft (double *u, int N, int inv);
45void fourder (double u[], double du[], int N);
46void fourder2 (double u[], double d2u[], int N);
47double fourev (double *u, int N, double x);
48
49double norm1 (double *v, int n);
50double norm2 (double *v, int n);
51double scalarproduct (double *v, double *w, int n);
52
53/*
54typedef nrerror TP_nrerror;
55typedef ivector TP_ivector;
56typedef dvector TP_dvector;
57typedef imatrix TP_imatrix;
58typedef dmatrix TP_dmatrix;
59typedef d3tensor TP_d3tensor;
60typedef free_ivector TP_free_ivector;
61typedef free_dvector TP_free_dvector;
62typedef free_imatrix TP_free_imatrix;
63typedef free_dmatrix TP_free_dmatrix;
64typedef free_d3tensor TP_free_d3tensor;
65*/
66
67} // namespac Utilities
68} // namespace TP
69
int minimum3(int i, int j, int k)
void fourft(double *u, int N, int inv)
double norm2(double *v, int n)
double chebev(double a, double b, double c[], int m, double x)
int maximum3(int i, int j, int k)
int maximum2(int i, int j)
double * dvector(long nl, long nh)
void chebft_Extremes(double u[], int n, int inv)
void free_dvector(double *v, long nl, long nh)
double norm1(double *v, int n)
double scalarproduct(double *v, double *w, int n)
void free_ivector(int *v, long nl, long nh)
void chebft_Zeros(double u[], int n, int inv)
void fourder2(double u[], double d2u[], int N)
int minimum2(int i, int j)
void chder(double *c, double *cder, int n)
double *** d3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
int * ivector(long nl, long nh)
void nrerror(char error_text[])
void fourder(double u[], double du[], int N)
double fourev(double *u, int N, double x)
double ** dmatrix(long nrl, long nrh, long ncl, long nch)
void free_d3tensor(double ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch)
int pow_int(int mantisse, int exponent)
void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch)
int ** imatrix(long nrl, long nrh, long ncl, long nch)
This file contains aliases for making access to the long state vector Q as used eg.