version 3.11-dev
Loading...
Searching...
No Matches
assembly/fvassembler.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_FV_ASSEMBLER_HH
13#define DUMUX_FV_ASSEMBLER_HH
14
15#include <algorithm>
16#include <vector>
17#include <deque>
18#include <type_traits>
19#include <memory>
20
21#include <dune/istl/matrixindexset.hh>
22
28
32
36
39
40#include "cvfelocalassembler.hh"
41#include "cclocalassembler.hh"
42#include "fclocalassembler.hh"
43
45
46namespace Dumux::Detail {
47
48template<class DiscretizationMethod>
50
51template<class DM>
53{
54 template<class TypeTag, class Impl, DiffMethod diffMethod, bool isImplicit>
56};
57
58template<>
60{
61 template<class TypeTag, class Impl, DiffMethod diffMethod, bool isImplicit>
63};
64
65template<>
67{
68 template<class TypeTag, class Impl, DiffMethod diffMethod, bool isImplicit>
70};
71
72template<>
74{
75 template<class TypeTag, class Impl, DiffMethod diffMethod, bool isImplicit>
77};
78
79template<class TypeTag, class Impl, DiffMethod diffMethod, bool isImplicit>
82>::template type<TypeTag, Impl, diffMethod, isImplicit>;
83
85template<class P>
86using ProblemConstraintsDetector = decltype(std::declval<P>().constraints());
87
88template<class P>
89constexpr inline bool hasGlobalConstraints()
90{ return Dune::Std::is_detected<ProblemConstraintsDetector, P>::value; }
91
92} // end namespace Dumux::Detail
93
94namespace Dumux {
95
104template<class TypeTag, DiffMethod diffMethod, bool isImplicit = true, class LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>>
106{
108 using GridView = typename GridGeo::GridView;
109 using Element = typename GridView::template Codim<0>::Entity;
110 using ElementSeed = typename GridView::Grid::template Codim<0>::EntitySeed;
112
113 static constexpr bool isBox = GridGeo::discMethod == DiscretizationMethods::box;
114
117
118public:
123
125
126 using GridGeometry = GridGeo;
128
134 FVAssembler(std::shared_ptr<const Problem> problem,
135 std::shared_ptr<const GridGeometry> gridGeometry,
136 std::shared_ptr<GridVariables> gridVariables)
137 : problem_(problem)
138 , gridGeometry_(gridGeometry)
139 , gridVariables_(gridVariables)
140 , timeLoop_()
141 , isStationaryProblem_(true)
142 {
143 static_assert(isImplicit, "Explicit assembler for stationary problem doesn't make sense!");
145 && Grid::Capabilities::supportsMultithreading(gridGeometry_->gridView())
147 && getParam<bool>("Assembly.Multithreading", true);
148
149 maybeComputeColors_();
150 }
151
157 FVAssembler(std::shared_ptr<const Problem> problem,
158 std::shared_ptr<const GridGeometry> gridGeometry,
159 std::shared_ptr<GridVariables> gridVariables,
160 std::shared_ptr<const TimeLoop> timeLoop,
161 const SolutionVector& prevSol)
162 : problem_(problem)
163 , gridGeometry_(gridGeometry)
164 , gridVariables_(gridVariables)
165 , timeLoop_(timeLoop)
166 , prevSol_(&prevSol)
167 , isStationaryProblem_(!timeLoop)
168 {
170 && Grid::Capabilities::supportsMultithreading(gridGeometry_->gridView())
172 && getParam<bool>("Assembly.Multithreading", true);
173
174 maybeComputeColors_();
175 }
176
181 template<class PartialReassembler = DefaultPartialReassembler>
182 void assembleJacobianAndResidual(const SolutionVector& curSol, const PartialReassembler* partialReassembler = nullptr)
183 {
184 checkAssemblerState_();
185 resetJacobian_(partialReassembler);
186 resetResidual_();
187
188 assemble_([&](const Element& element)
189 {
190 LocalAssembler localAssembler(*this, element, curSol);
191 localAssembler.assembleJacobianAndResidual(*jacobian_, *residual_, *gridVariables_, partialReassembler);
192 });
193
194 enforcePeriodicConstraints_(*jacobian_, *residual_, curSol, *gridGeometry_);
195
196 auto applyDirichletConstraint = [&] (const auto& dofIdx,
197 const auto& values,
198 const auto eqIdx,
199 const auto pvIdx)
200 {
201 (*residual_)[dofIdx][eqIdx] = curSol[dofIdx][pvIdx] - values[pvIdx];
202
203 auto& row = (*jacobian_)[dofIdx];
204 for (auto col = row.begin(); col != row.end(); ++col)
205 row[col.index()][eqIdx] = 0.0;
206
207 (*jacobian_)[dofIdx][dofIdx][eqIdx][pvIdx] = 1.0;
208 };
209 enforceProblemConstraints_(*problem_, *gridGeometry_, applyDirichletConstraint);
210 }
211
216 {
217 checkAssemblerState_();
218 resetJacobian_();
219
220 assemble_([&](const Element& element)
221 {
222 LocalAssembler localAssembler(*this, element, curSol);
223 localAssembler.assembleJacobian(*jacobian_, *gridVariables_);
224 });
225
226 enforcePeriodicConstraints_(*jacobian_, curSol, *gridGeometry_);
227
228 auto applyDirichletConstraint = [&] (const auto& dofIdx,
229 const auto& values,
230 const auto eqIdx,
231 const auto pvIdx)
232 {
233 auto& row = (*jacobian_)[dofIdx];
234 for (auto col = row.begin(); col != row.end(); ++col)
235 row[col.index()][eqIdx] = 0.0;
236
237 (*jacobian_)[dofIdx][dofIdx][eqIdx][pvIdx] = 1.0;
238 };
239 enforceProblemConstraints_(*problem_, *gridGeometry_, applyDirichletConstraint);
240 }
241
244 {
245 resetResidual_();
246 assembleResidual(*residual_, curSol);
247 }
248
250 void assembleResidual(ResidualType& r, const SolutionVector& curSol) const
251 {
252 checkAssemblerState_();
253
254 assemble_([&](const Element& element)
255 {
256 LocalAssembler localAssembler(*this, element, curSol);
257 localAssembler.assembleResidual(r);
258 });
259
260 enforcePeriodicConstraints_(r, curSol, *gridGeometry_);
261
262 auto applyDirichletConstraint = [&] (const auto& dofIdx,
263 const auto& values,
264 const auto eqIdx,
265 const auto pvIdx)
266 {
267 r[dofIdx][eqIdx] = curSol[dofIdx][pvIdx] - values[pvIdx];
268 };
269 enforceProblemConstraints_(*problem_, *gridGeometry_, applyDirichletConstraint);
270 }
271
277 void setLinearSystem(std::shared_ptr<JacobianMatrix> A,
278 std::shared_ptr<ResidualType> r)
279 {
280 jacobian_ = A;
281 residual_ = r;
282
283 // check and/or set the BCRS matrix's build mode
284 if (jacobian_->buildMode() == JacobianMatrix::BuildMode::unknown)
285 jacobian_->setBuildMode(JacobianMatrix::random);
286 else if (jacobian_->buildMode() != JacobianMatrix::BuildMode::random)
287 DUNE_THROW(Dune::NotImplemented, "Only BCRS matrices with random build mode are supported at the moment");
288
289 setResidualSize_();
290 setJacobianPattern_();
291 }
292
298 {
299 jacobian_ = std::make_shared<JacobianMatrix>();
300 jacobian_->setBuildMode(JacobianMatrix::random);
301 residual_ = std::make_shared<ResidualType>();
302
303 setResidualSize_();
304 setJacobianPattern_();
305 }
306
311 {
312 setResidualSize_();
313 setJacobianPattern_();
314 maybeComputeColors_();
315 }
316
318 std::size_t numDofs() const
319 { return gridGeometry_->numDofs(); }
320
322 const Problem& problem() const
323 { return *problem_; }
324
327 { return *gridGeometry_; }
328
330 const GridView& gridView() const
331 { return gridGeometry().gridView(); }
332
335 { return *gridVariables_; }
336
339 { return *gridVariables_; }
340
343 { return *jacobian_; }
344
347 { return *residual_; }
348
350 const SolutionVector& prevSol() const
351 { return *prevSol_; }
352
357 void setTimeLoop(std::shared_ptr<const TimeLoop> timeLoop)
358 { timeLoop_ = timeLoop; isStationaryProblem_ = !static_cast<bool>(timeLoop); }
359
365 { prevSol_ = &u; }
366
371 { return isStationaryProblem_; }
372
376 LocalResidual localResidual() const
377 { return LocalResidual(problem_.get(), timeLoop_.get()); }
378
383 {
384 gridVariables().update(cursol);
385 }
386
390 void resetTimeStep(const SolutionVector &cursol)
391 {
392 gridVariables().resetTimeStep(cursol);
393 }
394
395private:
399 void setJacobianPattern_()
400 {
401 // resize the jacobian and the residual
402 const auto numDofs = this->numDofs();
403 jacobian_->setSize(numDofs, numDofs);
404
405 // create occupation pattern of the jacobian
406 const auto occupationPattern = getJacobianPattern<isImplicit>(gridGeometry());
407
408 // export pattern to jacobian
409 occupationPattern.exportIdx(*jacobian_);
410 }
411
413 void setResidualSize_()
414 { residual_->resize(numDofs()); }
415
417 void maybeComputeColors_()
418 {
419 if (enableMultithreading_)
420 elementSets_ = computeColoring(gridGeometry()).sets;
421 }
422
423 // reset the residual vector to 0.0
424 void resetResidual_()
425 {
426 if(!residual_)
427 {
428 residual_ = std::make_shared<ResidualType>();
429 setResidualSize_();
430 }
431
432 (*residual_) = 0.0;
433 }
434
435 // reset the Jacobian matrix to 0.0
436 template <class PartialReassembler = DefaultPartialReassembler>
437 void resetJacobian_(const PartialReassembler *partialReassembler = nullptr)
438 {
439 if(!jacobian_)
440 {
441 jacobian_ = std::make_shared<JacobianMatrix>();
442 jacobian_->setBuildMode(JacobianMatrix::random);
443 setJacobianPattern_();
444 }
445
446 if (partialReassembler)
447 partialReassembler->resetJacobian(*this);
448 else
449 *jacobian_ = 0.0;
450 }
451
452 // check if the assembler is in a correct state for assembly
453 void checkAssemblerState_() const
454 {
455 if (!isStationaryProblem_ && !prevSol_)
456 DUNE_THROW(Dune::InvalidStateException, "Assembling instationary problem but previous solution was not set!");
457 }
458
464 template<typename AssembleElementFunc>
465 void assemble_(AssembleElementFunc&& assembleElement) const
466 {
467 // a state that will be checked on all processes
468 bool succeeded = false;
469
470 // try assembling using the local assembly function
471 try
472 {
473 if (enableMultithreading_)
474 {
475 assert(elementSets_.size() > 0);
476
477 // make this element loop run in parallel
478 // for this we have to color the elements so that we don't get
479 // race conditions when writing into the global matrix
480 // each color can be assembled using multiple threads
481 for (const auto& elements : elementSets_)
482 {
483 Dumux::parallelFor(elements.size(), [&](const std::size_t i)
484 {
485 const auto element = gridView().grid().entity(elements[i]);
486 assembleElement(element);
487 });
488 }
489 }
490 else
491 for (const auto& element : elements(gridView()))
492 assembleElement(element);
493
494 // if we get here, everything worked well on this process
495 succeeded = true;
496 }
497 // throw exception if a problem occurred
498 catch (NumericalProblem &e)
499 {
500 std::cout << "rank " << gridView().comm().rank()
501 << " caught an exception while assembling:" << e.what()
502 << "\n";
503 succeeded = false;
504 }
505
506 // make sure everything worked well on all processes
507 if (gridView().comm().size() > 1)
508 succeeded = gridView().comm().min(succeeded);
509
510 // if not succeeded rethrow the error on all processes
511 if (!succeeded)
512 DUNE_THROW(NumericalProblem, "A process did not succeed in linearizing the system");
513 }
514
515 template<class GG>
516 void enforcePeriodicConstraints_(JacobianMatrix& jac, ResidualType& res, const SolutionVector& curSol, const GG& gridGeometry) const
517 {
518 if constexpr (Detail::hasPeriodicDofMap<GG>())
519 {
520 for (const auto& m : gridGeometry.periodicDofMap())
521 {
522 const auto& periodicallyMappedDofs = Dumux::Deprecated::ensureRangeOfPeriodicDofs(m.second);
523 if (std::ranges::all_of(periodicallyMappedDofs, [&](auto second){ return m.first < second; }))
524 {
525 for (const auto& second : periodicallyMappedDofs)
526 {
527 // add the second row to the first
528 res[m.first] += res[second];
529 const auto end = jac[second].end();
530 for (auto it = jac[second].begin(); it != end; ++it)
531 jac[m.first][it.index()] += (*it);
532
533 // enforce constraint in second row
534 res[second] = curSol[second] - curSol[m.first];
535
536 // set derivatives accordingly in jacobian, i.e. id for second and -id for m.first
537 auto setMatrixBlock = [] (auto& matrixBlock, double diagValue)
538 {
539 for (int eIdx = 0; eIdx < matrixBlock.N(); ++eIdx)
540 matrixBlock[eIdx][eIdx] = diagValue;
541 };
542
543 for (auto it = jac[second].begin(); it != end; ++it)
544 {
545 auto& matrixBlock = *it;
546 matrixBlock = 0.0;
547
548 assert(matrixBlock.N() == matrixBlock.M());
549 if(it.index() == second)
550 setMatrixBlock(matrixBlock, 1.0);
551
552 if(it.index() == m.first)
553 setMatrixBlock(matrixBlock, -1.0);
554
555 }
556 }
557 }
558 }
559 }
560 }
561
562 template<class GG>
563 void enforcePeriodicConstraints_(JacobianMatrix& jac, const SolutionVector& curSol, const GG& gridGeometry) const
564 {
565 if constexpr (Detail::hasPeriodicDofMap<GG>())
566 {
567 for (const auto& m : gridGeometry.periodicDofMap())
568 {
569 const auto& periodicallyMappedDofs = Dumux::Deprecated::ensureRangeOfPeriodicDofs(m.second);
570 if (std::ranges::all_of(periodicallyMappedDofs, [&](auto second){ return m.first < second; }))
571 {
572 for (const auto& second : periodicallyMappedDofs)
573 {
574 // add the second row to the first
575 const auto end = jac[second].end();
576 for (auto it = jac[second].begin(); it != end; ++it)
577 jac[m.first][it.index()] += (*it);
578
579 // set derivatives accordingly in jacobian, i.e. id for second and -id for m.first
580 auto setMatrixBlock = [] (auto& matrixBlock, double diagValue)
581 {
582 for (int eIdx = 0; eIdx < matrixBlock.N(); ++eIdx)
583 matrixBlock[eIdx][eIdx] = diagValue;
584 };
585
586 for (auto it = jac[second].begin(); it != end; ++it)
587 {
588 auto& matrixBlock = *it;
589 matrixBlock = 0.0;
590
591 assert(matrixBlock.N() == matrixBlock.M());
592 if(it.index() == second)
593 setMatrixBlock(matrixBlock, 1.0);
594
595 if(it.index() == m.first)
596 setMatrixBlock(matrixBlock, -1.0);
597
598 }
599 }
600 }
601 }
602 }
603 }
604
605 template<class GG>
606 void enforcePeriodicConstraints_(ResidualType& res, const SolutionVector& curSol, const GG& gridGeometry) const
607 {
608 if constexpr (Detail::hasPeriodicDofMap<GG>())
609 {
610 for (const auto& m : gridGeometry.periodicDofMap())
611 {
612 const auto& periodicallyMappedDofs = Dumux::Deprecated::ensureRangeOfPeriodicDofs(m.second);
613 if (std::ranges::all_of(periodicallyMappedDofs, [&](auto second){ return m.first < second; }))
614 {
615 for (const auto& second : periodicallyMappedDofs)
616 {
617 // add the second row to the first
618 res[m.first] += res[second];
619
620 // enforce constraint in second row
621 res[second] = curSol[second] - curSol[m.first];
622 }
623 }
624 }
625 }
626 }
627
628 template<class Problem, class GG, typename ApplyFunction>
629 void enforceProblemConstraints_(const Problem& problem, const GG& gridGeometry, const ApplyFunction& applyDirichletConstraint) const
630 {
632 {
633 for (const auto& constraintData : problem.constraints())
634 {
635 const auto& constraintInfo = constraintData.constraintInfo();
636 const auto& values = constraintData.values();
637 const auto dofIdx = constraintData.dofIndex();
638 // set the constraint in residual and jacobian
639 for (int eqIdx = 0; eqIdx < constraintInfo.size(); ++eqIdx)
640 {
641 if (constraintInfo.isConstraintEquation(eqIdx))
642 {
643 const auto pvIdx = constraintInfo.eqToPriVarIndex(eqIdx);
644 assert(0 <= pvIdx && pvIdx < constraintInfo.size());
645 applyDirichletConstraint(dofIdx, values, eqIdx, pvIdx);
646 }
647 }
648 }
649 }
650 }
651
653 std::shared_ptr<const Problem> problem_;
654
656 std::shared_ptr<const GridGeometry> gridGeometry_;
657
659 std::shared_ptr<GridVariables> gridVariables_;
660
662 std::shared_ptr<const TimeLoop> timeLoop_;
663
665 const SolutionVector* prevSol_ = nullptr;
666
668 bool isStationaryProblem_;
669
671 std::shared_ptr<JacobianMatrix> jacobian_;
672 std::shared_ptr<ResidualType> residual_;
673
675 bool enableMultithreading_ = false;
676 std::deque<std::vector<ElementSeed>> elementSets_;
677};
678
679} // namespace Dumux
680
681#endif
An assembler for Jacobian and residual contribution per element (cell-centered methods).
An assembler for Jacobian and residual contribution per element (CVFE methods).
An assembler for Jacobian and residual contribution per element (cell-centered methods).
Definition assembly/cclocalassembler.hh:124
An assembler for Jacobian and residual contribution per element (CVFE methods).
Definition assembly/cvfelocalassembler.hh:343
void setPreviousSolution(const SolutionVector &u)
Sets the solution from which to start the time integration. Has to be called prior to assembly for ti...
Definition assembly/fvassembler.hh:364
GridGeo GridGeometry
Definition assembly/fvassembler.hh:126
GetPropType< TypeTag, Properties::GridVariables > GridVariables
Definition assembly/fvassembler.hh:124
FVAssembler(std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< GridVariables > gridVariables, std::shared_ptr< const TimeLoop > timeLoop, const SolutionVector &prevSol)
The constructor for instationary problems.
Definition assembly/fvassembler.hh:157
GridVariables & gridVariables()
Definition assembly/fvassembler.hh:334
std::size_t numDofs() const
Returns the number of degrees of freedom.
Definition assembly/fvassembler.hh:318
const GridVariables & gridVariables() const
The global grid variables.
Definition assembly/fvassembler.hh:338
LocalResidual localResidual() const
Create a local residual object (used by the local assembler).
Definition assembly/fvassembler.hh:376
GetPropType< TypeTag, Properties::SolutionVector > SolutionVector
Definition assembly/fvassembler.hh:121
void assembleJacobianAndResidual(const SolutionVector &curSol, const PartialReassembler *partialReassembler=nullptr)
Assembles the global Jacobian of the residual and the residual for the current solution.
Definition assembly/fvassembler.hh:182
void updateAfterGridAdaption()
Resizes jacobian and residual and recomputes colors.
Definition assembly/fvassembler.hh:310
const Problem & problem() const
Definition assembly/fvassembler.hh:322
bool isStationaryProblem() const
Whether we are assembling a stationary or instationary problem.
Definition assembly/fvassembler.hh:370
const GridGeometry & gridGeometry() const
Definition assembly/fvassembler.hh:326
void assembleResidual(ResidualType &r, const SolutionVector &curSol) const
assemble a residual r
Definition assembly/fvassembler.hh:250
typename Detail::NativeDuneVectorType< SolutionVector >::type ResidualType
Definition assembly/fvassembler.hh:122
void setTimeLoop(std::shared_ptr< const TimeLoop > timeLoop)
Set time loop for instationary problems.
Definition assembly/fvassembler.hh:357
void resetTimeStep(const SolutionVector &cursol)
Reset the gridVariables.
Definition assembly/fvassembler.hh:390
void assembleJacobian(const SolutionVector &curSol)
Assembles only the global Jacobian of the residual.
Definition assembly/fvassembler.hh:215
void updateGridVariables(const SolutionVector &cursol)
Update the grid variables.
Definition assembly/fvassembler.hh:382
JacobianMatrix & jacobian()
The jacobian matrix.
Definition assembly/fvassembler.hh:342
void setLinearSystem(std::shared_ptr< JacobianMatrix > A, std::shared_ptr< ResidualType > r)
Tells the assembler which jacobian and residual to use. This also resizes the containers to the requi...
Definition assembly/fvassembler.hh:277
GetPropType< TypeTag, Properties::JacobianMatrix > JacobianMatrix
Definition assembly/fvassembler.hh:120
GetPropType< TypeTag, Properties::Problem > Problem
Definition assembly/fvassembler.hh:127
void setLinearSystem()
The version without arguments uses the default constructor to create the jacobian and residual object...
Definition assembly/fvassembler.hh:297
const SolutionVector & prevSol() const
Definition assembly/fvassembler.hh:350
FVAssembler(std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< GridVariables > gridVariables)
The constructor for stationary problems.
Definition assembly/fvassembler.hh:134
const GridView & gridView() const
The gridview.
Definition assembly/fvassembler.hh:330
ResidualType & residual()
The residual vector (rhs).
Definition assembly/fvassembler.hh:346
void assembleResidual(const SolutionVector &curSol)
compute the residuals using the internal residual
Definition assembly/fvassembler.hh:243
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition assembly/fvassembler.hh:119
An assembler for Jacobian and residual contribution per element (Face-centered methods).
Definition fclocalassembler.hh:328
detects which entries in the Jacobian have to be recomputed
Definition partialreassembler.hh:418
Manages the handling of time dependent problems.
Definition common/timeloop.hh:84
Coloring schemes for shared-memory-parallel assembly.
Defines all properties used in Dumux.
Manages the handling of time dependent problems.
Helpers for deprecation.
An enum class to define various differentiation methods available in order to compute the derivatives...
Helper to extract native Dune vector types from particular Dumux types.
An assembler for Jacobian and residual contribution per element (face-centered staggered methods).
dune-grid capabilities compatibility layer
Dune::MatrixIndexSet getJacobianPattern(const GridGeometry &gridGeometry)
Helper function to generate Jacobian pattern for cell-centered methods.
Definition jacobianpattern.hh:29
constexpr bool isSerial()
Checking whether the backend is serial.
Definition multithreading.hh:45
void parallelFor(const std::size_t count, const FunctorType &functor)
A parallel for loop (multithreading).
Definition parallel_for.hh:160
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:155
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
Helper function to generate Jacobian pattern for different discretization methods.
The available discretization methods in Dumux.
Multithreading in Dumux.
Definition cellcentered/mpfa/elementvolumevariables.hh:24
Definition elementinterpolationpointdatacache.hh:21
Definition cvfelocalresidual.hh:25
constexpr bool hasGlobalConstraints()
Definition assembly/fvassembler.hh:89
constexpr bool hasPeriodicDofMap()
Definition periodic.hh:24
decltype(std::declval< P >().constraints()) ProblemConstraintsDetector
helper struct detecting if problem has a constraints() function
Definition assembly/fvassembler.hh:86
typename LocalAssemblerChooser< typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod >::template type< TypeTag, Impl, diffMethod, isImplicit > LocalAssemblerChooser_t
Definition assembly/fvassembler.hh:80
Definition method.hh:20
constexpr Box box
Definition method.hh:176
bool supportsMultithreading(const GridView &gridView)
Definition gridcapabilities.hh:36
Definition adapt.hh:17
const Scalar PengRobinsonMixture< Scalar, StaticParameters >::u
Definition pengrobinsonmixture.hh:138
auto computeColoring(const GridGeometry &gg, int verbosity=1)
Compute iterable lists of element seeds partitioned by color.
Definition coloring.hh:243
Parallel for loop (multithreading).
Provides a helper class for nonoverlapping decomposition.
Type traits to detect periodicity support.
CCLocalAssembler< TypeTag, Impl, diffMethod, isImplicit > type
Definition assembly/fvassembler.hh:62
CCLocalAssembler< TypeTag, Impl, diffMethod, isImplicit > type
Definition assembly/fvassembler.hh:69
CVFELocalAssembler< TypeTag, Impl, diffMethod, isImplicit > type
Definition assembly/fvassembler.hh:55
FaceCenteredLocalAssembler< TypeTag, Impl, diffMethod, isImplicit > type
Definition assembly/fvassembler.hh:76
Definition assembly/fvassembler.hh:49
typename NativeDuneVectorTypeImpl< V, Dune::Std::is_detected< Detail::DuneVectors::StateDetector, V >{} >::type type
Definition dunevectors.hh:57
Traits specifying if a given discretization tag supports coloring.
Definition coloring.hh:296
Type traits to be used with vector types.