|
dune-grid 2.8.0
|
Loading...
Searching...
No Matches
gridptr.hh
Go to the documentation of this file.
349 const DGFBoundaryParameter::type & parameters ( const Intersection< GridImp, IntersectionImp > & intersection ) const
363 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
373 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
395 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
423 assert( elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( nofElParam_ ) );
432 std::swap( vtxParam_[ index ], dgfFactory.parameter( element.template subEntity< dimension >( v ) ) );
448 bndParam_[ intersection.boundarySegmentIndex() ] = dgfFactory.boundaryParameter( intersection );
467 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
494 bndParam_[intersection.boundarySegmentIndex()] = std::to_string(boundaryIds[factory.insertionIndex(intersection)]);
597 assert( gridPtr_.elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
607 assert( gridPtr_.vtxParam_[ index ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
635 return (codim == 1) || ((codim == dimension) && (gridPtr_.nofVtxParam_ > 0)) || ((codim == 0) && (gridPtr_.nofElParam_ > 0));
648 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
655 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
676 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
683 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
731 static std::enable_if_t< std::is_trivially_copyable< T >::value, std::size_t > dataSize ( const T & /* value */ )
742 static std::enable_if_t< std::is_trivially_copyable< T >::value > write ( Buffer &buffer, const T &value )
759 static std::enable_if_t< std::is_trivially_copyable< T >::value > read ( Buffer &buffer, T &value, std::size_t &n )
786 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector< double > > elData_, vtxData_;
787 mutable std::map< typename GridType::LocalIdSet::IdType, std::pair< int, DGFBoundaryParameter::type > > bndData_;
Describes the parallel communication interface class for MessageBuffers and DataHandles.
int size() const
bool empty() const
static StaticIntegralRange< T, to > range(std::integral_constant< T, to >) noexcept
size_type dim() const
std::ptrdiff_t index() const
#define DUNE_THROW(E, m)
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:169
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:86
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:175
constexpr All all
PartitionSet for all partitions.
Definition partitionset.hh:294
constexpr InteriorBorder interiorBorder
PartitionSet for the interior and border partitions.
Definition partitionset.hh:285
Include standard header files.
MPI_Comm MPICommunicator
static MPICommunicator getCommunicator()
Definition dgfgridfactory.hh:36
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:100
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
Definition dgfgridfactory.hh:156
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:122
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:149
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:162
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:234
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:76
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:218
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:312
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:370
GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given a std::istream
Definition gridptr.hh:197
const std::vector< double > & parameters(const Entity &entity) const
get parameters defined for each codim 0 und dim entity on the grid through the grid file
Definition gridptr.hh:323
GridPtr()
Default constructor, creating empty GridPtr.
Definition gridptr.hh:215
const GridType & operator*() const
return const reference to GridType instance
Definition gridptr.hh:286
std::vector< DGFBoundaryParameter::type > bndParam_
Definition gridptr.hh:795
void initialize(GridFactory< GridType > &factory, std::vector< int > &boundaryIds, std::vector< int > &elementIds)
Definition gridptr.hh:454
GridPtr(GridType *grd)
Constructor storing given pointer to internal auto pointer.
Definition gridptr.hh:228
const DGFBoundaryParameter::type & parameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get parameters for intersection
Definition gridptr.hh:349
GridType & operator*()
return reference to GridType instance
Definition gridptr.hh:276
int nofParameters(const Entity &) const
get parameters defined for given entity
Definition gridptr.hh:309
GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition gridptr.hh:156
MPIHelper::MPICommunicator MPICommunicatorType
Definition gridptr.hh:152
GridPtr & operator=(const GridPtr &org)
assignment of grid pointer
Definition gridptr.hh:244
int nofParameters(int cdim) const
get number of parameters defined for a given codimension
Definition gridptr.hh:299
int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get number of parameters defined for a given intersection
Definition gridptr.hh:316
void readGmsh(const std::string &filename, std::integral_constant< bool, false >)
Definition gridptr.hh:145
void readGmsh(const std::string &filename, std::integral_constant< bool, true >)
Definition gridptr.hh:135
void initialize(DGFGridFactory< GridType > &dgfFactory)
Definition gridptr.hh:384
GridPtr(const GridPtr &org)=default
Copy constructor, copies internal auto pointer.
std::string getFileExtension(const std::string &filename) const
Definition gridptr.hh:120
const GridType * operator->() const
return const pointer to GridType instance
Definition gridptr.hh:291
GridType * release()
release pointer from internal ownership
Definition gridptr.hh:296
GridType * operator->()
return pointer to GridType instance
Definition gridptr.hh:281
Definition gridptr.hh:66
mygrid_ptr & operator=(const mygrid_ptr &other)
Definition gridptr.hh:103
Definition gridptr.hh:536
CommDataHandleIF< DataHandle, char > & interface()
Definition gridptr.hh:629
DataHandle(const DataHandle &)=delete
void gather(Buffer &buffer, const Entity &entity) const
Definition gridptr.hh:671
std::size_t size(const Entity &entity) const
Definition gridptr.hh:641
DataHandle(DataHandle &&)=delete
void scatter(Buffer &buffer, const Entity &entity, std::size_t n)
Definition gridptr.hh:700
static const type & defaultValue()
default constructor
Definition parser.hh:26
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:869
T data(T... args)
T empty(T... args)
T find_last_of(T... args)
GridType get(GridType ... args)
T memcpy(T... args)
T resize(T... args)
T size(T... args)
T substr(T... args)
GridType swap(GridType ... args)
T to_string(T... args)
GridType use_count(GridType ... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8