Functions | |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
std::vector< ValueTypeBasisData > | getClassicalComponentCoeffsInCellOEFE (const size_type cellIndex, std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | getClassicalComponentBasisValuesInCellAtQuadOEFE (const size_type cellIndex, const size_type nQuadPointInCell, std::vector< ValueTypeBasisData > coeffsInCell, std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, ValueTypeBasisData *basisValInCellPtr, std::vector< ValueTypeBasisData > &classicalComponentInQuadValues) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | getClassicalComponentBasisGradInCellAtQuadOEFE (const size_type cellIndex, const size_type nQuadPointInCell, std::vector< ValueTypeBasisData > &coeffsInCell, std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, ValueTypeBasisData *basisGradInCell, std::vector< ValueTypeBasisData > &classicalComponentInQuadGradients) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | storeValuesHRefinedSameQuadEveryCell (std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisGradientQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisHessianQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisOverlap, const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer, std::vector< size_type > &nQuadPointsInCell, std::vector< size_type > &cellStartIdsBasisQuadStorage, std::vector< size_type > &cellStartIdsBasisGradientQuadStorage, std::vector< size_type > &cellStartIdsBasisHessianQuadStorage, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | storeGradNiGradNjHRefinedSameQuadEveryCell (std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisGradNiGradNj, const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | storeValuesHRefinedAdaptiveQuad (std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisGradientQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisHessianQuadStorage, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisOverlap, const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer, std::vector< size_type > &nQuadPointsInCell, std::vector< size_type > &cellStartIdsBasisQuadStorage, std::vector< size_type > &cellStartIdsBasisGradientQuadStorage, std::vector< size_type > &cellStartIdsBasisHessianQuadStorage, const BasisStorageAttributesBoolMap basisStorageAttributesBoolMap) |
template<typename ValueTypeBasisCoeff , typename ValueTypeBasisData , utils::MemorySpace memorySpace, size_type dim> | |
void | storeGradNiGradNjHRefinedAdaptiveQuad (std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > efeBDH, std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > &basisGradNiGradNj, const quadrature::QuadratureRuleAttributes &quadratureRuleAttributes, std::shared_ptr< const quadrature::QuadratureRuleContainer > quadratureRuleContainer) |
void dftefe::basis::EFEBasisDataStorageDealiiInternal::getClassicalComponentBasisGradInCellAtQuadOEFE | ( | const size_type | cellIndex, |
const size_type | nQuadPointInCell, | ||
std::vector< ValueTypeBasisData > & | coeffsInCell, | ||
std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, | ||
ValueTypeBasisData * | basisGradInCell, | ||
std::vector< ValueTypeBasisData > & | classicalComponentInQuadGradients | ||
) |
void dftefe::basis::EFEBasisDataStorageDealiiInternal::getClassicalComponentBasisValuesInCellAtQuadOEFE | ( | const size_type | cellIndex, |
const size_type | nQuadPointInCell, | ||
std::vector< ValueTypeBasisData > | coeffsInCell, | ||
std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, | ||
ValueTypeBasisData * | basisValInCellPtr, | ||
std::vector< ValueTypeBasisData > & | classicalComponentInQuadValues | ||
) |
std::vector< ValueTypeBasisData > dftefe::basis::EFEBasisDataStorageDealiiInternal::getClassicalComponentCoeffsInCellOEFE | ( | const size_type | cellIndex, |
std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH | ||
) |
void dftefe::basis::EFEBasisDataStorageDealiiInternal::storeGradNiGradNjHRefinedAdaptiveQuad | ( | std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, |
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisGradNiGradNj, | ||
const quadrature::QuadratureRuleAttributes & | quadratureRuleAttributes, | ||
std::shared_ptr< const quadrature::QuadratureRuleContainer > | quadratureRuleContainer | ||
) |
const std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>> enrichmentIdToClassicalLocalIdMap = nullptr; const std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>> enrichmentIdToInterfaceCoeffMap = nullptr; std::shared_ptr<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>> cfeBasisManager = nullptr;
if (efeBDH->isOrthogonalized()) { enrichmentIdToClassicalLocalIdMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentLocalIdsMap());
enrichmentIdToInterfaceCoeffMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentCoeffMap());
cfeBasisManager = std::dynamic_pointer_cast<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>>( efeBDH->getEnrichmentClassicalInterface() ->getCFEBasisManager()); }
cfeBasisManager->getCellDofsLocalIds(cellIndex, vecClassicalLocalNodeId); std::vector<ValueTypeBasisData> coeffsInCell( classicalDofsPerCell * numEnrichmentIdsInCell, 0); for (size_type cellEnrichId = 0; cellEnrichId < numEnrichmentIdsInCell; cellEnrichId++) {
get the enrichmentIds global_size_type enrichmentId = efeBDH->getEnrichmentClassicalInterface() ->getEnrichmentId(cellIndex, cellEnrichId);
get the vectors of non-zero localIds and coeffs auto iter = enrichmentIdToInterfaceCoeffMap->find(enrichmentId); auto it = enrichmentIdToClassicalLocalIdMap->find(enrichmentId); if (iter != enrichmentIdToInterfaceCoeffMap->end() && it != enrichmentIdToClassicalLocalIdMap->end()) { const std::vector<ValueTypeBasisData> &coeffsInLocalIdsMap = iter->second;
for (size_type i = 0; i < classicalDofsPerCell; i++) { size_type pos = 0; bool found = false; it->second.getPosition(vecClassicalLocalNodeId[i], pos, found); if (found) { coeffsInCell[numEnrichmentIdsInCell * i + cellEnrichId] = coeffsInLocalIdsMap[pos]; } } } }
saved as cell->dim->node->quad dftefe::utils::MemoryStorage<ValueTypeBasisData, utils::MemorySpace::HOST> basisGradInCell = cfeBasisDataStorage->getBasisGradientDataInCell(cellIndex);
Do a gemm (\Sigma c_i N_i^classical) and get the quad values in std::vector
for (size_type iDim = 0; iDim < dim; iDim++) { ValueTypeBasisData *B = basisGradInCell.data() + iDim * nQuadPointInCell * classicalDofsPerCell; std::vector<ValueTypeBasisData> classicalComponentInQuadDim( nQuadPointInCell * numEnrichmentIdsInCell, (ValueTypeBasisData)0); linearAlgebra::blasLapack::gemm<ValueTypeBasisData, ValueTypeBasisData, utils::MemorySpace::HOST>( linearAlgebra::blasLapack::Layout::ColMajor, linearAlgebra::blasLapack::Op::NoTrans, linearAlgebra::blasLapack::Op::Trans, numEnrichmentIdsInCell, nQuadPointInCell, classicalDofsPerCell, (ValueTypeBasisData)1.0, coeffsInCell.data(), numEnrichmentIdsInCell, B, nQuadPointInCell, (ValueTypeBasisData)0.0, classicalComponentInQuadDim.data(), numEnrichmentIdsInCell, efeBDH->getEnrichmentClassicalInterface() ->getLinAlgOpContext()); classicalComponentInQuadGradients[iDim] = classicalComponentInQuadDim; }
void dftefe::basis::EFEBasisDataStorageDealiiInternal::storeGradNiGradNjHRefinedSameQuadEveryCell | ( | std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, |
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisGradNiGradNj, | ||
const quadrature::QuadratureRuleAttributes & | quadratureRuleAttributes, | ||
std::shared_ptr< const quadrature::QuadratureRuleContainer > | quadratureRuleContainer | ||
) |
const std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>> enrichmentIdToClassicalLocalIdMap = nullptr; const std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>> enrichmentIdToInterfaceCoeffMap = nullptr; std::shared_ptr<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>> cfeBasisManager = nullptr;
if (efeBDH->isOrthogonalized()) { enrichmentIdToClassicalLocalIdMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentLocalIdsMap());
enrichmentIdToInterfaceCoeffMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentCoeffMap());
cfeBasisManager = std::dynamic_pointer_cast<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>>( efeBDH->getEnrichmentClassicalInterface() ->getCFEBasisManager()); }
cfeBasisManager->getCellDofsLocalIds(cellIndex, vecClassicalLocalNodeId); std::vector<ValueTypeBasisData> coeffsInCell( classicalDofsPerCell * numEnrichmentIdsInCell, 0); for (size_type cellEnrichId = 0; cellEnrichId < numEnrichmentIdsInCell; cellEnrichId++) {
get the enrichmentIds global_size_type enrichmentId = efeBDH->getEnrichmentClassicalInterface() ->getEnrichmentId(cellIndex, cellEnrichId);
get the vectors of non-zero localIds and coeffs auto iter = enrichmentIdToInterfaceCoeffMap->find(enrichmentId); auto it = enrichmentIdToClassicalLocalIdMap->find(enrichmentId); if (iter != enrichmentIdToInterfaceCoeffMap->end() && it != enrichmentIdToClassicalLocalIdMap->end()) { const std::vector<ValueTypeBasisData> &coeffsInLocalIdsMap = iter->second;
for (size_type i = 0; i < classicalDofsPerCell; i++) { size_type pos = 0; bool found = false; it->second.getPosition(vecClassicalLocalNodeId[i], pos, found); if (found) { coeffsInCell[numEnrichmentIdsInCell * i + cellEnrichId] = coeffsInLocalIdsMap[pos]; } } } }
saved as cell->dim->node->quad dftefe::utils::MemoryStorage<ValueTypeBasisData, utils::MemorySpace::HOST> basisGradInCell = cfeBasisDataStorage->getBasisGradientDataInCell(cellIndex);
Do a gemm (\Sigma c_i N_i^classical) and get the quad values in std::vector
for (size_type iDim = 0; iDim < dim; iDim++) { ValueTypeBasisData *B = basisGradInCell.data() + iDim * nQuadPointInCell * classicalDofsPerCell; std::vector<ValueTypeBasisData> classicalComponentInQuadDim( nQuadPointInCell * numEnrichmentIdsInCell, (ValueTypeBasisData)0); linearAlgebra::blasLapack::gemm<ValueTypeBasisData, ValueTypeBasisData, utils::MemorySpace::HOST>( linearAlgebra::blasLapack::Layout::ColMajor, linearAlgebra::blasLapack::Op::NoTrans, linearAlgebra::blasLapack::Op::Trans, numEnrichmentIdsInCell, nQuadPointInCell, classicalDofsPerCell, (ValueTypeBasisData)1.0, coeffsInCell.data(), numEnrichmentIdsInCell, B, nQuadPointInCell, (ValueTypeBasisData)0.0, classicalComponentInQuadDim.data(), numEnrichmentIdsInCell, efeBDH->getEnrichmentClassicalInterface() ->getLinAlgOpContext()); classicalComponentInQuadGradients[iDim] = classicalComponentInQuadDim; }
void dftefe::basis::EFEBasisDataStorageDealiiInternal::storeValuesHRefinedAdaptiveQuad | ( | std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, |
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisGradientQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisHessianQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisOverlap, | ||
const quadrature::QuadratureRuleAttributes & | quadratureRuleAttributes, | ||
std::shared_ptr< const quadrature::QuadratureRuleContainer > | quadratureRuleContainer, | ||
std::vector< size_type > & | nQuadPointsInCell, | ||
std::vector< size_type > & | cellStartIdsBasisQuadStorage, | ||
std::vector< size_type > & | cellStartIdsBasisGradientQuadStorage, | ||
std::vector< size_type > & | cellStartIdsBasisHessianQuadStorage, | ||
const BasisStorageAttributesBoolMap | basisStorageAttributesBoolMap | ||
) |
const std::unordered_map<global_size_type, utils::OptimizedIndexSet<size_type>> enrichmentIdToClassicalLocalIdMap = nullptr; const std::unordered_map<global_size_type, std::vector<ValueTypeBasisData>> enrichmentIdToInterfaceCoeffMap = nullptr; std::shared_ptr<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>> cfeBasisManager = nullptr;
if (efeBDH->isOrthogonalized()) { enrichmentIdToClassicalLocalIdMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentLocalIdsMap());
enrichmentIdToInterfaceCoeffMap = &(efeBDH->getEnrichmentClassicalInterface() ->getClassicalComponentCoeffMap());
cfeBasisManager = std::dynamic_pointer_cast<const FEBasisManager<ValueTypeBasisData, ValueTypeBasisData, memorySpace, dim>>( efeBDH->getEnrichmentClassicalInterface() ->getCFEBasisManager()); }
cfeBasisManager->getCellDofsLocalIds(cellIndex, vecClassicalLocalNodeId); std::vector<ValueTypeBasisData> coeffsInCell( classicalDofsPerCell * numEnrichmentIdsInCell, 0); for (size_type cellEnrichId = 0; cellEnrichId < numEnrichmentIdsInCell; cellEnrichId++) {
get the enrichmentIds global_size_type enrichmentId = efeBDH->getEnrichmentClassicalInterface() ->getEnrichmentId(cellIndex, cellEnrichId);
// get the vectors of non-zero localIds and coeffs
auto iter = enrichmentIdToInterfaceCoeffMap->find(enrichmentId); DFTEFE_Assert(iter != enrichmentIdToInterfaceCoeffMap->end()); const std::vector<ValueTypeBasisData> &coeffsInLocalIdsMap = iter->second;
for (size_type i = 0; i < classicalDofsPerCell; i++) { size_type pos = 0; bool found = false; auto it = enrichmentIdToClassicalLocalIdMap->find(enrichmentId); DFTEFE_Assert(it != enrichmentIdToClassicalLocalIdMap->end()); it->second.getPosition(vecClassicalLocalNodeId[i], pos, found); if (found) { coeffsInCell[numEnrichmentIdsInCell * i + cellEnrichId] = coeffsInLocalIdsMap[pos]; } }
get the vectors of non-zero localIds and coeffs auto iter = enrichmentIdToInterfaceCoeffMap->find(enrichmentId); auto it = enrichmentIdToClassicalLocalIdMap->find(enrichmentId); if (iter != enrichmentIdToInterfaceCoeffMap->end() && it != enrichmentIdToClassicalLocalIdMap->end()) { const std::vector<ValueTypeBasisData> &coeffsInLocalIdsMap = iter->second;
for (size_type i = 0; i < classicalDofsPerCell; i++) { size_type pos = 0; bool found = false; it->second.getPosition(vecClassicalLocalNodeId[i], pos, found); if (found) { coeffsInCell[numEnrichmentIdsInCell * i + cellEnrichId] = coeffsInLocalIdsMap[pos]; } } } }
if (basisStorageAttributesBoolMap .find(BasisStorageAttributes::StoreValues) ->second || basisStorageAttributesBoolMap .find(BasisStorageAttributes::StoreOverlap) ->second) { dftefe::utils::MemoryStorage<ValueTypeBasisData, utils::MemorySpace::HOST> basisValInCell = cfeBasisDataStorage->getBasisDataInCell(cellIndex);
Do a gemm (\Sigma c_i N_i^classical) and get the quad values in std::vector
linearAlgebra::blasLapack::gemm<ValueTypeBasisData, ValueTypeBasisData, utils::MemorySpace::HOST>( linearAlgebra::blasLapack::Layout::ColMajor, linearAlgebra::blasLapack::Op::NoTrans, linearAlgebra::blasLapack::Op::Trans, numEnrichmentIdsInCell, nQuadPointInCell, classicalDofsPerCell, (ValueTypeBasisData)1.0, coeffsInCell.data(), numEnrichmentIdsInCell, basisValInCell.data(), nQuadPointInCell, (ValueTypeBasisData)0.0, classicalComponentInQuadValues.data(), numEnrichmentIdsInCell, efeBDH->getEnrichmentClassicalInterface() ->getLinAlgOpContext()); } if (basisStorageAttributesBoolMap .find(BasisStorageAttributes::StoreGradient) ->second) {
saved as cell->dim->node->quad dftefe::utils::MemoryStorage<ValueTypeBasisData, utils::MemorySpace::HOST> basisGradInCell = cfeBasisDataStorage->getBasisGradientDataInCell( cellIndex);
Do a gemm (\Sigma c_i N_i^classical) and get the quad values in std::vector
for (size_type iDim = 0; iDim < dim; iDim++) { ValueTypeBasisData *B = basisGradInCell.data() + iDim * nQuadPointInCell * classicalDofsPerCell; std::vector<ValueTypeBasisData> classicalComponentInQuadDim(nQuadPointInCell * numEnrichmentIdsInCell, (ValueTypeBasisData)0); linearAlgebra::blasLapack::gemm< ValueTypeBasisData, ValueTypeBasisData, utils::MemorySpace::HOST>( linearAlgebra::blasLapack::Layout::ColMajor, linearAlgebra::blasLapack::Op::NoTrans, linearAlgebra::blasLapack::Op::Trans, numEnrichmentIdsInCell, nQuadPointInCell, classicalDofsPerCell, (ValueTypeBasisData)1.0, coeffsInCell.data(), numEnrichmentIdsInCell, B, nQuadPointInCell, (ValueTypeBasisData)0.0, classicalComponentInQuadDim.data(), numEnrichmentIdsInCell, efeBDH->getEnrichmentClassicalInterface() ->getLinAlgOpContext()); classicalComponentInQuadGradients[iDim] = classicalComponentInQuadDim; } }
void dftefe::basis::EFEBasisDataStorageDealiiInternal::storeValuesHRefinedSameQuadEveryCell | ( | std::shared_ptr< const EFEBasisDofHandlerDealii< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > | efeBDH, |
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisGradientQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisHessianQuadStorage, | ||
std::shared_ptr< typename BasisDataStorage< ValueTypeBasisData, memorySpace >::Storage > & | basisOverlap, | ||
const quadrature::QuadratureRuleAttributes & | quadratureRuleAttributes, | ||
std::shared_ptr< const quadrature::QuadratureRuleContainer > | quadratureRuleContainer, | ||
std::vector< size_type > & | nQuadPointsInCell, | ||
std::vector< size_type > & | cellStartIdsBasisQuadStorage, | ||
std::vector< size_type > & | cellStartIdsBasisGradientQuadStorage, | ||
std::vector< size_type > & | cellStartIdsBasisHessianQuadStorage, | ||
const BasisStorageAttributesBoolMap | basisStorageAttributesBoolMap | ||
) |