Skip to content
Snippets Groups Projects
Commit 17474936 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

No commit message

No commit message
parent 2d4ff0ac
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@ void dgAlgorithm::residualVolume ( dofManager &dof, // the DOF manager (maybe us
if (claw.diffusiveFlux()) (*claw.diffusiveFlux())(DGE,fDiff);
for (int iUVW=0;iUVW<group.getDimUVW();iUVW++) {
// proxies should be done...
fullMatrix<double> fuvwe = Fuvw[iUVW].linesProxy(iElement);
// proxy to the elementary values
fullMatrix<double> fuvwe(Fuvw[iUVW], iElement*claw.nbFields(),claw.nbFields());
for (int iXYZ=0;iXYZ<group.getDimXYZ();iXYZ++) {
for (int iPt =0; iPt< group.getNbIntegrationPoints(); iPt++) {
// get the right inv jacobian matrix dU/dX element
......@@ -46,7 +46,7 @@ void dgAlgorithm::residualVolume ( dofManager &dof, // the DOF manager (maybe us
const double factor = invJ * detJ;
// compute fluxes in the reference coordinate system at this integration point
for (int k=0;k<group.nbFields();k++) {
fuvwe(i,k) += ( fConv[iXYZ](i,k) + fDiff[iXYZ](i,k)) * factor;
fuvwe(iPt,k) += ( fConv[iXYZ](iPt,k) + fDiff[iXYZ](iPt,k)) * factor;
}
}
}
......
......@@ -20,9 +20,14 @@ class functionSpace;
class dgElement {
MElement *_element;
double *_detJ;
const fullMatrix<double> &_solution, &_detJ, &_integration;
public:
dgElement (MElement *e, double *detJ);
dgElement (MElement *e,
const fullMatrix<double> &sol,
const fullMatrix<double> &detJ,
const fullMatrix<double> &integ)
: _element(e), _solution(sol), _detJ(detJ), _integration(integ)
{}
};
class dgGroupOfElements {
......@@ -50,24 +55,31 @@ class dgGroupOfElements {
fullMatrix<double> *_residual;
// dimension of the parametric space and of the real space
// may be different if the domain is a surface in 3D (manifold)
int dimUVW, dimXYZ;
int _dimUVW, _dimXYZ, _nbFields;
// forbid the copy
// dgGroupOfElements (const dgGroupOfElements &e, int order) {}
// dgGroupOfElements & operator = (const dgGroupOfElements &e) {}
public:
dgGroupOfElements (const std::vector<MElement*> &e, int);
dgGroupOfElements (const std::vector<MElement*> &e, int pOrder);
virtual ~dgGroupOfElements ();
inline dgElement getDGElement(int i) const;
inline dgElement getDGElement(int i) const {return dgElement(_elements[i], getSolution(i), getMapping(i), *_integration);}
inline int getNbElements() const {return _elements.size();}
inline int getNbFields() const {return _nbFields;}
inline int getNbNodes() const {return _collocation.size1();}
inline int getNbIntegrationPoints() const {return _collocation.size2();}
inline int getDimUVW () const {return dimUVW;}
inline int getDimXYZ () const {return dimXYZ;}
inline int getDimUVW () const {return _dimUVW;}
inline int getDimXYZ () const {return _dimXYZ;}
inline const fullMatrix<double> & getCollocationMatrix () const {return *_collocation;}
inline const fullMatrix<double> & getRedistributionMatrix (int i) const {return *_redistribution[i];}
inline const fullMatrix<double> & getSolution () const {return *_solution;}
// get a proxy on the solution for element iElement
inline fullMatrix<double> & getSolution (int iElement) const {return fullMatrix<double>(*_solution, iElement*_nbFields, _nbFields);}
inline const fullMatrix<double> & getResidual () const {return *_solution;}
inline double getDetJ (int iElement, int iGaussPoint)
// get a proxy on the residual for element iElement
inline fullMatrix<double> & getResidual (int iElement) const {return fullMatrix<double>(*_residual, iElement*_nbFields, _nbFields);}
inline double getDetJ (int iElement, int iGaussPoint) const {return (*_mapping)(iElement, 10*iGaussPoint + 9);}
inline double getInvJ (int iElement, int iGaussPoint, int i, int j) const {return (*_mapping)(iElement, 10*iGaussPoint + i + 3*j);}
inline fullMatrix<double> getMapping (int iElement) const {return fullMatrix<double>(*_mapping, iElement, 1);}
};
/*class dgFace {
......
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