Public Member Functions | |
| ConstReferenceCounting < ScalarDegreeOfFreedomPositionsSet > | getDOFPositionsSet (const Mesh &mesh, const ScalarDiscretizationTypeBase &discretizationType) |
| void | unsubscribe (ConstReferenceCounting< ScalarDegreeOfFreedomPositionsSet > dofSet) |
| Internal () | |
| ~Internal () | |
Private Types | |
| typedef std::string | DiscretizationLabel |
| typedef std::map< std::pair < const Mesh *, DiscretizationLabel > , std::pair< size_t, ScalarDegreeOfFreedomPositionsSet * > > | MeshesDOFPositionsCorrespondance |
Private Attributes | |
| MeshesDOFPositionsCorrespondance | __meshesDOFPositions |
Definition at line 34 of file DegreeOfFreedomSetManager.cpp.
typedef std::string DegreeOfFreedomSetManager::Internal::DiscretizationLabel [private] |
Definition at line 37 of file DegreeOfFreedomSetManager.cpp.
typedef std::map<std::pair<const Mesh*, DiscretizationLabel>, std::pair<size_t, ScalarDegreeOfFreedomPositionsSet*> > DegreeOfFreedomSetManager::Internal::MeshesDOFPositionsCorrespondance [private] |
Definition at line 42 of file DegreeOfFreedomSetManager.cpp.
| DegreeOfFreedomSetManager::Internal::Internal | ( | ) | [inline] |
| DegreeOfFreedomSetManager::Internal::~Internal | ( | ) | [inline] |
Definition at line 104 of file DegreeOfFreedomSetManager.cpp.
References __meshesDOFPositions, and fferr().
00105 { 00106 if (__meshesDOFPositions.size() > 0) { 00107 fferr(1) << __FILE__ << ':' << __LINE__ 00108 << ":warning: degrees of freedom set manager is not empty!\n"; 00109 } 00110 }

| ConstReferenceCounting<ScalarDegreeOfFreedomPositionsSet> DegreeOfFreedomSetManager::Internal::getDOFPositionsSet | ( | const Mesh & | mesh, | |
| const ScalarDiscretizationTypeBase & | discretizationType | |||
| ) | [inline] |
Definition at line 48 of file DegreeOfFreedomSetManager.cpp.
References __meshesDOFPositions, ScalarDiscretizationTypeSpectral::degrees(), ScalarDiscretizationTypeBase::name(), ScalarDiscretizationTypeBase::spectralLegendre, stringify(), and ScalarDiscretizationTypeBase::type().
Referenced by DegreeOfFreedomSetManager::getDOFPositionsSet().
00050 { 00051 DiscretizationLabel label = ScalarDiscretizationTypeBase::name(discretizationType); 00052 00053 switch (discretizationType.type()) { 00054 case ScalarDiscretizationTypeBase::spectralLegendre: { 00055 const ScalarDiscretizationTypeSpectral& spectralDiscretizationType 00056 = dynamic_cast<const ScalarDiscretizationTypeSpectral&>(discretizationType); 00057 label += "-"+stringify(spectralDiscretizationType.degrees()); 00058 break; 00059 } 00060 default: { 00061 } 00062 } 00063 00064 MeshesDOFPositionsCorrespondance::iterator 00065 i = __meshesDOFPositions.find(std::make_pair(&mesh,label)); 00066 00067 if (i != __meshesDOFPositions.end()) { 00068 (*i).second.first++; 00069 return (*i).second.second; 00070 } else { 00071 ScalarDegreeOfFreedomPositionsSet* dof 00072 = new ScalarDegreeOfFreedomPositionsSet(discretizationType,mesh); 00073 00074 __meshesDOFPositions[std::make_pair(&mesh, label)] 00075 = std::make_pair(1,dof); 00076 return dof; 00077 } 00078 }

| void DegreeOfFreedomSetManager::Internal::unsubscribe | ( | ConstReferenceCounting< ScalarDegreeOfFreedomPositionsSet > | dofSet | ) | [inline] |
Definition at line 80 of file DegreeOfFreedomSetManager.cpp.
References __meshesDOFPositions, and ErrorHandler::unexpected.
Referenced by DegreeOfFreedomSetManager::unsubscribe().
00081 { 00082 for (MeshesDOFPositionsCorrespondance::iterator i 00083 = __meshesDOFPositions.begin(); 00084 i != __meshesDOFPositions.end(); ++i) { 00085 if ((*i).second.second == dofSet) { 00086 (*i).second.first--; 00087 if ((*i).second.first == 0) { 00088 __meshesDOFPositions.erase(i); 00089 } 00090 return; 00091 } 00092 } 00093 throw ErrorHandler(__FILE__,__LINE__, 00094 "DOF Set not found!", 00095 ErrorHandler::unexpected); 00096 00097 }
MeshesDOFPositionsCorrespondance DegreeOfFreedomSetManager::Internal::__meshesDOFPositions [private] |
Definition at line 44 of file DegreeOfFreedomSetManager.cpp.
Referenced by getDOFPositionsSet(), unsubscribe(), and ~Internal().
1.5.6