Skip to content

Commit 3b382d6

Browse files
committed
Fix issue #65
1 parent 0fb7bfe commit 3b382d6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/femlib/FESpacen.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ class GTypeOfFESum: public GTypeOfFE<Mesh> {
734734
void init(InterpolationMatrix<RdHat> & M,FElement * pK=0,int odf=0,int ocomp=0,int *pp=nullptr) const;
735735
void set(const Mesh & Th,const Element & K,InterpolationMatrix<RdHat> & M,int ocoef,int odf,int *nump ) const; // no change by deflaut
736736
void FB(const What_d whatd,const Mesh & Th,const Element & K,const RdHat &PHat, KNMK_<R> & val) const ;
737+
R operator()(const GFElement<Mesh> & K,const RdHat & PHat,const KN_<R> & u,int componante,int op) const;
737738
~GTypeOfFESum(){}
738739
} ;
739740

@@ -761,6 +762,25 @@ void GTypeOfFESum<Mesh>::FB(const What_d whatd,const Mesh & Th,const Element & K
761762
}
762763

763764

765+
template<class Mesh>
766+
R GTypeOfFESum<Mesh>::operator()(const GFElement<Mesh> & K,const RdHat & PHat,const KN_<R> & u,int componante,int op) const
767+
{
768+
ffassert(0 <= componante && componante < this->N);
769+
int isub = 0;
770+
while (isub + 1 < NN.N() && componante >= NN[isub + 1]) ++isub;
771+
ffassert(isub < k);
772+
const GTypeOfFE<Mesh> & te = *teb[isub];
773+
const int nbf = te.NbDoF;
774+
const int ncomp = te.N;
775+
const int loccomp = componante - NN[isub];
776+
ffassert(0 <= loccomp && loccomp < ncomp);
777+
KNMK<R> fb(nbf, ncomp, last_operatortype);
778+
KN<R> fk(nbf);
779+
const int dof0 = DF[isub];
780+
for (int i = 0; i < nbf; ++i) fk[i] = u[K(dof0 + i)];
781+
te.FB(1 << op, K.Vh.Th, K.T, PHat, fb);
782+
return (fb('.', loccomp, op), fk);
783+
}
764784

765785
template<class RdHat>
766786
template<class Mesh>

0 commit comments

Comments
 (0)