// Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
// Distributed under the terms of the BSD license (see the LICENSE
// file for the exact terms).
// Email: hermes1d@googlegroups.com, home page: http://hpfem.org/

#include "h1_polys.h"


static double h1_polys_fn_0(double x) { return 0.7071067811865475244008444; }

static double h1_polys_fn_1(double x) { return 0.612372435695794524549321*x; }

static double h1_polys_fn_2(double x) { return -0.1976423537605237082499308 + 0.5929270612815711247497925*pow(x,2); }

static double h1_polys_fn_3(double x) { return -0.6851064595573102008736135*x + 0.7612293995081224454151261*pow(x,3); }

static double h1_polys_fn_4(double x) { return 0.2208404767588391179547789 - 1.349580691304016831945871*pow(x,2) + 1.145098768379165796802557*pow(x,4); }

static double h1_polys_fn_5(double x) { return 0.7716496485246504293893721*x - 2.602992946708621048951415*pow(x,3) + 1.832884670765293267111385*pow(x,5); }

static double h1_polys_fn_6(double x) { return -0.1426338957147346874780344 + 2.163647446719018602162392*pow(x,2) - 5.07315261607149999274562*pow(x,4) + 3.052340223492199397144529*pow(x,6); }

static double h1_polys_fn_7(double x) { return -0.7855977742373071206272084*x + 5.522271420072471761683968*pow(x,3) - 9.963620607152109824079708*pow(x,5) + 5.226959677048669146901664*pow(x,7); }

static double h1_polys_fn_8(double x) { return 0.1056549045646108269284724 - 2.969156485767467335327232*pow(x,2) + 13.3887723577409952695267*pow(x,4) - 19.66280869132675041583919*pow(x,6) + 9.137539103992935041699207*pow(x,8); }

static double h1_polys_fn_9(double x) { return 0.7909359617956479948904411*x - 9.508577847794959166671628*pow(x,3) + 31.41499881148376830691103*pow(x,5) - 38.92633972892485042290028*pow(x,7) + 16.22898285992605770143524*pow(x,9); }

static double h1_polys_fn_10(double x) { return -0.08367903573384707937363054 + 3.771732278134617413023007*pow(x,2) - 27.68837515925583428992023*pow(x,4) + 72.04217461996073416408404*pow(x,6) - 77.22931105373546553422956*pow(x,8) + 29.18745835474343174717319*pow(x,10); }

static double h1_polys_fn_11(double x) { return -0.7934288564505810130828288*x + 14.56002102644388834442683*pow(x,3) - 75.76204311453657130108907*pow(x,5) + 162.4258667792085419223742*pow(x,7) - 153.4590794857097210924156*pow(x,9) + 53.02866365120088264115949*pow(x,11); }

static double h1_polys_fn_12(double x) { return 0.06922374040827519507881072 - 4.572737062776697763779226*pow(x,2) + 49.56784957440932710932924*pow(x,4) - 198.359167666839243173753*pow(x,6) + 361.4194666017688837783385*pow(x,8) - 305.2803471236101253210091*pow(x,10) + 97.15571193664890693648544*pow(x,12); }

static double h1_polys_fn_13(double x) { return 0.7947871903487470146646887*x - 20.67593874927281318451808*pow(x,3) + 155.1327449697091688260908*pow(x,5) - 502.4912972272074141697487*pow(x,7) + 795.8072619387856292813388*pow(x,9) - 607.8286349062280787347738*pow(x,11) + 179.2610767838650566671418*pow(x,13); }

static double h1_polys_fn_14(double x) { return -0.059011808443302917422643 + 5.372836987681926925397899*pow(x,2) - 80.62298998471030177616515*pow(x,4) + 456.9956419087501169030942*pow(x,6) - 1240.6998984637469184821*pow(x,8) + 1737.300968212340622493457*pow(x,10) - 1211.031102146270492401283*pow(x,12) + 332.743555294398364176877*pow(x,14); }

static double h1_polys_fn_15(double x) { return -0.795607388771941991999484*x + 27.85605459512766112968637*pow(x,3) - 284.208244105466970885802*pow(x,5) + 1285.977336286984287641656*pow(x,7) - 3001.130457682589760229241*pow(x,9) + 3765.590279653063075058216*pow(x,11) - 2414.128486255508941772173*pow(x,13) + 620.839124897162591455262*pow(x,15); }

static double h1_polys_fn_16(double x) { return 0.05141951219157449034295694 - 6.172372996188137793113852*pow(x,2) + 122.4495721812928496004063*pow(x,4) - 930.8019252220099516380706*pow(x,6) + 3491.069665456174127553762*pow(x,8) - 7138.24829507255352579858*pow(x,10) + 8112.55321847944253298352*pow(x,12) - 4814.501399882536723978136*pow(x,14) + 1163.600117544187254597612*pow(x,16); }

static double h1_polys_fn_17(double x) { return 0.7961401944651981958209693*x - 36.10023330849763112085735*pow(x,3) + 480.2228792160011678597395*pow(x,5) - 2881.773550790729102844894*pow(x,7) + 9206.81725001450072384288*pow(x,9) - 16741.4273159182585822344*pow(x,11) + 17386.88534008244858868204*pow(x,13) - 9604.925864911379274221687*pow(x,15) + 2189.505355421448911841778*pow(x,17); }

static double h1_polys_fn_18(double x) { return -0.04555541717468888937685515 + 6.97153509639830021289558*pow(x,2) - 176.6433670648780735233616*pow(x,4) + 1731.352194846298630169111*pow(x,6) - 8534.099783965753839257256*pow(x,8) + 23708.1826996336648593384*pow(x,10) - 38798.48458413411406095005*pow(x,12) + 37095.75769488335014912903*pow(x,14) - 19167.35714540321179409828*pow(x,16) + 4134.3663115254205178689*pow(x,18); }

static double h1_polys_fn_19(double x) { return -0.7965057160920301228133854*x + 45.40840100339007968651842*pow(x,3) - 762.9642053751888913260226*pow(x,5) + 5850.045238638476821501245*pow(x,7) - 24377.47463787198195555187*pow(x,9) + 59840.40081176134581223988*pow(x,11) - 88999.54760956708785081963*pow(x,13) + 78832.90118090585656507729*pow(x,15) - 38259.16090785900762820111*pow(x,17) + 7831.188234080289077516518*pow(x,19); }


shape_fn_t h1_polys_fn_tab_1d[] = {

h1_polys_fn_0,
h1_polys_fn_1,
h1_polys_fn_2,
h1_polys_fn_3,
h1_polys_fn_4,
h1_polys_fn_5,
h1_polys_fn_6,
h1_polys_fn_7,
h1_polys_fn_8,
h1_polys_fn_9,
h1_polys_fn_10,
h1_polys_fn_11,
h1_polys_fn_12,
h1_polys_fn_13,
h1_polys_fn_14,
h1_polys_fn_15,
h1_polys_fn_16,
h1_polys_fn_17,
h1_polys_fn_18,
h1_polys_fn_19,
};



static double h1_polys_der_0(double x) { return 0; }

static double h1_polys_der_1(double x) { return 0.6123724356957945245493210; }

static double h1_polys_der_2(double x) { return 1.185854122563142249499585*x; }

static double h1_polys_der_3(double x) { return -0.6851064595573102008736135 + 2.283688198524367336245378*pow(x,2); }

static double h1_polys_der_4(double x) { return -2.699161382608033663891743*x + 4.58039507351666318721023*pow(x,3); }

static double h1_polys_der_5(double x) { return 0.7716496485246504293893721 - 7.808978840125863146854245*pow(x,2) + 9.164423353826466335556925*pow(x,4); }

static double h1_polys_der_6(double x) { return 4.327294893438037204324784*x - 20.29261046428599997098248*pow(x,3) + 18.31404134095319638286717*pow(x,5); }

static double h1_polys_der_7(double x) { return -0.7855977742373071206272084 + 16.5668142602174152850519*pow(x,2) - 49.81810303576054912039854*pow(x,4) + 36.58871773934068402831165*pow(x,6); }

static double h1_polys_der_8(double x) { return -5.938312971534934670654464*x + 53.5550894309639810781068*pow(x,3) - 117.9768521479605024950352*pow(x,5) + 73.10031283194348033359366*pow(x,7); }

static double h1_polys_der_9(double x) { return 0.7909359617956479948904411 - 28.52573354338487750001488*pow(x,2) + 157.0749940574188415345551*pow(x,4) - 272.484378102473952960302*pow(x,6) + 146.0608457393345193129172*pow(x,8); }

static double h1_polys_der_10(double x) { return 7.543464556269234826046015*x - 110.7535006370233371596809*pow(x,3) + 432.2530477197644049845042*pow(x,5) - 617.8344884298837242738365*pow(x,7) + 291.8745835474343174717319*pow(x,9); }

static double h1_polys_der_11(double x) { return -0.7934288564505810130828288 + 43.6800630793316650332805*pow(x,2) - 378.8102155726828565054454*pow(x,4) + 1136.981067454459793456619*pow(x,6) - 1381.13171537138748983174*pow(x,8) + 583.3153001632097090527544*pow(x,10); }

static double h1_polys_der_12(double x) { return -9.145474125553395527558452*x + 198.2713982976373084373169*pow(x,3) - 1190.155006001035459042518*pow(x,5) + 2891.355732814151070226708*pow(x,7) - 3052.803471236101253210091*pow(x,9) + 1165.868543239786883237825*pow(x,11); }

static double h1_polys_der_13(double x) { return 0.7947871903487470146646887 - 62.02781624781843955355423*pow(x,2) + 775.6637248485458441304542*pow(x,4) - 3517.439080590451899188241*pow(x,6) + 7162.265357449070663532049*pow(x,8) - 6686.114983968508866082512*pow(x,10) + 2330.393998190245736672843*pow(x,12); }

static double h1_polys_der_14(double x) { return 10.7456739753638538507958*x - 322.4919599388412071046606*pow(x,3) + 2741.973851452500701418565*pow(x,5) - 9925.599187709975347856798*pow(x,7) + 17373.00968212340622493457*pow(x,9) - 14532.37322575524590881539*pow(x,11) + 4658.409774121577098476278*pow(x,13); }

static double h1_polys_der_15(double x) { return -0.795607388771941991999484 + 83.56816378538298338905912*pow(x,2) - 1421.04122052733485442901*pow(x,4) + 9001.841354008890013491591*pow(x,6) - 27010.17411914330784206317*pow(x,8) + 41421.49307618369382564038*pow(x,10) - 31383.67032132161624303824*pow(x,12) + 9312.58687345743887182893*pow(x,14); }

static double h1_polys_der_16(double x) { return -12.3447459923762755862277*x + 489.7982887251713984016253*pow(x,3) - 5584.811551332059709828423*pow(x,5) + 27928.55732364939302043009*pow(x,7) - 71382.4829507255352579858*pow(x,9) + 97350.63862175331039580224*pow(x,11) - 67403.01959835551413569391*pow(x,13) + 18617.6018807069960735618*pow(x,15); }

static double h1_polys_der_17(double x) { return 0.7961401944651981958209693 - 108.300699925492893362572*pow(x,2) + 2401.114396080005839298698*pow(x,4) - 20172.41485553510371991426*pow(x,6) + 82861.35525013050651458592*pow(x,8) - 184155.7004751008444045784*pow(x,10) + 226029.5094210718316528666*pow(x,12) - 144073.8879736706891133253*pow(x,14) + 37221.59104216463150131023*pow(x,16); }

static double h1_polys_der_18(double x) { return 13.94307019279660042579116*x - 706.5734682595122940934464*pow(x,3) + 10388.11316907779178101467*pow(x,5) - 68272.79827172603071405805*pow(x,7) + 237081.826996336648593384*pow(x,9) - 465581.8150096093687314006*pow(x,11) + 519340.6077283669020878065*pow(x,13) - 306677.7143264513887055724*pow(x,15) + 74418.5936074575693216402*pow(x,17); }

static double h1_polys_der_19(double x) { return -0.7965057160920301228133854 + 136.2252030101702390595553*pow(x,2) - 3814.821026875944456630113*pow(x,4) + 40950.31667046933775050871*pow(x,6) - 219397.2717408478375999669*pow(x,8) + 658244.4089293748039346387*pow(x,10) - 1156994.118924372142060655*pow(x,12) + 1182493.517713587848476159*pow(x,14) - 650405.7354336031296794188*pow(x,16) + 148792.5764475254924728138*pow(x,18); }


shape_fn_t h1_polys_der_tab_1d[] = {

h1_polys_der_0,
h1_polys_der_1,
h1_polys_der_2,
h1_polys_der_3,
h1_polys_der_4,
h1_polys_der_5,
h1_polys_der_6,
h1_polys_der_7,
h1_polys_der_8,
h1_polys_der_9,
h1_polys_der_10,
h1_polys_der_11,
h1_polys_der_12,
h1_polys_der_13,
h1_polys_der_14,
h1_polys_der_15,
h1_polys_der_16,
h1_polys_der_17,
h1_polys_der_18,
h1_polys_der_19,
};
