| 
    
    
     fvbasediscretization.hh   
Go to the documentation of this file. 
   95 SET_TYPE_PROP(FvBaseDiscretization, DiscIntensiveQuantities, Ewoms::FvBaseIntensiveQuantities<TypeTag>); 
   96 SET_TYPE_PROP(FvBaseDiscretization, DiscExtensiveQuantities, Ewoms::FvBaseExtensiveQuantities<TypeTag>); 
   99 SET_TYPE_PROP(FvBaseDiscretization, GradientCalculator, Ewoms::FvBaseGradientCalculator<TypeTag>); 
  170 SET_TYPE_PROP(FvBaseDiscretization, IntensiveQuantities, Ewoms::FvBaseIntensiveQuantities<TypeTag>); 
  177 SET_TYPE_PROP(FvBaseDiscretization, ConstraintsContext, Ewoms::FvBaseConstraintsContext<TypeTag>); 
  193 SET_SCALAR_PROP(FvBaseDiscretization, MaxTimeStepSize, std::numeric_limits<Scalar>::infinity()); 
  347         EWOMS_REGISTER_PARAM(TypeTag, bool, EnableVtkOutput, "Global switch for turing on writing VTK files"); 
  349         EWOMS_REGISTER_PARAM(TypeTag, bool, EnableIntensiveQuantityCache, "Turn on caching of intensive quantities"); 
 1051         intensiveQuantityCacheUpToDate_[/*timeIdx=*/0] = intensiveQuantityCacheUpToDate_[/*timeIdx=*/1]; 
void shiftIntensiveQuantityCache(int numSlots=1) Move the intensive quantities for a given time index to the back.  Definition: fvbasediscretization.hh:582 Scalar dofTotalVolume(int globalIdx) const  Returns the volume  of a given control volume.  Definition: fvbasediscretization.hh:852 SolutionVector solution_[historySize] Definition: fvbasediscretization.hh:1546 void updateBegin() Called by the update() method before it tries to apply the newton method. This is primary a hook whic... Definition: fvbasediscretization.hh:1028 void applyInitialSolution() Applies the initial solution for all degrees of freedom to which the model applies.  Definition: fvbasediscretization.hh:428 const VertexMapper & vertexMapper() const  Mapper for vertices to indices.  Definition: fvbasediscretization.hh:1196 Linearizer & linearizer() Returns the object which linearizes the global system of equations at the current solution... Definition: fvbasediscretization.hh:895 void updateBoundary_() Find the degrees of freedoms adjacent to the grid boundary.  Definition: fvbasediscretization.hh:1491 Represents the primary variables used by the a model.  std::list< BaseOutputModule< TypeTag > * > outputModules_ Definition: fvbasediscretization.hh:1553 This is a grid manager which does not create any border list.  void globalStorage(EqVector &storage, int timeIdx=0) const  Compute the integral over the domain of the storage terms of all conservation quantities.  Definition: fvbasediscretization.hh:685 This is a grid manager which does not create any border list.  Definition: nullborderlistmanager.hh:50 Scalar timeStepSize() const  Returns the time step length  so that we don't miss the beginning of the next episode or cross the en... Definition: simulator.hh:296 const GridView & gridView() const  Reference to the grid view of the spatial domain.  Definition: fvbasediscretization.hh:1399 size_t numAuxiliaryModules() const  Returns the number of modules for auxiliary equations.  Definition: fvbasediscretization.hh:1438 This class stores an array of IntensiveQuantities objects, one intensive quantities object for each o... Definition: fvbaseelementcontext.hh:44 size_t numAuxiliaryDof() const  Returns the number of degrees of freedom (DOFs) of the auxiliary equations.  Definition: fvbasediscretization.hh:1168 void beginParallel(EntityIterator &threadPrivateIt) Definition: threadedentityiterator.hh:53 SET_SCALAR_PROP(NumericModel, EndTime,-1e100) The default value for the simulation's end time.  Problem & problem() Return the object which specifies the pysical setup of the simulation.  Definition: simulator.hh:189 const SolutionVector & solution(int timeIdx) const  Reference to the solution at a given history index as a block vector.  Definition: fvbasediscretization.hh:875 SolutionVector & solution(int timeIdx) Reference to the solution at a given history index as a block vector.  Definition: fvbasediscretization.hh:881 const IntensiveQuantities * cachedIntensiveQuantities(int globalIdx, int timeIdx) const  Return the cached intensive quantities for a entity on the grid at given time.  Definition: fvbasediscretization.hh:529 Declare the properties used by the infrastructure code of the finite volume discretizations.  LocalLinearizer & localLinearizer(int openMpThreadId) Definition: fvbasediscretization.hh:911 NewtonMethod newtonMethod_ Definition: fvbasediscretization.hh:1536 void supplementInitialSolution_(PrimaryVariables &priVars, const Context &context, int dofIdx, int timeIdx) Definition: fvbasediscretization.hh:1455 static void registerParameters() Register all run-time parameters for the Newton method.  Definition: newtonmethod.hh:198 #define GET_PROP_VALUE(TypeTag, PropTagName) Access the value attribute of a property for a type tag.  Definition: propertysystem.hh:468 The common code for the linearizers of non-linear systems of equations.  Definition: fvbaselinearizer.hh:60 LocalResidual & localResidual_() Reference to the local residal object.  Definition: fvbasediscretization.hh:1485 NewtonMethod & newtonMethod() Returns the newton method object.  Definition: fvbasediscretization.hh:477 static void registerParameters() Register all run-time parameters for the model.  Definition: fvbasediscretization.hh:334 const ElementMapper & elementMapper() const  Mapper for elements to indices.  Definition: fvbasediscretization.hh:1202 void deserialize(Restarter &res) Deserializes the state of the model.  Definition: fvbasediscretization.hh:1097 Implementation & asImp_() Definition: fvbasediscretization.hh:1521 #define GET_PROP_TYPE(TypeTag, PropTagName) Access the type attribute of a property for a type tag.  Definition: propertysystem.hh:485 The common code for the linearizers of non-linear systems of equations.  ~FvBaseDiscretization() Definition: fvbasediscretization.hh:320 Calculates the local residual and its Jacobian for a single element of the grid.  Represents all quantities which available for calculating constraints.  Definition: fvbaseconstraintscontext.hh:41 void addOutputModule(BaseOutputModule< TypeTag > *newModule) Add an module for writing visualization output after a timestep.  Definition: fvbasediscretization.hh:1267 void addAuxiliaryModule(std::shared_ptr< BaseAuxiliaryModule< TypeTag > > auxMod) Add a module for an auxiliary equation.  Definition: fvbasediscretization.hh:1413 static void registerParameters() Register all run-time parameters for the Vtk output module.  Definition: vtkprimaryvarsmodule.hh:80 bool onBoundary(int globalIdx) const  Return whether a degree of freedom is located on the domain boundary.  Definition: fvbasediscretization.hh:1222 void updateSuccessful() Called by the update() method if it was successful. This is primary a hook which the actual model can... Definition: fvbasediscretization.hh:1037 std::shared_ptr< const BaseAuxiliaryModule< TypeTag > > auxiliaryModule(int auxEqModIdx) const  Returns a given module for auxiliary equations.  Definition: fvbasediscretization.hh:1450 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:736 static bool storeIntensiveQuantities_() Definition: fvbasediscretization.hh:1459 SET_PROP(NumericModel, ParameterTree) Set the ParameterTree property.  Definition: basicproperties.hh:117 std::vector< LocalLinearizer > localLinearizer_ Definition: fvbasediscretization.hh:1539 bool isLocalDof(int globalIdx) const  Returns if the overlap of the volume ofa degree of freedom is non-zero.  Definition: fvbasediscretization.hh:860 void addPrePostProcessTime(Scalar value) Definition: simulator.hh:623 Represents all quantities which available for calculating constraints.  SET_INT_PROP(NumericModel, GridGlobalRefinements, 0) Represents the primary variables used by the a model.  Definition: fvbaseprimaryvariables.hh:41 Calculates the Jacobian of the local residual for finite volume spatial discretizations using a finit... size_t numGridDof() const  Returns the number of degrees of freedom (DOFs) for the computational grid.  Definition: fvbasediscretization.hh:1161 void updateCachedIntensiveQuantities(const IntensiveQuantities &intQuants, int globalIdx, int timeIdx) const  Update the intensive quantity cache for a entity on the grid at given time.  Definition: fvbasediscretization.hh:546 Scalar globalResidual(GlobalEqVector &dest, const SolutionVector &u) const  Compute the global residual for an arbitrary solution vector.  Definition: fvbasediscretization.hh:605 The base class for the finite volume discretization schemes.  FvBaseDiscretization(Simulator &simulator) Definition: fvbasediscretization.hh:298 const NewtonMethod & newtonMethod() const  Returns the newton method object.  Definition: fvbasediscretization.hh:483 std::vector< bool > isLocalDof_ Definition: fvbasediscretization.hh:1557 std::vector< bool > intensiveQuantityCacheUpToDate_[historySize] Definition: fvbasediscretization.hh:1548 void finishInit() Apply the initial conditions to the model.  Definition: fvbasediscretization.hh:355 SET_TYPE_PROP(NumericModel, Scalar, double) Set the default type of scalar values to double.  static std::string discretizationName() Returns a string of discretization's human-readable name.  Definition: fvbasediscretization.hh:1228 const IntensiveQuantities * thermodynamicHint(int globalIdx, int timeIdx) const  Return the thermodynamic hint for a entity on the grid at given time.  Definition: fvbasediscretization.hh:501 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:1141 Manages the initializing and running of time dependent problems.  Definition: simulator.hh:73 Provide the properties at a face which make sense indepentently of the conserved quantities.  Definition: fvbaseextensivequantities.hh:41 Scalar primaryVarWeight(int globalDofIdx, int pvIdx) const  Returns the relative weight of a primary variable for calculating relative errors.  Definition: fvbasediscretization.hh:932 Definition: baseauxiliarymodule.hh:35 Manages the initializing and running of time dependent problems.  std::vector< Scalar > dofTotalVolume_ Definition: fvbasediscretization.hh:1556 Provide the properties at a face which make sense indepentently of the conserved quantities.  ScalarBuffer * allocateManagedScalarBuffer(int numEntities) Allocate a managed buffer for a scalar field.  Definition: vtkmultiwriter.hh:147 const DofMapper & dofMapper() const  Mapper to convert the Dune entities of the discretization's degrees of freedoms are to indices... Definition: fvbasediscretization.hh:1189 void syncOverlap() Syncronize the values of the primary variables on the degrees of freedom that overlap with the neighb... Definition: fvbasediscretization.hh:1020 Base class for the model specific class which provides access to all intensive (i.e., volume averaged) quantities.  Definition: fvbaseintensivequantities.hh:42 static bool enableThermodynamicHints_() Definition: fvbasediscretization.hh:1465 const LocalLinearizer & localLinearizer(int openMpThreadId) const  Returns the local jacobian which calculates the local stiffness matrix for an arbitrary element... Definition: fvbasediscretization.hh:906 bool update(NewtonMethod &solver) Try to progress the model to the next timestep.  Definition: fvbasediscretization.hh:977 Provides data handles for parallel communication which operate on DOFs.  static int maxThreads() Return the maximum number of threads of the current process.  Definition: threadmanager.hh:117 #define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description) Register a run-time parameter.  Definition: parametersystem.hh:64 This class calculates gradients of arbitrary quantities at flux integration points using the two-poin... std::shared_ptr< BaseAuxiliaryModule< TypeTag > > auxiliaryModule(int auxEqModIdx) Returns a given module for auxiliary equations.  Definition: fvbasediscretization.hh:1444 Class to specify constraints for a finite volume spatial discretization.  Provides an STL-iterator like interface to iterate over the enties of a GridView in OpenMP threaded a... Definition: threadedentityiterator.hh:39 static int threadId() Return the index of the current OpenMP thread.  Definition: threadmanager.hh:123 void resetLinearizer() Resets the Jacobian matrix linearizer, so that the boundary types can be altered. ... Definition: fvbasediscretization.hh:1209 IntensiveQuantitiesVector intensiveQuantityCache_[historySize] Definition: fvbasediscretization.hh:1547 Base class for the model specific class which provides access to all intensive (i.e., volume averaged) quantities.  void updatePVWeights(const ElementContext &elemCtx) const  Update the weights of all primary variables within an element given the complete set of intensive qua... Definition: fvbasediscretization.hh:1261 void appendOutputFields(BaseOutputWriter &writer) const  Append the quantities relevant for the current solution to an output writer.  Definition: fvbasediscretization.hh:1388 std::string eqName(int eqIdx) const  Given an equation index, return a human readable name.  Definition: fvbasediscretization.hh:1248 Model & model() Return the physical model used in the simulation.  Definition: simulator.hh:176 Represents all quantities which available on boundary segments.  const LocalResidual & localResidual(int openMpThreadId) const  Returns the object to calculate the local residual function.  Definition: fvbasediscretization.hh:917 Implements a shallow wrapper around the "raw" locks provided by OpenMP.  Definition: locks.hh:35 A Newton method for models using a finite volume discretization.  Simulator & simulator_ Definition: fvbasediscretization.hh:1528 void advanceTimeLevel() Called by the problem if a time integration was successful, post processing of the solution is done a... Definition: fvbasediscretization.hh:1064 This class stores an array of IntensiveQuantities objects, one intensive quantities object for each o... Represents all quantities which available on boundary segments.  Definition: fvbaseboundarycontext.hh:41 Scalar eqWeight(int globalVertexIdx, int eqIdx) const  Returns the relative weight of an equation.  Definition: fvbasediscretization.hh:944 VTK output module for the fluid composition.  Definition: vtkprimaryvarsmodule.hh:56 Base class for specifying auxiliary equations.  Definition: baseauxiliarymodule.hh:57 void setIntensiveQuantitiesCacheEntryValidity(int globalIdx, int timeIdx, bool newValue) const  Invalidate the cache for a given intensive quantities object.  Definition: fvbasediscretization.hh:564 LocalResidual & localResidual(int openMpThreadId) Definition: fvbasediscretization.hh:922 void registerOutputModules_() Register all output modules which make sense for the model.  Definition: fvbasediscretization.hh:1475 GridView & gridView() Return the grid view for which the simulation is done.  Definition: simulator.hh:164 Element-wise caculation of the residual matrix for models based on a finite volume spatial discretiza... void clearAuxiliaryModules() Causes the list of auxiliary equations to be cleared.  Definition: fvbasediscretization.hh:1432 Scalar globalResidual(GlobalEqVector &dest) const  Compute the global residual for the current solution vector.  Definition: fvbasediscretization.hh:621 void serializeEntity(std::ostream &outstream, const DofEntity &dof) Write the current solution for a degree of freedom to a restart file.  Definition: fvbasediscretization.hh:1113 void increment(EntityIterator &threadPrivateIt) Definition: threadedentityiterator.hh:68 std::vector< std::shared_ptr< BaseAuxiliaryModule< TypeTag > > > auxEqModules_ Definition: fvbasediscretization.hh:1534 Scalar gridTotalVolume() const  Returns the volume  of the whole grid which represents the spatial domain.  Definition: fvbasediscretization.hh:867 size_t numTotalDof() const  Returns the total number of degrees of freedom (i.e., grid plux auxiliary DOFs)  Definition: fvbasediscretization.hh:1182 double realTimeElapsed() const  Return the real time [s] elapsed.  Definition: timer.hh:100 Element-wise caculation of the residual matrix for models based on a finite volume spatial discretiza... Definition: fvbaselocalresidual.hh:52 void updateFailed() Called by the update() method if it was unsuccessful. This is primary a hook which the actual model c... Definition: fvbasediscretization.hh:1045 bool verbose_() const  Returns whether messages should be printed.  Definition: fvbasediscretization.hh:1518 bool isFinished(const EntityIterator &threadPrivateIt) const  Definition: threadedentityiterator.hh:63 const Implementation & asImp_() const  Definition: fvbasediscretization.hh:1523 This class calculates gradients of arbitrary quantities at flux integration points using the two-poin... Definition: fvbasegradientcalculator.hh:44 static bool enableIntensiveQuantitiesCache_() Definition: fvbasediscretization.hh:1462 The base class for the finite volume discretization schemes.  Definition: fvbasediscretization.hh:68 SET_BOOL_PROP(FvBaseDiscretization, EnableVtkOutput, true) Enable the VTK output by default.  Linearizer * linearizer_ Definition: fvbasediscretization.hh:1542 void start() Start counting the time resources used by the simulation.  Definition: timer.hh:68 Base class for specifying auxiliary equations.  Simplifies multi-threaded capabilities.  void serialize(Restarter &res) Serializes the current state of the model.  Definition: fvbasediscretization.hh:1082 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:1279 std::vector< bool > onBoundary_ Definition: fvbasediscretization.hh:1551 Scalar gridTotalVolume_ Definition: fvbasediscretization.hh:1555 Scalar relativeDofError(int vertexIdx, const PrimaryVariables &pv1, const PrimaryVariables &pv2) const  Returns the relative error between two vectors of primary variables.  Definition: fvbasediscretization.hh:956 std::string primaryVarName(int pvIdx) const  Given an primary variable index, return a human readable name.  Definition: fvbasediscretization.hh:1236 const Linearizer & linearizer() const  Returns the operator linearizer for the global jacobian of the problem.  Definition: fvbasediscretization.hh:888 Class to specify constraints for a finite volume spatial discretization.  Definition: fvbaseconstraints.hh:45 #define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName) Retrieve a runtime parameter.  Definition: parametersystem.hh:95 void prepareOutputFields() const  Prepare the quantities relevant for the current solution to be appended to the output writers... Definition: fvbasediscretization.hh:1356 void stop() Stop counting the time resources used by the simulation.  Definition: timer.hh:77  |