33 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__CONSTRAINTS__CONTINUITY_CONSTRAINTS__P1_CONTINUITY_CONSTRAINTS_IMPL__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__CONSTRAINTS__CONTINUITY_CONSTRAINTS__P1_CONTINUITY_CONSTRAINTS_IMPL__
42 template <
typename TMatrix>
44 std::vector<size_t> & constrainedIndex,
45 std::vector<std::vector<size_t> >& vConstrainingIndex,
46 bool assembleLinearProblem =
true)
52 for(
size_t i = 0; i < vConstrainingIndex.size(); ++i)
53 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
54 "Wrong number of indices.");
57 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
59 const size_t ai = constrainedIndex[i];
70 if (assembleLinearProblem)
72 const number frac = -1.0/(vConstrainingIndex.size());
73 for(
size_t j=0; j < vConstrainingIndex.size(); ++j)
74 A(ai, vConstrainingIndex[j][i]) =
frac;
79 template <
typename TVector>
81 std::vector<size_t>& constrainedIndex,
82 std::vector<std::vector<size_t> >& vConstrainingIndex)
87 for(
size_t i = 0; i < vConstrainingIndex.size(); ++i)
88 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
89 "Wrong number of indices.");
92 const number frac = 1./(vConstrainingIndex.size());
95 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
98 block_type& val = u[constrainedIndex[i]];
104 for(
size_t j=0; j < vConstrainingIndex.size(); ++j)
112 template <
typename TMatrix>
114 std::vector<size_t>& constrainedIndex,
115 std::vector<std::vector<size_t> >& vConstrainingIndex)
118 typedef typename TMatrix::row_iterator row_iterator;
120 size_t nConstrg = vConstrainingIndex.size();
121 UG_ASSERT(nConstrg,
"There have to be constraining indices!");
124 for(
size_t i = 0; i < nConstrg; ++i)
125 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
126 "Wrong number of indices.");
132 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
134 const size_t algInd = constrainedIndex[i];
139 block_type diagEntry = A(algInd, algInd);
145 for(
size_t k = 0; k < vConstrainingIndex.size(); ++k)
146 for(
size_t m = 0; m < vConstrainingIndex.size(); ++m)
147 A(vConstrainingIndex[k][i], vConstrainingIndex[m][i]) += diagEntry;
153 const block_type block = A(algInd, algInd);
154 size_t nBlockCols =
GetCols(block);
155 UG_ASSERT(nBlockCols == constrainedIndex.size(),
156 "Number of block cols and number of constrained DoFs in hanging vertex not equal.");
157 for (
size_t blockIndConn = 0; blockIndConn < nBlockCols; ++blockIndConn)
160 for (
size_t k = 0; k < nConstrg; ++k)
161 for (
size_t m = 0; m < nConstrg; ++m)
162 DoFRef(A, vConstrainingIndex[k][i], vConstrainingIndex[m][blockIndConn]) += val;
167 for(row_iterator conn = A.begin_row(algInd); conn != A.end_row(algInd); ++conn)
169 const size_t algIndConn = conn.index();
172 if (algIndConn == algInd)
179 block_type block = conn.value();
180 block_type blockT = A(algIndConn, algInd);
187 for (
size_t k = 0; k < nConstrg; ++k)
189 UG_ASSERT(vConstrainingIndex[k][i] != constrainedIndex[i],
190 "Modifying 'this' (=conn referenced) matrix row is invalid!" << constrainedIndex[i]);
191 A(vConstrainingIndex[k][i], algIndConn) += block;
192 A(algIndConn, vConstrainingIndex[k][i]) += blockT;
198 A(algIndConn, algInd) = 0.0;
203 template <
typename TMatrix>
205 std::vector<size_t>& constrainedIndex,
206 std::vector<std::vector<size_t> >& vConstrainingIndex)
209 typedef typename TMatrix::row_iterator row_iterator;
211 UG_ASSERT(!vConstrainingIndex.empty(),
"There have to be constraining indices!");
214 for(
size_t i = 0; i < vConstrainingIndex.size(); ++i)
215 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
216 "Wrong number of indices.");
219 const number frac = 1./(vConstrainingIndex.size());
221 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
223 const size_t algInd = constrainedIndex[i];
226 const size_t addTo = vConstrainingIndex[0][i];
228 block_type diagEntry = A(algInd, algInd);
234 for(
size_t k = 0; k < vConstrainingIndex.size(); ++k)
235 A(addTo, vConstrainingIndex[k][i]) += diagEntry;
238 for(row_iterator conn = A.begin_row(algInd); conn != A.end_row(algInd); ++conn)
240 const size_t algIndConn = conn.index();
243 if (algIndConn == algInd)
continue;
249 const block_type block = conn.value();
250 block_type blockT = A(algIndConn, algInd);
255 for(
size_t k = 0; k < vConstrainingIndex.size(); ++k)
256 A(algIndConn, vConstrainingIndex[k][i]) += blockT;
259 A(addTo, algIndConn) += block;
264 A(algIndConn, algInd) = 0.0;
269 template <
typename TVector>
271 std::vector<size_t> & constrainedIndex,
272 std::vector<std::vector<size_t> >& vConstrainingIndex)
277 for(
size_t i = 0; i < vConstrainingIndex.size(); ++i)
278 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
279 "Wrong number of indices.");
282 const number frac = 1./(vConstrainingIndex.size());
285 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
289 block_type& val = rhs[constrainedIndex[i]];
293 for(
size_t j=0; j < vConstrainingIndex.size(); ++j)
294 rhs[vConstrainingIndex[j][i]] += val;
301 template <
typename TVector>
303 std::vector<size_t> & constrainedIndex,
304 std::vector<std::vector<size_t> >& vConstrainingIndex)
309 for(
size_t i = 0; i < vConstrainingIndex.size(); ++i)
310 UG_ASSERT(vConstrainingIndex[i].size() == constrainedIndex.size(),
311 "Wrong number of indices.");
313 for(
size_t i = 0; i < constrainedIndex.size(); ++i)
317 const size_t addTo = vConstrainingIndex[0][i];
319 block_type& val = rhs[constrainedIndex[i]];
337 std::vector<Vertex*>& vConstrainingVrt,
338 std::vector<size_t>& constrainedInd,
339 std::vector<std::vector<size_t> >& vConstrainingInd)
342 const int si = dd->subset_handler()->get_subset_index(hgVrt);
348 constrainedInd.clear();
351 vConstrainingInd.clear();
352 vConstrainingInd.resize(vConstrainingVrt.size());
357 dd->inner_algebra_indices(hgVrt, constrainedInd,
false);
360 for (
size_t i = 0; i < vConstrainingVrt.size(); ++i)
361 dd->inner_algebra_indices(vConstrainingVrt[i], vConstrainingInd[i],
false);
366 for (
size_t fct = 0; fct < dd->num_fct(); ++fct)
369 if (!dd->is_def_in_subset(fct, si))
continue;
372 dd->inner_algebra_indices_for_fct(hgVrt, constrainedInd,
false, fct);
375 for (
size_t i = 0; i < vConstrainingVrt.size(); ++i)
377 const int siC = dd->subset_handler()->get_subset_index(vConstrainingVrt[i]);
381 "Function " << fct <<
" is defined for a constrained vertex, "
382 "but not for one of its constraining vertices!");
384 dd->inner_algebra_indices_for_fct(vConstrainingVrt[i], vConstrainingInd[i],
false, fct);
396 template <
typename TDomain,
typename TAlgebra>
402 const std::vector<number>* vScaleMass,
403 const std::vector<number>* vScaleStiff)
405 if(this->m_spAssTuner->single_index_assembling_enabled())
406 UG_THROW(
"index-wise assemble routine is not "
407 "implemented for SymP1Constraints \n");
410 std::vector<std::vector<size_t> > vConstrainingInd;
411 std::vector<size_t> constrainedInd;
412 std::vector<Vertex*> vConstrainingVrt;
420 for(; iter != iterEnd; ++iter)
434 template <
typename TDomain,
typename TAlgebra>
440 if(this->m_spAssTuner->single_index_assembling_enabled())
441 UG_THROW(
"index-wise assemble routine is not "
442 "implemented for SymP1Constraints \n");
445 std::vector<std::vector<size_t> > vConstrainingInd;
446 std::vector<size_t> constrainedInd;
447 std::vector<Vertex*> vConstrainingVrt;
455 for(; iter != iterEnd; ++iter)
468 template <
typename TDomain,
typename TAlgebra>
476 if(this->m_spAssTuner->single_index_assembling_enabled())
477 UG_THROW(
"index-wise assemble routine is not "
478 "implemented for SymP1Constraints \n");
481 std::vector<std::vector<size_t> > vConstrainingInd;
482 std::vector<size_t> constrainedInd;
483 std::vector<Vertex*> vConstrainingVrt;
491 for(; iter != iterEnd; ++iter)
503 SetInterpolation(J, constrainedInd, vConstrainingInd, m_bAssembleLinearProblem);
507 template <
typename TDomain,
typename TAlgebra>
513 m_bAssembleLinearProblem =
true;
515 if(this->m_spAssTuner->single_index_assembling_enabled())
516 UG_THROW(
"index-wise assemble routine is not "
517 "implemented for SymP1Constraints \n");
520 std::vector<std::vector<size_t> > vConstrainingInd;
521 std::vector<size_t> constrainedInd;
522 std::vector<Vertex*> vConstrainingVrt;
530 for(; iter != iterEnd; ++iter)
549 template <
typename TDomain,
typename TAlgebra>
555 if(this->m_spAssTuner->single_index_assembling_enabled())
556 UG_THROW(
"index-wise assemble routine is not "
557 "implemented for SymP1Constraints \n");
560 std::vector<std::vector<size_t> > vConstrainingInd;
561 std::vector<size_t> constrainedInd;
562 std::vector<Vertex*> vConstrainingVrt;
570 for(; iter != iterEnd; ++iter)
584 template <
typename TDomain,
typename TAlgebra>
596 if (m_bAssembleLinearProblem)
return;
598 if (this->m_spAssTuner->single_index_assembling_enabled())
599 UG_THROW(
"index-wise assemble routine is not "
600 "implemented for SymP1Constraints \n");
603 std::vector<std::vector<size_t> > vConstrainingInd;
604 std::vector<size_t> constrainedInd;
605 std::vector<Vertex*> vConstrainingVrt;
613 for(; iter != iterEnd; ++iter)
622 size_t sz = constrainedInd.size();
623 for (
size_t i = 0; i < sz; ++i)
624 SetRow(P, constrainedInd[i], 0.0);
629 template <
typename TDomain,
typename TAlgebra>
646 template <
typename TDomain,
typename TAlgebra>
658 if (this->m_spAssTuner->single_index_assembling_enabled())
659 UG_THROW(
"index-wise assemble routine is not "
660 "implemented for OneSideP1Constraints \n");
663 std::vector<std::vector<size_t> > vConstrainingInd;
664 std::vector<size_t> constrainedInd;
665 std::vector<Vertex*> vConstrainingVrt;
673 for (; iter != iterEnd; ++iter)
682 for (
size_t i = 0; i < constrainedInd.size(); ++i)
683 u[constrainedInd[i]] = 0.0;
698 :
m_aaPos(spDomain->position_accessor())
711 if(m_aaPos[vrt1][0] < m_aaPos[vrt2][0]) {
720 if(m_aaPos[vrt1][0] < m_aaPos[vrt2][0]) {
723 else if(m_aaPos[vrt1][0] == m_aaPos[vrt2][0]) {
724 if(m_aaPos[vrt1][1] < m_aaPos[vrt2][1])
733 if(m_aaPos[vrt1][0] < m_aaPos[vrt2][0]) {
736 else if(m_aaPos[vrt1][0] == m_aaPos[vrt2][0]) {
737 if(m_aaPos[vrt1][1] < m_aaPos[vrt2][1]){
740 else if(m_aaPos[vrt1][1] == m_aaPos[vrt2][1]){
741 if(m_aaPos[vrt1][2] < m_aaPos[vrt2][2])
764 template <
typename TDomain>
767 std::vector<Vertex*>& vConstrainingVrt,
768 std::vector<size_t>& constrainedInd,
769 std::vector<std::vector<size_t> >& vConstrainingInd,
773 const int si = dd->subset_handler()->get_subset_index(hgVrt);
779 std::sort(vConstrainingVrt.begin(), vConstrainingVrt.end(), sortVertexPos);
783 constrainedInd.clear();
786 vConstrainingInd.clear();
787 vConstrainingInd.resize(vConstrainingVrt.size());
793 dd->inner_algebra_indices(hgVrt, constrainedInd,
false);
796 for (
size_t i = 0; i < vConstrainingVrt.size(); ++i)
797 dd->inner_algebra_indices(vConstrainingVrt[i], vConstrainingInd[i],
false);
801 for (
size_t fct = 0; fct < dd->num_fct(); fct++)
804 if (!dd->is_def_in_subset(fct, si))
continue;
807 dd->inner_algebra_indices_for_fct(hgVrt, constrainedInd,
false, fct);
810 for (
size_t i = 0; i < vConstrainingVrt.size(); ++i)
812 const int siC = dd->subset_handler()->get_subset_index(vConstrainingVrt[i]);
816 "Function " << fct <<
" is defined for a constrained vertex, "
817 "but not for one of its constraining vertices!");
819 dd->inner_algebra_indices_for_fct(vConstrainingVrt[i], vConstrainingInd[i],
false, fct);
826 template <
typename TDomain,
typename TAlgebra>
832 const std::vector<number>* vScaleMass,
833 const std::vector<number>* vScaleStiff)
835 if(this->m_spAssTuner->single_index_assembling_enabled())
836 UG_THROW(
"index-wise assemble routine is not "
837 "implemented for OneSideP1Constraints \n");
840 std::vector<std::vector<size_t> > vConstrainingInd;
841 std::vector<size_t> constrainedInd;
842 std::vector<Vertex*> vConstrainingVrt;
854 for(; iter != iterEnd; ++iter)
861 get_algebra_indices<TDomain>(dd, hgVrt, vConstrainingVrt, constrainedInd, vConstrainingInd, sortVertexPos);
872 template <
typename TDomain,
typename TAlgebra>
878 if(this->m_spAssTuner->single_index_assembling_enabled())
879 UG_THROW(
"index-wise assemble routine is not "
880 "implemented for OneSideP1Constraints \n");
883 std::vector<std::vector<size_t> > vConstrainingInd;
884 std::vector<size_t> constrainedInd;
885 std::vector<Vertex*> vConstrainingVrt;
897 for(; iter != iterEnd; ++iter)
904 get_algebra_indices<TDomain>(dd, hgVrt, vConstrainingVrt, constrainedInd, vConstrainingInd, sortVertexPos);
914 template <
typename TDomain,
typename TAlgebra>
922 if(this->m_spAssTuner->single_index_assembling_enabled())
923 UG_THROW(
"index-wise assemble routine is not "
924 "implemented for OneSideP1Constraints \n");
927 std::vector<std::vector<size_t> > vConstrainingInd;
928 std::vector<size_t> constrainedInd;
929 std::vector<Vertex*> vConstrainingVrt;
941 for(; iter != iterEnd; ++iter)
948 get_algebra_indices<TDomain>(dd, hgVrt, vConstrainingVrt, constrainedInd, vConstrainingInd, sortVertexPos);
957 SetInterpolation(J, constrainedInd, vConstrainingInd, m_bAssembleLinearProblem);
961 template <
typename TDomain,
typename TAlgebra>
967 m_bAssembleLinearProblem =
true;
969 if(this->m_spAssTuner->single_index_assembling_enabled())
970 UG_THROW(
"index-wise assemble routine is not "
971 "implemented for OneSideP1Constraints \n");
974 std::vector<std::vector<size_t> > vConstrainingInd;
975 std::vector<size_t> constrainedInd;
976 std::vector<Vertex*> vConstrainingVrt;
988 for(; iter != iterEnd; ++iter)
995 get_algebra_indices<TDomain>(dd, hgVrt, vConstrainingVrt, constrainedInd, vConstrainingInd, sortVertexPos);
1011 template <
typename TDomain,
typename TAlgebra>
1017 if(this->m_spAssTuner->single_index_assembling_enabled())
1018 UG_THROW(
"index-wise assemble routine is not "
1019 "implemented for OneSideP1Constraints \n");
1022 std::vector<std::vector<size_t> > vConstrainingInd;
1023 std::vector<size_t> constrainedInd;
1024 std::vector<Vertex*> vConstrainingVrt;
1032 for(; iter != iterEnd; ++iter)
1047 template <
typename TDomain,
typename TAlgebra>
1059 if (m_bAssembleLinearProblem)
return;
1061 if (this->m_spAssTuner->single_index_assembling_enabled())
1062 UG_THROW(
"index-wise assemble routine is not "
1063 "implemented for SymP1Constraints \n");
1066 std::vector<std::vector<size_t> > vConstrainingInd;
1067 std::vector<size_t> constrainedInd;
1068 std::vector<Vertex*> vConstrainingVrt;
1076 for(; iter != iterEnd; ++iter)
1085 size_t sz = constrainedInd.size();
1086 for (
size_t i = 0; i < sz; ++i)
1087 SetRow(P, constrainedInd[i], 0.0);
1092 template <
typename TDomain,
typename TAlgebra>
1108 template <
typename TDomain,
typename TAlgebra>
1120 if (this->m_spAssTuner->single_index_assembling_enabled())
1121 UG_THROW(
"index-wise assemble routine is not "
1122 "implemented for OneSideP1Constraints \n");
1125 std::vector<std::vector<size_t> > vConstrainingInd;
1126 std::vector<size_t> constrainedInd;
1127 std::vector<Vertex*> vConstrainingVrt;
1135 for (; iter != iterEnd; ++iter)
1144 for (
size_t i = 0; i < constrainedInd.size(); ++i)
1145 u[constrainedInd[i]] = 0.0;
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
A vertex appearing on edges or faces.
Definition: grid_objects_0d.h:110
algebra_type::vector_type vector_type
Type of algebra vector.
Definition: constraint_interface.h:72
algebra_type::matrix_type matrix_type
Type of algebra matrix.
Definition: constraint_interface.h:69
void adjust_jacobian(matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const number s_a0=1.0)
adapts jacobian to enforce constraints
Definition: p1_continuity_constraints_impl.h:917
virtual void adjust_correction(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
Definition: p1_continuity_constraints_impl.h:1112
void adjust_prolongation(matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0)
sets constraints in prolongation
Definition: p1_continuity_constraints_impl.h:1051
void adjust_rhs(vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
adapts a rhs to enforce constraints
Definition: p1_continuity_constraints_impl.h:875
void adjust_solution(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
sets the constraints in a solution vector
Definition: p1_continuity_constraints_impl.h:1014
void adjust_defect(vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)
adapts defect to enforce constraints
Definition: p1_continuity_constraints_impl.h:829
void adjust_restriction(matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0)
sets constraints in restriction
Definition: p1_continuity_constraints_impl.h:1096
void adjust_linear(matrix_type &mat, vector_type &rhs, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
adapts matrix and rhs (linear case) to enforce constraints
Definition: p1_continuity_constraints_impl.h:964
Const iterator to traverse the surface of a multi-grid hierarchy.
Definition: surface_view.h:237
void adjust_defect(vector_type &d, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const std::vector< number > *vScaleMass=NULL, const std::vector< number > *vScaleStiff=NULL)
adapts defect to enforce constraints
Definition: p1_continuity_constraints_impl.h:399
void adjust_prolongation(matrix_type &P, ConstSmartPtr< DoFDistribution > ddFine, ConstSmartPtr< DoFDistribution > ddCoarse, int type, number time=0.0)
sets constraints in prolongation
Definition: p1_continuity_constraints_impl.h:588
void adjust_restriction(matrix_type &R, ConstSmartPtr< DoFDistribution > ddCoarse, ConstSmartPtr< DoFDistribution > ddFine, int type, number time=0.0)
sets constraints in restriction
Definition: p1_continuity_constraints_impl.h:633
void adjust_rhs(vector_type &rhs, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
adapts a rhs to enforce constraints
Definition: p1_continuity_constraints_impl.h:437
void adjust_jacobian(matrix_type &J, const vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0, ConstSmartPtr< VectorTimeSeries< vector_type > > vSol=NULL, const number s_a0=1.0)
adapts jacobian to enforce constraints
Definition: p1_continuity_constraints_impl.h:471
virtual void adjust_correction(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
Definition: p1_continuity_constraints_impl.h:650
void adjust_linear(matrix_type &mat, vector_type &rhs, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
adapts matrix and rhs (linear case) to enforce constraints
Definition: p1_continuity_constraints_impl.h:510
void adjust_solution(vector_type &u, ConstSmartPtr< DoFDistribution > dd, int type, number time=0.0)
sets the constraints in a solution vector
Definition: p1_continuity_constraints_impl.h:552
time series of solutions and corresponding time point
Definition: solution_time_series.h:59
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
void SetRow(TSparseMatrix &A, size_t i, size_t alpha, number val=0.0)
Definition: sparsematrix_util.h:710
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
#define UG_THROW(msg)
Definition: error.h:57
#define UG_COND_THROW(cond, msg)
UG_COND_THROW(cond, msg) : performs a UG_THROW(msg) if cond == true.
Definition: error.h:61
double number
Definition: types.h:124
void VecScaleAdd(vector_t &vOut, typename vector_t::value_type s1, const vector_t &v1, typename vector_t::value_type s2, const vector_t &v2)
Scales two Vectors, adds them and returns the sum in a third vector.
Definition: math_vector_functions_common_impl.hpp:265
size_t GetCols(const T &t)
number & DoFRef(TMatrix &mat, const DoFIndex &iInd, const DoFIndex &jInd)
Definition: multi_index.h:276
void SetInterpolation(TMatrix &A, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex, bool assembleLinearProblem=true)
sets a matrix row corresponding to averaging the constrained index
Definition: p1_continuity_constraints_impl.h:43
void InterpolateValues(TVector &u, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex)
Definition: p1_continuity_constraints_impl.h:80
void SplitAddRhs_OneSide(TVector &rhs, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex)
Definition: p1_continuity_constraints_impl.h:302
double & BlockRef(T &vec, size_t i)
Definition: blocks.h:66
void SplitAddRow_Symmetric(TMatrix &A, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex)
Definition: p1_continuity_constraints_impl.h:113
void get_algebra_indices(ConstSmartPtr< DoFDistribution > dd, ConstrainedVertex *hgVrt, std::vector< Vertex * > &vConstrainingVrt, std::vector< size_t > &constrainedInd, std::vector< std::vector< size_t > > &vConstrainingInd)
Extract algebra indices for constrained and constraining indices from DoF distribution.
Definition: p1_continuity_constraints_impl.h:335
void SplitAddRhs_Symmetric(TVector &rhs, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex)
Definition: p1_continuity_constraints_impl.h:270
void CollectConstraining(std::vector< Vertex * > &vConstrainingVrt, const Grid &grid, ConstrainedVertex *hgVrt, bool bClearContainer)
returns the vertices of the object constraining a hanging vertex
Definition: p1_continuity_constraints.cpp:41
void SplitAddRow_OneSide(TMatrix &A, std::vector< size_t > &constrainedIndex, std::vector< std::vector< size_t > > &vConstrainingIndex)
Definition: p1_continuity_constraints_impl.h:204
T value_type
Definition: sparsematrix_interface.h:2
Definition: p1_continuity_constraints_impl.h:695
SortVertexPos(SmartPtr< Domain< dim, MultiGrid, MGSubsetHandler > > spDomain)
Definition: p1_continuity_constraints_impl.h:697
Domain< dim, MultiGrid, MGSubsetHandler >::position_accessor_type & m_aaPos
Definition: p1_continuity_constraints_impl.h:705
bool operator()(Vertex *vrt1, Vertex *vrt2)
Definition: p1_continuity_constraints_impl.h:701