From: kanschat Date: Tue, 6 Sep 2011 16:26:24 +0000 (+0000) Subject: ...and thnings compile again X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf75cc534a03f01fcaa3f8973e54fb6822462f76;p=dealii-svn.git ...and thnings compile again git-svn-id: https://svn.dealii.org/trunk@24274 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/meshworker/assembler.h b/deal.II/include/deal.II/meshworker/assembler.h index 54acf9779f..e71cacc14e 100644 --- a/deal.II/include/deal.II/meshworker/assembler.h +++ b/deal.II/include/deal.II/meshworker/assembler.h @@ -847,6 +847,8 @@ namespace MeshWorker } } } + } +} DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/meshworker/simple.h b/deal.II/include/deal.II/meshworker/simple.h index 81970cce62..1235a338d1 100644 --- a/deal.II/include/deal.II/meshworker/simple.h +++ b/deal.II/include/deal.II/meshworker/simple.h @@ -10,8 +10,8 @@ // //--------------------------------------------------------------------------- -#ifndef __deal2__mesh_worker_assembler_h -#define __deal2__mesh_worker_assembler_h +#ifndef __deal2__mesh_worker_simple_h +#define __deal2__mesh_worker_simple_h #include #include @@ -94,10 +94,10 @@ namespace MeshWorker * filled by assemble(). */ NamedData > > residuals; - /** - * A pointer to the object containing constraints. - */ - SmartPointer > constraints; + /** + * A pointer to the object containing constraints. + */ + SmartPointer > constraints; }; /** @@ -184,9 +184,9 @@ namespace MeshWorker * assembled. */ SmartPointer > matrix; - /** - * A pointer to the object containing constraints. - */ + /** + * A pointer to the object containing constraints. + */ SmartPointer > constraints; /** @@ -257,7 +257,7 @@ namespace MeshWorker */ void initialize_interfaces(MGLevelObject& interface_in, - MGLevelObject& interface_out); + MGLevelObject& interface_out); /** * Initialize the local data * in the @@ -296,63 +296,63 @@ namespace MeshWorker * Assemble a single matrix * into a global matrix. */ - void assemble(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2); + void assemble(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2); /** * Assemble a single matrix * into a global matrix. */ - void assemble(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2, - const unsigned int level); + void assemble(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2, + const unsigned int level); /** * Assemble a single matrix * into a global matrix. */ - void assemble_up(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2, - const unsigned int level = -1); + void assemble_up(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2, + const unsigned int level = -1); /** * Assemble a single matrix * into a global matrix. */ - void assemble_down(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2, - const unsigned int level = -1); + void assemble_down(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2, + const unsigned int level = -1); /** * Assemble a single matrix * into a global matrix. */ - void assemble_in(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2, - const unsigned int level = -1); + void assemble_in(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2, + const unsigned int level = -1); /** * Assemble a single matrix * into a global matrix. */ - void assemble_out(MATRIX& G, - const FullMatrix& M, - const std::vector& i1, - const std::vector& i2, - const unsigned int level = -1); + void assemble_out(MATRIX& G, + const FullMatrix& M, + const std::vector& i1, + const std::vector& i2, + const unsigned int level = -1); /** * The global matrix being @@ -393,9 +393,9 @@ namespace MeshWorker * fine to coarse. */ SmartPointer,MGMatrixSimple > interface_out; - /** - * A pointer to the object containing constraints. - */ + /** + * A pointer to the object containing constraints. + */ SmartPointer > mg_constrained_dofs; /** @@ -509,16 +509,16 @@ namespace MeshWorker ResidualSimple::assemble(const DOFINFO& info) { for (unsigned int k=0;kdistribute_local_to_global( + { + if(constraints == 0) + { + for (unsigned int i=0;idistribute_local_to_global( info.vector(k).block(0), info.indices, (*residuals(k))); - } + } } @@ -526,24 +526,24 @@ namespace MeshWorker template inline void ResidualSimple::assemble(const DOFINFO& info1, - const DOFINFO& info2) + const DOFINFO& info2) { for (unsigned int k=0;kdistribute_local_to_global( - info1.vector(k).block(0), info1.indices, (*residuals(k))); - constraints->distribute_local_to_global( - info2.vector(k).block(0), info2.indices, (*residuals(k))); - } + { + constraints->distribute_local_to_global( + info1.vector(k).block(0), info1.indices, (*residuals(k))); + constraints->distribute_local_to_global( + info2.vector(k).block(0), info2.indices, (*residuals(k))); + } } } @@ -593,16 +593,16 @@ namespace MeshWorker AssertDimension(M.m(), i1.size()); AssertDimension(M.n(), i2.size()); - if(constraints == 0) - { - for (unsigned int j=0; j= threshold) - matrix->add(i1[j], i2[k], M(j,k)); - } - else - constraints->distribute_local_to_global( - M, i1, i2, *matrix); + if(constraints == 0) + { + for (unsigned int j=0; j= threshold) + matrix->add(i1[j], i2[k], M(j,k)); + } + else + constraints->distribute_local_to_global( + M, i1, i2, *matrix); } @@ -693,22 +693,22 @@ namespace MeshWorker AssertDimension(M.n(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(j,k)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(j,k)); + } else - { - for (unsigned int j=0; j= threshold) - { - if(!mg_constrained_dofs->continuity_across_refinement_edges()) - G.add(i1[j], i2[k], M(j,k)); - } - } + { + for (unsigned int j=0; j= threshold) + { + if(!mg_constrained_dofs->continuity_across_refinement_edges()) + G.add(i1[j], i2[k], M(j,k)); + } + } } @@ -725,34 +725,34 @@ namespace MeshWorker AssertDimension(M.n(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(j,k)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(j,k)); + } else - { - for (unsigned int j=0; j= threshold) - if (!mg_constrained_dofs->at_refinement_edge(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge(level, i2[k])) - { - if (mg_constrained_dofs->set_boundary_values()) - { - if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) && - !mg_constrained_dofs->is_boundary_index(level, i2[k])) - || - (mg_constrained_dofs->is_boundary_index(level, i1[j]) && - mg_constrained_dofs->is_boundary_index(level, i2[k]) && - i1[j] == i2[k])) - G.add(i1[j], i2[k], M(j,k)); - } - else - G.add(i1[j], i2[k], M(j,k)); - } - } + { + for (unsigned int j=0; j= threshold) + if (!mg_constrained_dofs->at_refinement_edge(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge(level, i2[k])) + { + if (mg_constrained_dofs->set_boundary_values()) + { + if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) && + !mg_constrained_dofs->is_boundary_index(level, i2[k])) + || + (mg_constrained_dofs->is_boundary_index(level, i1[j]) && + mg_constrained_dofs->is_boundary_index(level, i2[k]) && + i1[j] == i2[k])) + G.add(i1[j], i2[k], M(j,k)); + } + else + G.add(i1[j], i2[k], M(j,k)); + } + } } @@ -769,21 +769,21 @@ namespace MeshWorker AssertDimension(M.m(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(k,j)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(k,j)); + } else - { - for (unsigned int j=0; j= threshold) - if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge(level, i2[k])) - G.add(i1[j], i2[k], M(k,j)); - } + { + for (unsigned int j=0; j= threshold) + if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge(level, i2[k])) + G.add(i1[j], i2[k], M(k,j)); + } } template @@ -799,21 +799,21 @@ namespace MeshWorker AssertDimension(M.n(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(j,k)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(j,k)); + } else - { - for (unsigned int j=0; j= threshold) - if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge(level, i2[k])) + { + for (unsigned int j=0; j= threshold) + if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge(level, i2[k])) G.add(i1[j], i2[k], M(j,k)); - } + } } template @@ -829,34 +829,34 @@ namespace MeshWorker AssertDimension(M.n(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(j,k)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(j,k)); + } else - { - for (unsigned int j=0; j= threshold) - if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge(level, i2[k])) - { - if (mg_constrained_dofs->set_boundary_values()) - { - if((!mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k])) - || - (mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && - mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k]) && - i1[j] == i2[k])) - G.add(i1[j], i2[k], M(j,k)); - } - else - G.add(i1[j], i2[k], M(j,k)); - } - } + { + for (unsigned int j=0; j= threshold) + if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge(level, i2[k])) + { + if (mg_constrained_dofs->set_boundary_values()) + { + if((!mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k])) + || + (mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && + mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k]) && + i1[j] == i2[k])) + G.add(i1[j], i2[k], M(j,k)); + } + else + G.add(i1[j], i2[k], M(j,k)); + } + } } template @@ -872,34 +872,34 @@ namespace MeshWorker AssertDimension(M.m(), i2.size()); if(mg_constrained_dofs == 0) - { - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(k,j)); - } + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(k,j)); + } else - { - for (unsigned int j=0; j= threshold) - if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge(level, i2[k])) - { - if (mg_constrained_dofs->set_boundary_values()) - { - if((!mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && - !mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k])) - || - (mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && - mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k]) && - i1[j] == i2[k])) - G.add(i1[j], i2[k], M(k,j)); - } - else - G.add(i1[j], i2[k], M(k,j)); - } - } + { + for (unsigned int j=0; j= threshold) + if(mg_constrained_dofs->at_refinement_edge(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge(level, i2[k])) + { + if (mg_constrained_dofs->set_boundary_values()) + { + if((!mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && + !mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k])) + || + (mg_constrained_dofs->at_refinement_edge_boundary(level, i1[j]) && + mg_constrained_dofs->at_refinement_edge_boundary(level, i2[k]) && + i1[j] == i2[k])) + G.add(i1[j], i2[k], M(k,j)); + } + else + G.add(i1[j], i2[k], M(k,j)); + } + } } @@ -912,10 +912,10 @@ namespace MeshWorker assemble((*matrix)[level], info.matrix(0,false).matrix, info.indices, info.indices, level); if(mg_constrained_dofs != 0) - { - assemble_in((*interface_in)[level], info.matrix(0,false).matrix, info.indices, info.indices, level); - assemble_out((*interface_out)[level],info.matrix(0,false).matrix, info.indices, info.indices, level); - } + { + assemble_in((*interface_in)[level], info.matrix(0,false).matrix, info.indices, info.indices, level); + assemble_out((*interface_out)[level],info.matrix(0,false).matrix, info.indices, info.indices, level); + } } @@ -931,19 +931,19 @@ namespace MeshWorker if (level1 == level2) { if(mg_constrained_dofs == 0) - { - assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices); - assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices); - assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices); - assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices); - } + { + assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices); + assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices); + assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices); + assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices); + } else - { - assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices, level1); - assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices, level1); - assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices, level1); - assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices, level1); - } + { + assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices, level1); + assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices, level1); + assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices, level1); + assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices, level1); + } } else { @@ -952,13 +952,13 @@ namespace MeshWorker // which is done by // the coarser cell assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices); - //assemble_transpose((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices); - //assemble((*flux_down)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices); + //assemble_transpose((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices); + //assemble((*flux_down)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices); if(level1>0) - { - assemble_up((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices, level1); - assemble_down((*flux_down)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices, level1); - } + { + assemble_up((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices, level1); + assemble_down((*flux_down)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices, level1); + } } } //----------------------------------------------------------------------//