47 typedef typename HBox::SortedContainer boxContainer;
48 typedef std::map<gsHBox<2,T>,
index_t,gsHBoxCompare<2,T>> indexMapType;
49 typedef std::map<index_t,gsHBox<2,T>*> boxMapType;
62 void defaultOptions();
68 void container_into(
const std::vector<T> & elError,
HBoxContainer & result);
70 void markRef_into(
const std::vector<T> & elError,
HBoxContainer & elMarked);
73 void markCrs_into(
const std::vector<T> & elError,
HBoxContainer & elMarked);
75 void markRef(
const std::vector<T> & errors);
76 void markCrs(
const std::vector<T> & errors);
81 bool refine(
const std::vector<bool> & markedRef) {
return refine(_toContainer(markedRef)); }
82 bool unrefine(
const std::vector<bool> & markedCrs) {
return unrefine(_toContainer(markedCrs)); };
84 bool refine() {
return refine(m_markedRef); }
85 bool unrefine() {
return unrefine(m_markedRef); };
99 void assignErrors(
const std::vector<T> & elError);
100 T blockedError()
const;
101 T nonBlockedError()
const;
104 void _makeMap(
const gsFunctionSet<T> * input,
typename gsAdaptiveMeshing<T>::indexMapType & indexMap,
typename gsAdaptiveMeshing<T>::boxMapType & boxMap);
106 void _assignErrors(boxMapType & container,
const std::vector<T> & elError);
112 void _unrefineMarkedElements(
const HBoxContainer & container,
119 std::vector<index_t> _sortPermutation(
const boxMapType & container);
120 std::vector<index_t> _sortPermutationProjectedRef(
const boxMapType & container);
121 std::vector<index_t> _sortPermutationProjectedCrs(
const boxMapType & container);
128 template<
bool _coarsen,
bool _admissible>
131 template<
bool _coarsen,
bool _admissible>
134 _markFraction_impl<_coarsen,_admissible>(elements,predicates,elMarked);
136 template<
bool _coarsen,
bool _admissible>
137 typename std::enable_if< _coarsen && _admissible, void>::type
140 template<
bool _coarsen,
bool _admissible>
141 typename std::enable_if< _coarsen && !_admissible, void>::type
144 template<
bool _coarsen,
bool _admissible>
145 typename std::enable_if<!_coarsen && _admissible, void>::type
148 template<
bool _coarsen,
bool _admissible>
149 typename std::enable_if<!_coarsen && !_admissible, void>::type
152 template<
bool _coarsen,
bool _admissible>
155 _markProjectedFraction_impl<_coarsen,_admissible>(elements,predicates,elMarked);
157 template<
bool _coarsen,
bool _admissible>
158 typename std::enable_if< _coarsen && _admissible, void>::type
161 template<
bool _coarsen,
bool _admissible>
162 typename std::enable_if< _coarsen && !_admissible, void>::type
165 template<
bool _coarsen,
bool _admissible>
166 typename std::enable_if<!_coarsen && _admissible, void>::type
169 template<
bool _coarsen,
bool _admissible>
170 typename std::enable_if<!_coarsen && !_admissible, void>::type
174 template<
bool _coarsen,
bool _admissible>
177 _markPercentage_impl<_coarsen,_admissible>(elements,predicates,elMarked);
179 template<
bool _coarsen,
bool _admissible>
180 typename std::enable_if< _coarsen && _admissible, void>::type
183 template<
bool _coarsen,
bool _admissible>
184 typename std::enable_if< _coarsen && !_admissible, void>::type
187 template<
bool _coarsen,
bool _admissible>
188 typename std::enable_if<!_coarsen && _admissible, void>::type
191 template<
bool _coarsen,
bool _admissible>
192 typename std::enable_if<!_coarsen && !_admissible, void>::type
195 template<
bool _coarsen,
bool _admissible>
198 _markThreshold_impl<_coarsen,_admissible>(elements,predicates,elMarked);
200 template<
bool _coarsen,
bool _admissible>
201 typename std::enable_if< _coarsen && _admissible, void>::type
204 template<
bool _coarsen,
bool _admissible>
205 typename std::enable_if< _coarsen && !_admissible, void>::type
208 template<
bool _coarsen,
bool _admissible>
209 typename std::enable_if<!_coarsen && _admissible, void>::type
212 template<
bool _coarsen,
bool _admissible>
213 typename std::enable_if<!_coarsen && !_admissible, void>::type
217 bool _checkBoxes(
const typename HBox::Container & boxes,
const std::vector<
gsHBoxCheck<2,T> *> predicates)
const;
219 T _totalError(
const boxMapType & elements);
221 T _maxError(
const boxMapType & elements);
224 void _addAndMark(
typename HBox::Container & boxes,
HBoxContainer & elMarked)
const;
226 void _setContainerProperties(
typename HBox::Container & boxes )
const;
228 HBox * _boxPtr(
const HBox & box)
const;
238 T m_crsParam, m_crsParamExtra, m_refParam, m_refParamExtra;
239 MarkingStrategy m_crsRule, m_refRule;
254 indexMapType m_indices;
257 T m_totalError, m_maxError, m_uniformRefError, m_uniformCrsError;
259 std::vector<index_t> m_refPermutation, m_crsPermutation;