| 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 | /* Hybrid (DCT enabled) functions */
|
|---|
| 23 | #define ID_NME hyb
|
|---|
| 24 |
|
|---|
| 25 | // standard
|
|---|
| 26 | #undef SHT_AXISYM
|
|---|
| 27 | #undef SHT_VAR_LTR
|
|---|
| 28 | #define SUFFIX
|
|---|
| 29 | #define GEN(name,sfx) name
|
|---|
| 30 | #define GEN3(name,nw,sfx) GLUE2(name,nw)
|
|---|
| 31 |
|
|---|
| 32 | #include "SHT/spat_to_SH.c"
|
|---|
| 33 | #include "SHT/SH_to_spat.c"
|
|---|
| 34 | #include "SHT/SHst_to_spat.c"
|
|---|
| 35 | #include "SHT/spat_to_SHst.c"
|
|---|
| 36 | #define SHT_GRAD
|
|---|
| 37 | #include "SHT/SHs_to_spat.c"
|
|---|
| 38 | #include "SHT/SHt_to_spat.c"
|
|---|
| 39 | #undef SHT_GRAD
|
|---|
| 40 | #define SHT_3COMP
|
|---|
| 41 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 42 | #undef SHT_3COMP
|
|---|
| 43 |
|
|---|
| 44 | // axisymmetric
|
|---|
| 45 | #define SHT_AXISYM
|
|---|
| 46 | #undef SHT_VAR_LTR
|
|---|
| 47 | #undef SUFFIX
|
|---|
| 48 | #define SUFFIX _m0
|
|---|
| 49 | #undef GEN
|
|---|
| 50 | #undef GEN3
|
|---|
| 51 | #define GEN(name,sfx) GLUE2(name,sfx)
|
|---|
| 52 | #define GEN3(name,nw,sfx) GLUE3(name,nw,sfx)
|
|---|
| 53 |
|
|---|
| 54 | #include "SHT/spat_to_SH.c"
|
|---|
| 55 | #include "SHT/SH_to_spat.c"
|
|---|
| 56 | #include "SHT/SHst_to_spat.c"
|
|---|
| 57 | #include "SHT/spat_to_SHst.c"
|
|---|
| 58 | #define SHT_GRAD
|
|---|
| 59 | #include "SHT/SHs_to_spat.c"
|
|---|
| 60 | #include "SHT/SHt_to_spat.c"
|
|---|
| 61 | #undef SHT_GRAD
|
|---|
| 62 | #define SHT_3COMP
|
|---|
| 63 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 64 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 65 | #undef SHT_3COMP
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 | // standard, l-truncation
|
|---|
| 69 | #undef SHT_AXISYM
|
|---|
| 70 | #define SHT_VAR_LTR
|
|---|
| 71 | #undef SUFFIX
|
|---|
| 72 | #define SUFFIX _l
|
|---|
| 73 |
|
|---|
| 74 | // scalar
|
|---|
| 75 | #include "SHT/spat_to_SH.c"
|
|---|
| 76 | #include "SHT/SH_to_spat.c"
|
|---|
| 77 | // vector
|
|---|
| 78 | #include "SHT/SHst_to_spat.c"
|
|---|
| 79 | #include "SHT/spat_to_SHst.c"
|
|---|
| 80 | // gradients
|
|---|
| 81 | #define SHT_GRAD
|
|---|
| 82 | #include "SHT/SHs_to_spat.c"
|
|---|
| 83 | #include "SHT/SHt_to_spat.c"
|
|---|
| 84 | #undef SHT_GRAD
|
|---|
| 85 | // 3 components
|
|---|
| 86 | #define SHT_3COMP
|
|---|
| 87 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 88 | #undef SHT_3COMP
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 | // axisymm, l-truncation
|
|---|
| 92 | #define SHT_AXISYM
|
|---|
| 93 | #define SHT_VAR_LTR
|
|---|
| 94 | #undef SUFFIX
|
|---|
| 95 | #define SUFFIX _m0l
|
|---|
| 96 |
|
|---|
| 97 | // scalar
|
|---|
| 98 | #include "SHT/spat_to_SH.c"
|
|---|
| 99 | #include "SHT/SH_to_spat.c"
|
|---|
| 100 | // vector
|
|---|
| 101 | #include "SHT/SHst_to_spat.c"
|
|---|
| 102 | #include "SHT/spat_to_SHst.c"
|
|---|
| 103 | // gradients
|
|---|
| 104 | #define SHT_GRAD
|
|---|
| 105 | #include "SHT/SHs_to_spat.c"
|
|---|
| 106 | #include "SHT/SHt_to_spat.c"
|
|---|
| 107 | #undef SHT_GRAD
|
|---|
| 108 | // 3 components
|
|---|
| 109 | #define SHT_3COMP
|
|---|
| 110 | #include "SHT/spat_to_SHqst.c"
|
|---|
| 111 | #include "SHT/SHqst_to_spat.c"
|
|---|
| 112 | #undef SHT_3COMP
|
|---|
| 113 |
|
|---|
| 114 | #undef ID_NME
|
|---|
| 115 |
|
|---|
| 116 | void* fdct[SHT_NTYP] = { SH_to_spat_hyb, spat_to_SH_hyb, SHsphtor_to_spat_hyb, spat_to_SHsphtor_hyb,
|
|---|
| 117 | SHsph_to_spat_hyb, SHtor_to_spat_hyb, NULL, spat_to_SHqst_hyb };
|
|---|
| 118 | void* fdct_l[SHT_NTYP] = { SH_to_spat_hyb_l, spat_to_SH_hyb_l, SHsphtor_to_spat_hyb_l, spat_to_SHsphtor_hyb_l,
|
|---|
| 119 | SHsph_to_spat_hyb_l, SHtor_to_spat_hyb_l, NULL, spat_to_SHqst_hyb_l };
|
|---|
| 120 | void* fdct_m0[SHT_NTYP] = { SH_to_spat_hyb_m0, spat_to_SH_hyb_m0, SHsphtor_to_spat_hyb_m0, spat_to_SHsphtor_hyb_m0,
|
|---|
| 121 | SHsph_to_spat_hyb_m0, SHtor_to_spat_hyb_m0, SHqst_to_spat_hyb_m0, spat_to_SHqst_hyb_m0 };
|
|---|
| 122 | void* fdct_m0l[SHT_NTYP] = { SH_to_spat_hyb_m0l, spat_to_SH_hyb_m0l, SHsphtor_to_spat_hyb_m0l, spat_to_SHsphtor_hyb_m0l,
|
|---|
| 123 | SHsph_to_spat_hyb_m0l, SHtor_to_spat_hyb_m0l, SHqst_to_spat_hyb_m0l, spat_to_SHqst_hyb_m0l };
|
|---|
| 124 |
|
|---|