Peano
Loading...
Searching...
No Matches
test_derive_load_store_compute_flag Namespace Reference

Data Structures

class  _FakeGenerator
 Minimal stand-in for peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer: derive_load_store_compute_flag() only ever needs somewhere to write load_store_compute_flag to. More...
 
class  _FakeGridSelector
 Stand-in for a peano4.api.toolbox.GridSelector with one distinct guard per kind, so tests can tell which routine was used. More...
 
class  _FakeSubmodel
 Minimal stand-in for a peano4.api.datamodel.Patch, with a generator attribute like the real thing has. More...
 

Functions

 _make_step (name)
 
 _use_cell (step, submodel, qualifier)
 
 _use_face (step, submodel, qualifier)
 
 _use_vertex (step, submodel, qualifier)
 
str _active (step)
 The exact "this Step is active" expression, for asserting against - built the same way the production code builds it, so these tests break if that expression's shape ever changes.
 
str _flag (use, load, store)
 
 test_read_and_discard_only_contributes_to_use_and_load ()
 
 test_write_only_contributes_to_use_and_store ()
 
 test_read_and_write_contributes_to_all_three ()
 
 test_temporary_contributes_only_to_use ()
 
 test_terms_from_different_steps_are_ored_together ()
 One Step reads, a different Step (elsewhere) writes the same submodel: use has both, load only the reader's term, store only the writer's term.
 
 test_terms_across_different_phases_use_each_steps_own_name ()
 
 test_cell_face_and_vertex_are_derived_independently ()
 
 test_submodel_never_used_is_left_untouched ()
 
 test_factory_default_is_overwritten_not_combined ()
 A submodel's generator starts out at the factory default (never customised by anyone) - the derived flag should replace it outright, not get AND-combined with it.
 
 test_pre_existing_custom_expression_is_combined_with_and ()
 A task graph author (or an earlier call to this function) already set a custom load_store_compute_flag - the newly derived expression must be AND-combined with it, existing first, new one parenthesised.
 
 test_touched_submodel_gets_step_repository_includes ()
 
 test_untouched_submodel_gets_no_includes ()
 
 test_includes_are_not_duplicated_on_repeated_calls ()
 
 test_grid_selector_guard_is_combined_with_each_predicate ()
 
 test_grid_selector_guard_is_combined_with_false_predicate ()
 
 test_grid_selector_guard_matches_kind_of_submodel ()
 
 test_no_grid_selector_leaves_predicates_untouched ()
 
 test_fine_grid_selector_restricts_patch_to_unrefined_cells ()
 End-to-end with the real classes: a peano4.api.datamodel.Patch carrying a peano4.api.toolbox.FineGridSelector.
 
 test_store_guard_defaults_to_guard ()
 A selector without its own store guard stores whenever it loads.
 

Variables

 READ_AND_DISCARD = Task.DataAccess.READ_AND_DISCARD
 
 WRITE = Task.DataAccess.WRITE
 
 READ_AND_WRITE = Task.DataAccess.READ_AND_WRITE
 
 TEMPORARY = Task.DataAccess.TEMPORARY
 

Function Documentation

◆ _active()

◆ _flag()

◆ _make_step()

◆ _use_cell()

◆ _use_face()

test_derive_load_store_compute_flag._use_face (   step,
  submodel,
  qualifier 
)
protected

Definition at line 46 of file test_derive_load_store_compute_flag.py.

Referenced by test_cell_face_and_vertex_are_derived_independently(), and test_grid_selector_guard_matches_kind_of_submodel().

Here is the caller graph for this function:

◆ _use_vertex()

test_derive_load_store_compute_flag._use_vertex (   step,
  submodel,
  qualifier 
)
protected

Definition at line 51 of file test_derive_load_store_compute_flag.py.

Referenced by test_cell_face_and_vertex_are_derived_independently(), and test_grid_selector_guard_matches_kind_of_submodel().

Here is the caller graph for this function:

◆ test_cell_face_and_vertex_are_derived_independently()

test_derive_load_store_compute_flag.test_cell_face_and_vertex_are_derived_independently ( )

Definition at line 149 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), _use_cell(), _use_face(), and _use_vertex().

Here is the call graph for this function:

◆ test_factory_default_is_overwritten_not_combined()

test_derive_load_store_compute_flag.test_factory_default_is_overwritten_not_combined ( )

A submodel's generator starts out at the factory default (never customised by anyone) - the derived flag should replace it outright, not get AND-combined with it.

Definition at line 178 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_fine_grid_selector_restricts_patch_to_unrefined_cells()

test_derive_load_store_compute_flag.test_fine_grid_selector_restricts_patch_to_unrefined_cells ( )

End-to-end with the real classes: a peano4.api.datamodel.Patch carrying a peano4.api.toolbox.FineGridSelector.

Definition at line 327 of file test_derive_load_store_compute_flag.py.

References _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_grid_selector_guard_is_combined_with_each_predicate()

test_derive_load_store_compute_flag.test_grid_selector_guard_is_combined_with_each_predicate ( )

Definition at line 259 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_grid_selector_guard_is_combined_with_false_predicate()

test_derive_load_store_compute_flag.test_grid_selector_guard_is_combined_with_false_predicate ( )

Definition at line 278 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_grid_selector_guard_matches_kind_of_submodel()

test_derive_load_store_compute_flag.test_grid_selector_guard_matches_kind_of_submodel ( )

Definition at line 292 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), _use_cell(), _use_face(), and _use_vertex().

Here is the call graph for this function:

◆ test_includes_are_not_duplicated_on_repeated_calls()

test_derive_load_store_compute_flag.test_includes_are_not_duplicated_on_repeated_calls ( )

Definition at line 232 of file test_derive_load_store_compute_flag.py.

References _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_no_grid_selector_leaves_predicates_untouched()

test_derive_load_store_compute_flag.test_no_grid_selector_leaves_predicates_untouched ( )

Definition at line 315 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_pre_existing_custom_expression_is_combined_with_and()

test_derive_load_store_compute_flag.test_pre_existing_custom_expression_is_combined_with_and ( )

A task graph author (or an earlier call to this function) already set a custom load_store_compute_flag - the newly derived expression must be AND-combined with it, existing first, new one parenthesised.

Definition at line 193 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_read_and_discard_only_contributes_to_use_and_load()

test_derive_load_store_compute_flag.test_read_and_discard_only_contributes_to_use_and_load ( )

Definition at line 70 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_read_and_write_contributes_to_all_three()

test_derive_load_store_compute_flag.test_read_and_write_contributes_to_all_three ( )

Definition at line 92 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_store_guard_defaults_to_guard()

test_derive_load_store_compute_flag.test_store_guard_defaults_to_guard ( )

A selector without its own store guard stores whenever it loads.

Definition at line 345 of file test_derive_load_store_compute_flag.py.

References _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_submodel_never_used_is_left_untouched()

test_derive_load_store_compute_flag.test_submodel_never_used_is_left_untouched ( )

Definition at line 166 of file test_derive_load_store_compute_flag.py.

References _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_temporary_contributes_only_to_use()

test_derive_load_store_compute_flag.test_temporary_contributes_only_to_use ( )

Definition at line 103 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_terms_across_different_phases_use_each_steps_own_name()

test_derive_load_store_compute_flag.test_terms_across_different_phases_use_each_steps_own_name ( )

Definition at line 133 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_terms_from_different_steps_are_ored_together()

test_derive_load_store_compute_flag.test_terms_from_different_steps_are_ored_together ( )

One Step reads, a different Step (elsewhere) writes the same submodel: use has both, load only the reader's term, store only the writer's term.

Definition at line 114 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_touched_submodel_gets_step_repository_includes()

test_derive_load_store_compute_flag.test_touched_submodel_gets_step_repository_includes ( )

Definition at line 209 of file test_derive_load_store_compute_flag.py.

References _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_untouched_submodel_gets_no_includes()

test_derive_load_store_compute_flag.test_untouched_submodel_gets_no_includes ( )

Definition at line 221 of file test_derive_load_store_compute_flag.py.

References _make_step(), and _use_cell().

Here is the call graph for this function:

◆ test_write_only_contributes_to_use_and_store()

test_derive_load_store_compute_flag.test_write_only_contributes_to_use_and_store ( )

Definition at line 81 of file test_derive_load_store_compute_flag.py.

References _active(), _flag(), _make_step(), and _use_cell().

Here is the call graph for this function:

Variable Documentation

◆ READ_AND_DISCARD

test_derive_load_store_compute_flag.READ_AND_DISCARD = Task.DataAccess.READ_AND_DISCARD

Definition at line 9 of file test_derive_load_store_compute_flag.py.

◆ READ_AND_WRITE

test_derive_load_store_compute_flag.READ_AND_WRITE = Task.DataAccess.READ_AND_WRITE

Definition at line 11 of file test_derive_load_store_compute_flag.py.

◆ TEMPORARY

test_derive_load_store_compute_flag.TEMPORARY = Task.DataAccess.TEMPORARY

Definition at line 12 of file test_derive_load_store_compute_flag.py.

◆ WRITE

test_derive_load_store_compute_flag.WRITE = Task.DataAccess.WRITE

Definition at line 10 of file test_derive_load_store_compute_flag.py.