Skip to content
Snippets Groups Projects
Commit 41bc23bc authored by Éric Béchet's avatar Éric Béchet
Browse files

No commit message

No commit message
parent 995580ea
No related branches found
No related tags found
No related merge requests found
...@@ -198,7 +198,7 @@ void elasticitySolver::solve() ...@@ -198,7 +198,7 @@ void elasticitySolver::solve()
// LaplaceTerm<SVector3,SVector3> Eterm(*LagSpace); // LaplaceTerm<SVector3,SVector3> Eterm(*LagSpace);
Assemble(Eterm,*LagSpace,elasticFields[i].g->begin(),elasticFields[i].g->end(),Integ_Bulk,*pAssembler); Assemble(Eterm,*LagSpace,elasticFields[i].g->begin(),elasticFields[i].g->end(),Integ_Bulk,*pAssembler);
} }
printf("nDofs=%d\n",pAssembler->sizeOfR());
printf("-- done assembling!\n"); printf("-- done assembling!\n");
lsys->systemSolve(); lsys->systemSolve();
printf("-- done solving!\n"); printf("-- done solving!\n");
......
...@@ -208,7 +208,8 @@ class IsotropicElasticTerm : public BilinearTerm<SVector3,SVector3> ...@@ -208,7 +208,8 @@ class IsotropicElasticTerm : public BilinearTerm<SVector3,SVector3>
virtual ~IsotropicElasticTerm() {} virtual ~IsotropicElasticTerm() {}
virtual void get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &m) virtual void get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &m)
{ {
if (sym) if (ele->getParent()) ele=ele->getParent();
if (sym)
{ {
int nbFF = BilinearTerm<SVector3,SVector3>::space1.getNumKeys(ele); int nbFF = BilinearTerm<SVector3,SVector3>::space1.getNumKeys(ele);
double jac[3][3]; double jac[3][3];
...@@ -222,7 +223,7 @@ class IsotropicElasticTerm : public BilinearTerm<SVector3,SVector3> ...@@ -222,7 +223,7 @@ class IsotropicElasticTerm : public BilinearTerm<SVector3,SVector3>
for (int i = 0; i < npts; i++) for (int i = 0; i < npts; i++)
{ {
const double u = GP[i].pt[0]; const double v = GP[i].pt[1]; const double w = GP[i].pt[2]; const double u = GP[i].pt[0]; const double v = GP[i].pt[1]; const double w = GP[i].pt[2];
if (ele->getParent()) ele=ele->getParent();
const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac); const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac);
std::vector<TensorialTraits<SVector3>::GradType> Grads; std::vector<TensorialTraits<SVector3>::GradType> Grads;
BilinearTerm<SVector3,SVector3>::space1.gradf(ele,u, v, w, Grads); // a optimiser ?? BilinearTerm<SVector3,SVector3>::space1.gradf(ele,u, v, w, Grads); // a optimiser ??
...@@ -300,7 +301,8 @@ template<class T1> class LoadTerm : public LinearTerm<T1> ...@@ -300,7 +301,8 @@ template<class T1> class LoadTerm : public LinearTerm<T1>
virtual void get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) virtual void get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m)
{ {
int nbFF=LinearTerm<T1>::space1.getNumKeys(ele); if (ele->getParent()) ele=ele->getParent();
int nbFF=LinearTerm<T1>::space1.getNumKeys(ele);
double jac[3][3]; double jac[3][3];
m.resize(nbFF); m.resize(nbFF);
m.scale(0.); m.scale(0.);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment