|
fvbasediscretization.hh
Go to the documentation of this file.
101{ using type = Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>; };
106{ using type = Dune::MultipleCodimMultipleGeomTypeMapper<GetPropType<TypeTag, Properties::GridView>>; };
569 // Initialize intensive quantities cache now that all problem-specific parameters are available.
570 // This ensures intensiveQuantityHistorySize is correct based on recycleFirstIterationStorage().
643 const IntensiveQuantities* cachedIntensiveQuantities(unsigned globalIdx, unsigned timeIdx) const
768 void invalidateAndUpdateIntensiveQuantities(unsigned timeIdx, const GridViewType& gridView) const
966 // If we cannot recycle first iteration storage, it does not make sense to shift the storage cache.
973 // should we invalidate the cache for the most recent time indices? (see shiftIntensiveQuantityCache)
1631 { throw std::logic_error("The discretization class must implement the numGridDof() method!"); }
1789 DiscBaseOutputModule::attachScalarDofData_(writer, *normalizedRelError, "normalized relative error");
2104 static constexpr unsigned historySize = getPropValue<TypeTag, Properties::TimeDiscHistorySize>();
This is a stand-alone version of boost::alignment::aligned_allocator from Boost 1.... Base class for specifying auxiliary equations. Definition: baseauxiliarymodule.hh:56 virtual void applyInitial()=0 Set the initial condition of the auxiliary module in the solution vector. void setDofOffset(int value) Set the offset in the global system of equations for the first degree of freedom of this auxiliary mo... Definition: baseauxiliarymodule.hh:78 Represents all quantities which available on boundary segments. Definition: fvbaseboundarycontext.hh:46 Represents all quantities which available for calculating constraints. Definition: fvbaseconstraintscontext.hh:44 Class to specify constraints for a finite volume spatial discretization. Definition: fvbaseconstraints.hh:48 Definition: fvbasediscretization.hh:350 const SolutionVector & blockVector() const Definition: fvbasediscretization.hh:373 BlockVectorWrapper()=default SolutionVector blockVector_ Definition: fvbasediscretization.hh:352 void serializeOp(Serializer &serializer) Definition: fvbasediscretization.hh:382 static BlockVectorWrapper serializationTestObject() Definition: fvbasediscretization.hh:360 SolutionVector & blockVector() Definition: fvbasediscretization.hh:370 bool operator==(const BlockVectorWrapper &wrapper) const Definition: fvbasediscretization.hh:376 BlockVectorWrapper(const std::string &, const std::size_t size) Definition: fvbasediscretization.hh:354 The base class for the finite volume discretization schemes without adaptation. Definition: fvbasediscretization.hh:2099 FvBaseDiscretizationNoAdapt(Simulator &simulator) Definition: fvbasediscretization.hh:2120 The base class for the finite volume discretization schemes. Definition: fvbasediscretization.hh:298 Timer linearizeTimer_ Definition: fvbasediscretization.hh:2054 std::vector< IntensiveQuantitiesVector > intensiveQuantityCache_ Definition: fvbasediscretization.hh:2066 LocalLinearizer & localLinearizer(unsigned openMpThreadId) Definition: fvbasediscretization.hh:1322 void prepareOutputFields() const Prepare the quantities relevant for the current solution to be appended to the output writers. Definition: fvbasediscretization.hh:1822 void shiftIntensiveQuantityCache(unsigned numSlots=1) Move the intensive quantities for a given time index to the back. Definition: fvbasediscretization.hh:822 void invalidateAndUpdateIntensiveQuantities(unsigned timeIdx) const Definition: fvbasediscretization.hh:727 void adaptGrid() Called by the update() method when the grid should be refined. Definition: fvbasediscretization.hh:1495 std::vector< BaseAuxiliaryModule< TypeTag > * > auxEqModules_ Definition: fvbasediscretization.hh:2049 const Implementation & asImp_() const Definition: fvbasediscretization.hh:2034 void addAuxiliaryModule(BaseAuxiliaryModule< TypeTag > *auxMod) Add a module for an auxiliary equation. Definition: fvbasediscretization.hh:1887 void setIntensiveQuantitiesCacheEntryValidity(unsigned globalIdx, unsigned timeIdx, bool newValue) const Invalidate the cache for a given intensive quantities object. Definition: fvbasediscretization.hh:694 void finishInit() Apply the initial conditions to the model. Definition: fvbasediscretization.hh:457 void prefetch(const Element &) const Allows to improve the performance by prefetching all data which is associated with a given element. Definition: fvbasediscretization.hh:590 bool enableStorageCache_ Definition: fvbasediscretization.hh:2086 void resizeAndResetIntensiveQuantitiesCache_() Definition: fvbasediscretization.hh:1970 std::vector< Scalar > dofTotalVolume_ Definition: fvbasediscretization.hh:2076 void updateSuccessful() Called by the update() method if it was successful. Definition: fvbasediscretization.hh:1489 static std::string discretizationName() Returns a string of discretization's human-readable name. Definition: fvbasediscretization.hh:1682 unsigned cachedIntensiveQuantityHistorySize() const Get the cached intensive quantity history size. Definition: fvbasediscretization.hh:708 BaseAuxiliaryModule< TypeTag > * auxiliaryModule(unsigned auxEqModIdx) Returns a given module for auxiliary equations. Definition: fvbasediscretization.hh:1927 bool isLocalDof(unsigned globalIdx) const Returns if the overlap of the volume ofa degree of freedom is non-zero. Definition: fvbasediscretization.hh:1259 std::size_t numAuxiliaryModules() const Returns the number of modules for auxiliary equations. Definition: fvbasediscretization.hh:1921 bool operator==(const FvBaseDiscretization &rhs) const Definition: fvbasediscretization.hh:1962 void serializeOp(Serializer &serializer) Definition: fvbasediscretization.hh:1955 std::vector< bool > isLocalDof_ Definition: fvbasediscretization.hh:2077 LocalResidual & localResidual_() Reference to the local residal object. Definition: fvbasediscretization.hh:2022 void registerOutputModules_() Register all output modules which make sense for the model. Definition: fvbasediscretization.hh:2013 bool enableGridAdaptation() const Returns whether the grid ought to be adapted to the solution during the simulation. Definition: fvbasediscretization.hh:522 const NewtonMethod & newtonMethod() const Returns the newton method object. Definition: fvbasediscretization.hh:604 SolutionVector & mutableSolution(unsigned timeIdx) const Definition: fvbasediscretization.hh:1290 void advanceTimeLevel() Called by the problem if a time integration was successful, post processing of the solution is done a... Definition: fvbasediscretization.hh:1533 NewtonMethod & newtonMethod() Returns the newton method object. Definition: fvbasediscretization.hh:598 const VertexMapper & vertexMapper() const Returns the mapper for vertices to indices. Definition: fvbasediscretization.hh:1660 const EqVector & cachedStorage(unsigned globalIdx, unsigned timeIdx) const Retrieve an entry of the cache for the storage term. Definition: fvbasediscretization.hh:880 void updatePVWeights(const ElementContext &) const Update the weights of all primary variables within an element given the complete set of intensive qua... Definition: fvbasediscretization.hh:1715 const Timer & solveTimer() const Definition: fvbasediscretization.hh:1948 void updateFailed() Called by the update() method if it was unsuccessful. This is primary a hook which the actual model c... Definition: fvbasediscretization.hh:1506 void updateBegin() Called by the update() method before it tries to apply the newton method. This is primary a hook whic... Definition: fvbasediscretization.hh:1482 FvBaseDiscretization(const FvBaseDiscretization &)=delete Scalar globalResidual(GlobalEqVector &dest) const Compute the global residual for the current solution vector. Definition: fvbasediscretization.hh:999 LocalResidual & localResidual(unsigned openMpThreadId) Definition: fvbasediscretization.hh:1334 void serializeEntity(std::ostream &outstream, const DofEntity &dof) Write the current solution for a degree of freedom to a restart file. Definition: fvbasediscretization.hh:1588 void setEnableStorageCache(bool enableStorageCache) Set the value of enable storage cache. Definition: fvbasediscretization.hh:864 std::string eqName(unsigned eqIdx) const Given an equation index, return a human readable name. Definition: fvbasediscretization.hh:1702 Scalar eqWeight(unsigned, unsigned) const Returns the relative weight of an equation. Definition: fvbasediscretization.hh:1356 std::array< std::vector< unsigned char >, historySize > storageCacheUpToDate_ Definition: fvbasediscretization.hh:2082 const Timer & prePostProcessTimer() const Definition: fvbasediscretization.hh:1942 Scalar primaryVarWeight(unsigned globalDofIdx, unsigned pvIdx) const Returns the relative weight of a primary variable for calculating relative errors. Definition: fvbasediscretization.hh:1344 void deserialize(Restarter &) Deserializes the state of the model. Definition: fvbasediscretization.hh:1573 void checkConservativeness(Scalar tolerance=-1, bool verbose=false) const Ensure that the difference between the storage terms of the last and of the current time step is cons... Definition: fvbasediscretization.hh:1129 Scalar gridTotalVolume() const Returns the volume of the whole grid which represents the spatial domain. Definition: fvbasediscretization.hh:1269 FvBaseDiscretization(Simulator &simulator) Definition: fvbasediscretization.hh:393 const IntensiveQuantities * thermodynamicHint(unsigned globalIdx, unsigned timeIdx) const Return the thermodynamic hint for a entity on the grid at given time. Definition: fvbasediscretization.hh:622 bool storageCacheIsUpToDate(unsigned globalIdx, unsigned timeIdx) const Returns true if the storage cache entry for a given DOF and time index is up to date. Definition: fvbasediscretization.hh:920 const Timer & updateTimer() const Definition: fvbasediscretization.hh:1951 const Linearizer & linearizer() const Returns the operator linearizer for the global jacobian of the problem. Definition: fvbasediscretization.hh:1298 void updateCachedStorage(unsigned globalIdx, unsigned timeIdx, const EqVector &value) const Set an entry of the cache for the storage term. Definition: fvbasediscretization.hh:904 void addConvergenceVtkFields(VtkMultiWriter &writer, const SolutionVector &u, const GlobalEqVector &deltaU) const Add the vector fields for analysing the convergence of the newton method to the a VTK writer. Definition: fvbasediscretization.hh:1733 Scalar relativeDofError(unsigned vertexIdx, const PrimaryVariables &pv1, const PrimaryVariables &pv2) const Returns the relative error between two vectors of primary variables. Definition: fvbasediscretization.hh:1368 bool enableGridAdaptation_ Definition: fvbasediscretization.hh:2084 Scalar globalResidual(GlobalEqVector &dest, const SolutionVector &u) const Compute the global residual for an arbitrary solution vector. Definition: fvbasediscretization.hh:984 SolutionVector & solution(unsigned timeIdx) Definition: fvbasediscretization.hh:1283 std::array< GlobalEqVector, historySize > storageCache_ Definition: fvbasediscretization.hh:2079 Timer prePostProcessTimer_ Definition: fvbasediscretization.hh:2053 void deserializeEntity(std::istream &instream, const DofEntity &dof) Reads the current solution variables for a degree of freedom from a restart file. Definition: fvbasediscretization.hh:1613 void supplementInitialSolution_(PrimaryVariables &, const Context &, unsigned, unsigned) Definition: fvbasediscretization.hh:2000 const LocalLinearizer & localLinearizer(unsigned openMpThreadId) const Returns the local jacobian which calculates the local stiffness matrix for an arbitrary element. Definition: fvbasediscretization.hh:1316 std::array< std::unique_ptr< DiscreteFunction >, historySize > solution_ Definition: fvbasediscretization.hh:2071 unsigned cachedIntensiveQuantityHistorySize_ Definition: fvbasediscretization.hh:2089 const Timer & linearizeTimer() const Definition: fvbasediscretization.hh:1945 void invalidateAndUpdateIntensiveQuantities(unsigned timeIdx, const GridViewType &gridView) const Definition: fvbasediscretization.hh:768 bool update() Try to progress the model to the next timestep. Definition: fvbasediscretization.hh:1389 const auto & intensiveQuantityCache() const Definition: fvbasediscretization.hh:663 std::size_t numAuxiliaryDof() const Returns the number of degrees of freedom (DOFs) of the auxiliary equations. Definition: fvbasediscretization.hh:1636 void clearAuxiliaryModules() Causes the list of auxiliary equations to be cleared. Definition: fvbasediscretization.hh:1911 bool enableIntensiveQuantityCache_ Definition: fvbasediscretization.hh:2085 std::unique_ptr< Linearizer > linearizer_ Definition: fvbasediscretization.hh:2062 const ElementMapper & elementMapper() const Returns the mapper for elements to indices. Definition: fvbasediscretization.hh:1666 void syncOverlap() Syncronize the values of the primary variables on the degrees of freedom that overlap with the neighb... Definition: fvbasediscretization.hh:1474 void appendOutputFields(BaseOutputWriter &writer) const Append the quantities relevant for the current solution to an output writer. Definition: fvbasediscretization.hh:1864 std::list< std::unique_ptr< BaseOutputModule< TypeTag > > > outputModules_ Definition: fvbasediscretization.hh:2073 ElementMapper elementMapper_ Definition: fvbasediscretization.hh:2045 NewtonMethod newtonMethod_ Definition: fvbasediscretization.hh:2051 std::size_t numTotalDof() const Returns the total number of degrees of freedom (i.e., grid plux auxiliary DOFs) Definition: fvbasediscretization.hh:1647 void applyInitialSolution() Applies the initial solution for all degrees of freedom to which the model applies. Definition: fvbasediscretization.hh:529 void updateCachedIntensiveQuantities(const IntensiveQuantities &intQuants, unsigned globalIdx, unsigned timeIdx) const Update the intensive quantity cache for a entity on the grid at given time. Definition: fvbasediscretization.hh:674 std::string primaryVarName(unsigned pvIdx) const Given an primary variable index, return a human readable name. Definition: fvbasediscretization.hh:1690 void invalidateIntensiveQuantitiesCache(unsigned timeIdx) const Invalidate the whole intensive quantity cache for time index. Definition: fvbasediscretization.hh:716 Linearizer & linearizer() Returns the object which linearizes the global system of equations at the current solution. Definition: fvbasediscretization.hh:1305 const BaseAuxiliaryModule< TypeTag > * auxiliaryModule(unsigned auxEqModIdx) const Returns a given module for auxiliary equations. Definition: fvbasediscretization.hh:1933 std::vector< std::vector< unsigned char > > intensiveQuantityCacheUpToDate_ Definition: fvbasediscretization.hh:2069 void globalStorage(EqVector &storage, unsigned timeIdx=0) const Compute the integral over the domain of the storage terms of all conservation quantities. Definition: fvbasediscretization.hh:1059 Scalar dofTotalVolume(unsigned globalIdx) const Returns the volume of a given control volume. Definition: fvbasediscretization.hh:1251 static void registerParameters() Register all run-time parameters for the model. Definition: fvbasediscretization.hh:426 const SolutionVector & solution(unsigned timeIdx) const Reference to the solution at a given history index as a block vector. Definition: fvbasediscretization.hh:1277 bool verbose_() const Returns whether messages should be printed. Definition: fvbasediscretization.hh:2028 void shiftStorageCache(unsigned numSlots=1) const Shift storage cache by a given number of time step slots. Definition: fvbasediscretization.hh:964 const LocalResidual & localResidual(unsigned openMpThreadId) const Returns the object to calculate the local residual function. Definition: fvbasediscretization.hh:1328 std::size_t numGridDof() const Returns the number of degrees of freedom (DOFs) for the computational grid. Definition: fvbasediscretization.hh:1630 Scalar gridTotalVolume_ Definition: fvbasediscretization.hh:2075 const DofMapper & dofMapper() const Mapper to convert the Dune entities of the discretization's degrees of freedoms are to indices. Definition: fvbasediscretization.hh:1654 bool storeIntensiveQuantities() const Returns true if the cache for intensive quantities is enabled. Definition: fvbasediscretization.hh:1939 std::vector< LocalLinearizer > localLinearizer_ Definition: fvbasediscretization.hh:2059 void invalidateStorageCache(unsigned timeIdx) const Invalidate the whole storage cache for a given time index. Definition: fvbasediscretization.hh:946 void serialize(Restarter &) Serializes the current state of the model. Definition: fvbasediscretization.hh:1559 bool enableThermodynamicHints_ Definition: fvbasediscretization.hh:2087 void rebuildStorageCache(const unsigned timeIdx) const Definition: fvbasediscretization.hh:1072 void invalidateStorageCacheEntry(unsigned globalIdx, unsigned timeIdx) const Invalidate the storage cache for a given DOF and time index. Definition: fvbasediscretization.hh:934 VertexMapper vertexMapper_ Definition: fvbasediscretization.hh:2046 void resetLinearizer() Resets the Jacobian matrix linearizer, so that the boundary types can be altered. Definition: fvbasediscretization.hh:1673 bool enableStorageCache() const Returns true iff the storage term is cached. Definition: fvbasediscretization.hh:855 const GridView & gridView() const Reference to the grid view of the spatial domain. Definition: fvbasediscretization.hh:1873 void addOutputModule(std::unique_ptr< BaseOutputModule< TypeTag > > newModule) Add an module for writing visualization output after a timestep. Definition: fvbasediscretization.hh:1721 const IntensiveQuantities * cachedIntensiveQuantities(unsigned globalIdx, unsigned timeIdx) const Return the cached intensive quantities for a entity on the grid at given time. Definition: fvbasediscretization.hh:643 This class stores an array of IntensiveQuantities objects, one intensive quantities object for each o... Definition: fvbaseelementcontext.hh:55 Provide the properties at a face which make sense independently of the conserved quantities. Definition: fvbaseextensivequantities.hh:48 This class calculates gradients of arbitrary quantities at flux integration points using the two-poin... Definition: fvbasegradientcalculator.hh:52 Base class for the model specific class which provides access to all intensive (i.... Definition: fvbaseintensivequantities.hh:45 The common code for the linearizers of non-linear systems of equations. Definition: fvbaselinearizer.hh:78 Element-wise caculation of the residual matrix for models based on a finite volume spatial discretiza... Definition: fvbaselocalresidual.hh:63 Represents the primary variables used by the a model. Definition: fvbaseprimaryvariables.hh:54 This is a grid manager which does not create any border list. Definition: nullborderlistmanager.hh:44 static void registerParameters() Register all run-time parameters for the Newton method. Definition: newtonmethod.hh:135 Manages the initializing and running of time dependent problems. Definition: simulator.hh:87 static unsigned maxThreads() Return the maximum number of threads of the current process. Definition: threadmanager.hpp:66 static unsigned threadId() Return the index of the current OpenMP thread. Provides an STL-iterator like interface to iterate over the enties of a GridView in OpenMP threaded a... Definition: threadedentityiterator.hh:42 bool isFinished(const EntityIterator &it) const Definition: threadedentityiterator.hh:67 EntityIterator increment() Definition: threadedentityiterator.hh:80 EntityIterator beginParallel() Definition: threadedentityiterator.hh:54 A simple class which makes sure that a timer gets stopped if an exception is thrown. Definition: timerguard.hh:42 ScalarBuffer * allocateManagedScalarBuffer(std::size_t numEntities) Allocate a managed buffer for a scalar field. Definition: vtkmultiwriter.hh:206 VTK output module for the fluid composition. Definition: vtkprimaryvarsmodule.hpp:48 static void registerParameters() Register all run-time parameters for the Vtk output module. Definition: vtkprimaryvarsmodule.hpp:74 Definition: alignedallocator.hh:97 Declare the properties used by the infrastructure code of the finite volume discretizations. Provides data handles for parallel communication which operate on DOFs. Declares the parameters for the black oil model. Definition: fvbaseprimaryvariables.hh:161 auto Get(bool errorIfNotRegistered=true) Retrieve a runtime parameter. Definition: parametersystem.hpp:192 Definition: blackoilmodel.hh:74 Definition: blackoilbioeffectsmodules.hh:45 typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:233 std::string to_string(const ConvergenceReport::ReservoirFailure::Type t) Definition: fvbasediscretization.hh:2109 static void serializeOp(Serializer &serializer, SolutionType &solution) Definition: fvbasediscretization.hh:2111 Definition: fvbasediscretization.hh:272 GetPropType< TypeTag, Properties::GridView > GridView Definition: fvbasediscretization.hh:113 GetPropType< TypeTag, Properties::DofMapper > DofMapper Definition: fvbasediscretization.hh:112 The class which marks the border indices associated with the degrees of freedom on a process boundary... Definition: basicproperties.hh:129 The secondary variables of a boundary segment. Definition: fvbaseproperties.hh:157 GetPropType< TypeTag, Properties::RateVector > type Definition: fvbasediscretization.hh:160 Type of object for specifying boundary conditions. Definition: fvbaseproperties.hh:124 The secondary variables of a constraint degree of freedom. Definition: fvbaseproperties.hh:160 The class which represents a constraint degree of freedom. Definition: fvbaseproperties.hh:127 The part of the extensive quantities which is specific to the spatial discretization. Definition: fvbaseproperties.hh:174 Definition: fvbaseproperties.hh:150 The discretization specific part of the local residual. Definition: fvbaseproperties.hh:96 typename BaseDiscretization::BlockVectorWrapper type Definition: fvbasediscretization.hh:283 Definition: fvbaseproperties.hh:82 The secondary variables of all degrees of freedom in an element's stencil. Definition: fvbaseproperties.hh:154 Dune::BlockVector< GetPropType< TypeTag, Properties::EqVector > > type Definition: fvbasediscretization.hh:174 A vector of holding a quantity for each equation for each DOF of an element. Definition: fvbaseproperties.hh:117 Dune::MultipleCodimMultipleGeomTypeMapper< GetPropType< TypeTag, Properties::GridView > > type Definition: fvbasediscretization.hh:106 The mapper to find the global index of an element. Definition: fvbaseproperties.hh:227 Specify whether the some degrees of fredom can be constraint. Definition: fvbaseproperties.hh:213 Specify if experimental features should be enabled or not. Definition: fvbaseproperties.hh:255 Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, getPropValue< TypeTag, Properties::NumEq >()> type Definition: fvbasediscretization.hh:143 A vector of holding a quantity for each equation (usually at a given spatial location) Definition: fvbaseproperties.hh:114 Specify whether the storage terms use extensive quantities or not. Definition: fvbaseproperties.hh:247 Dune::BlockVector< GetPropType< TypeTag, Properties::EqVector > > type Definition: fvbasediscretization.hh:181 Vector containing a quantity of for equation for each DOF of the whole grid. Definition: linalgproperties.hh:54 Calculates gradients of arbitrary quantities at flux integration points. Definition: fvbaseproperties.hh:166 The secondary variables within a sub-control volume. Definition: fvbaseproperties.hh:138 The class which linearizes the non-linear system of equations. Definition: newtonmethodproperties.hh:36 A vector of primary variables within a sub-control volume. Definition: fvbaseproperties.hh:135 GetPropType< TypeTag, Properties::EqVector > type Definition: fvbasediscretization.hh:153 Vector containing volumetric or areal rates of quantities. Definition: fvbaseproperties.hh:121 Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type Definition: fvbasediscretization.hh:195 Vector containing all primary variables of the grid. Definition: fvbaseproperties.hh:131 The history size required by the time discretization. Definition: fvbaseproperties.hh:239 a tag to mark properties as undefined Definition: propertysystem.hh:38 Definition: fvbaseproperties.hh:195 Specify whether to use volumetric residuals or not. Definition: fvbaseproperties.hh:251 Dune::MultipleCodimMultipleGeomTypeMapper< GetPropType< TypeTag, Properties::GridView > > type Definition: fvbasediscretization.hh:101 The mapper to find the global index of a vertex. Definition: fvbaseproperties.hh:221 Specify the format the VTK output is written to disk. Definition: fvbaseproperties.hh:209 |