Commit 1eac3d6e authored by akbib's avatar akbib Committed by akbib@FU-BERLIN.DE
Browse files

don't use dune-disc shapefunctions anymore

[[Imported from SVN: r10480]]
parent 8d8e3b11
......@@ -17,9 +17,8 @@
#include<dune/istl/bvector.hh>
#include<dune/grid/common/quadraturerules.hh>
#include<dune/disc/operators/localstiffness.hh>
#include<dune/disc/shapefunctions/lagrangeshapefunctions.hh>
#include<dune/disc/operators/boundaryconditions.hh>
#include <dune/localfunctions/lagrange/pqkfactory.hh>
/**
* @file
......@@ -133,17 +132,19 @@ namespace Dune
// extract some important parameters
GeometryType gt = e.geometry().type();
const typename LagrangeShapeFunctionSetContainer<DT,RT,dim>::value_type& sfs
= LagrangeShapeFunctions<DT,RT,dim>::general(gt,k);
this->currentsize_ = sfs.size();
//chache of local finite elements
typedef Dune::PQkLocalFiniteElementCache<typename GridType::ctype, RT, GridType::dimension, k> FiniteElementCache;
FiniteElementCache0 cache;
const typename FiniteElementCache::FiniteElementType& finiteElement = cache.get(gt);
this->currentsize_ = finiteElement.localBasis();
// clear assemble data
for (int i=0; i<sfs.size(); i++)
for (int i=0; i<finiteElement.localBasis(); i++)
{
this->b[i] = 0;
this->bctype[i][0] = BoundaryConditions::neumann;
for (int j=0; j<sfs.size(); j++)
for (int j=0; j<finiteElement.localBasis(); j++)
privateA[i][j] = 0;
}
......@@ -167,22 +168,24 @@ namespace Dune
DT detjac = e.geometry().integrationElement(local);
// evaluate gradients at Gauss points
Dune::FieldVector<DT,dim> grad[SIZE], temp;
for (int i=0; i<sfs.size(); i++) {
std::vector<Dune::FieldMatrix<dim,1> > referenceGradients(finiteElement.localBasis().size());
std::vector<Dune::FieldVector<double,dim> > grad(finiteElement.localBasis().size());
finiteElement.localBasis().evaluateJacobian(local,referenceGradients);
for (int i=0; i<finiteElement.localBasis.size(); i++) {
for (int l=0; l<dim; l++)
temp[l] = sfs[i].evaluateDerivative(0,l,local);
grad[i] = 0;
jac.umv(temp,grad[i]); // transform gradient to global ooordinates
jac.umv(referenceGradients[i][0],grad[i]); // transform gradient to global ooordinates
}
// /////////////////////////////////////////////
// Compute strain for all shape functions
// /////////////////////////////////////////////
std::vector<FixedArray<SymmTensor,dim> > strain(sfs.size());
std::vector<FixedArray<SymmTensor,dim> > strain(finiteElement.localBasis().size());
for (int i=0; i<sfs.size(); i++)
for (int i=0; i<finiteElement.localBasis().size(); i++)
for (int k=0; k<dim; k++) {
// The deformation gradient of the shape function
......@@ -195,7 +198,7 @@ namespace Dune
}
// loop over test function number
for (int row=0; row<sfs.size(); row++) {
for (int row=0; row<finiteElement.localBasis().size(); row++) {
for (int rcomp=0; rcomp<dim; rcomp++) {
......
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