Appearance
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
| Name | Type | Attributes | Description |
|---|---|---|---|
name | character(len=:) | allocatable | The name an input selects it by ([amr_marker_N] name). |
runtime_only | logical | Skipped by the AMR of the initial condition. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
vote | pass(self) | The vote of one block. |
mark | pass(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
| Name | Type | Attributes | Description |
|---|---|---|---|
ptr | class(amr_criterion_object) | pointer | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(amr_criterion_object) | inout | The criterion. | |
realm | class(realm_object) | inout | The realm. | |
votes | integer(kind=I4P) | out | One vote per local block. | |
initial | logical | in | The AMR of the initial condition (the default votes alike). |
Call graph