37template <
class T,
unsigned Dim,
class MeshType >
44template <
class T,
unsigned Dim,
class MeshType >
49 for (
unsigned d=0; d <
Dim; ++d) {
67template <
class T,
unsigned Dim,
class MeshType >
72 for (
unsigned d=0; d <
Dim; ++d) {
98template <
class T,
unsigned Dim,
class MeshType >
116template <
class T,
unsigned Dim,
class MeshType >
118 MeshType& mesh,
int vnodes) {
131template <
class T,
unsigned Dim,
class MeshType >
133 MeshType& mesh,
int vnodes) {
138 "Number of PRegion arguments does not match RegionLayout dimension!!");
150template <
class T,
unsigned Dim,
class MeshType >
158 "Number of PRegion arguments does not match RegionLayout dimension!!");
171template <
class T,
unsigned Dim,
class MeshType >
179 "Number of PRegion arguments does not match RegionLayout dimension!!");
195template <
class T,
unsigned Dim,
class MeshType >
203 for (
unsigned int i=0; i<
Dim; i++)
204 extended[i] =
Index(domain[i].first(), domain[i].last()+1,
215template <
class T,
unsigned Dim,
class MeshType >
221 "Number of Index arguments does not match RegionLayout dimension!!");
235template <
class T,
unsigned Dim,
class MeshType >
242 "Number of Index arguments does not match RegionLayout dimension!!");
258template <
class T,
unsigned Dim,
class MeshType >
260 const Index& i3,
int vnodes) {
263 "Number of Index arguments does not match RegionLayout dimension!!");
271 store_mesh(
new MeshType(ex1, ex2, ex3),
true);
283template <
class T,
unsigned Dim,
class MeshType >
299template <
class T,
unsigned Dim,
class MeshType >
307 "Number of Index arguments does not match RegionLayout dimension!!");
319template <
class T,
unsigned Dim,
class MeshType >
326 "Number of Index arguments does not match RegionLayout dimension!!");
339template <
class T,
unsigned Dim,
class MeshType >
347 "Number of Index arguments does not match RegionLayout dimension!!");
362template <
class T,
unsigned Dim,
class MeshType >
370 for (
unsigned int i=0; i<
Dim; i++)
371 extended[i] =
Index(domain[i].first(), domain[i].last()+1,
383template <
class T,
unsigned Dim,
class MeshType >
400template <
class T,
unsigned Dim,
class MeshType >
414 for (d=0; d <
Dim; ++d)
415 ex[d] =
Index(domain[d].first(),domain[d].last()+1,domain[d].stride());
420 for (d=0; d <
Dim; ++d) {
443template <
class T,
unsigned Dim,
class MeshType >
460 for (d=0; d <
Dim; ++d) {
485template <
class T,
unsigned Dim,
class MeshType >
499 for (d=0; d <
Dim; ++d)
500 ex[d] =
Index(domain[d].first(),domain[d].last()+1,domain[d].stride());
505 for (d=0; d <
Dim; ++d) {
524template <
class T,
unsigned Dim,
class MeshType >
534 for (d=0; d<
Dim; d++) {
537 FirstPoint[d] =
Index(first, first);
538 LastPoint[d] =
Index(last, last);
544 for (d=0; d<
Dim; d++) {
546 if ( !(FirstPoint[d] ==
Index(0,0)) ) {
547 FirstPoint[d] = FirstPoint[d] - 1;
548 FirstCoord =
theMesh->getVertexPosition(FirstPoint);
549 FirstCoord(d) = FirstCoord(d) +
550 0.5 *
theMesh->getDeltaVertex(FirstPoint)(d);
552 int final =
theMesh->gridSizes[d]-1;
553 if ( !(LastPoint[d] ==
Index(
final,
final)) )
554 LastCoord(d) = LastCoord(d) +
555 0.5 *
theMesh->getDeltaVertex(LastPoint)(d);
558 new_pregion[d] =
PRegion<T>(FirstCoord(d), LastCoord(d));
570template <
class T,
unsigned Dim,
class MeshType >
581 for (d=0; d<
Dim; d++) {
582 FirstCoord(d) =
nr[d].first();
583 LastCoord(d) =
nr[d].last();
587 for (d=0; d<
Dim; d++) {
589 if (
theMesh->getVertexPosition(FirstPoint)(d) < FirstCoord(d))
590 FirstPoint[d] = FirstPoint[d] + 1;
591 if (
theMesh->getVertexPosition(LastPoint)(d) > LastCoord(d))
592 LastPoint[d] = LastPoint[d] - 1;
605template <
class T,
unsigned Dim,
class MeshType >
623 for ( ; lociter != endloc; ++lociter) {
627 (*((*lociter).second)).getNode());
637 typedef typename ac_domain_vnodes::value_type rrnode_t;
640 for ( ; remiter != endrem; ++remiter) {
644 (*((*remiter).second)).getNode());
667template <
class T,
unsigned Dim,
class MeshType >
675 for ( ; lociter != endloc; ++lociter)
681 typename ac_domain_vnodes::iterator remiter =
Remote_ac->begin();
682 typename ac_domain_vnodes::iterator endrem =
Remote_ac->end();
683 for ( ; remiter != endrem; ++remiter)
693template <
class T,
unsigned Dim,
class MeshType >
714template <
class T,
unsigned Dim,
class MeshType >
728template <
class T,
unsigned Dim,
class MeshType >
742 for (
unsigned int d=0; d <
Dim; ++d)
751template <
class T,
unsigned Dim,
class MeshType >
766template <
class T,
unsigned Dim,
class MeshType >
773 typename MeshType::MeshVektor_t morigin = m->get_origin();
776 for (d=0; d <
Dim; ++d)
778 typename MeshType::MeshVektor_t msize = m->getDeltaVertex(meshCells);
779 for (d=0; d <
Dim; ++d)
780 retDomain[d] =
PRegion<T>(morigin[d], morigin[d] + msize[d]);
787template <
class T,
unsigned Dim,
class MeshType >
794 for (
unsigned int d=0; d <
Dim; ++d)
795 mvertices[d] =
Index(m->gridSizes[d]);
802template <
class T,
unsigned Dim,
class MeshType >
810 out <<
"Total Domain = " << f.
getDomain() <<
"\n";
813 out <<
"Local Rnodes = " << f.
size_iv() <<
"\n";
816 for(icount=0 ; v_i != v_e; ++v_i, ++icount)
817 out <<
" rnode " << icount <<
" : " << (*v_i).second->getDomain() <<
"\n";
820 out <<
"Remote Rnodes = " << f.
size_rdv() <<
"\n";
824 for (icount=0 ; dv_i != dv_e; ++dv_i, ++icount)
825 out <<
" rnode " << icount <<
" : " << (*dv_i).first <<
"\n";
845template <
class T,
unsigned Dim,
class MeshType >
864template <
class T,
unsigned Dim,
class MeshType >
911template <
class T,
unsigned Dim,
class MeshType >
933 WARNMSG(
"RegionLayout: notified of unknown UserList being deleted.");
std::ostream & operator<<(std::ostream &out, const RegionLayout< T, Dim, MeshType > &f)
iterator_dv begin_rdv(const GuardCellSizes< Dim > &gc=gc0())
ac_domain_vnodes::iterator iterator_dv
iterator_dv end_rdv(const GuardCellSizes< Dim > &gc=gc0())
const NDIndex< Dim > & getDomain() const
ac_id_vnodes::iterator iterator_iv
virtual void Repartition(UserList *)=0
NDIndex< Dim > MeshVertices
void changeDomain(FieldLayout< Dim > &)
void RepartitionLayout(NDIndex< Dim > *, NDIndex< Dim > *)
void make_rnodes(const NDRegion< T, Dim > &, FieldLayout< Dim > &)
ac_domain_vnodes::const_iterator const_iterator_dv
NDRegion< T, Dim > getMeshDomain(MeshType *)
NDIndex< Dim > convert_region(const NDRegion< T, Dim > &) const
NDRegion< T, Dim > convert_index(const NDIndex< Dim > &) const
ac_id_vnodes::size_type size_iv() const
NDRegion< T, Dim > Domain
virtual void notifyUserOfDelete(UserList *)
ac_id_vnodes::const_iterator const_iterator_iv
ac_domain_vnodes::size_type size_rdv() const
virtual void Repartition(UserList *)
FieldLayout< Dim > * FLayout
DomainMap< NDRegion< T, Dim >, Rnode< T, Dim > *, TouchesRegion< T, Dim >, ContainsRegion< T, Dim >, SplitRegion< T, Dim > > ac_domain_vnodes
const NDRegion< T, Dim > & getDomain() const
static RnodePool StaticRnodePool
NDIndex< Dim > getMeshVertices(MeshType *)
ac_domain_vnodes * Remote_ac
FieldLayout< Dim > & getFieldLayout()
void store_flayout(FieldLayout< Dim > *, bool WeOwn)
void store_mesh(UniformCartesian< Dim, T > *, bool WeOwn)
const NDRegion< T, Dim > & getDomain()
iterator_user begin_user()
UserList_t::iterator iterator_user
rep_type::iterator iterator
std::pair< Unique::type, T > value_type