|
BioDynaMo
v1.05.125-2619fe54
|
Continuum model for the 3D diffusion equation with exponential decay and substance depletion
.
More...
#include <euler_depletion_grid.h>
Public Member Functions | |
| EulerDepletionGrid ()=default | |
| EulerDepletionGrid (int substance_id, std::string substance_name, real_t dc, real_t mu, int resolution=10, std::vector< real_t > binding_coefficients={}, std::vector< int > binding_substances={}) | |
| void | DiffuseWithClosedEdge (real_t dt) override |
| void | DiffuseWithOpenEdge (real_t dt) override |
| void | DiffuseWithDirichlet (real_t dt) override |
| void | DiffuseWithNeumann (real_t dt) override |
| void | DiffuseWithPeriodic (real_t dt) override |
| void | SetBindingSubstance (int bnd_sub, real_t bnd_coeff) |
| Sets a binding substance and coefficient for the substance. More... | |
| std::vector< int > | GetBindingSubstances () const |
| Get the vector of binding substances (vector of IDs) More... | |
| std::vector< real_t > | GetBindingCoefficients () const |
| Get the vector of binding coefficients (vector of coefficients) More... | |
Public Member Functions inherited from bdm::EulerGrid | |
| EulerGrid ()=default | |
| EulerGrid (int substance_id, std::string substance_name, real_t dc, real_t mu, int resolution=10) | |
| void | DiffuseWithClosedEdge (real_t dt) override |
| void | DiffuseWithOpenEdge (real_t dt) override |
| void | DiffuseWithDirichlet (real_t dt) override |
| void | DiffuseWithNeumann (real_t dt) override |
| void | DiffuseWithPeriodic (real_t dt) override |
Public Member Functions inherited from bdm::DiffusionGrid | |
| DiffusionGrid ()=default | |
| DiffusionGrid (const TRootIOCtor *) | |
| DiffusionGrid (int substance_id, const std::string &substance_name, real_t dc, real_t mu, int resolution=10) | |
| ~DiffusionGrid () override=default | |
| DiffusionGrid (const DiffusionGrid &)=delete | |
| DiffusionGrid & | operator= (const DiffusionGrid &)=delete |
| DiffusionGrid (DiffusionGrid &&)=delete | |
| DiffusionGrid & | operator= (DiffusionGrid &&)=delete |
| void | Initialize () override |
| void | Update () override |
| void | Step (real_t dt) override |
| void | Diffuse (real_t dt) |
| void | CalculateGradient () |
| void | RunInitializers () |
| void | ChangeConcentrationBy (const Real3 &position, real_t amount, InteractionMode mode=InteractionMode::kAdditive, bool scale_with_resolution=false) |
| void | ChangeConcentrationBy (size_t idx, real_t amount, InteractionMode mode=InteractionMode::kAdditive, bool scale_with_resolution=false) |
| See ChangeConcentrationBy(const Real3&, real_t, InteractionMode, bool). More... | |
| real_t | GetValue (const Real3 &position) const override |
| Get the value of the scalar field at specified position. More... | |
| real_t | GetConcentration (const Real3 &position) const |
| real_t | GetConcentration (const size_t idx) const |
| Get the concentration at specified index. More... | |
| Real3 | GetGradient (const Real3 &position) const override |
| virtual void | GetGradient (const Real3 &position, Real3 *gradient, bool normalize=true) const |
| std::array< uint32_t, 3 > | GetBoxCoordinates (const Real3 &position) const |
| Get the coordinates of the box at the specified position. More... | |
| std::array< uint32_t, 3 > | GetBoxCoordinates (const size_t idx) const |
| size_t | GetBoxIndex (const std::array< uint32_t, 3 > &box_coord) const |
| Calculates the box index at specified box coordinates. More... | |
| size_t | GetBoxIndex (const Real3 &position) const |
| Calculates the box index of the substance at specified position. More... | |
| std::array< size_t, 6 > | GetNeighboringBoxes (size_t index) const |
| std::array< size_t, 6 > | GetNeighboringBoxes (size_t index, const std::array< uint32_t, 3 > &box_coord) const |
| void | SetDecayConstant (real_t mu) |
| real_t | GetLastTimestep () const |
Return the last timestep dt that was used to run Diffuse(dt) More... | |
| void | SetUpperThreshold (real_t t) |
| real_t | GetUpperThreshold () const |
| void | SetLowerThreshold (real_t t) |
| real_t | GetLowerThreshold () const |
| const real_t * | GetAllConcentrations () const |
| const real_t * | GetAllGradients () const |
| std::array< size_t, 3 > | GetNumBoxesArray () const |
| size_t | GetNumBoxes () const |
| real_t | GetBoxLength () const |
| int | GetSubstanceId () const |
| const std::string & | GetSubstanceName () const |
| real_t | GetDecayConstant () const |
| const int32_t * | GetDimensionsPtr () const |
| std::array< int32_t, 6 > | GetDimensions () const |
| std::array< int32_t, 3 > | GetGridSize () const |
| const std::array< real_t, 7 > & | GetDiffusionCoefficients () const |
| size_t | GetResolution () const |
| real_t | GetBoxVolume () const |
| template<typename F > | |
| void | AddInitializer (F function) |
| bool | IsFixedSubstance () |
| Return if a substance is stationary, e.g. (mu == 0 && dc == 0) More... | |
| void | SetBoundaryCondition (std::unique_ptr< BoundaryCondition > bc) |
| Set the boundary condition, takes ownership of the object. More... | |
| BoundaryCondition * | GetBoundaryCondition () const |
| Returns the boundary condition. Does not transfer ownership. More... | |
| void | SetBoundaryConditionType (BoundaryConditionType bc_type) |
| Sets boundary condition type. More... | |
| BoundaryConditionType | GetBoundaryConditionType () const |
Returns the BoundaryConditionType, see BoundaryConditionType More... | |
| void | PrintInfo (std::ostream &out=std::cout) |
| Print information about the Diffusion Grid. More... | |
| void | PrintInfoWithInitialization () |
| Print the information after initialization. More... | |
| bool | IsInitialized () const |
| Returns if the grid has been initialized. More... | |
| void | TurnOffGradientCalculation () |
Public Member Functions inherited from bdm::ScalarField | |
| ScalarField ()=default | |
| ScalarField (const TRootIOCtor *) | |
| ~ScalarField () override=default | |
| BDM_CLASS_DEF_OVERRIDE (ScalarField, 1) | |
Public Member Functions inherited from bdm::Continuum | |
| Continuum ()=default | |
| Continuum (const TRootIOCtor *) | |
| virtual | ~Continuum ()=default |
| void | IntegrateTimeAsynchronously (real_t dt) |
| int | GetContinuumId () const |
| Returns the ID of the continuum. More... | |
| void | SetContinuumId (int id) |
| Sets the ID of the continuum. More... | |
| const std::string & | GetContinuumName () const |
| Returns the name of the continuum. More... | |
| void | SetContinuumName (const std::string &name) |
| Sets the name of the continuum. More... | |
| real_t | GetSimulatedTime () const |
| Returns the time simulated by the continuum. More... | |
| void | SetTimeStep (real_t dt) |
| real_t | GetTimeStep () const |
| Returns the time step for the continuum. More... | |
Private Member Functions | |
| void | ApplyDepletion (real_t dt) |
| Depletes the substance according to binding_substances_ and binding_coefficients_. Iterates over all grid points and calculates the new concentration according to the depletion. See class description. More... | |
| BDM_CLASS_DEF_OVERRIDE (EulerDepletionGrid, 1) | |
Private Attributes | |
| std::vector< real_t > | binding_coefficients_ = {} |
| std::vector< int > | binding_substances_ = {} |
| Vector of binding substances. More... | |
Continuum model for the 3D diffusion equation with exponential decay and substance depletion
.
For a single depleting substance with concentration c' and binding coefficient mu_' the FCTS method leads to the following relation: c2_[c] = c1_[c] * (1 - (mu_ + c'1_[c] * mu_') * dt) + (d * dt * ibl2) * (c1_[c - 1] - 2 * c1_[c] + c1_[c + 1] + c1_[s] - 2 * c1_[c] + c1_[n] + c1_[b] - 2 * c1_[c] + c1_[t])
Definition at line 34 of file euler_depletion_grid.h.
|
default |
|
inline |
Definition at line 37 of file euler_depletion_grid.h.
|
private |
Depletes the substance according to binding_substances_ and binding_coefficients_. Iterates over all grid points and calculates the new concentration according to the depletion. See class description.
| dt | Time step |
Definition at line 21 of file euler_depletion_grid.cc.
|
private |
|
overridevirtual |
Simulates the Diffusion with EulerGrid::DiffuseWithClosedEdge and subsequently depletes the substance according to binding_substances_ and binding_coefficients_. See ApplyDepletion for details.
Implements bdm::DiffusionGrid.
Definition at line 63 of file euler_depletion_grid.cc.
|
overridevirtual |
Simulates the Diffusion with EulerGrid::DiffuseWithDirichlet and subsequently depletes the substance according to binding_substances_ and binding_coefficients_. See ApplyDepletion for details.
Implements bdm::DiffusionGrid.
Definition at line 77 of file euler_depletion_grid.cc.
|
overridevirtual |
Simulates the Diffusion with EulerGrid::DiffuseWithNeumann and subsequently depletes the substance according to binding_substances_ and binding_coefficients_. See ApplyDepletion for details.
Implements bdm::DiffusionGrid.
Definition at line 84 of file euler_depletion_grid.cc.
|
overridevirtual |
Simulates the Diffusion with EulerGrid::DiffuseWithOpenEdge and subsequently depletes the substance according to binding_substances_ and binding_coefficients_. See ApplyDepletion for details.
Implements bdm::DiffusionGrid.
Definition at line 70 of file euler_depletion_grid.cc.
|
overridevirtual |
Simulates the Diffusion with EulerGrid::DiffuseWithPeriodic and subsequently depletes the substance according to binding_substances_ and binding_coefficients_. See ApplyDepletion for details.
Implements bdm::DiffusionGrid.
Definition at line 91 of file euler_depletion_grid.cc.
|
inline |
Get the vector of binding coefficients (vector of coefficients)
Definition at line 81 of file euler_depletion_grid.h.
|
inline |
Get the vector of binding substances (vector of IDs)
Definition at line 79 of file euler_depletion_grid.h.
|
inline |
Sets a binding substance and coefficient for the substance.
| bnd_sub | ID of the binding substance |
| bnd_coeff | Binding coefficient that determines the rate of depletion |
Definition at line 73 of file euler_depletion_grid.h.
|
private |
Vector of binding coefficients for each binding substance. All coefficients should be positive.
Definition at line 94 of file euler_depletion_grid.h.
|
private |
Vector of binding substances.
Definition at line 96 of file euler_depletion_grid.h.
1.8.17