Commit 684c6605 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

added todo

parent cdfd7ab1
Pipeline #158116 passed with stages
in 12 minutes and 30 seconds
......@@ -45,10 +45,7 @@ void MonteCarlo::method() {
}
aggregate.Update(fineSolution, coarseSolution);
// errors.Estimate(aggregate);
//
// if (errors.stochastic > epsilon && epsilon != 0.0)
// mout << "TODO" << endl;
// aggregate.
// Todo: implement error estimation!
// errors.Estimate(aggregate);
}
}
......@@ -29,10 +29,14 @@ void StochasticCollocation::method() {
while (aggregate.ctr.dMcomm != 0) {
updateSampleIds(fineSolution, coarseSolution);
// Todo implement coarse solution solving
pdeSolver->DrawSample(fineId);
pdeSolver->Run(fineSolution);
aggregate.Update(fineSolution, coarseSolution);
// Todo: implement error estimation!
// errors.Estimate(aggregate);
}
}
......
......@@ -5,6 +5,9 @@
#include <utility>
// Todo
// * this class should be merged with MC into Estimator class.
// * Then provide purely abstract Estimator Interface
class StochasticCollocation : public Estimator {
protected:
......@@ -27,6 +30,7 @@ protected:
void method();
public:
// Todo decide what to use to control the number of samples -> see SparseGridGenerator
StochasticCollocation(double epsilon, int level, int stochLevel,
bool onlyFine, bool parallel,
MeshesCreator meshesCreator = MeshesCreator(),
......
......@@ -37,6 +37,23 @@ protected:
};
public:
// Todo:
// * Use other grid types. (e.g. for normally distributed rv)
// * If so, write tests and split this class
// * Maybe overload other generators than SampleGenerator<RVector>
//
// Todo:
// * Find out which level corresponds to which total degree and exact degree
// * Which depth_rule will be the most useful for our purpose
//
// Todo:
// * Move functions to cpp and only include tasmanian there!
//
// Todo:
// * Distribute samples ob different processes
SparseGridGenerator(const Meshes &meshes, int dimension, int outputs, int level,
TasGrid::TypeDepth depth = TasGrid::type_level,
TasGrid::TypeOneDRule rule = TasGrid::rule_clenshawcurtis) :
......@@ -59,6 +76,9 @@ public:
return weights;
}
// Todo implement linear trafo for areas other than [-1, 1]^N
// Todo Use TASMANIAN interface for that
double SampleWeight(const SampleID &id) {
return weights[id.number];
}
......@@ -68,6 +88,7 @@ public:
}
double SumOfWeights() const {
// Todo has to be adapted to area
return 2.0 * dimension;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment