Commit d297b88d authored by François Trigaux's avatar François Trigaux
Browse files

enabled material interpolation

parent c8dc17c6
......@@ -215,8 +215,6 @@ void initBeam(Beam *bm)
if((bm->analysis_flag==2) && (bm->initFromFile==1))
{
// READ INITIAL CONIDITIONS FROM THE FILE
FILE *INIT = fopen("Beam_initCond.ini","r");
FILE *INIT = fopen("Beam_initCond.ini","r");
FILE *INIT = fopen("Beam_initCond.ini","r");
if (INIT==NULL)
{
......@@ -891,7 +889,7 @@ static void beam_interpolateMatrix(double **out, double x, double *xp, double **
}
/*
static void beam_setMaterial(Beam *bm)
{
int i,j,k;
......@@ -953,26 +951,26 @@ static void beam_setMaterial(Beam *bm)
// Warning: this requires that bm->nmate = bm->nkp!!
// Position are given in arc length / L
//x = sqrt(bm->coord[i][0]*bm->coord[i][0] + bm->coord[i][1]*bm->coord[i][1] + bm->coord[i][2]*bm->coord[i][2]) / bm->L;
x = sqrt(bm->coord[i][0]*bm->coord[i][0] + bm->coord[i][1]*bm->coord[i][1] + bm->coord[i][2]*bm->coord[i][2]) / bm->L;
// Interpolate the material at the correct point position
//beam_interpolateMatrix(bm->material[i],x,xcomp,matComp,ncomp,NSTRN,NSTRN,0 ,0);
for (j=0;j<NSTRN;j++){
for(k=0;k<NSTRN;k++)
{
bm->material[i][j][k] = matComp[0][j][k];
}
}
beam_interpolateMatrix(bm->material[i],x,xcomp,matComp,ncomp,NSTRN,NSTRN,0 ,0);
//for (j=0;j<NSTRN;j++){
// for(k=0;k<NSTRN;k++)
// {
// bm->material[i][j][k] = matComp[0][j][k];
// }
// }
if (bm->analysis_flag!=0)
{
//beam_interpolateMatrix(bm->material[i],x,xmass,matMass,nmass,NSTRN,NSTRN,NSTRN,0);
beam_interpolateMatrix(bm->material[i],x,xmass,matMass,nmass,NSTRN,NSTRN,NSTRN,0);
// Copy mass matrix
for (j=NSTRN;j<NSTRN+NSTRN;j++){
for(k=0;k<NSTRN;k++)
{
bm->material[i][j][k] = matMass[0][j-NSTRN][k];
}
}
// for (j=NSTRN;j<NSTRN+NSTRN;j++){
// for(k=0;k<NSTRN;k++)
// {
// bm->material[i][j][k] = matMass[0][j-NSTRN][k];
// }
// }
}
//for(j=0;j<bm->ndof_el-NSTRN;j++)
//{
......@@ -998,9 +996,9 @@ static void beam_setMaterial(Beam *bm)
fclose(COMP);
fclose(MASS);
}*/
}
/*
static void beam_setMaterial(Beam *bm)
{
int i,j,k;
......@@ -1122,4 +1120,5 @@ static void beam_setMaterial(Beam *bm)
fclose(COMP);
fclose(MASS);
}
\ No newline at end of file
}
*/
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment