Skip to content

adam_amr_criterion_object ​

ADAM AMR criterion: a refinement criterion an application or a user defines (issue #110, P4).

The built-in markers of adam_amr_object (geometry, gradient, Loehner, Jeans) are selected by a numeric mode in the [amr_marker_N] sections. A criterion of this kind is code: a type extending amr_criterion_object whose vote returns, for one block of a realm, TO_BE_REFINED, TO_NOT_TOUCH or TO_BE_DEREFINED. The program registers an instance with its realm before the simulation starts (the app's register_amr_criterion), and an input selects it by name, [amr_marker_N] mode = 6 (AMR_USER) and name = <its name>. The app combines its votes with those of the other markers as it combines theirs. vote receives the realm as class(realm_object): a criterion selects the app's concrete type (select type) to read its fields. It is called on the host, for the blocks this rank owns.

mark gives the votes of all the blocks of the rank at once; its default asks vote block by block. A criterion that is not local to a block (it compares neighbours, dilates its marks, refreshes ghosts first) overrides it: the built-in markers of an app are criteria of this kind, so built-in and registered criteria share one list. mark is called with initial = .true. by the AMR of the initial condition, unless runtime_only (the default: a registered criterion acts at the runtime regrids only).

Source: src/lib/common/adam_amr_criterion_object.F90

Dependencies

Contents ​

Derived Types ​

amr_criterion_object ​

A refinement criterion: one vote per block.

Inheritance

Attributes: abstract

Components ​

NameTypeAttributesDescription
namecharacter(len=:)allocatableThe name an input selects it by ([amr_marker_N] name).
runtime_onlylogicalSkipped by the AMR of the initial condition.

Type-Bound Procedures ​

NameAttributesDescription
votepass(self)The vote of one block.
markpass(self)The votes of every block of the rank.

amr_criterion_pointer ​

A registered criterion (the program owns the instance, which must outlive the simulation).

Components ​

NameTypeAttributesDescription
ptrclass(amr_criterion_object)pointerThe criterion.

Subroutines ​

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