SheafSystem  0.0.0.0
fiber_bundle::mesh_partition Class Reference

A decomposition of a mesh into non-overlapping scopes. More...

#include <mesh_partition.h>

Inheritance diagram for fiber_bundle::mesh_partition:
sheaf::any

Public Member Functions

 mesh_partition ()
 Default constructor. More...
 
 mesh_partition (const mesh_partition &xother)
 Copy constructor. More...
 
virtual ~mesh_partition ()
 Destructor. More...
 
 mesh_partition (const base_space_poset &xmesh, const std::string &xname)
 Creates an instance for mesh xmesh. More...
 
const std::string & name () const
 The name of this mesh_partition. More...
 
const base_space_posetmesh () const
 The mesh poset containing this mesh_partition. More...
 
const subposetparts () const
 The set of processor read scope members. More...
 
int part_ct () const
 The number of parts in this mesh_partition. More...
 
string part_name (const scoped_index &xp_id) const
 The name for the part associated with client id xp_id. More...
 
void part (const scoped_index &xp_id, id_block &xresult) const
 The zones in the part with client id xp_id. More...
 
const scoped_indexput_part (const scoped_index &xp_id, id_block &xzones)
 Creates a part with client id xp_id containing zones xzones. More...
 
pod_index_type part_id (const std::string &xname) const
 Extracts the part id from part name xname. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
virtual mesh_partitionclone () const
 Virtual constructor, makes a new instance of the same type as this. More...
 
mesh_partitionoperator= (const mesh_partition &xother)
 Assignment operator. More...
 
virtual bool invariant () const
 Class invariant. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 

Static Public Member Functions

static bool is_valid_name (const std::string &xname)
 True if xname is a valid decomposition name. More...
 
static string name_prefix ()
 The prefix for valid mesh_partition names. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

A decomposition of a mesh into non-overlapping scopes.

Deprecated:
Removed from the build but remain around as a reference for future development.

Definition at line 55 of file mesh_partition.h.

Constructor & Destructor Documentation

◆ mesh_partition() [1/3]

fiber_bundle::mesh_partition::mesh_partition ( )

Default constructor.

Postcondition
  • !name().empty()

Definition at line 42 of file mesh_partition.cc.

Referenced by ~mesh_partition().

◆ mesh_partition() [2/3]

fiber_bundle::mesh_partition::mesh_partition ( const mesh_partition xother)

Copy constructor.

Postcondition

Definition at line 72 of file mesh_partition.cc.

References ~mesh_partition().

◆ ~mesh_partition()

fiber_bundle::mesh_partition::~mesh_partition ( )
virtual

Destructor.

Definition at line 92 of file mesh_partition.cc.

References mesh_partition().

Referenced by mesh_partition().

◆ mesh_partition() [3/3]

fiber_bundle::mesh_partition::mesh_partition ( const base_space_poset xmesh,
const std::string &  xname 
)

Creates an instance for mesh xmesh.

Precondition
  • is_valid_name(xname)
  • xmesh.includes_subposet(xname) ? xmesh.state_is_read_accessible() : xmesh.state_is_read_write_accessible()
Postcondition
  • mesh().is_same_state(&xmesh)
  • xmesh.includes_subposet(xname)
  • part_ct() == (old_xmesh_includes_mesh_partition_xname ? parts().member_ct() : 0)

Definition at line 112 of file mesh_partition.cc.

References sheaf::poset_state_handle::includes_subposet(), name(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::read_write_monitor_handle::state_is_read_write_accessible().

Member Function Documentation

◆ clone()

fiber_bundle::mesh_partition * fiber_bundle::mesh_partition::clone ( ) const
virtual

Virtual constructor, makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::any.

Definition at line 375 of file mesh_partition.cc.

References operator=().

Referenced by is_ancestor_of().

◆ invariant()

bool fiber_bundle::mesh_partition::invariant ( ) const
virtual

Class invariant.

Invariant
  • !name().empty()

Reimplemented from sheaf::any.

Definition at line 424 of file mesh_partition.cc.

References sheaf::any::invariant().

Referenced by operator=().

◆ is_ancestor_of()

bool fiber_bundle::mesh_partition::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Definition at line 354 of file mesh_partition.cc.

References clone().

Referenced by name_prefix().

◆ is_valid_name()

bool fiber_bundle::mesh_partition::is_valid_name ( const std::string &  xname)
static

True if xname is a valid decomposition name.

Definition at line 307 of file mesh_partition.cc.

References name_prefix().

Referenced by part_id().

◆ mesh()

const fiber_bundle::base_space_poset & fiber_bundle::mesh_partition::mesh ( ) const

The mesh poset containing this mesh_partition.

Definition at line 157 of file mesh_partition.cc.

References parts().

Referenced by name().

◆ name()

const std::string & fiber_bundle::mesh_partition::name ( ) const

The name of this mesh_partition.

Definition at line 148 of file mesh_partition.cc.

References mesh().

Referenced by mesh_partition().

◆ name_prefix()

string fiber_bundle::mesh_partition::name_prefix ( )
static

The prefix for valid mesh_partition names.

Definition at line 329 of file mesh_partition.cc.

References is_ancestor_of(), and sheaf::poset_path::reserved_prefix().

Referenced by is_valid_name().

◆ operator=()

fiber_bundle::mesh_partition & fiber_bundle::mesh_partition::operator= ( const mesh_partition xother)

Assignment operator.

Postcondition

Definition at line 399 of file mesh_partition.cc.

References invariant().

Referenced by clone().

◆ part()

void fiber_bundle::mesh_partition::part ( const scoped_index xp_id,
id_block xresult 
) const

The zones in the part with client id xp_id.

Precondition
  • mesh().state_is_read_accessible()
  • mesh().contains_member(part_name(xp_id))
  • xresult.is_member_hub_id_space()

Definition at line 204 of file mesh_partition.cc.

References sheaf::poset_component::detach_from_state(), sheaf::DOWN, fiber_bundle::base_space_poset::elements(), sheaf::id_block::is_member_hub_id_space(), sheaf::NOT_STRICT, sheaf::auto_block< T, S >::push_back(), put_part(), sheaf::auto_block< T, S >::reserve(), and sheaf::auto_block< T, S >::set_ct().

Referenced by part_name().

◆ part_ct()

int fiber_bundle::mesh_partition::part_ct ( ) const

The number of parts in this mesh_partition.

Definition at line 173 of file mesh_partition.cc.

References part_name().

Referenced by parts().

◆ part_id()

sheaf::pod_index_type fiber_bundle::mesh_partition::part_id ( const std::string &  xname) const

Extracts the part id from part name xname.

Definition at line 277 of file mesh_partition.cc.

References is_valid_name().

Referenced by put_part().

◆ part_name()

string fiber_bundle::mesh_partition::part_name ( const scoped_index xp_id) const

The name for the part associated with client id xp_id.

Definition at line 182 of file mesh_partition.cc.

References part().

Referenced by part_ct().

◆ parts()

const sheaf::subposet & fiber_bundle::mesh_partition::parts ( ) const

The set of processor read scope members.

Definition at line 165 of file mesh_partition.cc.

References part_ct().

Referenced by mesh().

◆ put_part()

const sheaf::scoped_index & fiber_bundle::mesh_partition::put_part ( const scoped_index xp_id,
id_block xzones 
)

Creates a part with client id xp_id containing zones xzones.

Precondition
  • mesh().state_is_read_write_accessible()
  • !mesh().contains_member(part_name(xp_id))
  • xzones.is_member_hub_id_space()
  • for(int i = ( 0 ); i < ( xzones.ct() ); ++ i ) mesh().contains_member(xzones[i])
Postcondition
  • mesh().contains_member(result)
  • mesh().member_name(result) == part_name(xp_id)

Definition at line 240 of file mesh_partition.cc.

References sheaf::auto_block< T, S >::base(), sheaf::auto_block< T, S >::ct(), sheaf::id_block::is_member_hub_id_space(), part_id(), and sheaf::abstract_poset_member::put_name().

Referenced by part().


The documentation for this class was generated from the following files: