diff --git a/dumux/freeflow/staggered/model.hh b/dumux/freeflow/staggered/model.hh index 379452da40424e7d8d60201ce7973934328594ea..52407cd73a6110fbddcf2b07d9718bdc6a55a222 100644 --- a/dumux/freeflow/staggered/model.hh +++ b/dumux/freeflow/staggered/model.hh @@ -89,56 +89,57 @@ public: void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { - // typedef Dune::BlockVector<Dune::FieldVector<double, dimWorld> > VectorField; - - // create the required scalar fields - unsigned numDofs = this->numDofs(); - auto *p = writer.allocateManagedBuffer(numDofs); - // VectorField *velocity = writer.template allocateManagedBuffer<double, dimWorld>(numDofs); - // ImplicitVelocityOutput<TypeTag> velocityOutput(this->problem_()); - - // if (velocityOutput.enableOutput()) - // { - // // initialize velocity field - // for (unsigned int i = 0; i < numDofs; ++i) - // { - // (*velocity)[i] = double(0); - // } - // } - - unsigned numElements = this->gridView_().size(0); - auto *rank = writer.allocateManagedBuffer(numElements); - - for (const auto& element : elements(this->gridView_(), Dune::Partitions::interior)) - { - auto eIdx = this->elementMapper().index(element); - (*rank)[eIdx] = this->gridView_().comm().rank(); - - // get the local fv geometry - auto fvGeometry = localView(this->globalFvGeometry()); - fvGeometry.bindElement(element); - - auto elemVolVars = localView(this->curGlobalVolVars()); - elemVolVars.bindElement(element, fvGeometry, this->curSol()); - - for (auto&& scv : scvs(fvGeometry)) - { - const auto& volVars = elemVolVars[scv]; - auto dofIdxGlobal = scv.dofIndex(); - - (*p)[dofIdxGlobal] = volVars.pressure(); - } - - // velocity output - //velocityOutput.calculateVelocity(*velocity, elemVolVars, fvGeometry, element, /*phaseIdx=*/0); - } - - writer.attachDofData(*p, "p", isBox); - // if (velocityOutput.enableOutput()) - // { - // writer.attachDofData(*velocity, "velocity", isBox, dim); - // } - writer.attachCellData(*rank, "process rank"); + // TODO: implement vtk output +// // typedef Dune::BlockVector<Dune::FieldVector<double, dimWorld> > VectorField; +// +// // create the required scalar fields +// unsigned numDofs = this->numDofs(); +// auto *p = writer.allocateManagedBuffer(numDofs); +// // VectorField *velocity = writer.template allocateManagedBuffer<double, dimWorld>(numDofs); +// // ImplicitVelocityOutput<TypeTag> velocityOutput(this->problem_()); +// +// // if (velocityOutput.enableOutput()) +// // { +// // // initialize velocity field +// // for (unsigned int i = 0; i < numDofs; ++i) +// // { +// // (*velocity)[i] = double(0); +// // } +// // } +// +// unsigned numElements = this->gridView_().size(0); +// auto *rank = writer.allocateManagedBuffer(numElements); +// +// for (const auto& element : elements(this->gridView_(), Dune::Partitions::interior)) +// { +// auto eIdx = this->elementMapper().index(element); +// (*rank)[eIdx] = this->gridView_().comm().rank(); +// +// // get the local fv geometry +// auto fvGeometry = localView(this->globalFvGeometry()); +// fvGeometry.bindElement(element); +// +// auto elemVolVars = localView(this->curGlobalVolVars()); +// elemVolVars.bindElement(element, fvGeometry, this->curSol()); +// +// for (auto&& scv : scvs(fvGeometry)) +// { +// const auto& volVars = elemVolVars[scv]; +// auto dofIdxGlobal = scv.dofIndex(); +// +// (*p)[dofIdxGlobal] = volVars.pressure(); +// } +// +// // velocity output +// //velocityOutput.calculateVelocity(*velocity, elemVolVars, fvGeometry, element, /*phaseIdx=*/0); +// } +// +// writer.attachDofData(*p, "p", isBox); +// // if (velocityOutput.enableOutput()) +// // { +// // writer.attachDofData(*velocity, "velocity", isBox, dim); +// // } +// writer.attachCellData(*rank, "process rank"); } diff --git a/dumux/implicit/staggered/model.hh b/dumux/implicit/staggered/model.hh index 7529c3f0c183401f95ac587519fd27e257d7f053..edcb3b1729328d8672bae5160e7dfbf5dfafa735 100644 --- a/dumux/implicit/staggered/model.hh +++ b/dumux/implicit/staggered/model.hh @@ -337,56 +337,57 @@ public: void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { - // typedef Dune::BlockVector<Dune::FieldVector<double, dimWorld> > VectorField; - - // create the required scalar fields - unsigned numDofs = this->numDofs(); - auto *p = writer.allocateManagedBuffer(numDofs); - // VectorField *velocity = writer.template allocateManagedBuffer<double, dimWorld>(numDofs); - // ImplicitVelocityOutput<TypeTag> velocityOutput(this->problem_()); - - // if (velocityOutput.enableOutput()) - // { - // // initialize velocity field - // for (unsigned int i = 0; i < numDofs; ++i) - // { - // (*velocity)[i] = double(0); - // } - // } - - unsigned numElements = this->gridView_().size(0); - auto *rank = writer.allocateManagedBuffer(numElements); - - for (const auto& element : elements(this->gridView_(), Dune::Partitions::interior)) - { - auto eIdx = this->elementMapper().index(element); - (*rank)[eIdx] = this->gridView_().comm().rank(); - - // get the local fv geometry - auto fvGeometry = localView(this->globalFvGeometry()); - fvGeometry.bindElement(element); - - auto elemVolVars = localView(this->curGlobalVolVars()); - elemVolVars.bindElement(element, fvGeometry, this->curSol()); - - for (auto&& scv : scvs(fvGeometry)) - { - const auto& volVars = elemVolVars[scv]; - auto dofIdxGlobal = scv.dofIndex(); - - (*p)[dofIdxGlobal] = volVars.pressure(); - } - - // velocity output - //velocityOutput.calculateVelocity(*velocity, elemVolVars, fvGeometry, element, /*phaseIdx=*/0); - } - - writer.attachDofData(*p, "p", isBox); - // if (velocityOutput.enableOutput()) - // { - // writer.attachDofData(*velocity, "velocity", isBox, dim); - // } - writer.attachCellData(*rank, "process rank"); + // TODO: implement vtk output +// // typedef Dune::BlockVector<Dune::FieldVector<double, dimWorld> > VectorField; +// +// // create the required scalar fields +// unsigned numDofs = this->numDofs(); +// auto *p = writer.allocateManagedBuffer(numDofs); +// // VectorField *velocity = writer.template allocateManagedBuffer<double, dimWorld>(numDofs); +// // ImplicitVelocityOutput<TypeTag> velocityOutput(this->problem_()); +// +// // if (velocityOutput.enableOutput()) +// // { +// // // initialize velocity field +// // for (unsigned int i = 0; i < numDofs; ++i) +// // { +// // (*velocity)[i] = double(0); +// // } +// // } +// +// unsigned numElements = this->gridView_().size(0); +// auto *rank = writer.allocateManagedBuffer(numElements); +// +// for (const auto& element : elements(this->gridView_(), Dune::Partitions::interior)) +// { +// auto eIdx = this->elementMapper().index(element); +// (*rank)[eIdx] = this->gridView_().comm().rank(); +// +// // get the local fv geometry +// auto fvGeometry = localView(this->globalFvGeometry()); +// fvGeometry.bindElement(element); +// +// auto elemVolVars = localView(this->curGlobalVolVars()); +// elemVolVars.bindElement(element, fvGeometry, this->curSol()); +// +// for (auto&& scv : scvs(fvGeometry)) +// { +// const auto& volVars = elemVolVars[scv]; +// auto dofIdxGlobal = scv.dofIndex(); +// +// (*p)[dofIdxGlobal] = volVars.pressure(); +// } +// +// // velocity output +// //velocityOutput.calculateVelocity(*velocity, elemVolVars, fvGeometry, element, /*phaseIdx=*/0); +// } +// +// writer.attachDofData(*p, "p", isBox); +// // if (velocityOutput.enableOutput()) +// // { +// // writer.attachDofData(*velocity, "velocity", isBox, dim); +// // } +// writer.attachCellData(*rank, "process rank"); } /*!