Loading [MathJax]/extensions/TeX/AMSsymbols.js

DUNE-ACFEM (unstable)

s-multiply-added-models.hh
1#include "../../functions/gridfunction.hh"
2
3#include "test-template.hh"
4
5namespace Dune::ACFem::PDEModel::Testing
6{
7 template<class Space, class ScalarSpace>
8 void sMultiplyAddedModels(const Space& space, const ScalarSpace& scalarSpace)
9 {
10 auto Ph = discreteFunction(scalarSpace, "Ph");
11 auto sdend(Ph.dend());
12 for (auto it = Ph.dbegin(); it != sdend; ++it) {
13 *it = 1; // simply generate a constant function
14 }
15
16 auto DU_DPhi = laplacianModel(scalarSpace, "DU_DPhi");
17 std::clog << "Expression: Ph * Ph * (DU_DPhi + ritzLoadModel(DU_DPhi, Ph)" << std::endl << std::endl;
18 auto expression = Ph * Ph * (DU_DPhi + ritzLoadModel(DU_DPhi, Ph));
19 gridWalkTest(expression, scalarSpace);
20 }
21}
static auto laplacianModel(const Object &object, const std::string &name="")
Generate Model for a (weak, of course) Laplacian.
Definition: laplacianmodel.hh:95
void gridWalkTest(Function &&function)
Test routine which is called with the GridFunctionExpression from the main-program.
Definition: test-template.cc:74
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Mar 12, 23:28, 2025)