Skip to content
Snippets Groups Projects
Commit 3c904c3e authored by Adrian Burri's avatar Adrian Burri
Browse files

Adapted for dimRange > 1

[[Imported from SVN: r3509]]
parent 171363ab
Branches
Tags
No related merge requests found
......@@ -73,7 +73,8 @@ namespace Dune {
const DomainType& xLocal,
const RangeType& factor) const
{
this->eval(util_.containedDof(baseFunct), xLocal, tmp_);
baseFunctions_[util_.containedDof(baseFunct)]->
evaluate(diffVar0_, xLocal, tmp_);
return factor[util_.component(baseFunct)]*tmp_[0];
}
......@@ -88,11 +89,15 @@ namespace Dune {
{
DomainType gradScaled(0.);
this->jacobian(util_.containedDof(baseFunct), xLocal, jTmp_);
for (int i = 0; i < FunctionSpaceImp::DimDomain; ++i) {
diffVar1_[0] = i;
baseFunctions_[util_.containedDof(baseFunct)]->
evaluate(diffVar1_, xLocal, tmp_);
jTmp_[i] = tmp_[0];
}
en.geometry().jacobianInverseTransposed(xLocal).
umv(jTmp_[0], gradScaled);
//! is this right?
//return factor[util_.component(baseFunct)]*jTmp[0];
umv(jTmp_, gradScaled);
return gradScaled*factor[util_.component(baseFunct)];
}
......
......@@ -107,7 +107,11 @@ namespace Dune {
public:
VectorialBaseFunctionSet(const FactoryType& factory) :
baseFunctions_(),
util_(FunctionSpaceType::DimRange)
util_(FunctionSpaceType::DimRange),
diffVar0_(),
diffVar1_(0),
tmp_(0.),
jTmp_(0.)
{
for (int i = 0; i < factory.numBaseFunctions(); ++i) {
baseFunctions_.push_back(factory.baseFunction(i));
......@@ -122,6 +126,8 @@ namespace Dune {
}
}
// * override other functions as well!!!!
int numBaseFunctions() const;
template <int diffOrd>
......@@ -131,10 +137,10 @@ namespace Dune {
RangeType& phi) const;
template <int diffOrd, class QuadratureType>
void evaluate (int baseFunct,
const FieldVector<deriType, diffOrd> &diffVariable,
QuadratureType & quad,
int quadPoint, RangeType & phi ) const;
void evaluate(int baseFunct,
const FieldVector<deriType, diffOrd> &diffVariable,
QuadratureType & quad,
int quadPoint, RangeType & phi ) const;
// * add those methods with quadratures as well
DofType evaluateSingle(int baseFunct,
......@@ -151,8 +157,10 @@ namespace Dune {
std::vector<BaseFunctionType*> baseFunctions_;
DofConversionUtility<PointBased> util_;
mutable FieldVector<int, 0> diffVar0_;
mutable FieldVector<int, 1> diffVar1_;
mutable ScalarRangeType tmp_;
mutable ScalarJacobianRangeType jTmp_;
mutable DomainType jTmp_;
};
} // end namespace Dune
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment