| [2131108] | 1 | /*
|
|---|
| 2 | * Copyright (c) 2010-2015 Centre National de la Recherche Scientifique.
|
|---|
| 3 | * written by Nathanael Schaeffer (CNRS, ISTerre, Grenoble, France).
|
|---|
| 4 | *
|
|---|
| 5 | * nathanael.schaeffer@ujf-grenoble.fr
|
|---|
| 6 | *
|
|---|
| 7 | * This software is governed by the CeCILL license under French law and
|
|---|
| 8 | * abiding by the rules of distribution of free software. You can use,
|
|---|
| 9 | * modify and/or redistribute the software under the terms of the CeCILL
|
|---|
| 10 | * license as circulated by CEA, CNRS and INRIA at the following URL
|
|---|
| 11 | * "http://www.cecill.info".
|
|---|
| 12 | *
|
|---|
| 13 | * The fact that you are presently reading this means that you have had
|
|---|
| 14 | * knowledge of the CeCILL license and that you accept its terms.
|
|---|
| 15 | *
|
|---|
| 16 | */
|
|---|
| 17 |
|
|---|
| 18 | #include "sht_private.h"
|
|---|
| 19 |
|
|---|
| 20 | #define MTR MMAX
|
|---|
| 21 |
|
|---|
| 22 | /* regular mem functions (without dct), at the end for SHT_NO_DCT must no interfere with others */
|
|---|
| 23 | #define SHT_NO_DCT
|
|---|
| 24 | #define ID_NME mem
|
|---|
| 25 |
|
|---|
| 26 | // standard
|
|---|
| 27 | #undef SHT_AXISYM
|
|---|
| 28 | #undef SHT_VAR_LTR
|
|---|
| 29 | #define SUFFIX
|
|---|
| 30 | #define GEN(name,sfx) name
|
|---|
| 31 | #define GEN3(name,nw,sfx) GLUE2(name,nw)
|
|---|
| 32 |
|
|---|
| 33 | #include "SHT/spat_to_SH.c"
|
|---|
| 34 | #include "SHT/SH_to_spat.c"
|
|---|
| 35 | #include "SHT/SHst_to_spat.c"
|
|---|
| 36 | #include "SHT/spat_to_SHst.c"
|
|---|
| 37 | #define SHT_GRAD
|
|---|
| 38 | #include "SHT/SHs_to_spat.c"
|
|---|
| 39 | #include "SHT/SHt_to_spat.c"
|
|---|
| 40 | #undef SHT_GRAD
|
|---|
| 41 | #define SHT_3COMP
|
|---|
| 42 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 43 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 44 | #undef SHT_3COMP
|
|---|
| 45 |
|
|---|
| 46 | // axisymmetric
|
|---|
| 47 | #define SHT_AXISYM
|
|---|
| 48 | #undef SHT_VAR_LTR
|
|---|
| 49 | #undef SUFFIX
|
|---|
| 50 | #define SUFFIX _m0
|
|---|
| 51 | #undef GEN
|
|---|
| 52 | #undef GEN3
|
|---|
| 53 | #define GEN(name,sfx) GLUE2(name,sfx)
|
|---|
| 54 | #define GEN3(name,nw,sfx) GLUE3(name,nw,sfx)
|
|---|
| 55 |
|
|---|
| 56 | #include "SHT/spat_to_SH.c"
|
|---|
| 57 | #include "SHT/SH_to_spat.c"
|
|---|
| 58 | #include "SHT/SHst_to_spat.c"
|
|---|
| 59 | #include "SHT/spat_to_SHst.c"
|
|---|
| 60 | #define SHT_GRAD
|
|---|
| 61 | #include "SHT/SHs_to_spat.c"
|
|---|
| 62 | #include "SHT/SHt_to_spat.c"
|
|---|
| 63 | #undef SHT_GRAD
|
|---|
| 64 | #define SHT_3COMP
|
|---|
| 65 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 66 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 67 | #undef SHT_3COMP
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 | // standard, l-truncation
|
|---|
| 71 | #undef SHT_AXISYM
|
|---|
| 72 | #define SHT_VAR_LTR
|
|---|
| 73 | #undef SUFFIX
|
|---|
| 74 | #define SUFFIX _l
|
|---|
| 75 |
|
|---|
| 76 | // scalar
|
|---|
| 77 | #include "SHT/spat_to_SH.c"
|
|---|
| 78 | #include "SHT/SH_to_spat.c"
|
|---|
| 79 | // vector
|
|---|
| 80 | #include "SHT/SHst_to_spat.c"
|
|---|
| 81 | #include "SHT/spat_to_SHst.c"
|
|---|
| 82 | // gradients
|
|---|
| 83 | #define SHT_GRAD
|
|---|
| 84 | #include "SHT/SHs_to_spat.c"
|
|---|
| 85 | #include "SHT/SHt_to_spat.c"
|
|---|
| 86 | #undef SHT_GRAD
|
|---|
| 87 | // 3 components
|
|---|
| 88 | #define SHT_3COMP
|
|---|
| 89 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 90 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 91 | #undef SHT_3COMP
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 | // axisymm, l-truncation
|
|---|
| 95 | #define SHT_AXISYM
|
|---|
| 96 | #define SHT_VAR_LTR
|
|---|
| 97 | #undef SUFFIX
|
|---|
| 98 | #define SUFFIX _m0l
|
|---|
| 99 |
|
|---|
| 100 | // scalar
|
|---|
| 101 | #include "SHT/spat_to_SH.c"
|
|---|
| 102 | #include "SHT/SH_to_spat.c"
|
|---|
| 103 | // vector
|
|---|
| 104 | #include "SHT/SHst_to_spat.c"
|
|---|
| 105 | #include "SHT/spat_to_SHst.c"
|
|---|
| 106 | // gradients
|
|---|
| 107 | #define SHT_GRAD
|
|---|
| 108 | #include "SHT/SHs_to_spat.c"
|
|---|
| 109 | #include "SHT/SHt_to_spat.c"
|
|---|
| 110 | #undef SHT_GRAD
|
|---|
| 111 | // 3 components
|
|---|
| 112 | #define SHT_3COMP
|
|---|
| 113 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 114 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 115 | #undef SHT_3COMP
|
|---|
| 116 |
|
|---|
| 117 | #undef ID_NME
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | void* fmem[SHT_NTYP] = { SH_to_spat_mem, spat_to_SH_mem, SHsphtor_to_spat_mem, spat_to_SHsphtor_mem,
|
|---|
| 121 | SHsph_to_spat_mem, SHtor_to_spat_mem, SHqst_to_spat_mem, spat_to_SHqst_mem};
|
|---|
| 122 | void* fmem_l[SHT_NTYP] = { SH_to_spat_mem_l, spat_to_SH_mem_l, SHsphtor_to_spat_mem_l, spat_to_SHsphtor_mem_l,
|
|---|
| 123 | SHsph_to_spat_mem_l, SHtor_to_spat_mem_l, SHqst_to_spat_mem_l, spat_to_SHqst_mem_l };
|
|---|
| 124 | void* fmem_m0[SHT_NTYP] = { SH_to_spat_mem_m0, spat_to_SH_mem_m0, SHsphtor_to_spat_mem_m0, spat_to_SHsphtor_mem_m0,
|
|---|
| 125 | SHsph_to_spat_mem_m0, SHtor_to_spat_mem_m0, SHqst_to_spat_mem_m0, spat_to_SHqst_mem_m0};
|
|---|
| 126 | void* fmem_m0l[SHT_NTYP] = { SH_to_spat_mem_m0l, spat_to_SH_mem_m0l, SHsphtor_to_spat_mem_m0l, spat_to_SHsphtor_mem_m0l,
|
|---|
| 127 | SHsph_to_spat_mem_m0l, SHtor_to_spat_mem_m0l, SHqst_to_spat_mem_m0l, spat_to_SHqst_mem_m0l };
|
|---|