Skip to content
Snippets Groups Projects
Commit 62c9d417 authored by Youett, Jonathan's avatar Youett, Jonathan Committed by akbib@FU-BERLIN.DE
Browse files

adapt to changes of boundarypatch

[[Imported from SVN: r7497]]
parent 1f61f218
Branches
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@ int main (int argc, char *argv[]) try
#if 0
BitSetVector<1> allNodes(grid.size(dim));
allNodes.setAll();
LeafBoundaryPatch<GridType> dirichletBoundary(grid, allNodes);
BoundaryPatch<GridType::LeafGridView> dirichletBoundary(grid.leafView(), allNodes);
BitSetVector<blocksize> dirichletNodes(grid.size(dim), false);
for (int i=0; i<dirichletNodes.size(); i++) {
......
......@@ -22,7 +22,7 @@
#include <dune/fufem/readbitfield.hh>
#include <dune/solvers/norms/energynorm.hh>
#include <dune/fufem/boundarypatch.hh>
#include <dune/fufem/prolongboundarypatch.hh>
#include <dune/fufem/boundarypatchprolongator.hh>
#include <dune/fufem/sampleonbitfield.hh>
#include <dune/fufem/computestress.hh>
......@@ -128,6 +128,9 @@ int main (int argc, char *argv[]) try
typedef OneDGrid RodGridType;
typedef UGGrid<dim> GridType;
typedef BoundaryPatch<GridType::LevelGridView> LevelBoundaryPatch;
typedef BoundaryPatch<GridType::LeafGridView> LeafBoundaryPatch;
RodContinuumComplex<RodGridType,GridType> complex;
complex.rods_["rod"].grid_ = shared_ptr<RodGridType>
......@@ -207,14 +210,14 @@ int main (int argc, char *argv[]) try
// Determine the continuum Dirichlet nodes
// /////////////////////////////////////////////////////
VectorType coarseDirichletValues(complex.continua_["continuum"].grid_->size(0, dim));
AmiraMeshReader<int>::readFunction(coarseDirichletValues, path + dirichletValuesFile);
AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile);
LevelBoundaryPatch<GridType> coarseDirichletBoundary;
coarseDirichletBoundary.setup(*complex.continua_["continuum"].grid_, 0);
readBoundaryPatch(coarseDirichletBoundary, path + dirichletNodesFile);
LevelBoundaryPatch coarseDirichletBoundary;
coarseDirichletBoundary.setup(complex.continua_["continuum"].grid_->levelView(0));
readBoundaryPatch<GridType>(coarseDirichletBoundary, path + dirichletNodesFile);
LeafBoundaryPatch<GridType> dirichletBoundary(*complex.continua_["continuum"].grid_);
PatchProlongator<GridType>::prolong(coarseDirichletBoundary, dirichletBoundary);
LeafBoundaryPatch dirichletBoundary(complex.continua_["continuum"].grid_->leafView());
BoundaryPatchProlongator<GridType>::prolong(coarseDirichletBoundary, dirichletBoundary);
complex.continua_["continuum"].dirichletBoundary_ = dirichletBoundary;
BitSetVector<dim> dirichletNodes( complex.continua_["continuum"].grid_->size(dim) );
......@@ -244,10 +247,10 @@ int main (int argc, char *argv[]) try
complex.couplings_[interfaceName].rodInterfaceBoundary_.setup(*complex.rods_["rod"].grid_, rodCouplingBitfield);
// then for the continuum
LevelBoundaryPatch<GridType> coarseInterfaceBoundary(*complex.continua_["continuum"].grid_, 0);
readBoundaryPatch(coarseInterfaceBoundary, path + interfaceNodesFile);
LevelBoundaryPatch coarseInterfaceBoundary(complex.continua_["continuum"].grid_->levelView(0));
readBoundaryPatch<GridType>(coarseInterfaceBoundary, path + interfaceNodesFile);
PatchProlongator<GridType>::prolong(coarseInterfaceBoundary, complex.couplings_[interfaceName].continuumInterfaceBoundary_);
BoundaryPatchProlongator<GridType>::prolong(coarseInterfaceBoundary, complex.couplings_[interfaceName].continuumInterfaceBoundary_);
// //////////////////////////////////////////
// Assemble 3d linear elasticity problem
......@@ -559,7 +562,7 @@ int main (int argc, char *argv[]) try
iAsAscii << i;
std::string iSolFilename = tmpPath + "intermediate3dSolution_" + iAsAscii.str();
AmiraMeshReader<int>::readFunction(intermediateSol3d, iSolFilename);
AmiraMeshReader<GridType>::readFunction(intermediateSol3d, iSolFilename);
// Read rod solution from file
iSolFilename = tmpPath + "intermediateRodSolution_" + iAsAscii.str();
......
......@@ -57,7 +57,7 @@ void solve (const shared_ptr<GridType>& grid,
BitSetVector<1> allNodes(grid->size(dim));
allNodes.setAll();
LeafBoundaryPatch<GridType> dirichletBoundary(*grid, allNodes);
BoundaryPatch<GridType::LeafGridView> dirichletBoundary(grid->leafView(), allNodes);
BitSetVector<blocksize> dirichletNodes(grid->size(dim));
for (int i=0; i<dirichletNodes.size(); i++)
......
......@@ -130,7 +130,7 @@ int main (int argc, char *argv[]) try
BitSetVector<1> allNodes(grid.size(dim));
allNodes.setAll();
LeafBoundaryPatch<GridType> dirichletBoundary(grid, allNodes);
BoundaryPatch<GridType::LeafGridView> dirichletBoundary(grid.leafView(), allNodes);
BitSetVector<blocksize> dirichletNodes(grid.size(dim));
for (int i=0; i<dirichletNodes.size(); i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment