|
dune-grid 2.11
|
Loading...
Searching...
No Matches
gridptr.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
351 const DGFBoundaryParameter::type & parameters ( const Intersection< GridImp, IntersectionImp > & intersection ) const
365 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
375 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
397 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
425 assert( elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( nofElParam_ ) );
434 std::swap( vtxParam_[ index ], dgfFactory.parameter( element.template subEntity< dimension >( v ) ) );
450 bndParam_[ intersection.boundarySegmentIndex() ] = dgfFactory.boundaryParameter( intersection );
469 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
496 bndParam_[intersection.boundarySegmentIndex()] = std::to_string(boundaryIds[factory.insertionIndex(intersection)]);
599 assert( gridPtr_.elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
609 assert( gridPtr_.vtxParam_[ index ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
637 return (codim == 1) || ((codim == dimension) && (gridPtr_.nofVtxParam_ > 0)) || ((codim == 0) && (gridPtr_.nofElParam_ > 0));
650 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
657 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
678 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
685 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
733 static std::enable_if_t< std::is_trivially_copyable< T >::value, std::size_t > dataSize ( const T & /* value */ )
744 static std::enable_if_t< std::is_trivially_copyable< T >::value > write ( Buffer &buffer, const T &value )
761 static std::enable_if_t< std::is_trivially_copyable< T >::value > read ( Buffer &buffer, T &value, std::size_t &n )
788 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector< double > > elData_, vtxData_;
789 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 constexpr IntegralRange< std::decay_t< T > > range(T &&from, U &&to) noexcept
size_type dim() const
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
@ ForwardCommunication
communicate as given in InterfaceType
Definition gridenums.hh:171
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition gridenums.hh:88
const IndexSet & indexSet() const
obtain the index set
Definition common/gridview.hh:177
constexpr All all
PartitionSet for all partitions.
Definition partitionset.hh:295
constexpr InteriorBorder interiorBorder
PartitionSet for the interior and border partitions.
Definition partitionset.hh:286
Include standard header files.
MPI_Comm MPICommunicator
static MPICommunicator getCommunicator()
Definition dgfgridfactory.hh:38
const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &) const
Definition dgfgridfactory.hh:158
int boundaryId(const Intersection &intersection) const
Definition dgfgridfactory.hh:102
std::vector< double > & parameter(const Element &element)
Definition dgfgridfactory.hh:124
bool haveBoundaryParameters() const
Definition dgfgridfactory.hh:151
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition common/intersection.hh:164
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition common/intersection.hh:236
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition datahandleif.hh:78
static constexpr int codimension
Know your own codimension.
Definition common/entity.hh:106
virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
obtain an element's insertion index
Definition common/gridfactory.hh:181
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given a std::istream
Definition gridptr.hh:199
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:325
GridPtr()
Default constructor, creating empty GridPtr.
Definition gridptr.hh:217
const GridType & operator*() const
return const reference to GridType instance
Definition gridptr.hh:288
std::vector< DGFBoundaryParameter::type > bndParam_
Definition gridptr.hh:797
void initialize(GridFactory< GridType > &factory, std::vector< int > &boundaryIds, std::vector< int > &elementIds)
Definition gridptr.hh:456
GridPtr(GridType *grd)
Constructor storing given pointer to internal auto pointer.
Definition gridptr.hh:230
const DGFBoundaryParameter::type & parameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get parameters for intersection
Definition gridptr.hh:351
GridType & operator*()
return reference to GridType instance
Definition gridptr.hh:278
int nofParameters(const Entity &) const
get parameters defined for given entity
Definition gridptr.hh:311
GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
constructor given the name of a DGF file
Definition gridptr.hh:158
MPIHelper::MPICommunicator MPICommunicatorType
Definition gridptr.hh:154
GridPtr & operator=(const GridPtr &org)
assignment of grid pointer
Definition gridptr.hh:246
int nofParameters(int cdim) const
get number of parameters defined for a given codimension
Definition gridptr.hh:301
int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection) const
get number of parameters defined for a given intersection
Definition gridptr.hh:318
void readGmsh(const std::string &, std::integral_constant< bool, false >)
Definition gridptr.hh:147
void readGmsh(const std::string &filename, std::integral_constant< bool, true >)
Definition gridptr.hh:137
void initialize(DGFGridFactory< GridType > &dgfFactory)
Definition gridptr.hh:386
GridPtr(const GridPtr &org)=default
Copy constructor, copies internal auto pointer.
std::string getFileExtension(const std::string &filename) const
Definition gridptr.hh:122
const GridType * operator->() const
return const pointer to GridType instance
Definition gridptr.hh:293
GridType * release()
release pointer from internal ownership
Definition gridptr.hh:298
GridType * operator->()
return pointer to GridType instance
Definition gridptr.hh:283
Definition gridptr.hh:68
mygrid_ptr & operator=(const mygrid_ptr &other)
Definition gridptr.hh:105
Definition gridptr.hh:538
CommDataHandleIF< DataHandle, char > & interface()
Definition gridptr.hh:631
DataHandle(const DataHandle &)=delete
void gather(Buffer &buffer, const Entity &entity) const
Definition gridptr.hh:673
std::size_t size(const Entity &entity) const
Definition gridptr.hh:643
DataHandle(DataHandle &&)=delete
void scatter(Buffer &buffer, const Entity &entity, std::size_t n)
Definition gridptr.hh:702
static const type & defaultValue()
default constructor
Definition parser.hh:28
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:203
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