-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
const CellModel& cellModel(CellModel::GetCellModel(_my_geometry));
switch( _my_geometry )
{
+ case NORM_POINT1:
+ _my_local_ref_dim = 0;
+ _my_local_nb_ref = 1;
+ point1Init();
+ aSatify = isSatisfy();
+ CHECK_MACRO;
+ break;
+
case NORM_SEG2:
_my_local_ref_dim = 1;
_my_local_nb_ref = 2;
}
break;
+ case NORM_TRI7:
+ _my_local_ref_dim = 2;
+ _my_local_nb_ref = 7;
+ tria7aInit();
+ aSatify = isSatisfy();
+ CHECK_MACRO;
+ break;
+
case NORM_QUAD4:
{
_my_local_ref_dim = 2;
break;
case NORM_PENTA15:
- _my_local_ref_dim = 3;
- _my_local_nb_ref = 15;
- penta15aInit();
- aSatify = isSatisfy();
-
- if(!aSatify)
- {
- penta15bInit();
- aSatify = isSatisfy();
- CHECK_MACRO;
- }
- break;
+ {
+ _my_local_ref_dim = 3;
+ _my_local_nb_ref = 15;
+ MapToShapeFunction PENTA15PTR[]={Penta15aInit,Penta15bInit};
+ std::size_t NB_OF_PENTA15PTR(sizeof(PENTA15PTR)/sizeof(MapToShapeFunction));
+ for(std::size_t i=0;i<NB_OF_PENTA15PTR && !aSatify;i++)
+ {
+ (PENTA15PTR[i])(*this);
+ aSatify = isSatisfy();
+ }
+ CHECK_MACRO;
+ break;
+ }
case NORM_HEXA8:
{
return &_my_function_value[ _my_nb_ref*theGaussId ];
}
+void GaussInfo::point1Init()
+{
+ double *funValue(&_my_function_value[0]);
+ funValue[0] = 1. ;
+}
+
/*!
* Init Segment 2 Reference coordinates ans Shape function.
*/
SHAPE_FUN_MACRO_END;
}
+void GaussInfo::tria7aInit()
+{
+ LOCAL_COORD_MACRO_BEGIN;
+ case 0:
+ coords[0] = 0.0;
+ coords[1] = 0.0;
+ break;
+ case 1:
+ coords[0] = 1.0;
+ coords[1] = 0.0;
+ break;
+ case 2:
+ coords[0] = 0.0;
+ coords[1] = 1.0;
+ break;
+ case 3:
+ coords[0] = 0.5;
+ coords[1] = 0.0;
+ break;
+ case 4:
+ coords[0] = 0.5;
+ coords[1] = 0.5;
+ break;
+ case 5:
+ coords[0] = 0.0;
+ coords[1] = 0.5;
+ break;
+ case 6:
+ coords[0] = 0.3333333333333333;
+ coords[1] = 0.3333333333333333;
+ break;
+
+ LOCAL_COORD_MACRO_END;
+
+ SHAPE_FUN_MACRO_BEGIN;
+ funValue[0]=1-3*(gc[0]+gc[1])+2*(gc[0]*gc[0]+gc[1]*gc[1])+7*gc[0]*gc[1]-3*gc[0]*gc[1]*(gc[0]+gc[1]);
+ funValue[1]=gc[0]*(-1+2*gc[0]+3*gc[1]-3*gc[1]*(gc[0]+gc[1]));
+ funValue[2]=gc[1]*(-1.+3.*gc[0]+2.*gc[1]-3.*gc[0]*(gc[0]+gc[1]));
+ funValue[3]=4*gc[0]*(1-gc[0]-4*gc[1]+3*gc[1]*(gc[0]+gc[1]));
+ funValue[4]=4*gc[0]*gc[1]*(-2+3*(gc[0]+gc[1]));
+ funValue[5]=4*gc[1]*(1-4*gc[0]-gc[1]+3*gc[0]*(gc[0]+gc[1]));
+ funValue[6]=27*gc[0]*gc[1]*(1-gc[0]-gc[1]);
+ SHAPE_FUN_MACRO_END;
+}
+
/*!
* Init Quadrangle Reference coordinates ans Shape function.
* Case A.
coords[1] = 0.0;
coords[2] = 0.0;
break;
- case 3:
+ case 1:
coords[0] = 0.0;
- coords[1] = 1.0;
+ coords[1] = -1.0;
coords[2] = 0.0;
break;
case 2:
coords[1] = 0.0;
coords[2] = 0.0;
break;
- case 1:
+ case 3:
coords[0] = 0.0;
- coords[1] = -1.0;
+ coords[1] = 1.0;
coords[2] = 0.0;
break;
case 4:
coords[1] = 0.0;
coords[2] = 1.0;
break;
- case 8:
+ case 5:
coords[0] = 0.5;
- coords[1] = 0.5;
+ coords[1] = -0.5;
coords[2] = 0.0;
break;
- case 7:
+ case 6:
coords[0] = -0.5;
- coords[1] = 0.5;
+ coords[1] = -0.5;
coords[2] = 0.0;
break;
- case 6:
+ case 7:
coords[0] = -0.5;
- coords[1] = -0.5;
+ coords[1] = 0.5;
coords[2] = 0.0;
break;
- case 5:
+ case 8:
coords[0] = 0.5;
- coords[1] = -0.5;
+ coords[1] = 0.5;
coords[2] = 0.0;
break;
case 9:
coords[1] = 0.0;
coords[2] = 0.5;
break;
- case 12:
+ case 10:
coords[0] = 0.0;
- coords[1] = 0.5;
+ coords[1] = -0.5;
coords[2] = 0.5;
break;
case 11:
coords[1] = 0.0;
coords[2] = 0.5;
break;
- case 10:
+ case 12:
coords[0] = 0.0;
- coords[1] = -0.5;
+ coords[1] = 0.5;
coords[2] = 0.5;
break;
LOCAL_COORD_MACRO_END;
SHAPE_FUN_MACRO_BEGIN;
- funValue[0] = 0.5*(-gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] - gc[1] + gc[2] - 1.0)*
- (gc[0] - 0.5)/(1.0 - gc[2]);
- funValue[3] = 0.5*(-gc[0] - gc[1] + gc[2] - 1.0)*(+gc[0] - gc[1] + gc[2] - 1.0)*
- (gc[1] - 0.5)/(1.0 - gc[2]);
- funValue[2] = 0.5*(+gc[0] - gc[1] + gc[2] - 1.0)*(+gc[0] + gc[1] + gc[2] - 1.0)*
- (-gc[0] - 0.5)/(1.0 - gc[2]);
- funValue[1] = 0.5*(+gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] + gc[1] + gc[2] - 1.0)*
- (-gc[1] - 0.5)/(1.0 - gc[2]);
-
- funValue[4] = 2.0*gc[2]*(gc[2] - 0.5);
-
- funValue[8] = 0.5*(-gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] - gc[1] + gc[2] - 1.0)*
- (gc[0] - gc[1] + gc[2] - 1.0)/(1.0 - gc[2]);
- funValue[7] = 0.5*(-gc[0] - gc[1] + gc[2] - 1.0)*(gc[0] - gc[1] + gc[2] - 1.0)*
- (gc[0] + gc[1] + gc[2] - 1.0)/(1.0 - gc[2]);
- funValue[6] = 0.5*(gc[0] - gc[1] + gc[2] - 1.0)*(gc[0] + gc[1] + gc[2] - 1.0)*
- (-gc[0] + gc[1] + gc[2] - 1.0)/(1.0 - gc[2]);
- funValue[5] = 0.5*(gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] + gc[1] + gc[2] - 1.0)*
- (-gc[0] - gc[1] + gc[2] - 1.0)/(1.0 - gc[2]);
-
- funValue[9] = 0.5*gc[2]*(-gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] - gc[1] + gc[2] - 1.0)/
- (1.0 - gc[2]);
- funValue[12] = 0.5*gc[2]*(-gc[0] - gc[1] + gc[2] - 1.0)*(gc[0] - gc[1] + gc[2] - 1.0)/
- (1.0 - gc[2]);
- funValue[11] = 0.5*gc[2]*(gc[0] - gc[1] + gc[2] - 1.0)*(gc[0] + gc[1] + gc[2] - 1.0)/
- (1.0 - gc[2]);
- funValue[10] = 0.5*gc[2]*(gc[0] + gc[1] + gc[2] - 1.0)*(-gc[0] + gc[1] + gc[2] - 1.0)/
- (1.0 - gc[2]);
+ funValue[0] =0.5*(-gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]-gc[1]+gc[2]-1.0)*(gc[0]-0.5)/(1.0-gc[2]);
+ funValue[1] =0.5*(+gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]+gc[1]+gc[2]-1.0)*(-gc[1]-0.5)/(1.0-gc[2]);
+ funValue[2] =0.5*(+gc[0]-gc[1]+gc[2]-1.0)*(+gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]-0.5)/(1.0-gc[2]);
+ funValue[3] =0.5*(-gc[0]-gc[1]+gc[2]-1.0)*(+gc[0]-gc[1]+gc[2]-1.0)*(gc[1]-0.5)/(1.0-gc[2]);
+
+ funValue[4] =2.*gc[2]*(gc[2]-0.5);
+
+ funValue[5] =-0.5*(gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]-gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[6] =-0.5*(gc[0]-gc[1]+gc[2]-1.0)*(gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]+gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[7] =-0.5*(-gc[0]-gc[1]+gc[2]-1.0)*(gc[0]-gc[1]+gc[2]-1.0)*(gc[0]+gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[8] =-0.5*(-gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]-gc[1]+gc[2]-1.0)*(gc[0]-gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+
+ funValue[9] =gc[2]*(-gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]-gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[10]=gc[2]*(gc[0]+gc[1]+gc[2]-1.0)*(-gc[0]+gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[11]=gc[2]*(gc[0]-gc[1]+gc[2]-1.0)*(gc[0]+gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+ funValue[12]=gc[2]*(-gc[0]-gc[1]+gc[2]-1.0)*(gc[0]-gc[1]+gc[2]-1.0)/(1.0-gc[2]);
+
SHAPE_FUN_MACRO_END;
}
funValue[5] =0.125*gc[0]*(gc[0]-1.)*gc[1]*(gc[1]+1.)*gc[2]*(gc[2]+1.);
funValue[6] =0.125*gc[0]*(gc[0]+1.)*gc[1]*(gc[1]+1.)*gc[2]*(gc[2]+1.);
funValue[7] =0.125*gc[0]*(gc[0]+1.)*gc[1]*(gc[1]-1.)*gc[2]*(gc[2]+1.);
- funValue[8] =0.25*(1.-gc[0])*(1.-gc[1]*gc[1])*(1.-gc[2]);
- funValue[9] =0.25*(1.-gc[0]*gc[0])*(1.+gc[1])*(1.-gc[2]);
- funValue[10]=0.25*(1.+gc[0])*(1.-gc[1]*gc[1])*(1.-gc[2]);
- funValue[11]=0.25*(1.-gc[0]*gc[0])*(1.-gc[1])*(1.-gc[2]);
- funValue[12]=0.25*(1.-gc[0])*(1.-gc[1]*gc[1])*(1.+gc[2]);
- funValue[13]=0.25*(1.-gc[0]*gc[0])*(1.+gc[1])*(1.+gc[2]);
- funValue[14]=0.25*(1.+gc[0])*(1.-gc[1]*gc[1])*(1.+gc[2]);
- funValue[15]=0.25*(1.-gc[0]*gc[0])*(1.-gc[1])*(1.+gc[2]);
- funValue[16]=0.25*(1.-gc[0])*(1.-gc[1])*(1.-gc[2]*gc[2]);
- funValue[17]=0.25*(1.-gc[0])*(1.+gc[1])*(1.-gc[2]*gc[2]);
- funValue[18]=0.25*(1.+gc[0])*(1.+gc[1])*(1.-gc[2]*gc[2]);
- funValue[19]=0.25*(1.+gc[0])*(1.-gc[1])*(1.-gc[2]*gc[2]);
+ funValue[8] =0.25*gc[0]*(gc[0]-1.)*(1.-gc[1]*gc[1])*gc[2]*(gc[2]-1.);
+ funValue[9] =0.25*(1.-gc[0]*gc[0])*gc[1]*(gc[1]+1.)*gc[2]*(gc[2]-1.);
+ funValue[10]=0.25*gc[0]*(gc[0]+1.)*(1.-gc[1]*gc[1])*gc[2]*(gc[2]-1.);
+ funValue[11]=0.25*(1.-gc[0]*gc[0])*gc[1]*(gc[1]-1.)*gc[2]*(gc[2]-1.);
+ funValue[12]=0.25*gc[0]*(gc[0]-1.)*(1.-gc[1]*gc[1])*gc[2]*(gc[2]+1.);
+ funValue[13]=0.25*(1.-gc[0]*gc[0])*gc[1]*(gc[1]+1.)*gc[2]*(gc[2]+1.);
+ funValue[14]=0.25*gc[0]*(gc[0]+1.)*(1.-gc[1]*gc[1])*gc[2]*(gc[2]+1.);
+ funValue[15]=0.25*(1.-gc[0]*gc[0])*gc[1]*(gc[1]-1.)*gc[2]*(gc[2]+1.);
+ funValue[16]=0.25*gc[0]*(gc[0]-1.)*gc[1]*(gc[1]-1.)*(1.-gc[2]*gc[2]);
+ funValue[17]=0.25*gc[0]*(gc[0]-1.)*gc[1]*(gc[1]+1.)*(1.-gc[2]*gc[2]);
+ funValue[18]=0.25*gc[0]*(gc[0]+1.)*gc[1]*(gc[1]+1.)*(1.-gc[2]*gc[2]);
+ funValue[19]=0.25*gc[0]*(gc[0]+1.)*gc[1]*(gc[1]-1.)*(1.-gc[2]*gc[2]);
funValue[20]=0.5*(1.-gc[0]*gc[0])*(1.-gc[1]*gc[1])*gc[2]*(gc[2]-1.);
funValue[21]=0.5*gc[0]*(gc[0]-1.)*(1.-gc[1]*gc[1])*(1.-gc[2]*gc[2]);
funValue[22]=0.5*(1.-gc[0]*gc[0])*gc[1]*(gc[1]+1.)*(1.-gc[2]*gc[2]);