Skip to content
Snippets Groups Projects
Commit 37f8c258 authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

chunkSize in new adapt method has to be minimun value not zero otherwise

this wont work in parallel computation.

[[Imported from SVN: r1920]]
parent 150768c0
No related branches found
No related tags found
No related merge requests found
......@@ -260,12 +260,17 @@ namespace Dune {
template <int dim, int dimworld>
template <class DofManagerType, class RestrictProlongOperatorType>
inline bool ALU3dGrid<dim,dimworld>::
adapt(DofManagerType & dm, RestrictProlongOperatorType & rpo)
adapt(DofManagerType & dm, RestrictProlongOperatorType & rpo, bool verbose )
{
assert( ((verbose) ? (std::cout << "ALU3dGrid :: adapt() new method called!\n", 1) : 1 ) );
EntityImp f ( *this, this->maxlevel() );
EntityImp s ( *this, this->maxlevel() );
int newElements = 16*refineMarked_; // guess how many new elements we get
int defaultChunk = newElementsChunk_;
int actChunk = refineEstimate_ * refineMarked_;
// guess how many new elements we get
int newElements = std::max( actChunk , defaultChunk );
ALU3DSPACE AdaptRestrictProlongImpl<ALU3dGrid<dim,dimworld>, EntityImp, DofManagerType, RestrictProlongOperatorType >
rp(*this,f,s,dm,rpo, newElements);
......@@ -274,7 +279,7 @@ namespace Dune {
// if new maxlevel was claculated
if(rp.maxlevel() >= 0) maxlevel_ = rp.maxlevel();
//std::cout << maxlevel_ << "\n";
assert( ((verbose) ? (std::cout << "maxlevel = " << maxlevel_ << "!\n", 1) : 1 ) );
if(ref)
{
......@@ -288,6 +293,7 @@ namespace Dune {
communicate(dm);
postAdapt();
assert( ((verbose) ? (std::cout << "ALU3dGrid :: adapt() new method finished!\n", 1) : 1 ) );
return ref;
}
......
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