Commit 62841d3c by Praetorius, Simon

### ElementFileWriter updated and some corrections in DOFVector

parent f5e012b5
 ... @@ -324,6 +324,9 @@ namespace AMDiS { ... @@ -324,6 +324,9 @@ namespace AMDiS { calculateElementMatrix(elInfo, elementMatrix); calculateElementMatrix(elInfo, elementMatrix); } } // eventuell einfach // vec = elementMatrix*uhOldLoc; // schreiben for (int i = 0; i < nRow; i++) { for (int i = 0; i < nRow; i++) { double val = 0.0; double val = 0.0; for (int j = 0; j < nCol; j++) for (int j = 0; j < nCol; j++) ... ...
 ... @@ -934,13 +934,6 @@ namespace AMDiS { ... @@ -934,13 +934,6 @@ namespace AMDiS { TOut integrate_VecAndCoords(const DOFVector &vec, TOut integrate_VecAndCoords(const DOFVector &vec, BinaryAbstractFunction > *fct); BinaryAbstractFunction > *fct); template TOut integrate_VecAndCoords(const DOFVector &vec, BinaryAbstractFunction > *fct) { return integrate(vec, fct); } /// Computes the integral: \f$\int f(\{v_i(\vec{x})\}_i)\,\text{d}\vec{x}\f$ /// Computes the integral: \f$\int f(\{v_i(\vec{x})\}_i)\,\text{d}\vec{x}\f$ double integrateGeneral(const vector*> &vecs, double integrateGeneral(const vector*> &vecs, AbstractFunction > *fct); AbstractFunction > *fct); ... ...
 ... @@ -361,7 +361,7 @@ namespace AMDiS { ... @@ -361,7 +361,7 @@ namespace AMDiS { { { public: public: /// Constructor. /// Constructor. VecAtQP_SOT(DOFVectorBase *dv, AbstractFunction *af); VecAtQP_SOT(DOFVectorBase *dv, AbstractFunction *af = NULL); /// Implementation of \ref OperatorTerm::initElement(). /// Implementation of \ref OperatorTerm::initElement(). void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, ... @@ -411,8 +411,9 @@ namespace AMDiS { ... @@ -411,8 +411,9 @@ namespace AMDiS { { { public: public: /// Constructor. /// Constructor. Vec2AtQP_SOT(DOFVectorBase *dv1, DOFVectorBase *dv2, Vec2AtQP_SOT(DOFVectorBase *dv1, BinaryAbstractFunction *af); DOFVectorBase *dv2, BinaryAbstractFunction *af = NULL); /// Implementation of \ref OperatorTerm::initElement(). /// Implementation of \ref OperatorTerm::initElement(). void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, ... @@ -1145,7 +1146,8 @@ namespace AMDiS { ... @@ -1145,7 +1146,8 @@ namespace AMDiS { { { public: public: /// Constructor. /// Constructor. VecAtQP_IJ_SOT(DOFVectorBase *dv, AbstractFunction *af, VecAtQP_IJ_SOT(DOFVectorBase *dv, AbstractFunction *af, int x_i, int x_j); int x_i, int x_j); /// Implementation of \ref OperatorTerm::initElement(). /// Implementation of \ref OperatorTerm::initElement(). ... @@ -1182,6 +1184,59 @@ namespace AMDiS { ... @@ -1182,6 +1184,59 @@ namespace AMDiS { int xi, xj; int xi, xj; }; }; /** * \ingroup Assembler * * \brief * SecondOrderTerm where A is a WorldMatrix having a in all positions * except possibly the position IJ, multiplied with a function * evaluated at the quadrature points of two given DOFVectors: * \f$\nabla \cdot f(v(\vec{x}),w(\vec{x})) A \nabla u(\vec{x}) \f$ */ class Vec2AtQP_IJ_SOT : public SecondOrderTerm { public: /// Constructor. Vec2AtQP_IJ_SOT(DOFVectorBase *dv1, DOFVectorBase *dv2, BinaryAbstractFunction *af, int x_i, int x_j); /// Implementation of \ref OperatorTerm::initElement(). void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, Quadrature *quad = NULL); /// Implements SecondOrderTerm::getLALt(). void getLALt(const ElInfo *elInfo, vector > &LALt) const; /// Implements SecondOrderTerm::eval(). void eval(int nPoints, const mtl::dense_vector& uhAtQP, const mtl::dense_vector >& grdUhAtQP, const mtl::dense_vector >& D2UhAtQP, mtl::dense_vector& result, double factor); /// Implements SecondOrderTerm::weakEval(). void weakEval(const std::vector > &grdUhAtQP, std::vector > &result); protected: /// DOFVector to be evaluated at quadrature points. DOFVectorBase* vec1; DOFVectorBase* vec2; /// Pointer to an array containing the DOFVector evaluated at quadrature points. mtl::dense_vector vecAtQPs1; mtl::dense_vector vecAtQPs2; /// Function evaluated at \ref vecAtQPs. BinaryAbstractFunction *f; private: /// Directions for the derivatives. int xi, xj; }; } } #endif #endif