Skip to content

ripple_crest_criterion ​

A refinement criterion of one's own, for RIPPLE (issue #110, P4.5): the worked example of the build-your-own tutorial.

crest_criterion refines the blocks where the advected profile rises above threshold, until they reach target_level, and leaves the others alone. It reads the app's state, so its vote selects the app's type.

Source: src/tests/ripple/test_ripple_crest_criterion.F90

Dependencies

Contents ​

Derived Types ​

crest_criterion ​

Refine where u > threshold.

Inheritance

Extends: amr_criterion_object

Components

NameTypeAttributesDescription
namecharacter(len=:)allocatableThe name an input selects it by ([amr_marker_N] name).
runtime_onlylogicalSkipped by the AMR of the initial condition.
thresholdreal(kind=R8P)Refine the blocks where some cell holds u above it.
target_levelinteger(kind=I4P)Refine up to this level.

Type-Bound Procedures

NameAttributesDescription
markpass(self)The votes of every block of the rank.
votepass(self)Refine block b when one of its cells holds u above the threshold and the block is below the target level; otherwise leave it as it is.

crest_criterion%mark ​

The votes of every block of this rank (votes(b) for local block b), by default vote block by block. An override may read and update the realm (ghost refreshes, auxiliary fields), and may act differently for the AMR of the initial condition (initial).

fortran
subroutine mark(self, realm, votes, initial)

Arguments

NameTypeIntentAttributesDescription
selfclass(amr_criterion_object)inoutThe criterion.
realmclass(realm_object)inoutThe realm.
votesinteger(kind=I4P)outOne vote per local block.
initiallogicalinThe AMR of the initial condition (the default votes alike).

Call graph

Functions ​

vote ​

Refine block b when one of its cells holds u above the threshold and the block is below the target level; otherwise leave it as it is.

Returns: integer(kind=I4P)

fortran
function vote(self, realm, b) result(mark)

Arguments

NameTypeIntentAttributesDescription
selfclass(crest_criterion)inoutThe criterion.
realmclass(realm_object)inThe realm.
binteger(kind=I4P)inLocal block index.

Call graph