#include "StdAfx.h"
#include "cREgDistDxDy_Polyn4.h"

cREgDistDxDy_Polyn4::cREgDistDxDy_Polyn4():
    cElCompiledFonc(2)
{
   AddIntRef (cIncIntervale("Intr",0,27));
   Close(false);
}

void cREgDistDxDy_Polyn4::ComputeVal()
{
   double tmp0_ = mLocRegDistxy1_x - mLocPolyn4_State_1_0;
   double tmp1_ = (tmp0_) / mLocPolyn4_State_0_0;
   double tmp2_ = mLocRegDistxy1_y - mLocPolyn4_State_2_0;
   double tmp3_ = (tmp2_) / mLocPolyn4_State_0_0;
   double tmp4_ = (tmp1_) * (tmp1_);
   double tmp5_ = (tmp3_) * (tmp3_);
   double tmp6_ = tmp4_ * (tmp1_);
   double tmp7_ = (tmp3_) * (tmp1_);
   double tmp8_ = tmp7_ * (tmp1_);
   double tmp9_ = tmp5_ * (tmp1_);
   double tmp10_ = (tmp3_) * tmp5_;
   double tmp11_ = mCompCoord[3];
   double tmp12_ = 1 + tmp11_;
   double tmp13_ = mCompCoord[4];
   double tmp14_ = mCompCoord[5];
   double tmp15_ = tmp14_ * 2;
   double tmp16_ = mLocRegDistxy2_x - mLocPolyn4_State_1_0;
   double tmp17_ = (tmp16_) / mLocPolyn4_State_0_0;
   double tmp18_ = mCompCoord[6];
   double tmp19_ = mLocRegDistxy2_y - mLocPolyn4_State_2_0;
   double tmp20_ = (tmp19_) / mLocPolyn4_State_0_0;
   double tmp21_ = mCompCoord[7];
   double tmp22_ = mCompCoord[9];
   double tmp23_ = (tmp17_) * (tmp17_);
   double tmp24_ = mCompCoord[10];
   double tmp25_ = mCompCoord[11];
   double tmp26_ = (tmp20_) * (tmp20_);
   double tmp27_ = mCompCoord[12];
   double tmp28_ = mCompCoord[17];
   double tmp29_ = tmp23_ * (tmp17_);
   double tmp30_ = mCompCoord[18];
   double tmp31_ = (tmp20_) * (tmp17_);
   double tmp32_ = tmp31_ * (tmp17_);
   double tmp33_ = mCompCoord[19];
   double tmp34_ = tmp26_ * (tmp17_);
   double tmp35_ = mCompCoord[20];
   double tmp36_ = (tmp20_) * tmp26_;
   double tmp37_ = mCompCoord[21];
   double tmp38_ = mLocRegDistxy3_x - mLocPolyn4_State_1_0;
   double tmp39_ = (tmp38_) / mLocPolyn4_State_0_0;
   double tmp40_ = mLocRegDistxy3_y - mLocPolyn4_State_2_0;
   double tmp41_ = (tmp40_) / mLocPolyn4_State_0_0;
   double tmp42_ = (tmp39_) * (tmp39_);
   double tmp43_ = (tmp41_) * (tmp41_);
   double tmp44_ = tmp42_ * (tmp39_);
   double tmp45_ = (tmp41_) * (tmp39_);
   double tmp46_ = tmp45_ * (tmp39_);
   double tmp47_ = tmp43_ * (tmp39_);
   double tmp48_ = (tmp41_) * tmp43_;
   double tmp49_ = mLocRegDistxy4_x - mLocPolyn4_State_1_0;
   double tmp50_ = (tmp49_) / mLocPolyn4_State_0_0;
   double tmp51_ = mLocRegDistxy4_y - mLocPolyn4_State_2_0;
   double tmp52_ = (tmp51_) / mLocPolyn4_State_0_0;
   double tmp53_ = (tmp50_) * (tmp50_);
   double tmp54_ = (tmp52_) * (tmp52_);
   double tmp55_ = tmp53_ * (tmp50_);
   double tmp56_ = (tmp52_) * (tmp50_);
   double tmp57_ = tmp56_ * (tmp50_);
   double tmp58_ = tmp54_ * (tmp50_);
   double tmp59_ = (tmp52_) * tmp54_;
   double tmp60_ = (tmp1_) * (tmp3_);
   double tmp61_ = tmp6_ * (tmp1_);
   double tmp62_ = tmp8_ * (tmp1_);
   double tmp63_ = tmp9_ * (tmp1_);
   double tmp64_ = tmp10_ * (tmp1_);
   double tmp65_ = (tmp3_) * tmp10_;
   double tmp66_ = 1 - tmp11_;
   double tmp67_ = (tmp17_) * (tmp20_);
   double tmp68_ = tmp18_ * 2;
   double tmp69_ = mCompCoord[8];
   double tmp70_ = mCompCoord[13];
   double tmp71_ = mCompCoord[14];
   double tmp72_ = mCompCoord[15];
   double tmp73_ = mCompCoord[16];
   double tmp74_ = mCompCoord[22];
   double tmp75_ = tmp29_ * (tmp17_);
   double tmp76_ = mCompCoord[23];
   double tmp77_ = tmp32_ * (tmp17_);
   double tmp78_ = mCompCoord[24];
   double tmp79_ = tmp34_ * (tmp17_);
   double tmp80_ = mCompCoord[25];
   double tmp81_ = tmp36_ * (tmp17_);
   double tmp82_ = mCompCoord[26];
   double tmp83_ = (tmp20_) * tmp36_;
   double tmp84_ = (tmp39_) * (tmp41_);
   double tmp85_ = tmp44_ * (tmp39_);
   double tmp86_ = tmp46_ * (tmp39_);
   double tmp87_ = tmp47_ * (tmp39_);
   double tmp88_ = tmp48_ * (tmp39_);
   double tmp89_ = (tmp41_) * tmp48_;
   double tmp90_ = (tmp50_) * (tmp52_);
   double tmp91_ = tmp55_ * (tmp50_);
   double tmp92_ = tmp57_ * (tmp50_);
   double tmp93_ = tmp58_ * (tmp50_);
   double tmp94_ = tmp59_ * (tmp50_);
   double tmp95_ = (tmp52_) * tmp59_;

  mVal[0] = (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp1_) + tmp13_ * (tmp3_)) - tmp15_ * tmp4_ + tmp18_ * tmp60_ + tmp21_ * tmp5_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp6_ + tmp24_ * tmp8_ + tmp25_ * tmp9_ + tmp27_ * tmp10_ + tmp28_ * tmp61_ + tmp30_ * tmp62_ + tmp33_ * tmp63_ + tmp35_ * tmp64_ + tmp37_ * tmp65_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp17_) + tmp13_ * (tmp20_)) - tmp15_ * tmp23_ + tmp18_ * tmp67_ + tmp21_ * tmp26_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp29_ + tmp24_ * tmp32_ + tmp25_ * tmp34_ + tmp27_ * tmp36_ + tmp28_ * tmp75_ + tmp30_ * tmp77_ + tmp33_ * tmp79_ + tmp35_ * tmp81_ + tmp37_ * tmp83_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp39_) + tmp13_ * (tmp41_)) - tmp15_ * tmp42_ + tmp18_ * tmp84_ + tmp21_ * tmp43_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp44_ + tmp24_ * tmp46_ + tmp25_ * tmp47_ + tmp27_ * tmp48_ + tmp28_ * tmp85_ + tmp30_ * tmp86_ + tmp33_ * tmp87_ + tmp35_ * tmp88_ + tmp37_ * tmp89_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp50_) + tmp13_ * (tmp52_)) - tmp15_ * tmp53_ + tmp18_ * tmp90_ + tmp21_ * tmp54_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp55_ + tmp24_ * tmp57_ + tmp25_ * tmp58_ + tmp27_ * tmp59_ + tmp28_ * tmp91_ + tmp30_ * tmp92_ + tmp33_ * tmp93_ + tmp35_ * tmp94_ + tmp37_ * tmp95_) * mLocPolyn4_State_0_0);

  mVal[1] = (mLocPolyn4_State_2_0 + (((tmp66_) * (tmp3_) + tmp13_ * (tmp1_) + tmp14_ * tmp60_) - tmp68_ * tmp5_ + tmp69_ * tmp4_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp6_ + tmp71_ * tmp8_ + tmp72_ * tmp9_ + tmp73_ * tmp10_ + tmp74_ * tmp61_ + tmp76_ * tmp62_ + tmp78_ * tmp63_ + tmp80_ * tmp64_ + tmp82_ * tmp65_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp66_) * (tmp20_) + tmp13_ * (tmp17_) + tmp14_ * tmp67_) - tmp68_ * tmp26_ + tmp69_ * tmp23_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp29_ + tmp71_ * tmp32_ + tmp72_ * tmp34_ + tmp73_ * tmp36_ + tmp74_ * tmp75_ + tmp76_ * tmp77_ + tmp78_ * tmp79_ + tmp80_ * tmp81_ + tmp82_ * tmp83_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_2_0 + (((tmp66_) * (tmp41_) + tmp13_ * (tmp39_) + tmp14_ * tmp84_) - tmp68_ * tmp43_ + tmp69_ * tmp42_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp44_ + tmp71_ * tmp46_ + tmp72_ * tmp47_ + tmp73_ * tmp48_ + tmp74_ * tmp85_ + tmp76_ * tmp86_ + tmp78_ * tmp87_ + tmp80_ * tmp88_ + tmp82_ * tmp89_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp66_) * (tmp52_) + tmp13_ * (tmp50_) + tmp14_ * tmp90_) - tmp68_ * tmp54_ + tmp69_ * tmp53_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp55_ + tmp71_ * tmp57_ + tmp72_ * tmp58_ + tmp73_ * tmp59_ + tmp74_ * tmp91_ + tmp76_ * tmp92_ + tmp78_ * tmp93_ + tmp80_ * tmp94_ + tmp82_ * tmp95_) * mLocPolyn4_State_0_0);

}

void cREgDistDxDy_Polyn4::ComputeValDeriv()
{
   double tmp0_ = mLocRegDistxy1_x - mLocPolyn4_State_1_0;
   double tmp1_ = (tmp0_) / mLocPolyn4_State_0_0;
   double tmp2_ = mLocRegDistxy1_y - mLocPolyn4_State_2_0;
   double tmp3_ = (tmp2_) / mLocPolyn4_State_0_0;
   double tmp4_ = (tmp1_) * (tmp1_);
   double tmp5_ = (tmp3_) * (tmp3_);
   double tmp6_ = tmp4_ * (tmp1_);
   double tmp7_ = (tmp3_) * (tmp1_);
   double tmp8_ = tmp7_ * (tmp1_);
   double tmp9_ = tmp5_ * (tmp1_);
   double tmp10_ = (tmp3_) * tmp5_;
   double tmp11_ = mCompCoord[3];
   double tmp12_ = 1 + tmp11_;
   double tmp13_ = mCompCoord[4];
   double tmp14_ = mCompCoord[5];
   double tmp15_ = tmp14_ * 2;
   double tmp16_ = mLocRegDistxy2_x - mLocPolyn4_State_1_0;
   double tmp17_ = (tmp16_) / mLocPolyn4_State_0_0;
   double tmp18_ = mCompCoord[6];
   double tmp19_ = mLocRegDistxy2_y - mLocPolyn4_State_2_0;
   double tmp20_ = (tmp19_) / mLocPolyn4_State_0_0;
   double tmp21_ = mCompCoord[7];
   double tmp22_ = mCompCoord[9];
   double tmp23_ = (tmp17_) * (tmp17_);
   double tmp24_ = mCompCoord[10];
   double tmp25_ = mCompCoord[11];
   double tmp26_ = (tmp20_) * (tmp20_);
   double tmp27_ = mCompCoord[12];
   double tmp28_ = mCompCoord[17];
   double tmp29_ = tmp23_ * (tmp17_);
   double tmp30_ = mCompCoord[18];
   double tmp31_ = (tmp20_) * (tmp17_);
   double tmp32_ = tmp31_ * (tmp17_);
   double tmp33_ = mCompCoord[19];
   double tmp34_ = tmp26_ * (tmp17_);
   double tmp35_ = mCompCoord[20];
   double tmp36_ = (tmp20_) * tmp26_;
   double tmp37_ = mCompCoord[21];
   double tmp38_ = mLocRegDistxy3_x - mLocPolyn4_State_1_0;
   double tmp39_ = (tmp38_) / mLocPolyn4_State_0_0;
   double tmp40_ = mLocRegDistxy3_y - mLocPolyn4_State_2_0;
   double tmp41_ = (tmp40_) / mLocPolyn4_State_0_0;
   double tmp42_ = (tmp39_) * (tmp39_);
   double tmp43_ = (tmp41_) * (tmp41_);
   double tmp44_ = tmp42_ * (tmp39_);
   double tmp45_ = (tmp41_) * (tmp39_);
   double tmp46_ = tmp45_ * (tmp39_);
   double tmp47_ = tmp43_ * (tmp39_);
   double tmp48_ = (tmp41_) * tmp43_;
   double tmp49_ = mLocRegDistxy4_x - mLocPolyn4_State_1_0;
   double tmp50_ = (tmp49_) / mLocPolyn4_State_0_0;
   double tmp51_ = mLocRegDistxy4_y - mLocPolyn4_State_2_0;
   double tmp52_ = (tmp51_) / mLocPolyn4_State_0_0;
   double tmp53_ = (tmp50_) * (tmp50_);
   double tmp54_ = (tmp52_) * (tmp52_);
   double tmp55_ = tmp53_ * (tmp50_);
   double tmp56_ = (tmp52_) * (tmp50_);
   double tmp57_ = tmp56_ * (tmp50_);
   double tmp58_ = tmp54_ * (tmp50_);
   double tmp59_ = (tmp52_) * tmp54_;
   double tmp60_ = (tmp1_) * (tmp3_);
   double tmp61_ = (tmp17_) * (tmp20_);
   double tmp62_ = (tmp39_) * (tmp41_);
   double tmp63_ = (tmp50_) * (tmp52_);
   double tmp64_ = tmp6_ * (tmp1_);
   double tmp65_ = tmp29_ * (tmp17_);
   double tmp66_ = tmp44_ * (tmp39_);
   double tmp67_ = tmp55_ * (tmp50_);
   double tmp68_ = tmp8_ * (tmp1_);
   double tmp69_ = tmp32_ * (tmp17_);
   double tmp70_ = tmp46_ * (tmp39_);
   double tmp71_ = tmp57_ * (tmp50_);
   double tmp72_ = tmp9_ * (tmp1_);
   double tmp73_ = tmp34_ * (tmp17_);
   double tmp74_ = tmp47_ * (tmp39_);
   double tmp75_ = tmp58_ * (tmp50_);
   double tmp76_ = tmp10_ * (tmp1_);
   double tmp77_ = tmp36_ * (tmp17_);
   double tmp78_ = tmp48_ * (tmp39_);
   double tmp79_ = tmp59_ * (tmp50_);
   double tmp80_ = (tmp3_) * tmp10_;
   double tmp81_ = (tmp20_) * tmp36_;
   double tmp82_ = (tmp41_) * tmp48_;
   double tmp83_ = (tmp52_) * tmp59_;
   double tmp84_ = 1 - tmp11_;
   double tmp85_ = tmp18_ * 2;
   double tmp86_ = mCompCoord[8];
   double tmp87_ = mCompCoord[13];
   double tmp88_ = mCompCoord[14];
   double tmp89_ = mCompCoord[15];
   double tmp90_ = mCompCoord[16];
   double tmp91_ = mCompCoord[22];
   double tmp92_ = mCompCoord[23];
   double tmp93_ = mCompCoord[24];
   double tmp94_ = mCompCoord[25];
   double tmp95_ = mCompCoord[26];
   double tmp96_ = -(1);
   double tmp97_ = (tmp1_) * mLocPolyn4_State_0_0;
   double tmp98_ = (tmp17_) * mLocPolyn4_State_0_0;
   double tmp99_ = tmp97_ + tmp98_;
   double tmp100_ = (tmp39_) * mLocPolyn4_State_0_0;
   double tmp101_ = (tmp50_) * mLocPolyn4_State_0_0;
   double tmp102_ = tmp100_ + tmp101_;
   double tmp103_ = (tmp99_) - (tmp102_);
   double tmp104_ = tmp60_ * mLocPolyn4_State_0_0;
   double tmp105_ = tmp61_ * mLocPolyn4_State_0_0;
   double tmp106_ = tmp104_ + tmp105_;
   double tmp107_ = tmp62_ * mLocPolyn4_State_0_0;
   double tmp108_ = tmp63_ * mLocPolyn4_State_0_0;
   double tmp109_ = tmp107_ + tmp108_;
   double tmp110_ = (tmp106_) - (tmp109_);
   double tmp111_ = tmp6_ * mLocPolyn4_State_0_0;
   double tmp112_ = tmp29_ * mLocPolyn4_State_0_0;
   double tmp113_ = tmp111_ + tmp112_;
   double tmp114_ = tmp44_ * mLocPolyn4_State_0_0;
   double tmp115_ = tmp55_ * mLocPolyn4_State_0_0;
   double tmp116_ = tmp114_ + tmp115_;
   double tmp117_ = (tmp113_) - (tmp116_);
   double tmp118_ = tmp8_ * mLocPolyn4_State_0_0;
   double tmp119_ = tmp32_ * mLocPolyn4_State_0_0;
   double tmp120_ = tmp118_ + tmp119_;
   double tmp121_ = tmp46_ * mLocPolyn4_State_0_0;
   double tmp122_ = tmp57_ * mLocPolyn4_State_0_0;
   double tmp123_ = tmp121_ + tmp122_;
   double tmp124_ = (tmp120_) - (tmp123_);
   double tmp125_ = tmp9_ * mLocPolyn4_State_0_0;
   double tmp126_ = tmp34_ * mLocPolyn4_State_0_0;
   double tmp127_ = tmp125_ + tmp126_;
   double tmp128_ = tmp47_ * mLocPolyn4_State_0_0;
   double tmp129_ = tmp58_ * mLocPolyn4_State_0_0;
   double tmp130_ = tmp128_ + tmp129_;
   double tmp131_ = (tmp127_) - (tmp130_);
   double tmp132_ = tmp10_ * mLocPolyn4_State_0_0;
   double tmp133_ = tmp36_ * mLocPolyn4_State_0_0;
   double tmp134_ = tmp132_ + tmp133_;
   double tmp135_ = tmp48_ * mLocPolyn4_State_0_0;
   double tmp136_ = tmp59_ * mLocPolyn4_State_0_0;
   double tmp137_ = tmp135_ + tmp136_;
   double tmp138_ = (tmp134_) - (tmp137_);
   double tmp139_ = tmp64_ * mLocPolyn4_State_0_0;
   double tmp140_ = tmp65_ * mLocPolyn4_State_0_0;
   double tmp141_ = tmp139_ + tmp140_;
   double tmp142_ = tmp66_ * mLocPolyn4_State_0_0;
   double tmp143_ = tmp67_ * mLocPolyn4_State_0_0;
   double tmp144_ = tmp142_ + tmp143_;
   double tmp145_ = (tmp141_) - (tmp144_);
   double tmp146_ = tmp68_ * mLocPolyn4_State_0_0;
   double tmp147_ = tmp69_ * mLocPolyn4_State_0_0;
   double tmp148_ = tmp146_ + tmp147_;
   double tmp149_ = tmp70_ * mLocPolyn4_State_0_0;
   double tmp150_ = tmp71_ * mLocPolyn4_State_0_0;
   double tmp151_ = tmp149_ + tmp150_;
   double tmp152_ = (tmp148_) - (tmp151_);
   double tmp153_ = tmp72_ * mLocPolyn4_State_0_0;
   double tmp154_ = tmp73_ * mLocPolyn4_State_0_0;
   double tmp155_ = tmp153_ + tmp154_;
   double tmp156_ = tmp74_ * mLocPolyn4_State_0_0;
   double tmp157_ = tmp75_ * mLocPolyn4_State_0_0;
   double tmp158_ = tmp156_ + tmp157_;
   double tmp159_ = (tmp155_) - (tmp158_);
   double tmp160_ = tmp76_ * mLocPolyn4_State_0_0;
   double tmp161_ = tmp77_ * mLocPolyn4_State_0_0;
   double tmp162_ = tmp160_ + tmp161_;
   double tmp163_ = tmp78_ * mLocPolyn4_State_0_0;
   double tmp164_ = tmp79_ * mLocPolyn4_State_0_0;
   double tmp165_ = tmp163_ + tmp164_;
   double tmp166_ = (tmp162_) - (tmp165_);
   double tmp167_ = tmp80_ * mLocPolyn4_State_0_0;
   double tmp168_ = tmp81_ * mLocPolyn4_State_0_0;
   double tmp169_ = tmp167_ + tmp168_;
   double tmp170_ = tmp82_ * mLocPolyn4_State_0_0;
   double tmp171_ = tmp83_ * mLocPolyn4_State_0_0;
   double tmp172_ = tmp170_ + tmp171_;
   double tmp173_ = (tmp169_) - (tmp172_);

  mVal[0] = (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp1_) + tmp13_ * (tmp3_)) - tmp15_ * tmp4_ + tmp18_ * tmp60_ + tmp21_ * tmp5_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp6_ + tmp24_ * tmp8_ + tmp25_ * tmp9_ + tmp27_ * tmp10_ + tmp28_ * tmp64_ + tmp30_ * tmp68_ + tmp33_ * tmp72_ + tmp35_ * tmp76_ + tmp37_ * tmp80_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp17_) + tmp13_ * (tmp20_)) - tmp15_ * tmp23_ + tmp18_ * tmp61_ + tmp21_ * tmp26_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp29_ + tmp24_ * tmp32_ + tmp25_ * tmp34_ + tmp27_ * tmp36_ + tmp28_ * tmp65_ + tmp30_ * tmp69_ + tmp33_ * tmp73_ + tmp35_ * tmp77_ + tmp37_ * tmp81_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp39_) + tmp13_ * (tmp41_)) - tmp15_ * tmp42_ + tmp18_ * tmp62_ + tmp21_ * tmp43_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp44_ + tmp24_ * tmp46_ + tmp25_ * tmp47_ + tmp27_ * tmp48_ + tmp28_ * tmp66_ + tmp30_ * tmp70_ + tmp33_ * tmp74_ + tmp35_ * tmp78_ + tmp37_ * tmp82_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp50_) + tmp13_ * (tmp52_)) - tmp15_ * tmp53_ + tmp18_ * tmp63_ + tmp21_ * tmp54_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp55_ + tmp24_ * tmp57_ + tmp25_ * tmp58_ + tmp27_ * tmp59_ + tmp28_ * tmp67_ + tmp30_ * tmp71_ + tmp33_ * tmp75_ + tmp35_ * tmp79_ + tmp37_ * tmp83_) * mLocPolyn4_State_0_0);

  mCompDer[0][0] = 0;
  mCompDer[0][1] = 0;
  mCompDer[0][2] = 0;
  mCompDer[0][3] = tmp103_;
  mCompDer[0][4] = ((tmp3_) * mLocPolyn4_State_0_0 + (tmp20_) * mLocPolyn4_State_0_0) - ((tmp41_) * mLocPolyn4_State_0_0 + (tmp52_) * mLocPolyn4_State_0_0);
  mCompDer[0][5] = (-(2 * tmp4_) * mLocPolyn4_State_0_0 + -(2 * tmp23_) * mLocPolyn4_State_0_0) - (-(2 * tmp42_) * mLocPolyn4_State_0_0 + -(2 * tmp53_) * mLocPolyn4_State_0_0);
  mCompDer[0][6] = tmp110_;
  mCompDer[0][7] = (tmp5_ * mLocPolyn4_State_0_0 + tmp26_ * mLocPolyn4_State_0_0) - (tmp43_ * mLocPolyn4_State_0_0 + tmp54_ * mLocPolyn4_State_0_0);
  mCompDer[0][8] = 0;
  mCompDer[0][9] = tmp117_;
  mCompDer[0][10] = tmp124_;
  mCompDer[0][11] = tmp131_;
  mCompDer[0][12] = tmp138_;
  mCompDer[0][13] = 0;
  mCompDer[0][14] = 0;
  mCompDer[0][15] = 0;
  mCompDer[0][16] = 0;
  mCompDer[0][17] = tmp145_;
  mCompDer[0][18] = tmp152_;
  mCompDer[0][19] = tmp159_;
  mCompDer[0][20] = tmp166_;
  mCompDer[0][21] = tmp173_;
  mCompDer[0][22] = 0;
  mCompDer[0][23] = 0;
  mCompDer[0][24] = 0;
  mCompDer[0][25] = 0;
  mCompDer[0][26] = 0;
  mVal[1] = (mLocPolyn4_State_2_0 + (((tmp84_) * (tmp3_) + tmp13_ * (tmp1_) + tmp14_ * tmp60_) - tmp85_ * tmp5_ + tmp86_ * tmp4_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp6_ + tmp88_ * tmp8_ + tmp89_ * tmp9_ + tmp90_ * tmp10_ + tmp91_ * tmp64_ + tmp92_ * tmp68_ + tmp93_ * tmp72_ + tmp94_ * tmp76_ + tmp95_ * tmp80_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp84_) * (tmp20_) + tmp13_ * (tmp17_) + tmp14_ * tmp61_) - tmp85_ * tmp26_ + tmp86_ * tmp23_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp29_ + tmp88_ * tmp32_ + tmp89_ * tmp34_ + tmp90_ * tmp36_ + tmp91_ * tmp65_ + tmp92_ * tmp69_ + tmp93_ * tmp73_ + tmp94_ * tmp77_ + tmp95_ * tmp81_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_2_0 + (((tmp84_) * (tmp41_) + tmp13_ * (tmp39_) + tmp14_ * tmp62_) - tmp85_ * tmp43_ + tmp86_ * tmp42_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp44_ + tmp88_ * tmp46_ + tmp89_ * tmp47_ + tmp90_ * tmp48_ + tmp91_ * tmp66_ + tmp92_ * tmp70_ + tmp93_ * tmp74_ + tmp94_ * tmp78_ + tmp95_ * tmp82_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp84_) * (tmp52_) + tmp13_ * (tmp50_) + tmp14_ * tmp63_) - tmp85_ * tmp54_ + tmp86_ * tmp53_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp55_ + tmp88_ * tmp57_ + tmp89_ * tmp58_ + tmp90_ * tmp59_ + tmp91_ * tmp67_ + tmp92_ * tmp71_ + tmp93_ * tmp75_ + tmp94_ * tmp79_ + tmp95_ * tmp83_) * mLocPolyn4_State_0_0);

  mCompDer[1][0] = 0;
  mCompDer[1][1] = 0;
  mCompDer[1][2] = 0;
  mCompDer[1][3] = (tmp96_ * (tmp3_) * mLocPolyn4_State_0_0 + tmp96_ * (tmp20_) * mLocPolyn4_State_0_0) - (tmp96_ * (tmp41_) * mLocPolyn4_State_0_0 + tmp96_ * (tmp52_) * mLocPolyn4_State_0_0);
  mCompDer[1][4] = tmp103_;
  mCompDer[1][5] = tmp110_;
  mCompDer[1][6] = (-(2 * tmp5_) * mLocPolyn4_State_0_0 + -(2 * tmp26_) * mLocPolyn4_State_0_0) - (-(2 * tmp43_) * mLocPolyn4_State_0_0 + -(2 * tmp54_) * mLocPolyn4_State_0_0);
  mCompDer[1][7] = 0;
  mCompDer[1][8] = (tmp4_ * mLocPolyn4_State_0_0 + tmp23_ * mLocPolyn4_State_0_0) - (tmp42_ * mLocPolyn4_State_0_0 + tmp53_ * mLocPolyn4_State_0_0);
  mCompDer[1][9] = 0;
  mCompDer[1][10] = 0;
  mCompDer[1][11] = 0;
  mCompDer[1][12] = 0;
  mCompDer[1][13] = tmp117_;
  mCompDer[1][14] = tmp124_;
  mCompDer[1][15] = tmp131_;
  mCompDer[1][16] = tmp138_;
  mCompDer[1][17] = 0;
  mCompDer[1][18] = 0;
  mCompDer[1][19] = 0;
  mCompDer[1][20] = 0;
  mCompDer[1][21] = 0;
  mCompDer[1][22] = tmp145_;
  mCompDer[1][23] = tmp152_;
  mCompDer[1][24] = tmp159_;
  mCompDer[1][25] = tmp166_;
  mCompDer[1][26] = tmp173_;
}

void cREgDistDxDy_Polyn4::ComputeValDerivHessian()
{
  ELISE_ASSERT(false,"Foncteur cREgDistDxDy_Polyn4 Has no Der Sec");
}

void cREgDistDxDy_Polyn4::SetPolyn4_State_0_0(double aVal){ mLocPolyn4_State_0_0 = aVal;}
void cREgDistDxDy_Polyn4::SetPolyn4_State_1_0(double aVal){ mLocPolyn4_State_1_0 = aVal;}
void cREgDistDxDy_Polyn4::SetPolyn4_State_2_0(double aVal){ mLocPolyn4_State_2_0 = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy1_x(double aVal){ mLocRegDistxy1_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy1_y(double aVal){ mLocRegDistxy1_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy2_x(double aVal){ mLocRegDistxy2_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy2_y(double aVal){ mLocRegDistxy2_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy3_x(double aVal){ mLocRegDistxy3_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy3_y(double aVal){ mLocRegDistxy3_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy4_x(double aVal){ mLocRegDistxy4_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy4_y(double aVal){ mLocRegDistxy4_y = aVal;}

double * cREgDistDxDy_Polyn4::AdrVarLocFromString(const std::string & aName)
{
   if (aName == "Polyn4_State_0_0") return & mLocPolyn4_State_0_0;
   if (aName == "Polyn4_State_1_0") return & mLocPolyn4_State_1_0;
   if (aName == "Polyn4_State_2_0") return & mLocPolyn4_State_2_0;
   if (aName == "RegDistxy1_x") return & mLocRegDistxy1_x;
   if (aName == "RegDistxy1_y") return & mLocRegDistxy1_y;
   if (aName == "RegDistxy2_x") return & mLocRegDistxy2_x;
   if (aName == "RegDistxy2_y") return & mLocRegDistxy2_y;
   if (aName == "RegDistxy3_x") return & mLocRegDistxy3_x;
   if (aName == "RegDistxy3_y") return & mLocRegDistxy3_y;
   if (aName == "RegDistxy4_x") return & mLocRegDistxy4_x;
   if (aName == "RegDistxy4_y") return & mLocRegDistxy4_y;
   return 0;
}

cElCompiledFonc::cAutoAddEntry cREgDistDxDy_Polyn4::mTheAuto("cREgDistDxDy_Polyn4",cREgDistDxDy_Polyn4::Alloc);

cElCompiledFonc *  cREgDistDxDy_Polyn4::Alloc()
{  return new cREgDistDxDy_Polyn4();
}
// File Automatically generated by eLiSe
#include "StdAfx.h"
#include "cREgDistDxDy_Polyn4.h"


cREgDistDxDy_Polyn4::cREgDistDxDy_Polyn4():
    cElCompiledFonc(2)
{
   AddIntRef (cIncIntervale("Intr",0,27));
   Close(false);
}



void cREgDistDxDy_Polyn4::ComputeVal()
{
   double tmp0_ = mLocRegDistxy1_x - mLocPolyn4_State_1_0;
   double tmp1_ = (tmp0_) / mLocPolyn4_State_0_0;
   double tmp2_ = mLocRegDistxy1_y - mLocPolyn4_State_2_0;
   double tmp3_ = (tmp2_) / mLocPolyn4_State_0_0;
   double tmp4_ = (tmp1_) * (tmp1_);
   double tmp5_ = (tmp3_) * (tmp3_);
   double tmp6_ = tmp4_ * (tmp1_);
   double tmp7_ = (tmp3_) * (tmp1_);
   double tmp8_ = tmp7_ * (tmp1_);
   double tmp9_ = tmp5_ * (tmp1_);
   double tmp10_ = (tmp3_) * tmp5_;
   double tmp11_ = mCompCoord[3];
   double tmp12_ = 1 + tmp11_;
   double tmp13_ = mCompCoord[4];
   double tmp14_ = mCompCoord[5];
   double tmp15_ = tmp14_ * 2;
   double tmp16_ = mLocRegDistxy2_x - mLocPolyn4_State_1_0;
   double tmp17_ = (tmp16_) / mLocPolyn4_State_0_0;
   double tmp18_ = mCompCoord[6];
   double tmp19_ = mLocRegDistxy2_y - mLocPolyn4_State_2_0;
   double tmp20_ = (tmp19_) / mLocPolyn4_State_0_0;
   double tmp21_ = mCompCoord[7];
   double tmp22_ = mCompCoord[9];
   double tmp23_ = (tmp17_) * (tmp17_);
   double tmp24_ = mCompCoord[10];
   double tmp25_ = mCompCoord[11];
   double tmp26_ = (tmp20_) * (tmp20_);
   double tmp27_ = mCompCoord[12];
   double tmp28_ = mCompCoord[17];
   double tmp29_ = tmp23_ * (tmp17_);
   double tmp30_ = mCompCoord[18];
   double tmp31_ = (tmp20_) * (tmp17_);
   double tmp32_ = tmp31_ * (tmp17_);
   double tmp33_ = mCompCoord[19];
   double tmp34_ = tmp26_ * (tmp17_);
   double tmp35_ = mCompCoord[20];
   double tmp36_ = (tmp20_) * tmp26_;
   double tmp37_ = mCompCoord[21];
   double tmp38_ = mLocRegDistxy3_x - mLocPolyn4_State_1_0;
   double tmp39_ = (tmp38_) / mLocPolyn4_State_0_0;
   double tmp40_ = mLocRegDistxy3_y - mLocPolyn4_State_2_0;
   double tmp41_ = (tmp40_) / mLocPolyn4_State_0_0;
   double tmp42_ = (tmp39_) * (tmp39_);
   double tmp43_ = (tmp41_) * (tmp41_);
   double tmp44_ = tmp42_ * (tmp39_);
   double tmp45_ = (tmp41_) * (tmp39_);
   double tmp46_ = tmp45_ * (tmp39_);
   double tmp47_ = tmp43_ * (tmp39_);
   double tmp48_ = (tmp41_) * tmp43_;
   double tmp49_ = mLocRegDistxy4_x - mLocPolyn4_State_1_0;
   double tmp50_ = (tmp49_) / mLocPolyn4_State_0_0;
   double tmp51_ = mLocRegDistxy4_y - mLocPolyn4_State_2_0;
   double tmp52_ = (tmp51_) / mLocPolyn4_State_0_0;
   double tmp53_ = (tmp50_) * (tmp50_);
   double tmp54_ = (tmp52_) * (tmp52_);
   double tmp55_ = tmp53_ * (tmp50_);
   double tmp56_ = (tmp52_) * (tmp50_);
   double tmp57_ = tmp56_ * (tmp50_);
   double tmp58_ = tmp54_ * (tmp50_);
   double tmp59_ = (tmp52_) * tmp54_;
   double tmp60_ = (tmp1_) * (tmp3_);
   double tmp61_ = tmp6_ * (tmp1_);
   double tmp62_ = tmp8_ * (tmp1_);
   double tmp63_ = tmp9_ * (tmp1_);
   double tmp64_ = tmp10_ * (tmp1_);
   double tmp65_ = (tmp3_) * tmp10_;
   double tmp66_ = 1 - tmp11_;
   double tmp67_ = (tmp17_) * (tmp20_);
   double tmp68_ = tmp18_ * 2;
   double tmp69_ = mCompCoord[8];
   double tmp70_ = mCompCoord[13];
   double tmp71_ = mCompCoord[14];
   double tmp72_ = mCompCoord[15];
   double tmp73_ = mCompCoord[16];
   double tmp74_ = mCompCoord[22];
   double tmp75_ = tmp29_ * (tmp17_);
   double tmp76_ = mCompCoord[23];
   double tmp77_ = tmp32_ * (tmp17_);
   double tmp78_ = mCompCoord[24];
   double tmp79_ = tmp34_ * (tmp17_);
   double tmp80_ = mCompCoord[25];
   double tmp81_ = tmp36_ * (tmp17_);
   double tmp82_ = mCompCoord[26];
   double tmp83_ = (tmp20_) * tmp36_;
   double tmp84_ = (tmp39_) * (tmp41_);
   double tmp85_ = tmp44_ * (tmp39_);
   double tmp86_ = tmp46_ * (tmp39_);
   double tmp87_ = tmp47_ * (tmp39_);
   double tmp88_ = tmp48_ * (tmp39_);
   double tmp89_ = (tmp41_) * tmp48_;
   double tmp90_ = (tmp50_) * (tmp52_);
   double tmp91_ = tmp55_ * (tmp50_);
   double tmp92_ = tmp57_ * (tmp50_);
   double tmp93_ = tmp58_ * (tmp50_);
   double tmp94_ = tmp59_ * (tmp50_);
   double tmp95_ = (tmp52_) * tmp59_;

  mVal[0] = (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp1_) + tmp13_ * (tmp3_)) - tmp15_ * tmp4_ + tmp18_ * tmp60_ + tmp21_ * tmp5_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp6_ + tmp24_ * tmp8_ + tmp25_ * tmp9_ + tmp27_ * tmp10_ + tmp28_ * tmp61_ + tmp30_ * tmp62_ + tmp33_ * tmp63_ + tmp35_ * tmp64_ + tmp37_ * tmp65_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp17_) + tmp13_ * (tmp20_)) - tmp15_ * tmp23_ + tmp18_ * tmp67_ + tmp21_ * tmp26_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp29_ + tmp24_ * tmp32_ + tmp25_ * tmp34_ + tmp27_ * tmp36_ + tmp28_ * tmp75_ + tmp30_ * tmp77_ + tmp33_ * tmp79_ + tmp35_ * tmp81_ + tmp37_ * tmp83_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp39_) + tmp13_ * (tmp41_)) - tmp15_ * tmp42_ + tmp18_ * tmp84_ + tmp21_ * tmp43_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp44_ + tmp24_ * tmp46_ + tmp25_ * tmp47_ + tmp27_ * tmp48_ + tmp28_ * tmp85_ + tmp30_ * tmp86_ + tmp33_ * tmp87_ + tmp35_ * tmp88_ + tmp37_ * tmp89_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp50_) + tmp13_ * (tmp52_)) - tmp15_ * tmp53_ + tmp18_ * tmp90_ + tmp21_ * tmp54_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp55_ + tmp24_ * tmp57_ + tmp25_ * tmp58_ + tmp27_ * tmp59_ + tmp28_ * tmp91_ + tmp30_ * tmp92_ + tmp33_ * tmp93_ + tmp35_ * tmp94_ + tmp37_ * tmp95_) * mLocPolyn4_State_0_0);

  mVal[1] = (mLocPolyn4_State_2_0 + (((tmp66_) * (tmp3_) + tmp13_ * (tmp1_) + tmp14_ * tmp60_) - tmp68_ * tmp5_ + tmp69_ * tmp4_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp6_ + tmp71_ * tmp8_ + tmp72_ * tmp9_ + tmp73_ * tmp10_ + tmp74_ * tmp61_ + tmp76_ * tmp62_ + tmp78_ * tmp63_ + tmp80_ * tmp64_ + tmp82_ * tmp65_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp66_) * (tmp20_) + tmp13_ * (tmp17_) + tmp14_ * tmp67_) - tmp68_ * tmp26_ + tmp69_ * tmp23_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp29_ + tmp71_ * tmp32_ + tmp72_ * tmp34_ + tmp73_ * tmp36_ + tmp74_ * tmp75_ + tmp76_ * tmp77_ + tmp78_ * tmp79_ + tmp80_ * tmp81_ + tmp82_ * tmp83_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_2_0 + (((tmp66_) * (tmp41_) + tmp13_ * (tmp39_) + tmp14_ * tmp84_) - tmp68_ * tmp43_ + tmp69_ * tmp42_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp44_ + tmp71_ * tmp46_ + tmp72_ * tmp47_ + tmp73_ * tmp48_ + tmp74_ * tmp85_ + tmp76_ * tmp86_ + tmp78_ * tmp87_ + tmp80_ * tmp88_ + tmp82_ * tmp89_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp66_) * (tmp52_) + tmp13_ * (tmp50_) + tmp14_ * tmp90_) - tmp68_ * tmp54_ + tmp69_ * tmp53_) * mLocPolyn4_State_0_0 + (tmp70_ * tmp55_ + tmp71_ * tmp57_ + tmp72_ * tmp58_ + tmp73_ * tmp59_ + tmp74_ * tmp91_ + tmp76_ * tmp92_ + tmp78_ * tmp93_ + tmp80_ * tmp94_ + tmp82_ * tmp95_) * mLocPolyn4_State_0_0);

}


void cREgDistDxDy_Polyn4::ComputeValDeriv()
{
   double tmp0_ = mLocRegDistxy1_x - mLocPolyn4_State_1_0;
   double tmp1_ = (tmp0_) / mLocPolyn4_State_0_0;
   double tmp2_ = mLocRegDistxy1_y - mLocPolyn4_State_2_0;
   double tmp3_ = (tmp2_) / mLocPolyn4_State_0_0;
   double tmp4_ = (tmp1_) * (tmp1_);
   double tmp5_ = (tmp3_) * (tmp3_);
   double tmp6_ = tmp4_ * (tmp1_);
   double tmp7_ = (tmp3_) * (tmp1_);
   double tmp8_ = tmp7_ * (tmp1_);
   double tmp9_ = tmp5_ * (tmp1_);
   double tmp10_ = (tmp3_) * tmp5_;
   double tmp11_ = mCompCoord[3];
   double tmp12_ = 1 + tmp11_;
   double tmp13_ = mCompCoord[4];
   double tmp14_ = mCompCoord[5];
   double tmp15_ = tmp14_ * 2;
   double tmp16_ = mLocRegDistxy2_x - mLocPolyn4_State_1_0;
   double tmp17_ = (tmp16_) / mLocPolyn4_State_0_0;
   double tmp18_ = mCompCoord[6];
   double tmp19_ = mLocRegDistxy2_y - mLocPolyn4_State_2_0;
   double tmp20_ = (tmp19_) / mLocPolyn4_State_0_0;
   double tmp21_ = mCompCoord[7];
   double tmp22_ = mCompCoord[9];
   double tmp23_ = (tmp17_) * (tmp17_);
   double tmp24_ = mCompCoord[10];
   double tmp25_ = mCompCoord[11];
   double tmp26_ = (tmp20_) * (tmp20_);
   double tmp27_ = mCompCoord[12];
   double tmp28_ = mCompCoord[17];
   double tmp29_ = tmp23_ * (tmp17_);
   double tmp30_ = mCompCoord[18];
   double tmp31_ = (tmp20_) * (tmp17_);
   double tmp32_ = tmp31_ * (tmp17_);
   double tmp33_ = mCompCoord[19];
   double tmp34_ = tmp26_ * (tmp17_);
   double tmp35_ = mCompCoord[20];
   double tmp36_ = (tmp20_) * tmp26_;
   double tmp37_ = mCompCoord[21];
   double tmp38_ = mLocRegDistxy3_x - mLocPolyn4_State_1_0;
   double tmp39_ = (tmp38_) / mLocPolyn4_State_0_0;
   double tmp40_ = mLocRegDistxy3_y - mLocPolyn4_State_2_0;
   double tmp41_ = (tmp40_) / mLocPolyn4_State_0_0;
   double tmp42_ = (tmp39_) * (tmp39_);
   double tmp43_ = (tmp41_) * (tmp41_);
   double tmp44_ = tmp42_ * (tmp39_);
   double tmp45_ = (tmp41_) * (tmp39_);
   double tmp46_ = tmp45_ * (tmp39_);
   double tmp47_ = tmp43_ * (tmp39_);
   double tmp48_ = (tmp41_) * tmp43_;
   double tmp49_ = mLocRegDistxy4_x - mLocPolyn4_State_1_0;
   double tmp50_ = (tmp49_) / mLocPolyn4_State_0_0;
   double tmp51_ = mLocRegDistxy4_y - mLocPolyn4_State_2_0;
   double tmp52_ = (tmp51_) / mLocPolyn4_State_0_0;
   double tmp53_ = (tmp50_) * (tmp50_);
   double tmp54_ = (tmp52_) * (tmp52_);
   double tmp55_ = tmp53_ * (tmp50_);
   double tmp56_ = (tmp52_) * (tmp50_);
   double tmp57_ = tmp56_ * (tmp50_);
   double tmp58_ = tmp54_ * (tmp50_);
   double tmp59_ = (tmp52_) * tmp54_;
   double tmp60_ = (tmp1_) * (tmp3_);
   double tmp61_ = (tmp17_) * (tmp20_);
   double tmp62_ = (tmp39_) * (tmp41_);
   double tmp63_ = (tmp50_) * (tmp52_);
   double tmp64_ = tmp6_ * (tmp1_);
   double tmp65_ = tmp29_ * (tmp17_);
   double tmp66_ = tmp44_ * (tmp39_);
   double tmp67_ = tmp55_ * (tmp50_);
   double tmp68_ = tmp8_ * (tmp1_);
   double tmp69_ = tmp32_ * (tmp17_);
   double tmp70_ = tmp46_ * (tmp39_);
   double tmp71_ = tmp57_ * (tmp50_);
   double tmp72_ = tmp9_ * (tmp1_);
   double tmp73_ = tmp34_ * (tmp17_);
   double tmp74_ = tmp47_ * (tmp39_);
   double tmp75_ = tmp58_ * (tmp50_);
   double tmp76_ = tmp10_ * (tmp1_);
   double tmp77_ = tmp36_ * (tmp17_);
   double tmp78_ = tmp48_ * (tmp39_);
   double tmp79_ = tmp59_ * (tmp50_);
   double tmp80_ = (tmp3_) * tmp10_;
   double tmp81_ = (tmp20_) * tmp36_;
   double tmp82_ = (tmp41_) * tmp48_;
   double tmp83_ = (tmp52_) * tmp59_;
   double tmp84_ = 1 - tmp11_;
   double tmp85_ = tmp18_ * 2;
   double tmp86_ = mCompCoord[8];
   double tmp87_ = mCompCoord[13];
   double tmp88_ = mCompCoord[14];
   double tmp89_ = mCompCoord[15];
   double tmp90_ = mCompCoord[16];
   double tmp91_ = mCompCoord[22];
   double tmp92_ = mCompCoord[23];
   double tmp93_ = mCompCoord[24];
   double tmp94_ = mCompCoord[25];
   double tmp95_ = mCompCoord[26];
   double tmp96_ = -(1);
   double tmp97_ = (tmp1_) * mLocPolyn4_State_0_0;
   double tmp98_ = (tmp17_) * mLocPolyn4_State_0_0;
   double tmp99_ = tmp97_ + tmp98_;
   double tmp100_ = (tmp39_) * mLocPolyn4_State_0_0;
   double tmp101_ = (tmp50_) * mLocPolyn4_State_0_0;
   double tmp102_ = tmp100_ + tmp101_;
   double tmp103_ = (tmp99_) - (tmp102_);
   double tmp104_ = tmp60_ * mLocPolyn4_State_0_0;
   double tmp105_ = tmp61_ * mLocPolyn4_State_0_0;
   double tmp106_ = tmp104_ + tmp105_;
   double tmp107_ = tmp62_ * mLocPolyn4_State_0_0;
   double tmp108_ = tmp63_ * mLocPolyn4_State_0_0;
   double tmp109_ = tmp107_ + tmp108_;
   double tmp110_ = (tmp106_) - (tmp109_);
   double tmp111_ = tmp6_ * mLocPolyn4_State_0_0;
   double tmp112_ = tmp29_ * mLocPolyn4_State_0_0;
   double tmp113_ = tmp111_ + tmp112_;
   double tmp114_ = tmp44_ * mLocPolyn4_State_0_0;
   double tmp115_ = tmp55_ * mLocPolyn4_State_0_0;
   double tmp116_ = tmp114_ + tmp115_;
   double tmp117_ = (tmp113_) - (tmp116_);
   double tmp118_ = tmp8_ * mLocPolyn4_State_0_0;
   double tmp119_ = tmp32_ * mLocPolyn4_State_0_0;
   double tmp120_ = tmp118_ + tmp119_;
   double tmp121_ = tmp46_ * mLocPolyn4_State_0_0;
   double tmp122_ = tmp57_ * mLocPolyn4_State_0_0;
   double tmp123_ = tmp121_ + tmp122_;
   double tmp124_ = (tmp120_) - (tmp123_);
   double tmp125_ = tmp9_ * mLocPolyn4_State_0_0;
   double tmp126_ = tmp34_ * mLocPolyn4_State_0_0;
   double tmp127_ = tmp125_ + tmp126_;
   double tmp128_ = tmp47_ * mLocPolyn4_State_0_0;
   double tmp129_ = tmp58_ * mLocPolyn4_State_0_0;
   double tmp130_ = tmp128_ + tmp129_;
   double tmp131_ = (tmp127_) - (tmp130_);
   double tmp132_ = tmp10_ * mLocPolyn4_State_0_0;
   double tmp133_ = tmp36_ * mLocPolyn4_State_0_0;
   double tmp134_ = tmp132_ + tmp133_;
   double tmp135_ = tmp48_ * mLocPolyn4_State_0_0;
   double tmp136_ = tmp59_ * mLocPolyn4_State_0_0;
   double tmp137_ = tmp135_ + tmp136_;
   double tmp138_ = (tmp134_) - (tmp137_);
   double tmp139_ = tmp64_ * mLocPolyn4_State_0_0;
   double tmp140_ = tmp65_ * mLocPolyn4_State_0_0;
   double tmp141_ = tmp139_ + tmp140_;
   double tmp142_ = tmp66_ * mLocPolyn4_State_0_0;
   double tmp143_ = tmp67_ * mLocPolyn4_State_0_0;
   double tmp144_ = tmp142_ + tmp143_;
   double tmp145_ = (tmp141_) - (tmp144_);
   double tmp146_ = tmp68_ * mLocPolyn4_State_0_0;
   double tmp147_ = tmp69_ * mLocPolyn4_State_0_0;
   double tmp148_ = tmp146_ + tmp147_;
   double tmp149_ = tmp70_ * mLocPolyn4_State_0_0;
   double tmp150_ = tmp71_ * mLocPolyn4_State_0_0;
   double tmp151_ = tmp149_ + tmp150_;
   double tmp152_ = (tmp148_) - (tmp151_);
   double tmp153_ = tmp72_ * mLocPolyn4_State_0_0;
   double tmp154_ = tmp73_ * mLocPolyn4_State_0_0;
   double tmp155_ = tmp153_ + tmp154_;
   double tmp156_ = tmp74_ * mLocPolyn4_State_0_0;
   double tmp157_ = tmp75_ * mLocPolyn4_State_0_0;
   double tmp158_ = tmp156_ + tmp157_;
   double tmp159_ = (tmp155_) - (tmp158_);
   double tmp160_ = tmp76_ * mLocPolyn4_State_0_0;
   double tmp161_ = tmp77_ * mLocPolyn4_State_0_0;
   double tmp162_ = tmp160_ + tmp161_;
   double tmp163_ = tmp78_ * mLocPolyn4_State_0_0;
   double tmp164_ = tmp79_ * mLocPolyn4_State_0_0;
   double tmp165_ = tmp163_ + tmp164_;
   double tmp166_ = (tmp162_) - (tmp165_);
   double tmp167_ = tmp80_ * mLocPolyn4_State_0_0;
   double tmp168_ = tmp81_ * mLocPolyn4_State_0_0;
   double tmp169_ = tmp167_ + tmp168_;
   double tmp170_ = tmp82_ * mLocPolyn4_State_0_0;
   double tmp171_ = tmp83_ * mLocPolyn4_State_0_0;
   double tmp172_ = tmp170_ + tmp171_;
   double tmp173_ = (tmp169_) - (tmp172_);

  mVal[0] = (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp1_) + tmp13_ * (tmp3_)) - tmp15_ * tmp4_ + tmp18_ * tmp60_ + tmp21_ * tmp5_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp6_ + tmp24_ * tmp8_ + tmp25_ * tmp9_ + tmp27_ * tmp10_ + tmp28_ * tmp64_ + tmp30_ * tmp68_ + tmp33_ * tmp72_ + tmp35_ * tmp76_ + tmp37_ * tmp80_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp17_) + tmp13_ * (tmp20_)) - tmp15_ * tmp23_ + tmp18_ * tmp61_ + tmp21_ * tmp26_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp29_ + tmp24_ * tmp32_ + tmp25_ * tmp34_ + tmp27_ * tmp36_ + tmp28_ * tmp65_ + tmp30_ * tmp69_ + tmp33_ * tmp73_ + tmp35_ * tmp77_ + tmp37_ * tmp81_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_1_0 + (((tmp12_) * (tmp39_) + tmp13_ * (tmp41_)) - tmp15_ * tmp42_ + tmp18_ * tmp62_ + tmp21_ * tmp43_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp44_ + tmp24_ * tmp46_ + tmp25_ * tmp47_ + tmp27_ * tmp48_ + tmp28_ * tmp66_ + tmp30_ * tmp70_ + tmp33_ * tmp74_ + tmp35_ * tmp78_ + tmp37_ * tmp82_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_1_0 + (((tmp12_) * (tmp50_) + tmp13_ * (tmp52_)) - tmp15_ * tmp53_ + tmp18_ * tmp63_ + tmp21_ * tmp54_) * mLocPolyn4_State_0_0 + (tmp22_ * tmp55_ + tmp24_ * tmp57_ + tmp25_ * tmp58_ + tmp27_ * tmp59_ + tmp28_ * tmp67_ + tmp30_ * tmp71_ + tmp33_ * tmp75_ + tmp35_ * tmp79_ + tmp37_ * tmp83_) * mLocPolyn4_State_0_0);

  mCompDer[0][0] = 0;
  mCompDer[0][1] = 0;
  mCompDer[0][2] = 0;
  mCompDer[0][3] = tmp103_;
  mCompDer[0][4] = ((tmp3_) * mLocPolyn4_State_0_0 + (tmp20_) * mLocPolyn4_State_0_0) - ((tmp41_) * mLocPolyn4_State_0_0 + (tmp52_) * mLocPolyn4_State_0_0);
  mCompDer[0][5] = (-(2 * tmp4_) * mLocPolyn4_State_0_0 + -(2 * tmp23_) * mLocPolyn4_State_0_0) - (-(2 * tmp42_) * mLocPolyn4_State_0_0 + -(2 * tmp53_) * mLocPolyn4_State_0_0);
  mCompDer[0][6] = tmp110_;
  mCompDer[0][7] = (tmp5_ * mLocPolyn4_State_0_0 + tmp26_ * mLocPolyn4_State_0_0) - (tmp43_ * mLocPolyn4_State_0_0 + tmp54_ * mLocPolyn4_State_0_0);
  mCompDer[0][8] = 0;
  mCompDer[0][9] = tmp117_;
  mCompDer[0][10] = tmp124_;
  mCompDer[0][11] = tmp131_;
  mCompDer[0][12] = tmp138_;
  mCompDer[0][13] = 0;
  mCompDer[0][14] = 0;
  mCompDer[0][15] = 0;
  mCompDer[0][16] = 0;
  mCompDer[0][17] = tmp145_;
  mCompDer[0][18] = tmp152_;
  mCompDer[0][19] = tmp159_;
  mCompDer[0][20] = tmp166_;
  mCompDer[0][21] = tmp173_;
  mCompDer[0][22] = 0;
  mCompDer[0][23] = 0;
  mCompDer[0][24] = 0;
  mCompDer[0][25] = 0;
  mCompDer[0][26] = 0;
  mVal[1] = (mLocPolyn4_State_2_0 + (((tmp84_) * (tmp3_) + tmp13_ * (tmp1_) + tmp14_ * tmp60_) - tmp85_ * tmp5_ + tmp86_ * tmp4_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp6_ + tmp88_ * tmp8_ + tmp89_ * tmp9_ + tmp90_ * tmp10_ + tmp91_ * tmp64_ + tmp92_ * tmp68_ + tmp93_ * tmp72_ + tmp94_ * tmp76_ + tmp95_ * tmp80_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp84_) * (tmp20_) + tmp13_ * (tmp17_) + tmp14_ * tmp61_) - tmp85_ * tmp26_ + tmp86_ * tmp23_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp29_ + tmp88_ * tmp32_ + tmp89_ * tmp34_ + tmp90_ * tmp36_ + tmp91_ * tmp65_ + tmp92_ * tmp69_ + tmp93_ * tmp73_ + tmp94_ * tmp77_ + tmp95_ * tmp81_) * mLocPolyn4_State_0_0) - (mLocPolyn4_State_2_0 + (((tmp84_) * (tmp41_) + tmp13_ * (tmp39_) + tmp14_ * tmp62_) - tmp85_ * tmp43_ + tmp86_ * tmp42_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp44_ + tmp88_ * tmp46_ + tmp89_ * tmp47_ + tmp90_ * tmp48_ + tmp91_ * tmp66_ + tmp92_ * tmp70_ + tmp93_ * tmp74_ + tmp94_ * tmp78_ + tmp95_ * tmp82_) * mLocPolyn4_State_0_0 + mLocPolyn4_State_2_0 + (((tmp84_) * (tmp52_) + tmp13_ * (tmp50_) + tmp14_ * tmp63_) - tmp85_ * tmp54_ + tmp86_ * tmp53_) * mLocPolyn4_State_0_0 + (tmp87_ * tmp55_ + tmp88_ * tmp57_ + tmp89_ * tmp58_ + tmp90_ * tmp59_ + tmp91_ * tmp67_ + tmp92_ * tmp71_ + tmp93_ * tmp75_ + tmp94_ * tmp79_ + tmp95_ * tmp83_) * mLocPolyn4_State_0_0);

  mCompDer[1][0] = 0;
  mCompDer[1][1] = 0;
  mCompDer[1][2] = 0;
  mCompDer[1][3] = (tmp96_ * (tmp3_) * mLocPolyn4_State_0_0 + tmp96_ * (tmp20_) * mLocPolyn4_State_0_0) - (tmp96_ * (tmp41_) * mLocPolyn4_State_0_0 + tmp96_ * (tmp52_) * mLocPolyn4_State_0_0);
  mCompDer[1][4] = tmp103_;
  mCompDer[1][5] = tmp110_;
  mCompDer[1][6] = (-(2 * tmp5_) * mLocPolyn4_State_0_0 + -(2 * tmp26_) * mLocPolyn4_State_0_0) - (-(2 * tmp43_) * mLocPolyn4_State_0_0 + -(2 * tmp54_) * mLocPolyn4_State_0_0);
  mCompDer[1][7] = 0;
  mCompDer[1][8] = (tmp4_ * mLocPolyn4_State_0_0 + tmp23_ * mLocPolyn4_State_0_0) - (tmp42_ * mLocPolyn4_State_0_0 + tmp53_ * mLocPolyn4_State_0_0);
  mCompDer[1][9] = 0;
  mCompDer[1][10] = 0;
  mCompDer[1][11] = 0;
  mCompDer[1][12] = 0;
  mCompDer[1][13] = tmp117_;
  mCompDer[1][14] = tmp124_;
  mCompDer[1][15] = tmp131_;
  mCompDer[1][16] = tmp138_;
  mCompDer[1][17] = 0;
  mCompDer[1][18] = 0;
  mCompDer[1][19] = 0;
  mCompDer[1][20] = 0;
  mCompDer[1][21] = 0;
  mCompDer[1][22] = tmp145_;
  mCompDer[1][23] = tmp152_;
  mCompDer[1][24] = tmp159_;
  mCompDer[1][25] = tmp166_;
  mCompDer[1][26] = tmp173_;
}


void cREgDistDxDy_Polyn4::ComputeValDerivHessian()
{
  ELISE_ASSERT(false,"Foncteur cREgDistDxDy_Polyn4 Has no Der Sec");
}

void cREgDistDxDy_Polyn4::SetPolyn4_State_0_0(double aVal){ mLocPolyn4_State_0_0 = aVal;}
void cREgDistDxDy_Polyn4::SetPolyn4_State_1_0(double aVal){ mLocPolyn4_State_1_0 = aVal;}
void cREgDistDxDy_Polyn4::SetPolyn4_State_2_0(double aVal){ mLocPolyn4_State_2_0 = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy1_x(double aVal){ mLocRegDistxy1_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy1_y(double aVal){ mLocRegDistxy1_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy2_x(double aVal){ mLocRegDistxy2_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy2_y(double aVal){ mLocRegDistxy2_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy3_x(double aVal){ mLocRegDistxy3_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy3_y(double aVal){ mLocRegDistxy3_y = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy4_x(double aVal){ mLocRegDistxy4_x = aVal;}
void cREgDistDxDy_Polyn4::SetRegDistxy4_y(double aVal){ mLocRegDistxy4_y = aVal;}



double * cREgDistDxDy_Polyn4::AdrVarLocFromString(const std::string & aName)
{
   if (aName == "Polyn4_State_0_0") return & mLocPolyn4_State_0_0;
   if (aName == "Polyn4_State_1_0") return & mLocPolyn4_State_1_0;
   if (aName == "Polyn4_State_2_0") return & mLocPolyn4_State_2_0;
   if (aName == "RegDistxy1_x") return & mLocRegDistxy1_x;
   if (aName == "RegDistxy1_y") return & mLocRegDistxy1_y;
   if (aName == "RegDistxy2_x") return & mLocRegDistxy2_x;
   if (aName == "RegDistxy2_y") return & mLocRegDistxy2_y;
   if (aName == "RegDistxy3_x") return & mLocRegDistxy3_x;
   if (aName == "RegDistxy3_y") return & mLocRegDistxy3_y;
   if (aName == "RegDistxy4_x") return & mLocRegDistxy4_x;
   if (aName == "RegDistxy4_y") return & mLocRegDistxy4_y;
   return 0;
}


cElCompiledFonc::cAutoAddEntry cREgDistDxDy_Polyn4::mTheAuto("cREgDistDxDy_Polyn4",cREgDistDxDy_Polyn4::Alloc);


cElCompiledFonc *  cREgDistDxDy_Polyn4::Alloc()
{  return new cREgDistDxDy_Polyn4();
}


