Commit 84c343fc by Praetorius, Simon

### some new baseproblems

parent e9313900
 ... ... @@ -11,9 +11,9 @@ using namespace AMDiS; const Flag INIT_EXACT_SOLUTION = 0X2000L; const Flag UPDATE_PERIODIC_BC = 0X4000L; const Flag UPDATE_DIRICHLET_BC = 0X8000L; const Flag INIT_EXACT_SOLUTION = 0X10000L; const Flag UPDATE_PERIODIC_BC = 0X20000L; const Flag UPDATE_DIRICHLET_BC = 0X40000L; #if defined NONLIN_PROBLEM typedef ProblemNonLin ProblemStat_; ... ... @@ -128,7 +128,10 @@ public: if (asmMatrix && (singularDirichletBC.size() > 0 || manualPeriodicBC.size() > 0)) { solverMatrix.setMatrix(*getSystemMatrix()); } // writeMatrix("matrix.mat"); #endif #ifndef NDEBUG writeMatrix(name + ".mtx"); #endif } ... ...
 ... ... @@ -205,7 +205,7 @@ namespace Helpers { /// calculate the dimension of a mesh, by mesh traversal. void getMeshDimension(Mesh *mesh, WorldVector &min_corner, WorldVector &max_corner); /// read DOFVector from AMDiS .dat-files void read_dof_vector(const std::string file, DOFVector *dofvec, long size); ... ...
 ... ... @@ -546,6 +546,70 @@ mtl::dense_vector ch; mtl::dense_vector > grdMu; double delta; }; /* -------------------------------------------------------------- */ /** * \ingroup Assembler * * \brief * First order term: \f$b(v(\vec{x}), \nabla w_1(\vec{x}), \nabla w_2(\vec{x})) \cdot \nabla u(\vec{x})\f$. */ class VecGrad2_FOT : public FirstOrderTerm { public: /// Constructor VecGrad2_FOT(DOFVectorBase *dv, DOFVectorBase *dw1, DOFVectorBase *dw2, TertiaryAbstractFunction, double, WorldVector, WorldVector > *vecFct_) : FirstOrderTerm(vecFct_->getDegree()), vec0(dv), vec1(dw1), vec2(dw2), vecFct(vecFct_) { auxFeSpaces.insert(dv->getFeSpace()); auxFeSpaces.insert(dw1->getFeSpace()); auxFeSpaces.insert(dw2->getFeSpace()); } /// Implementation of \ref OperatorTerm::initElement(). void initElement(const ElInfo* elInfo, SubAssembler* subAssembler, Quadrature *quad = NULL); /// Implements FirstOrderTerm::getLb(). void getLb(const ElInfo *elInfo, vector >& Lb) const; /// Implements FirstOrderTerm::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); protected: /// DOFVector to be evaluated at quadrature points. DOFVectorBase* vec0; /// DOFVector to be evaluated at quadrature points. DOFVectorBase* vec1; /// DOFVector to be evaluated at quadrature points. DOFVectorBase* vec2; mtl::dense_vector vec0AtQPs; /// Gradient v at quadrature points. mtl::dense_vector > grad1AtQPs; /// Gradient v at quadrature points. mtl::dense_vector > grad2AtQPs; /// Function for b. TertiaryAbstractFunction, double, WorldVector, WorldVector > *vecFct; }; #endif // P_OPERATORS_FOT_H