00001 // QMcBeaver 00002 // 00003 // Constructed by 00004 // 00005 // Michael Todd Feldmann 00006 // and 00007 // David Randall "Chip" Kent IV 00008 // 00009 // Copyright 2000. All rights reserved. 00010 // 00011 // drkent@users.sourceforge.net mtfeldmann@users.sourceforge.net 00012 00013 #include "QMCCorrelationFunctionFactory.h" 00014 #include "Cambridge2CorrelationFunction.h" 00015 #include "Umrigar2CorrelationFunction.h" 00016 #include "Yukawa2CorrelationFunction.h" 00017 #include "Williamson2CorrelationFunction.h" 00018 #include "Anderson2CorrelationFunction.h" 00019 00020 QMCCorrelationFunction * 00021 QMCCorrelationFunctionFactory::correlationFunctionFactory(string & Type) 00022 { 00023 QMCCorrelationFunction * CorrelationFunction = 0; 00024 if( Type == "None" ) 00025 { 00026 CorrelationFunction = new ZeroCorrelationFunction(); 00027 } 00028 else if( Type == "Pade" ) 00029 { 00030 CorrelationFunction = new PadeCorrelationFunction(); 00031 } 00032 else if( Type == "FixedCuspPade" ) 00033 { 00034 CorrelationFunction = new FixedCuspPadeCorrelationFunction(); 00035 } 00036 else if( Type == "Cambridge2" ) 00037 { 00038 CorrelationFunction = new Cambridge2CorrelationFunction(); 00039 } 00040 else if( Type == "Umrigar2" ) 00041 { 00042 CorrelationFunction = new Umrigar2CorrelationFunction(); 00043 } 00044 else if( Type == "Yukawa" ) 00045 { 00046 CorrelationFunction = new Yukawa2CorrelationFunction(); 00047 } 00048 else if( Type == "Williamson" ) 00049 { 00050 CorrelationFunction = new Williamson2CorrelationFunction(); 00051 } 00052 else if( Type == "Anderson" ) 00053 { 00054 CorrelationFunction = new Anderson2CorrelationFunction(); 00055 } 00056 else if( Type == "Julius" ) 00057 { 00058 CorrelationFunction = new JuliusCorrelationFunction(); 00059 } 00060 else 00061 { 00062 cerr << "ERROR: Unknown correlation function type (" 00063 << Type 00064 << ") being assigned in QMCCorrelationFunctionFactory!" << endl; 00065 exit(0); 00066 } 00067 00068 return CorrelationFunction; 00069 }