OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
classfactory.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef classfactory_h
36 #define classfactory_h
37 
38 #include "oofemcfg.h"
39 #include "sparsemtrxtype.h"
40 #include "errorestimatortype.h"
41 #include "doftype.h"
42 #include "linsystsolvertype.h"
43 //#include "patch.h" // for PatchType
44 #include "nodalrecoverymodel.h" // for NodalRecoveryModelType
45 #include "integrationrule.h" // for IntegrationRuleType
46 #include "geneigvalsolvertype.h"
48 #include "meshpackagetype.h"
49 #include "dofiditem.h"
50 
51 #include <map>
52 #include <string>
53 #include <cstring>
54 
55 namespace oofem {
56 class Domain;
57 class EngngModel;
58 class Element;
59 class DofManager;
60 class GeneralBoundaryCondition;
61 class CrossSection;
62 class Material;
63 class Function;
64 class NonlocalBarrier;
65 class ExportModule;
66 class SparseNonLinearSystemNM;
67 class InitModule;
68 class TopologyDescription;
69 
70 class Dof;
71 class SparseMtrx;
72 class SparseLinearSystemNM;
73 class ErrorEstimator;
74 class InitialCondition;
75 class Patch;
76 class NodalRecoveryModel;
77 class SparseGeneralEigenValueSystemNM;
78 class IntegrationRule;
79 class MaterialMappingAlgorithm;
80 class MesherInterface;
81 
82 class LoadBalancerMonitor;
83 class LoadBalancer;
84 
85 class XfemManager;
86 class EnrichmentItem;
87 class NucleationCriterion;
88 class EnrichmentFunction;
89 class EnrichmentDomain;
90 class BasicGeometry;
91 class EnrichmentFront;
92 class PropagationLaw;
93 
94 class FractureManager;
95 class FailureCriteriaStatus;
96 class FailureCriteria;
97 
98 class ContactManager;
99 class ContactDefinition;
100 
101 #ifdef _GNUC
102 #define OOFEM_ATTR_UNUSED __attribute__((unused))
103 #else
104 #define OOFEM_ATTR_UNUSED
105 #endif
106 
107 // Templates to wrap constructors into functions
108 template< typename T > Element *elemCreator(int n, Domain *d) { return new T(n, d); }
109 template< typename T > DofManager *dofmanCreator(int n, Domain *d) { return new T(n, d); }
110 template< typename T > GeneralBoundaryCondition *bcCreator(int n, Domain *d) { return new T(n, d); }
111 template< typename T > CrossSection *csCreator(int n, Domain *d) { return new T(n, d); }
112 template< typename T > Material *matCreator(int n, Domain *d) { return new T(n, d); }
113 template< typename T > EngngModel *engngCreator(int n, EngngModel *m) { return ( new T(n, m) ); }
114 template< typename T > Function *funcCreator(int n, Domain *d) { return new T(n, d); }
115 template< typename T > NonlocalBarrier *nlbCreator(int n, Domain *d) { return new T(n, d); }
116 template< typename T > ExportModule *exportCreator(int n, EngngModel *e) { return ( new T(n, e) ); }
117 template< typename T > SparseNonLinearSystemNM *nonlinCreator(Domain *d, EngngModel *m) { return ( new T(d, m) ); }
118 template< typename T > InitModule *initCreator(int n, EngngModel *e) { return ( new T(n, e) ); }
119 template< typename T > TopologyDescription *topologyCreator(Domain *d) { return new T(d); }
120 
121 template< typename T > Dof *dofCreator(DofIDItem dofid, DofManager *dman) { return new T(dman, dofid); }
122 template< typename T > SparseMtrx *sparseMtrxCreator() { return new T(); }
123 template< typename T > SparseLinearSystemNM *sparseLinSolCreator(Domain *d, EngngModel *m) { return new T(d, m); }
124 template< typename T > ErrorEstimator *errEstCreator(int n, Domain *d) { return new T(n, d); }
125 
126 template< typename T > NodalRecoveryModel *nrmCreator(Domain *d) { return new T(d); }
127 template< typename T > SparseGeneralEigenValueSystemNM *gesCreator(Domain *d, EngngModel *m) { return new T(d, m); }
128 template< typename T > MesherInterface *mesherCreator(Domain *d) { return new T(d); }
129 template< typename T > MaterialMappingAlgorithm *mmaCreator() { return new T(); }
130 
131 
132 template< typename T > LoadBalancer *loadBalancerCreator(Domain *d) { return new T(d); }
133 template< typename T > LoadBalancerMonitor *loadMonitorCreator(EngngModel *e) { return new T(e); }
134 
135 // XFEM stuff
136 template< typename T > XfemManager *xManCreator(Domain *d) { return new T(d); }
137 template< typename T > EnrichmentItem *enrichItemCreator(int n, XfemManager *x, Domain *d) { return new T(n, x, d); }
138 template< typename T > NucleationCriterion *nucleationCritCreator(Domain *d) { return new T(d); }
139 template< typename T > EnrichmentFunction *enrichFuncCreator(int n, Domain *d) { return new T(n, d); }
140 template< typename T > EnrichmentDomain *enrichmentDomainCreator() { return new T(); }
141 template< typename T > BasicGeometry *geometryCreator() { return new T(); }
142 template< typename T > EnrichmentFront *enrichFrontCreator() { return new T(); }
143 template< typename T > PropagationLaw *propagationLawCreator() { return new T(); }
144 
145 
146 template< typename T > FailureCriteria *failureCriteriaCreator(int n, FractureManager *x) { return new T(n, x); }
147 template< typename T > FailureCriteriaStatus *failureCriteriaCreator(int n, FailureCriteria *x) { return new T(n, x); }
148 
149 template< typename T > ContactManager *contactManCreator(Domain *d) { return new T(d); }
150 template< typename T > ContactDefinition *contactDefCreator(ContactManager *cMan) { return new T(cMan); }
151 
153 
154 #define REGISTER_Element(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerElement(_IFT_ ## class ## _Name, elemCreator< class > );
155 #define REGISTER_DofManager(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerDofManager(_IFT_ ## class ## _Name, dofmanCreator< class > );
156 #define REGISTER_BoundaryCondition(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerBoundaryCondition(_IFT_ ## class ## _Name, bcCreator< class > );
157 #define REGISTER_CrossSection(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerCrossSection(_IFT_ ## class ## _Name, csCreator< class > );
158 #define REGISTER_Material(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerMaterial(_IFT_ ## class ## _Name, matCreator< class > );
159 #define REGISTER_Material_Alt(class, altname) static bool __dummy_ ## class ## altname OOFEM_ATTR_UNUSED = GiveClassFactory().registerMaterial(#altname, matCreator< class > );
160 #define REGISTER_EngngModel(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerEngngModel(_IFT_ ## class ## _Name, engngCreator< class > );
161 #define REGISTER_Function(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerFunction(_IFT_ ## class ## _Name, funcCreator< class > );
162 #define REGISTER_NonlocalBarrier(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerNonlocalBarrier(_IFT_ ## class ## _Name, nlbCreator< class > );
163 #define REGISTER_ExportModule(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerExportModule(_IFT_ ## class ## _Name, exportCreator< class > );
164 #define REGISTER_SparseNonLinearSystemNM(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerSparseNonLinearSystemNM(_IFT_ ## class ## _Name, nonlinCreator< class > );
165 #define REGISTER_InitModule(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerInitModule(_IFT_ ## class ## _Name, initCreator< class > );
166 #define REGISTER_TopologyDescription(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerTopologyDescription(_IFT_ ## class ## _Name, topologyCreator< class > );
167 #define REGISTER_LoadBalancerMonitor(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerLoadBalancerMonitor(_IFT_ ## class ## _Name, loadMonitorCreator< class > );
168 #define REGISTER_LoadBalancer(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerLoadBalancer(_IFT_ ## class ## _Name, loadBalancerCreator< class > );
169 
170 // These should be converted to use strings.
171 #define REGISTER_SparseMtrx(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerSparseMtrx(type, sparseMtrxCreator< class > );
172 #define REGISTER_SparseLinSolver(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerSparseLinSolver(type, sparseLinSolCreator< class > );
173 #define REGISTER_ErrorEstimator(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerErrorEstimator(type, errEstCreator< class > );
174 #define REGISTER_NodalRecoveryModel(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerNodalRecoveryModel(type, nrmCreator< class > );
175 #define REGISTER_GeneralizedEigenValueSolver(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerGeneralizedEigenValueSolver(type, gesCreator< class > );
176 #define REGISTER_Mesher(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerMesherInterface(type, mesherCreator< class > );
177 #define REGISTER_MaterialMappingAlgorithm(class, type) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerMaterialMappingAlgorithm(type, mmaCreator< class > );
178 
179 #define REGISTER_XfemManager(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerXfemManager(_IFT_ ## class ## _Name, xManCreator< class > );
180 #define REGISTER_EnrichmentItem(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerEnrichmentItem(_IFT_ ## class ## _Name, enrichItemCreator< class > );
181 #define REGISTER_NucleationCriterion(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerNucleationCriterion(_IFT_ ## class ## _Name, nucleationCritCreator< class > );
182 #define REGISTER_EnrichmentFunction(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerEnrichmentFunction(_IFT_ ## class ## _Name, enrichFuncCreator< class > );
183 #define REGISTER_EnrichmentDomain(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerEnrichmentDomain(_IFT_ ## class ## _Name, enrichmentDomainCreator< class > );
184 #define REGISTER_Geometry(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerGeometry(_IFT_ ## class ## _Name, geometryCreator< class > );
185 #define REGISTER_EnrichmentFront(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerEnrichmentFront(_IFT_ ## class ## _Name, enrichFrontCreator< class > );
186 #define REGISTER_PropagationLaw(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerPropagationLaw(_IFT_ ## class ## _Name, propagationLawCreator< class > );
187 
188 #define REGISTER_FailureCriteria(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerFailureCriteria(_IFT_ ## class ## _Name, failureCriteriaCreator< class > );
189 #define REGISTER_FailureCriteriaStatus(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerFailureCriteriaStatus(_IFT_ ## class ## _Name, failureCriteriaCreator< class > );
190 
191 #define REGISTER_ContactManager(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerContactManager(_IFT_ ## class ## _Name, contactManCreator< class > );
192 #define REGISTER_ContactDefinition(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerContactDefinition(_IFT_ ## class ## _Name, contactDefCreator< class > );
193 #define REGISTER_Quasicontinuum(class) static bool __dummy_ ## class OOFEM_ATTR_UNUSED = GiveClassFactory().registerQuasicontinuum(_IFT_ ## class ## _Name, QuasicontinuumCreator< class > );
194 
195 
204 class OOFEM_EXPORT ClassFactory
205 {
206 private:
208  std :: map < std :: string, Element * ( * )(int, Domain *) > elemList;
210  std :: map < std :: string, DofManager * ( * )(int, Domain *) > dofmanList;
212  std :: map < std :: string, GeneralBoundaryCondition * ( * )(int, Domain *) > bcList;
214  std :: map < std :: string, CrossSection * ( * )(int, Domain *) > csList;
216  std :: map < std :: string, Material * ( * )(int, Domain *) > matList;
218  std :: map < std :: string, EngngModel * ( * )(int, EngngModel *) > engngList;
220  std :: map < std :: string, Function * ( * )(int, Domain *) > funcList;
222  std :: map < std :: string, NonlocalBarrier * ( * )(int, Domain *) > nlbList;
224  std :: map < std :: string, ExportModule * ( * )(int, EngngModel *) > exportList;
226  std :: map < std :: string, SparseNonLinearSystemNM * ( * )(Domain *, EngngModel *) > nonlinList;
228  std :: map < std :: string, InitModule * ( * )(int, EngngModel *) > initList;
230  std :: map < std :: string, TopologyDescription * ( * )(Domain *) > topologyList;
231  // Internal structures (accessed by hard-coded enum values)
233  std :: map < std :: string, LoadBalancer * ( * )(Domain *) > loadBalancerList;
235  std :: map < std :: string, LoadBalancerMonitor * ( * )(EngngModel *) > loadMonitorList;
237  std :: map < SparseMtrxType, SparseMtrx * ( * )() > sparseMtrxList;
239  std :: map < dofType, Dof * ( * )(DofIDItem, DofManager *) > dofList;
241  std :: map < ErrorEstimatorType, ErrorEstimator * ( * )(int, Domain *) > errEstList;
243  std :: map < LinSystSolverType, SparseLinearSystemNM * ( * )(Domain *, EngngModel *) > sparseLinSolList;
245  std :: map < NodalRecoveryModel :: NodalRecoveryModelType, NodalRecoveryModel * ( * )(Domain *) > nodalRecoveryModelList;
247  std :: map < GenEigvalSolverType, SparseGeneralEigenValueSystemNM * ( * )(Domain *, EngngModel *) > generalizedEigenValueSolverList;
249  std :: map < MaterialMappingAlgorithmType, MaterialMappingAlgorithm * ( * )() > materialMappingList;
251  std :: map < MeshPackageType, MesherInterface * ( * )(Domain *) > mesherInterfaceList;
252 
253  // XFEM:
255  std :: map < std :: string, EnrichmentItem * ( * )(int, XfemManager *, Domain *) > enrichItemList;
257  std :: map < std :: string, NucleationCriterion * ( * )(Domain *) > nucleationCritList;
259  std :: map < std :: string, EnrichmentFunction * ( * )(int, Domain *) > enrichFuncList;
261  std :: map < std :: string, BasicGeometry * ( * )() > geometryList;
263  std :: map < std :: string, EnrichmentDomain * ( * )() > enrichmentDomainList;
265  std :: map < std :: string, EnrichmentFront * ( * )() > enrichmentFrontList;
267  std :: map < std :: string, PropagationLaw * ( * )() > propagationLawList;
269  std :: map < std :: string, XfemManager * ( * )(Domain *) > xManList;
270 
271 
273  std :: map < std :: string, FailureCriteria * ( * )(int, FractureManager *) > failureCriteriaList;
274  std :: map < std :: string, FailureCriteriaStatus * ( * )(int, FailureCriteria *) > failureCriteriaStatusList;
275 
277  std :: map < std :: string, ContactManager * ( * )(Domain *) > contactManList;
278  std :: map < std :: string, ContactDefinition * ( * )(ContactManager *) > contactDefList;
279 
280 public:
282  ClassFactory();
283 
291  Element *createElement(const char *name, int num, Domain *domain);
296  bool registerElement( const char *name, Element * ( *creator )( int, Domain * ) );
304  DofManager *createDofManager(const char *name, int num, Domain *domain);
309  bool registerDofManager( const char *name, DofManager * ( *creator )( int, Domain * ) );
317  GeneralBoundaryCondition *createBoundaryCondition(const char *name, int num, Domain *domain);
322  bool registerBoundaryCondition( const char *name, GeneralBoundaryCondition * ( *creator )( int, Domain * ) );
330  CrossSection *createCrossSection(const char *name, int num, Domain *domain);
335  bool registerCrossSection( const char *name, CrossSection * ( *creator )( int, Domain * ) );
343  Material *createMaterial(const char *name, int num, Domain *domain);
348  bool registerMaterial( const char *name, Material * ( *creator )( int, Domain * ) );
356  EngngModel *createEngngModel(const char *name, int num, EngngModel *master);
361  bool registerEngngModel( const char *name, EngngModel * ( *creator )( int, EngngModel * ) );
369  Function *createFunction(const char *name, int num, Domain *domain);
374  bool registerFunction( const char *name, Function * ( *creator )( int, Domain * ) );
382  NonlocalBarrier *createNonlocalBarrier(const char *name, int num, Domain *domain);
387  bool registerNonlocalBarrier( const char *name, NonlocalBarrier * ( *creator )( int, Domain * ) );
395  ExportModule *createExportModule(const char *name, int num, EngngModel *emodel);
400  bool registerExportModule( const char *name, ExportModule * ( *creator )( int, EngngModel * ) );
408  SparseNonLinearSystemNM *createNonLinearSolver(const char *name, Domain *domain, EngngModel *emodel);
413  bool registerSparseNonLinearSystemNM( const char *name, SparseNonLinearSystemNM * ( *creator )( Domain *, EngngModel * ) );
421  InitModule *createInitModule(const char *name, int num, EngngModel *emodel);
426  bool registerInitModule( const char *name, InitModule * ( *creator )( int, EngngModel * ) );
434  InitialCondition *createInitialCondition(const char *name, int num, Domain *d);
441  TopologyDescription *createTopology(const char *name, Domain *domain);
446  bool registerTopologyDescription( const char *name, TopologyDescription * ( *creator )( Domain * ) );
447 
453  SparseMtrx *createSparseMtrx(SparseMtrxType type);
458  bool registerSparseMtrx( SparseMtrxType type, SparseMtrx * ( *creator )() );
466  Dof *createDof(dofType type, DofIDItem dofid, DofManager *dman);
475  SparseLinearSystemNM *createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m);
480  bool registerSparseLinSolver( LinSystSolverType type, SparseLinearSystemNM * ( *creator )(Domain *, EngngModel *) );
489  ErrorEstimator *createErrorEstimator(ErrorEstimatorType type, int num, Domain *d);
494  bool registerErrorEstimator( ErrorEstimatorType type, ErrorEstimator * ( *creator )(int, Domain *) );
499  bool registerNodalRecoveryModel( NodalRecoveryModel :: NodalRecoveryModelType name, NodalRecoveryModel * ( *creator )(Domain *) );
506  NodalRecoveryModel *createNodalRecoveryModel(NodalRecoveryModel :: NodalRecoveryModelType type, Domain *d);
507 
508  // XFEM:
509  EnrichmentItem *createEnrichmentItem(const char *name, int num, XfemManager *xm, Domain *domain);
510  bool registerEnrichmentItem( const char *name, EnrichmentItem * ( *creator )( int, XfemManager *, Domain * ) );
511 
512  NucleationCriterion *createNucleationCriterion(const char *name, Domain *domain);
513  bool registerNucleationCriterion( const char *name, NucleationCriterion * ( *creator )( Domain * ) );
514 
515  EnrichmentFunction *createEnrichmentFunction(const char *name, int num, Domain *domain);
516  bool registerEnrichmentFunction( const char *name, EnrichmentFunction * ( *creator )( int, Domain * ) );
517 
518  EnrichmentDomain *createEnrichmentDomain(const char *name);
519  bool registerEnrichmentDomain( const char *name, EnrichmentDomain * ( *creator )( ) );
520 
521  EnrichmentFront *createEnrichmentFront(const char *name);
522  bool registerEnrichmentFront( const char *name, EnrichmentFront * ( *creator )( ) );
523 
524  PropagationLaw *createPropagationLaw(const char *name);
525  bool registerPropagationLaw( const char *name, PropagationLaw * ( *creator )( ) );
526 
527  BasicGeometry *createGeometry(const char *name);
528  bool registerGeometry( const char *name, BasicGeometry * ( *creator )( ) );
529 
530  XfemManager *createXfemManager(const char *name, Domain *domain);
531  bool registerXfemManager( const char *name, XfemManager * ( *creator )( Domain * ) );
532 
533 
534  ContactManager *createContactManager(const char *name, Domain *domain);
535  bool registerContactManager( const char *name, ContactManager * ( *creator )( Domain * ) );
536 
537  ContactDefinition *createContactDefinition(const char *name, ContactManager *cMan);
538  bool registerContactDefinition( const char *name, ContactDefinition * ( *creator )( ContactManager * ) );
539 
540  // Failure module (in development!)
541  FailureCriteria *createFailureCriteria(const char *name, int num, FractureManager *fracManager);
542  bool registerFailureCriteria( const char *name, FailureCriteria * ( *creator )( int, FractureManager * ) );
543 
544  FailureCriteriaStatus *createFailureCriteriaStatus(const char *name, int num, FailureCriteria *critManager);
545  bool registerFailureCriteriaStatus( const char *name, FailureCriteriaStatus * ( *creator )( int, FailureCriteria * ) );
546 
547  bool registerGeneralizedEigenValueSolver( GenEigvalSolverType name, SparseGeneralEigenValueSystemNM * ( *creator )(Domain *, EngngModel *) );
548  SparseGeneralEigenValueSystemNM *createGeneralizedEigenValueSolver(GenEigvalSolverType name, Domain *d, EngngModel *m);
549 
550  IntegrationRule *createIRule(IntegrationRuleType name, int number, Element *e);
551 
552  bool registerMaterialMappingAlgorithm( MaterialMappingAlgorithmType name, MaterialMappingAlgorithm * ( *creator )( ) );
553  MaterialMappingAlgorithm *createMaterialMappingAlgorithm(MaterialMappingAlgorithmType name);
554 
555  bool registerMesherInterface( MeshPackageType name, MesherInterface * ( *creator )( Domain * ) );
556  MesherInterface *createMesherInterface(MeshPackageType name, Domain *d);
557 
558  LoadBalancerMonitor *createLoadBalancerMonitor(const char *name, EngngModel *e);
559  bool registerLoadBalancerMonitor( const char *name, LoadBalancerMonitor * ( *creator )( EngngModel * ) );
560  LoadBalancer *createLoadBalancer(const char *name, Domain *d);
561  bool registerLoadBalancer( const char *name, LoadBalancer * ( *creator )( Domain * ) );
562 };
563 
564 extern ClassFactory &classFactory;
565 
571 } // end namespace oofem
572 #endif // clasfactort_h
PropagationLaw * propagationLawCreator()
Definition: classfactory.h:143
GenEigvalSolverType
Types of general eigenvalue solvers.
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
ErrorEstimator * errEstCreator(int n, Domain *d)
Definition: classfactory.h:124
std::map< std::string, Element *(*)(int, Domain *) > elemList
Associative container containing element creators with element name as key.
Definition: classfactory.h:208
std::map< std::string, LoadBalancer *(*)(Domain *) > loadBalancerList
Associative container containing load balancer creators.
Definition: classfactory.h:233
std::map< std::string, ContactDefinition *(*)(ContactManager *) > contactDefList
Definition: classfactory.h:278
Abstract class representing entity, which is included in the FE model using one (or more) global func...
std::map< std::string, CrossSection *(*)(int, Domain *) > csList
Associative container containing cross section creators with cross section name as key...
Definition: classfactory.h:214
std::map< LinSystSolverType, SparseLinearSystemNM *(*)(Domain *, EngngModel *) > sparseLinSolList
Associative container containing sparse linear solver creators.
Definition: classfactory.h:243
Class and object Domain.
Definition: domain.h:115
Abstract base class for all nonlocal barriers.
Class implementing general initial condition.
BasicGeometry * geometryCreator()
Definition: classfactory.h:141
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
Function * funcCreator(int n, Domain *d)
Definition: classfactory.h:114
std::map< std::string, NucleationCriterion *(*)(Domain *) > nucleationCritList
Associative container containing nucleation criterion creators.
Definition: classfactory.h:257
MaterialMappingAlgorithm * mmaCreator()
Definition: classfactory.h:129
std::map< std::string, FailureCriteriaStatus *(*)(int, FailureCriteria *) > failureCriteriaStatusList
Definition: classfactory.h:274
LoadBalancerMonitor * loadMonitorCreator(EngngModel *e)
Definition: classfactory.h:133
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
LoadBalancer * loadBalancerCreator(Domain *d)
Definition: classfactory.h:132
std::map< std::string, ExportModule *(*)(int, EngngModel *) > exportList
Associative container containing export module creators.
Definition: classfactory.h:224
ExportModule * exportCreator(int n, EngngModel *e)
Definition: classfactory.h:116
XfemManager * xManCreator(Domain *d)
Definition: classfactory.h:136
std::map< std::string, NonlocalBarrier *(*)(int, Domain *) > nlbList
Associative container containing nonlocal barriers creators with barrier name as key.
Definition: classfactory.h:222
ContactManager * contactManCreator(Domain *d)
Definition: classfactory.h:149
DofManager * dofmanCreator(int n, Domain *d)
Definition: classfactory.h:109
dofType
Dof Type, determines the type of DOF created.
Definition: doftype.h:48
Represents init module - a base class for all init modules.
Definition: initmodule.h:61
Updates the geometry of evolving XFEM interfaces.
Abstract base class for all finite elements.
Definition: element.h:145
std::map< std::string, BasicGeometry *(*)() > geometryList
Associative container containing geometry creators.
Definition: classfactory.h:261
Dof * dofCreator(DofIDItem dofid, DofManager *dman)
Definition: classfactory.h:121
The class representing the general material model mapping algorithm.
Base class for dof managers.
Definition: dofmanager.h:113
This class manages the fracture mechanics part.
std::map< std::string, EnrichmentFunction *(*)(int, Domain *) > enrichFuncList
Associative container containing enrichment function creators.
Definition: classfactory.h:259
std::map< std::string, DofManager *(*)(int, Domain *) > dofmanList
Associative container containing dofmanager creators with dofmanager name as key. ...
Definition: classfactory.h:210
std::map< MaterialMappingAlgorithmType, MaterialMappingAlgorithm *(*)() > materialMappingList
Associative container containing material mapping algorithm creators.
Definition: classfactory.h:249
SparseMtrx * sparseMtrxCreator()
Definition: classfactory.h:122
EnrichmentFunction * enrichFuncCreator(int n, Domain *d)
Definition: classfactory.h:139
Represents export output module - a base class for all output modules.
Definition: exportmodule.h:71
Abstract representation of Geometry.
Definition: geometry.h:81
InitModule * initCreator(int n, EngngModel *e)
Definition: classfactory.h:118
EnrichmentDomain * enrichmentDomainCreator()
Definition: classfactory.h:140
std::map< std::string, EngngModel *(*)(int, EngngModel *) > engngList
Associative container containing engng model creators with engng model name as key.
Definition: classfactory.h:218
EnrichmentFront * enrichFrontCreator()
Definition: classfactory.h:142
ErrorEstimatorType
Determines the type of error estimator.
Abstract class representing global shape function Base class declares abstract interface common to al...
Abstract base class representing integration rule.
GeneralBoundaryCondition * bcCreator(int n, Domain *d)
Definition: classfactory.h:110
std::map< SparseMtrxType, SparseMtrx *(*)() > sparseMtrxList
Associative container containing sparse matrix creators.
Definition: classfactory.h:237
std::map< GenEigvalSolverType, SparseGeneralEigenValueSystemNM *(*)(Domain *, EngngModel *) > generalizedEigenValueSolverList
Associative container containing sparse generalized eigenvalue creators.
Definition: classfactory.h:247
Base abstract class representing cross section in finite element mesh.
Definition: crosssection.h:107
NonlocalBarrier * nlbCreator(int n, Domain *d)
Definition: classfactory.h:115
EnrichmentItem * enrichItemCreator(int n, XfemManager *x, Domain *d)
Definition: classfactory.h:137
SparseNonLinearSystemNM * nonlinCreator(Domain *d, EngngModel *m)
Definition: classfactory.h:117
std::map< std::string, Material *(*)(int, Domain *) > matList
Associative container containing material creators with material name as key.
Definition: classfactory.h:216
EngngModel * engngCreator(int n, EngngModel *m)
Definition: classfactory.h:113
CrossSection * csCreator(int n, Domain *d)
Definition: classfactory.h:111
std::map< std::string, ContactManager *(*)(Domain *) > contactManList
Associative container containing ContactManager creators.
Definition: classfactory.h:277
std::map< std::string, GeneralBoundaryCondition *(*)(int, Domain *) > bcList
Associative container containing boundary condition creators with bc name as key. ...
Definition: classfactory.h:212
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
SparseLinearSystemNM * sparseLinSolCreator(Domain *d, EngngModel *m)
Definition: classfactory.h:123
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
The base class representing the interface to mesh generation package.
Class EnrichmentFront: describes the edge or tip of an XFEM enrichment.
TopologyDescription * topologyCreator(Domain *d)
Definition: classfactory.h:119
std::map< ErrorEstimatorType, ErrorEstimator *(*)(int, Domain *) > errEstList
Associative container containing error estimator creators.
Definition: classfactory.h:241
std::map< std::string, EnrichmentFront *(*)() > enrichmentFrontList
Associative container containing enrichment front creators.
Definition: classfactory.h:265
std::map< std::string, TopologyDescription *(*)(Domain *) > topologyList
Associative container containing topology description creators.
Definition: classfactory.h:230
Abstract base class for all boundary conditions of problem.
ClassFactory & GiveClassFactory()
This function must be used by all code that run at link time to ensure that the classFactory is const...
Definition: classfactory.C:53
Abstract base class for all material models.
Definition: material.h:95
MaterialMappingAlgorithmType
Enumerative type used to classify supported MaterialMappingAlgorithms.
This class manages all the contacts in a domain.
Element * elemCreator(int n, Domain *d)
Definition: classfactory.h:108
FailureCriteria * failureCriteriaCreator(int n, FractureManager *x)
Definition: classfactory.h:146
The base class for all error estimation or error indicator algorithms.
Abstract base class representing general load balancer.
Definition: loadbalancer.h:108
Abstract base class representing a function with vector input and output.
Definition: function.h:88
This class manages the xfem part.
Definition: xfemmanager.h:109
std::map< dofType, Dof *(*)(DofIDItem, DofManager *) > dofList
Associative container containing dof creators.
Definition: classfactory.h:239
Material * matCreator(int n, Domain *d)
Definition: classfactory.h:112
std::map< std::string, PropagationLaw *(*)() > propagationLawList
Associative container containing propagation law creators.
Definition: classfactory.h:267
std::map< MeshPackageType, MesherInterface *(*)(Domain *) > mesherInterfaceList
Associative container containing mesher interface creators.
Definition: classfactory.h:251
SparseGeneralEigenValueSystemNM * gesCreator(Domain *d, EngngModel *m)
Definition: classfactory.h:127
Abstract class for topology description.
std::map< std::string, EnrichmentDomain *(*)() > enrichmentDomainList
Associative container containing enrichment-domain creators.
Definition: classfactory.h:263
ClassFactory & classFactory
Definition: classfactory.C:59
This class manages a particular contact definition.
std::map< std::string, EnrichmentItem *(*)(int, XfemManager *, Domain *) > enrichItemList
Associative container containing enrichment item creators.
Definition: classfactory.h:255
NucleationCriterion * nucleationCritCreator(Domain *d)
Definition: classfactory.h:138
MeshPackageType
Enumerative type used to classify supported mesh packages.
IntegrationRuleType
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
std::map< std::string, InitModule *(*)(int, EngngModel *) > initList
Associative container containing init module creators.
Definition: classfactory.h:228
Class Factory allows to register terminal oofem classes, based on their membership (classes represent...
Definition: classfactory.h:204
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
std::map< std::string, FailureCriteria *(*)(int, FractureManager *) > failureCriteriaList
Associative container containing failure criteria creators.
Definition: classfactory.h:273
The base class for all recovery models, which perform nodal averaging or projection processes for int...
std::map< std::string, LoadBalancerMonitor *(*)(EngngModel *) > loadMonitorList
Associative container containing load balancer monitor creators.
Definition: classfactory.h:235
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
std::map< std::string, Function *(*)(int, Domain *) > funcList
Associative container containing load time function creators with function name as key...
Definition: classfactory.h:220
MesherInterface * mesherCreator(Domain *d)
Definition: classfactory.h:128
NodalRecoveryModel * nrmCreator(Domain *d)
Definition: classfactory.h:126
std::map< std::string, SparseNonLinearSystemNM *(*)(Domain *, EngngModel *) > nonlinList
Associative container containing nonlinear solver creators.
Definition: classfactory.h:226
std::map< NodalRecoveryModel::NodalRecoveryModelType, NodalRecoveryModel *(*)(Domain *) > nodalRecoveryModelList
Associative container containing nodal recovery model creators.
Definition: classfactory.h:245
This base class is an abstraction for all numerical methods solving sparse nonlinear system of equati...
Abstract base class representing general load balancer monitor.
Definition: loadbalancer.h:68
ContactDefinition * contactDefCreator(ContactManager *cMan)
Definition: classfactory.h:150
std::map< std::string, XfemManager *(*)(Domain *) > xManList
Associative container containing XfemManager creators.
Definition: classfactory.h:269

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:27 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011