Skip to content
Snippets Groups Projects
Verified Commit 5764308b authored by René Fritze's avatar René Fritze
Browse files

[functors] implement mandatory copy function

parent 965da5ea
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,11 @@ public:
return found_;
}
BaseType* copy() override
{
return new BoundaryDetectorFunctor<GL>(*this);
}
private:
const BoundaryInfo<IntersectionType>& boundary_info_;
const std::shared_ptr<BoundaryType> boundary_type_;
......
......@@ -48,6 +48,11 @@ struct MinMaxCoordinateFunctor : public ElementFunctor<GridViewType>
}
}
ElementFunctor<GridViewType>* copy() override
{
return new MinMaxCoordinateFunctor<GridViewType>(*this);
}
VectorType minima_;
VectorType maxima_;
};
......
......@@ -55,6 +55,11 @@ public:
finalize_lambda_();
}
BaseType* copy() override
{
return new ElementLambdaFunctor<GL>(*this);
}
private:
const ApplyLambdaType apply_lambda_;
const PrepareLambdaType prepare_lambda_;
......@@ -102,6 +107,11 @@ public:
finalize_lambda_();
}
BaseType* copy() override
{
return new IntersectionLambdaFunctor(*this);
}
private:
const ApplyLambdaType apply_lambda_;
const PrepareLambdaType prepare_lambda_;
......@@ -157,6 +167,11 @@ public:
finalize_lambda_();
}
BaseType* copy() override
{
return new ElementAndIntersectionLambdaFunctor<GL>(*this);
}
private:
const ElementApplyLambdaType element_apply_lambda_;
const IntersectionApplyLambdaType intersection_apply_lambda_;
......
......@@ -41,6 +41,11 @@ struct MaximumEntityVolumeRefineFunctor : public ElementFunctor<GridViewType>
grid_.mark(1, element);
}
ElementFunctor<GridViewType>* copy() override
{
return new MaximumEntityVolumeRefineFunctor<GridViewType>(*this);
}
const double threshold_volume_;
GridType& grid_;
};
......
......@@ -139,6 +139,11 @@ struct Dimensions
coord_limits_[k](corner[k]);
}
} // ()
ElementFunctor<GridLayerType>* copy() override
{
return new GridDimensionsFunctor(*this);
}
};
double volume_relation() const
......
......@@ -137,6 +137,11 @@ public:
file_.flush();
}
BaseType* copy() override
{
return new PgfEntityFunctorIntersections<GridViewType>(*this);
}
void maybePrintEntityIndex(const typename BaseType::ElementType& entity, const int idx)
{
if (!print_entityIndex_)
......@@ -206,6 +211,12 @@ public:
this->file_.flush();
}
ElementAndIntersectionFunctor<GridViewType>* copy() override
{
return new PgfEntityFunctorIntersectionsWithShift<GridViewType>(*this);
}
private:
const int level_;
};
......
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