DFT-EFE
 
Loading...
Searching...
No Matches
EFEBasisDofHandler.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeEFEBasisDofHandler_h
27#define dftefeEFEBasisDofHandler_h
28
29#include <utils/TypeConfig.h>
30#include <utils/Point.h>
33#include <basis/FECellBase.h>
34#include <map>
38#include <utils/MPIPatternP2P.h>
39
40namespace dftefe
41{
42 namespace basis
43 {
50 template <typename ValueTypeBasisCoeff,
51 typename ValueTypeBasisData,
53 size_type dim>
55 : public FEBasisDofHandler<ValueTypeBasisCoeff, memorySpace, dim>
56
57 {
58 public:
59 virtual double
61 const utils::Point &point) const = 0;
62 virtual std::vector<double>
64 const utils::Point &point,
65 const size_type derivativeOrder = 1) const = 0;
66
68 // virtual void
69 // reinit(std::shared_ptr<const TriangulationBase> triangulation,
70 // const size_type feOrder) = 0;
71
72 virtual std::shared_ptr<const TriangulationBase>
73 getTriangulation() const = 0;
74
75 virtual size_type
76 nLocalCells() const = 0;
77 virtual size_type
78 nLocallyOwnedCells() const = 0;
79 virtual size_type
80 nGlobalCells() const = 0;
81 virtual size_type
82 getFEOrder(size_type cellId) const = 0;
83 virtual size_type
84 nCellDofs(size_type cellId) const = 0;
85 virtual bool
87
88 virtual std::vector<std::pair<global_size_type, global_size_type>>
90
91 virtual std::vector<std::pair<global_size_type, global_size_type>>
92 getGlobalRanges() const = 0;
93
94 virtual std::map<BasisIdAttribute, size_type>
96
97 virtual size_type
98 nLocalNodes() const = 0;
99 virtual global_size_type
100 nGlobalNodes() const = 0;
101 virtual std::vector<size_type>
102 getLocalNodeIds(size_type cellId) const = 0;
103 virtual std::vector<size_type>
104 getGlobalNodeIds() const = 0;
105 virtual void
107 size_type cellId,
108 std::vector<global_size_type> &vecGlobalNodeId) const = 0;
109 virtual const std::vector<global_size_type> &
110 getBoundaryIds() const = 0;
111 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
112 memorySpace,
115 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
116 memorySpace,
119 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
120 memorySpace,
123 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
124 memorySpace,
127 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
128 memorySpace,
131 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
132 memorySpace,
135 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
136 memorySpace,
138 beginLocalCells() const = 0;
139 virtual typename FEBasisDofHandler<ValueTypeBasisCoeff,
140 memorySpace,
142 endLocalCells() const = 0;
143
144 virtual size_type
146
147 virtual size_type
149
150 // This assumes a linear cell mapping
151 virtual void
153 std::map<global_size_type, utils::Point> &dofCoords) const = 0;
154
155 virtual unsigned int
156 getDim() const = 0;
157
158 // Enrichment specific functions.
159 virtual double
161 const size_type cellLocalEnrichmentId,
162 const dftefe::utils::Point &point) const = 0;
163
164 virtual std::vector<double>
166 const size_type cellLocalEnrichmentId,
167 const dftefe::utils::Point &point) const = 0;
168
169 virtual std::vector<double>
171 const size_type cellLocalEnrichmentId,
172 const dftefe::utils::Point &point) const = 0;
173
174 virtual std::vector<global_size_type>
176
177 virtual global_size_type
179
180 virtual std::shared_ptr<const EnrichmentIdsPartition<dim>>
182
183 virtual std::shared_ptr<
184 const EnrichmentClassicalInterfaceSpherical<ValueTypeBasisData,
185 memorySpace,
186 dim>>
188
189 virtual bool
190 isOrthogonalized() const = 0;
191
192 virtual size_type
193 totalRanges() const = 0;
194
195 // Additional functions for getting geometric constriants matrix
196 // Additional functions for getting the communication pattern object
197 // for MPI case
198
199 virtual std::shared_ptr<
202
203 // use this to add extra constraints on top of geometric constraints
204 virtual std::shared_ptr<
207
208 // call this after calling start
209 virtual void
212 constraintsLocal) const = 0;
213
214 virtual std::shared_ptr<const utils::mpi::MPIPatternP2P<memorySpace>>
215 getMPIPatternP2P() const = 0;
216
217 virtual bool
218 isDistributed() const = 0;
219
220 }; // end of EFEBasisDofHandler
221 } // end of namespace basis
222} // end of namespace dftefe
223#endif // dftefeEFEBasisDofHandler_h
Definition: ConstraintsLocal.h:43
Definition: EFEBasisDofHandler.h:57
virtual std::vector< global_size_type > getGhostEnrichmentGlobalIds() const =0
virtual global_size_type nGlobalEnrichmentNodes() const =0
virtual bool isVariableDofsPerCell() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::const_FECellIterator endLocalCells() const =0
virtual std::shared_ptr< const EnrichmentIdsPartition< dim > > getEnrichmentIdsPartition() const =0
virtual std::map< BasisIdAttribute, size_type > getBasisAttributeToRangeIdMap() const =0
virtual std::shared_ptr< const TriangulationBase > getTriangulation() const =0
virtual double getEnrichmentValue(const size_type cellId, const size_type cellLocalEnrichmentId, const dftefe::utils::Point &point) const =0
virtual size_type nCellDofs(size_type cellId) const =0
virtual global_size_type nGlobalNodes() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::FECellIterator endLocallyOwnedCells()=0
virtual size_type nCumulativeLocallyOwnedCellDofs() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::const_FECellIterator beginLocalCells() const =0
virtual std::vector< double > getEnrichmentHessian(const size_type cellId, const size_type cellLocalEnrichmentId, const dftefe::utils::Point &point) const =0
virtual bool isDistributed() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::FECellIterator beginLocallyOwnedCells()=0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::const_FECellIterator beginLocallyOwnedCells() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::FECellIterator endLocalCells()=0
virtual std::vector< double > getEnrichmentDerivative(const size_type cellId, const size_type cellLocalEnrichmentId, const dftefe::utils::Point &point) const =0
virtual size_type nLocalCells() const =0
virtual std::shared_ptr< const ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > > getIntrinsicConstraints() const =0
virtual void getCellDofsGlobalIds(size_type cellId, std::vector< global_size_type > &vecGlobalNodeId) const =0
virtual double getBasisFunctionValue(const size_type basisId, const utils::Point &point) const =0
virtual std::vector< size_type > getGlobalNodeIds() const =0
virtual void createConstraintsEnd(std::shared_ptr< ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > > constraintsLocal) const =0
virtual bool isOrthogonalized() const =0
virtual size_type getFEOrder(size_type cellId) const =0
virtual const std::vector< global_size_type > & getBoundaryIds() const =0
virtual std::vector< std::pair< global_size_type, global_size_type > > getLocallyOwnedRanges() const =0
virtual std::vector< double > getBasisFunctionDerivative(const size_type basisId, const utils::Point &point, const size_type derivativeOrder=1) const =0
virtual size_type nLocalNodes() const =0
virtual void getBasisCenters(std::map< global_size_type, utils::Point > &dofCoords) const =0
virtual size_type nCumulativeLocalCellDofs() const =0
virtual std::shared_ptr< ConstraintsLocal< ValueTypeBasisCoeff, memorySpace > > createConstraintsStart() const =0
virtual size_type totalRanges() const =0
virtual std::shared_ptr< const EnrichmentClassicalInterfaceSpherical< ValueTypeBasisData, memorySpace, dim > > getEnrichmentClassicalInterface() const =0
virtual std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > getMPIPatternP2P() const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::FECellIterator beginLocalCells()=0
virtual size_type nGlobalCells() const =0
virtual unsigned int getDim() const =0
virtual std::vector< std::pair< global_size_type, global_size_type > > getGlobalRanges() const =0
virtual size_type nLocallyOwnedCells() const =0
virtual std::vector< size_type > getLocalNodeIds(size_type cellId) const =0
virtual FEBasisDofHandler< ValueTypeBasisCoeff, memorySpace, dim >::const_FECellIterator endLocallyOwnedCells() const =0
Class to get the interface between Classical and Enrichment basis. It takes as the classical basis as...
Definition: EnrichmentClassicalInterfaceSpherical.h:72
Definition: FEBasisDofHandler.h:57
std::vector< std::shared_ptr< FECellBase > >::iterator FECellIterator
Definition: FEBasisDofHandler.h:62
std::vector< std::shared_ptr< FECellBase > >::const_iterator const_FECellIterator
Definition: FEBasisDofHandler.h:64
Definition: PointImpl.h:13
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
unsigned long int global_size_type
Definition: TypeConfig.h:9