Beispiel #1
0
void AbstractDb::registerAllFunctions()
{
    for (const RegisteredFunction& regFn : registeredFunctions)
    {
        if (!deregisterFunction(regFn.name, regFn.argCount))
            qWarning() << "Failed to deregister custom SQL function:" << regFn.name;
    }

    registeredFunctions.clear();

    RegisteredFunction regFn;
    for (FunctionManager::ScriptFunction* fnPtr : FUNCTIONS->getScriptFunctionsForDatabase(getName()))
    {
        regFn.argCount = fnPtr->undefinedArgs ? -1 : fnPtr->arguments.count();
        regFn.name = fnPtr->name;
        regFn.type = fnPtr->type;
        registerFunction(regFn);
    }

    for (FunctionManager::NativeFunction* fnPtr : FUNCTIONS->getAllNativeFunctions())
    {
        regFn.argCount = fnPtr->undefinedArgs ? -1 : fnPtr->arguments.count();
        regFn.name = fnPtr->name;
        regFn.type = fnPtr->type;
        registerFunction(regFn);
    }

    disconnect(FUNCTIONS, SIGNAL(functionListChanged()), this, SLOT(registerAllFunctions()));
    connect(FUNCTIONS, SIGNAL(functionListChanged()), this, SLOT(registerAllFunctions()));
}
Beispiel #2
0
static void registerBuildin()
{
    registerFunction("clock", &buildin_clock);
    registerFunction("assert", &buildin_assert);
    registerFunction("malloc", &buildin_malloc);
    registerFunction("free", &buildin_free);
    registerVarLengFunction("printf", &buildin_printf);
}
int main(int argc, char **argv) {
	registerFunction("testChar", "char*", &testChar, 2, "char*", "char*");
	registerFunction("testInt", "int*", &testInt, 2, "int", "int");
	registerFunction("testVoid", "void", &testVoid, 0);
	registerFunction("addInteger", "int*", &addInteger, 2, "int", "int");
	registerFunction("subtractInteger", "int*", &subtractInteger, 2, "int", "int");
	//list = ArgParser(argc, argv);
	agentStart(argc, argv);
	log_debug(logger, "Going out of the main\n");
}
Beispiel #4
0
AppScripting::AppScripting(scripting::EngineDelegate* delegate)
  : scripting::Engine(delegate)
{
  registerFunction("rgba", rgba, 4);
  registerFunction("rgbaR", rgbaR, 1);
  registerFunction("rgbaG", rgbaG, 1);
  registerFunction("rgbaB", rgbaB, 1);
  registerFunction("rgbaA", rgbaA, 1);
  registerClass("Sprite", Sprite_ctor, 3, Sprite_methods, Sprite_props);
  registerGlobal("activeSprite", activeSprite_getter, activeSprite_setter);
}
Beispiel #5
0
void Function::registerBuiltins()
{
	registerFunction("dump", &Functions::dump, 1, Const | Raw);
	registerFunction("pow",  &Functions::pow,  2, Const);

	registerFilter("raw",           &Filters::raw,           0, Const | Raw);
	registerFilter("upper",         &Filters::upper,         0, Const);
	registerFilter("left",          &Filters::left,          1, Const);
	registerFilter("hex",           &Filters::hex,           0, Const);
	registerFilter("codeHighlight", &Filters::codeHighlight, 1, Const | Raw);

	registerFilter("bytesSize",     &Filters::bytesSize,     0, Const | Raw);
	registerFilter("money",         &Filters::money,        -1, Const | Raw);
}
Beispiel #6
0
llvm::Function* FunctionAddressRegistry::getLLVMFuncAtAddress(void* addr) {
    FuncMap::iterator it = functions.find(addr);
    if (it == functions.end()) {
        if (lookup_neg_cache.count(addr))
            return NULL;

        bool success;
        std::string name = getFuncNameAtAddress(addr, false, &success);
        if (!success) {
            lookup_neg_cache.insert(addr);
            return NULL;
        }

        llvm::Function* r = g.stdlib_module->getFunction(name);

        if (!r) {
            lookup_neg_cache.insert(addr);
            return NULL;
        }

        registerFunction(name, addr, 0, r);
        return r;
    }
    return it->second.llvm_func;
}
Beispiel #7
0
 // EnumMember用繰り返し実行部
 // param[0] メンバ名
 // param[1] フラグ
 // param[2] メンバの値
 virtual tjs_error TJS_INTF_METHOD FuncCall( // function invocation
     tjs_uint32 flag,			// calling flag
     const tjs_char * membername,// member name ( NULL for a default member )
     tjs_uint32 *hint,			// hint for the member name (in/out)
     tTJSVariant *result,		// result
     tjs_int numparams,			// number of parameters
     tTJSVariant **param,		// parameters
     iTJSDispatch2 *objthis		// object as "this"
 ) {
     if (numparams > 1) {
         if (param[2]->Type() == tvtObject) {
             const tjs_char *name = param[0]->GetString();
             tTVInteger flag = param[1]->AsInteger();
             bool staticMember = (flag & TJS_STATICMEMBER) != 0;
             iTJSDispatch2 *member = param[2]->AsObjectNoAddRef();
             if (member) {
                 if (TJS_SUCCEEDED(member->IsInstanceOf(0,NULL,NULL,L"Function",NULL))) {
                     registerFunction(name, *param[2], staticMember);
                 } else if (TJS_SUCCEEDED(member->IsInstanceOf(0,NULL,NULL,L"Property",NULL))) {
                     registerProperty(name, *param[2], staticMember);
                 }
             } else {
                 registNull(name);
             }
         }
     }
     if (result) {
         *result = true;
     }
     return TJS_S_OK;
 }
Beispiel #8
0
void Function::registerFilter(const String& name,
                              Handler func,
                              int argsCount,
                              int options)
{
	registerFunction(name, func, argsCount, options | Filter);
}
Beispiel #9
0
bool PluginManager::load(const std::string& path){
    std::string plugName = getPluginName(path);
    std::string realPath = resolvePathExtension(path);
    DLibrary* lib = DLibrary::load(realPath);
    if (!lib) return false;

    fnRegisterPlugin* registerFunction;
    registerFunction = reinterpret_cast<fnRegisterPlugin*>(lib->getSymbol("connect"));

    if(!registerFunction){
        fprintf(stderr, "Failed to initialize plugin \"%s\": connect function not found\n", plugName.c_str());
        delete lib;
        return false;
    }
    // try to initialize plugin:
    if (!registerFunction(host)){
        // plugin decided to fail
        fprintf(stderr, "Self registry failed on plugin \"%s\".\n", plugName.c_str());
        host.cancelAddictions();
        delete lib;
        return false;
    }
    // Store the library if addictions are confirmed
    if (host.confirmAddictions())
        libraries[plugName] = lib;
    else{
        // otherwise nothing was registered
        fprintf(stderr, "Nothing registered by plugin \"%s\".\n", plugName.c_str());
        delete lib;
        return false;
    }
    return true;
}
Beispiel #10
0
void
AhiApp::registerObjects(Factory & factory)
{
 registerBoundaryCondition(RadiationBC);
 registerFunction(PostprocessorFunction);
 registerBoundaryCondition(ScalarDirichletBC);
}
Beispiel #11
0
//各种注册模板
void UFuncFactory::InitFuncAndFilters()
{
	//------------ 选人 Start ------------
	registerFilter(ULockFilter::CreateFilter(Filter_Lock));
	registerFilter(UCircleFilter::CreateFilter(Filter_Circle));
	
	//------------ 选人 End ------------

	//------------ 技能 Start ------------
	registerFunction(UAttackPhy::CreateFunction(Func_AttackPhy));
	registerFunction(UAddBuff::CreateFunction(Func_AddBuff));
	//------------ 技能 End ------------

	//------------ 属性 Start ------------
	registerFunction(USuckup::CreateFunction(Func_Suckhp));
	//------------ 属性 End ------------
}
	server(AfcEventLoop &loop, AfcArgString &ip, AfcArgInteger &port) 
		: AfcRpcServer(loop, ip, port) {
		registerMethod("echo", m_api, &api::echo);
		registerMethod("clear", m_api, &api::clear);
		registerMethod("waitdelay", *this, &server::waitdelay);
		registerMethod("addReference", *this, &server::addReference);
		registerMethod("removeReferene", *this, &server::removeReferene);
		registerFunction("add", add);
	}
void ConfigManager::load() {
	if (lstate != NULL)
		lua_close(lstate);
	integer.clear();
	ponto.clear();
	maps.clear();
	scr = &integer;
	play = &ponto;
	m = &maps;
	lstate = newState();
	registerFunction(lstate, "regscreen", regscreen);
	registerFunction(lstate, "regplayer", regplayer);
	registerFunction(lstate, "regplayerhp", regplayerhp);
	registerFunction(lstate, "regmap", regmap);
	doLuaFile(lstate,"configmanager.lua");
	doLuaFile(lstate,"config.lua");
	map = maps.begin();
}
AIDA::IFunction * AIDA_FunctionFactory::createFunctionByName(const std::string & name, const std::string & model)
{ 
  AIDA::Dev::IDevFunction * f = m_factory->createFunctionByName(model); 
  
  // LM: temp fixes since codelet does not work for composite functions
  // set model string in codelet to have the function be able to recreate
  if (f) f->setCodeletString(model); 

  return registerFunction(f,name); 
}
Beispiel #15
0
void bindBuiltins(ast::ExternModuleDeclaration *module)
{
    registerClass<int>(module, "int");
    registerClass<float>(module, "float");
    registerClass<bool>(module, "bool");
    registerClass<std::string>(module, "string");

    registerEnum<ast::TaskDeclarationBase::State>(module, "TaskState")
        .value("failure", ast::TaskDeclarationBase::failure, "ast::TaskDeclarationBase::failure")
        .value("done", ast::TaskDeclarationBase::done, "ast::TaskDeclarationBase::done")
        .value("restart", ast::TaskDeclarationBase::restart, "ast::TaskDeclarationBase::restart")
        .value("running", ast::TaskDeclarationBase::running, "ast::TaskDeclarationBase::running")
        ;

    registerFunction(module, "toInt", &toInt, "int");
    registerFunction(module, "toFloat", &toFloat, "float");

    registerFullBScriptFunctionVoid(module, "TRACES", &traces, "traces");
    registerFullBScriptFunctionVoid(module, "TRACEF", &tracef, "tracef");
    registerFullBScriptFunctionVoid(module, "TRACEI", &tracei, "tracei");
}
Beispiel #16
0
int main() {

	init();

	ss_initialize(&Disp);
	ss_setValueLong(&Disp, val);

	initialize(&scheduler, 8000);
	registerFunction(&scheduler, printSync, 1, 0);
	registerFunction(&scheduler, updateTemp, 25000, 1);

	launchScheduler(&scheduler);
	/*
	 *  delay(5000);
	 *  if (!registered) {
	 *    registered = 1;
	 *    registerFunctionWithOffset(&Scheduler, updateTemp, S_2_US(2), 1875);
}
*/
	return 0;
}
int
registerUpdateFunctions()
{
    int ret;

    ret = registerFunction("update_forced", fn_update_forced, NULL);
    if (ret < 0) return ret;

    ret = registerFunction("get_mark", fn_get_mark, NULL);
    if (ret < 0) return ret;

    ret = registerFunction("hash_dir", fn_hash_dir, NULL);
    if (ret < 0) return ret;

    ret = registerFunction("matches", fn_matches, NULL);
    if (ret < 0) return ret;

    ret = registerFunction("concat", fn_concat, NULL);
    if (ret < 0) return ret;

    return 0;
}
int
registerSelf()
{
	registerFunction("MPLACE", dsoName);
	registerFunction("RVB", dsoName);
	registerFunction("matrix", dsoName); 
	registerFunction("space", dsoName); 
	registerFunction("mikes", dsoName); 
	registerFunction("mikes_off", dsoName); 
  	registerFunction("set_attenuation_params", dsoName); 
	return 0;
}
Beispiel #19
0
void
PhaseFieldApp::registerObjects(Factory & factory)
{
  registerKernel(MatDiffusion);
  registerKernel(ACInterface);
  registerKernel(CHMath);
  registerKernel(CHParsed);
  registerKernel(CHInterface);
  registerKernel(SplitCHWRes);
  registerKernel(SplitCHMath);
  registerKernel(SplitCHParsed);
  registerKernel(CoupledImplicitEuler);
  registerKernel(ACGrGrPoly);
  registerKernel(ACGBPoly);
  registerKernel(ACParsed);
  registerInitialCondition(CrossIC);
  registerInitialCondition(SmoothCircleIC);
  registerInitialCondition(RndSmoothCircleIC);
  registerInitialCondition(MultiSmoothCircleIC);
  registerInitialCondition(LatticeSmoothCircleIC);
  registerInitialCondition(SpecifiedSmoothCircleIC);
  registerInitialCondition(RndBoundingBoxIC);
  registerInitialCondition(HexPolycrystalIC);
  registerInitialCondition(PolycrystalRandomIC);
  registerInitialCondition(PolycrystalReducedIC);
  registerInitialCondition(ThumbIC);
  registerInitialCondition(Tricrystal2CircleGrainsIC);
  registerMaterial(PFMobility);
  registerMaterial(GBEvolution);
  registerMaterial(DerivativeParsedMaterial);
  registerUserObject(NodalFloodCount);
  registerAux(NodalFloodCountAux);
  registerAux(BndsCalcAux);
  // registerAux(SPPARKSAux);
  registerUserObject(NodalVolumeFraction);
  // registerUserObject(SPPARKSUserObject);
#ifdef LIBMESH_HAVE_VTK
  registerFunction(ImageFunction);
#endif
}
Beispiel #20
0
void ScriptManager::registerDefaultBindings() {
	declareClass("ScriptManager");

	beginRegister();

	registerFunction("getLua", &ScriptManager::luaGetLua);

	beginRegisterClass("ScriptManager");
	registerFunction("PlayFile", &ScriptManager::luaPlayFile);
	registerFunction("SetGCInterval", &ScriptManager::luaSetGCInterval);
	registerFunction("RegisterSubst", &ScriptManager::luaRegisterSubst);
	registerFunction("UnregisterSubst", &ScriptManager::luaUnregisterSubst);
	registerFunction("RegisterHandler", &ScriptManager::luaRegisterHandler);
	endRegisterClass();

	endRegister();
}
void WeaponManager::loadWeapons() {
	if (lstate != NULL)
		lua_close(lstate);
	std::list<Weapon*>::iterator it;
	for (it = weapons.begin(); it != weapons.end(); it++)
		delete (*it);
	weapons.clear();
	_weapons = &weapons;
	_game = game;
	collision.clear();
	_collision = &collision;
	lstate = newState();
	registerFunction(lstate,"regweapon",regweapon);
	registerFunction(lstate,"regspriteline",regspriteline);
	registerFunction(lstate,"regspritelineshot",regspritelineshot);
	registerFunction(lstate,"regfirefunction",regfirefunction);
	registerFunction(lstate,"createshot",createshot);
	registerFunction(lstate,"regcollision",regcollision);
	doLuaFile(lstate,"weaponmanager.lua");
	doLuaFile(lstate,"weapons.lua");
}
Beispiel #22
0
void ScriptEngine::registerFunction(const QString& name, QScriptEngine::FunctionSignature fun, int numArguments) {
    registerFunction(globalObject(), name, fun, numArguments);
}
Beispiel #23
0
void
RichardsApp::registerObjects(Factory & factory)
{
  // UserObjects
  registerUserObject(RichardsVarNames);
  registerUserObject(RichardsDensityConstBulk);
  registerUserObject(RichardsDensityConstBulkCut);
  registerUserObject(RichardsDensityIdeal);
  registerUserObject(RichardsDensityMethane20degC);
  registerUserObject(RichardsDensityVDW);
  registerUserObject(RichardsRelPermMonomial);
  registerUserObject(RichardsRelPermPower);
  registerUserObject(RichardsRelPermVG);
  registerUserObject(RichardsRelPermVG1);
  registerUserObject(RichardsRelPermBW);
  registerUserObject(RichardsRelPermPowerGas);
  registerUserObject(Q2PRelPermPowerGas);
  registerUserObject(RichardsSeff1VG);
  registerUserObject(RichardsSeff1VGcut);
  registerUserObject(RichardsSeff1BWsmall);
  registerUserObject(RichardsSeff1RSC);
  registerUserObject(RichardsSeff2waterVG);
  registerUserObject(RichardsSeff2gasVG);
  registerUserObject(RichardsSeff2waterVGshifted);
  registerUserObject(RichardsSeff2gasVGshifted);
  registerUserObject(RichardsSeff2waterRSC);
  registerUserObject(RichardsSeff2gasRSC);
  registerUserObject(RichardsSat);
  registerUserObject(RichardsSUPGnone);
  registerUserObject(RichardsSUPGstandard);
  registerUserObject(RichardsSumQuantity);

  // AuxKernels
  registerAux(RichardsSatAux);
  registerAux(RichardsSatPrimeAux);
  registerAux(RichardsSeffAux);
  registerAux(RichardsSeffPrimeAux);
  registerAux(RichardsSeffPrimePrimeAux);
  registerAux(RichardsDensityAux);
  registerAux(RichardsDensityPrimeAux);
  registerAux(RichardsDensityPrimePrimeAux);
  registerAux(RichardsRelPermAux);
  registerAux(RichardsRelPermPrimeAux);
  registerAux(RichardsRelPermPrimePrimeAux);
  registerAux(DarcyFluxComponent);

  // Materials
  registerMaterial(RichardsMaterial);
  registerMaterial(PoroFullSatMaterial); // Used for mechanical coupling
  registerMaterial(DarcyMaterial);
  registerMaterial(Q2PMaterial);

  // DiracKernels
  registerDiracKernel(RichardsPolyLineSink);
  registerDiracKernel(RichardsBorehole);
  registerDiracKernel(Q2PBorehole);

  // Functions
  registerFunction(RichardsExcavGeom);
  registerFunction(GradParsedFunction);
  registerFunction(Grad2ParsedFunction);

  // Postprocessors
  registerPostprocessor(RichardsMass);
  registerPostprocessor(RichardsPiecewiseLinearSinkFlux);
  registerPostprocessor(RichardsHalfGaussianSinkFlux);
  registerPostprocessor(NodalMaxVarChange);
  registerPostprocessor(RichardsExcavFlow);
  registerPostprocessor(RichardsPlotQuantity);
  registerPostprocessor(Q2PPiecewiseLinearSinkFlux);

  // Kernels
  registerKernel(RichardsMassChange);
  registerKernel(RichardsLumpedMassChange);
  registerKernel(RichardsFlux);
  registerKernel(RichardsFullyUpwindFlux);
  registerKernel(RichardsPPenalty);
  registerKernel(PoroFullSatTimeDerivative); // Used for mechanical coupling
  registerKernel(DarcyFlux);
  registerKernel(Q2PPorepressureFlux);
  registerKernel(Q2PSaturationFlux);
  registerKernel(Q2PSaturationDiffusion);
  registerKernel(Q2PNodalMass);
  registerKernel(Q2PNegativeNodalMassOld);

  // BoundaryConditions
  registerBoundaryCondition(RichardsExcav);
  registerBoundaryCondition(RichardsPiecewiseLinearSink);
  registerBoundaryCondition(RichardsHalfGaussianSink);
  registerBoundaryCondition(Q2PPiecewiseLinearSink);

  // Problems
  registerProblem(RichardsMultiphaseProblem);
}
Beispiel #24
0
FlowBackend::FlowBackend()
{
	registerFunction("__print", FlowValue::VOID, &flow_print, NULL);
}
Beispiel #25
0
void
registerObjects(Factory & factory)
{
  // mesh
  registerMesh(FileMesh);
  registerMesh(GeneratedMesh);
  registerMesh(TiledMesh);

  // mesh modifiers
  registerMeshModifier(MeshExtruder);
  registerMeshModifier(SideSetsFromPoints);
  registerMeshModifier(SideSetsFromNormals);
  registerMeshModifier(AddExtraNodeset);
  registerMeshModifier(BoundingBoxNodeSet);
  registerMeshModifier(Transform);
  registerMeshModifier(SideSetsAroundSubdomain);
  registerMeshModifier(SideSetsBetweenSubdomains);
  registerMeshModifier(AddAllSideSetsByNormals);
  registerMeshModifier(SubdomainBoundingBox);
  registerMeshModifier(OrientedSubdomainBoundingBox);
  registerMeshModifier(RenameBlock);

  // problems
  registerProblem(FEProblem);
  registerProblem(DisplacedProblem);

  // kernels
  registerKernel(TimeDerivative);
  registerKernel(CoupledTimeDerivative);
  registerKernel(MassLumpedTimeDerivative);
  registerKernel(Diffusion);
  registerKernel(AnisotropicDiffusion);
  registerKernel(CoupledForce);
  registerKernel(UserForcingFunction);
  registerKernel(BodyForce);
  registerKernel(Reaction);
  registerKernel(MassEigenKernel);

  // bcs
  registerBoundaryCondition(ConvectiveFluxBC);
  registerBoundaryCondition(DirichletBC);
  registerBoundaryCondition(PenaltyDirichletBC);
  registerBoundaryCondition(PresetBC);
  registerBoundaryCondition(NeumannBC);
  registerBoundaryCondition(FunctionDirichletBC);
  registerBoundaryCondition(FunctionPenaltyDirichletBC);
  registerBoundaryCondition(FunctionPresetBC);
  registerBoundaryCondition(FunctionNeumannBC);
  registerBoundaryCondition(MatchedValueBC);
  registerBoundaryCondition(VacuumBC);

  registerBoundaryCondition(SinDirichletBC);
  registerBoundaryCondition(SinNeumannBC);
  registerBoundaryCondition(VectorNeumannBC);
  registerBoundaryCondition(WeakGradientBC);
  registerBoundaryCondition(DiffusionFluxBC);
  registerBoundaryCondition(PostprocessorDirichletBC);
  registerBoundaryCondition(OneDEqualValueConstraintBC);

  // dirac kernels
  registerDiracKernel(ConstantPointSource);

  // aux kernels
  registerAux(ConstantAux);
  registerAux(FunctionAux);
  registerAux(NearestNodeDistanceAux);
  registerAux(NearestNodeValueAux);
  registerAux(PenetrationAux);
  registerAux(ProcessorIDAux);
  registerAux(SelfAux);
  registerAux(GapValueAux);
  registerAux(MaterialRealAux);
  registerAux(MaterialRealVectorValueAux);
  registerAux(MaterialRealTensorValueAux);
  registerAux(MaterialStdVectorAux);
  registerAux(MaterialRealDenseMatrixAux);
  registerAux(MaterialStdVectorRealGradientAux);
  registerAux(DebugResidualAux);
  registerAux(BoundsAux);
  registerAux(SpatialUserObjectAux);
  registerAux(SolutionAux);
  registerAux(VectorMagnitudeAux);
  registerAux(ConstantScalarAux);
  registerAux(QuotientAux);
  registerAux(NormalizationAux);
  registerAux(FunctionScalarAux);
  registerAux(VariableGradientComponent);
  registerAux(ParsedAux);

  // Initial Conditions
  registerInitialCondition(ConstantIC);
  registerInitialCondition(BoundingBoxIC);
  registerInitialCondition(FunctionIC);
  registerInitialCondition(RandomIC);
  registerInitialCondition(ScalarConstantIC);
  registerInitialCondition(ScalarComponentIC);

  // executioners
  registerExecutioner(Steady);
  registerExecutioner(Transient);
  registerExecutioner(InversePowerMethod);
  registerExecutioner(NonlinearEigen);
#if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3,4,0)
#if 0 // This seems to be broken right now -- doesn't work wiith petsc >= 3.4 either
  registerExecutioner(PetscTSExecutioner);
#endif
#endif

  // functions
  registerFunction(Axisymmetric2D3DSolutionFunction);
  registerFunction(ConstantFunction);
  registerFunction(CompositeFunction);
  registerNamedFunction(MooseParsedFunction, "ParsedFunction");
  registerNamedFunction(MooseParsedGradFunction, "ParsedGradFunction");
  registerNamedFunction(MooseParsedVectorFunction, "ParsedVectorFunction");
  registerFunction(PiecewiseConstant);
  registerFunction(PiecewiseLinear);
  registerFunction(SolutionFunction);
  registerFunction(PiecewiseBilinear);
  registerFunction(SplineFunction);
  registerFunction(PiecewiseMultilinear);
  registerFunction(LinearCombinationFunction);

  // materials
  registerMaterial(GenericConstantMaterial);
  registerMaterial(GenericFunctionMaterial);

  // PPS
  registerPostprocessor(AverageElementSize);
  registerPostprocessor(AverageNodalVariableValue);
  registerPostprocessor(NodalSum);
  registerPostprocessor(ElementAverageValue);
  registerPostprocessor(ElementAverageTimeDerivative);
  registerPostprocessor(ElementW1pError);
  registerPostprocessor(ElementH1Error);
  registerPostprocessor(ElementH1SemiError);
  registerPostprocessor(ElementIntegralVariablePostprocessor);
  registerPostprocessor(ElementIntegralMaterialProperty);
  registerPostprocessor(ElementL2Error);
  registerPostprocessor(ElementVectorL2Error);
  registerPostprocessor(ScalarL2Error);
  registerPostprocessor(EmptyPostprocessor);
  registerPostprocessor(NodalVariableValue);
  registerPostprocessor(NumDOFs);
  registerPostprocessor(TimestepSize);
  registerPostprocessor(RunTime);
  registerPostprocessor(PerformanceData);
  registerPostprocessor(NumElems);
  registerPostprocessor(NumNodes);
  registerPostprocessor(NumNonlinearIterations);
  registerPostprocessor(NumLinearIterations);
  registerPostprocessor(Residual);
  registerPostprocessor(ScalarVariable);
  registerPostprocessor(NumVars);
  registerPostprocessor(NumResidualEvaluations);
  registerDeprecatedObjectName(FunctionValuePostprocessor, "PlotFunction", "09/18/2015 12:00");
  registerPostprocessor(Receiver);
  registerPostprocessor(SideAverageValue);
  registerPostprocessor(SideFluxIntegral);
  registerPostprocessor(SideFluxAverage);
  registerPostprocessor(SideIntegralVariablePostprocessor);
  registerPostprocessor(NodalMaxValue);
  registerPostprocessor(NodalProxyMaxValue);
  registerPostprocessor(ElementalVariableValue);
  registerPostprocessor(ElementL2Norm);
  registerPostprocessor(NodalL2Norm);
  registerPostprocessor(NodalL2Error);
  registerPostprocessor(TotalVariableValue);
  registerPostprocessor(VolumePostprocessor);
  registerPostprocessor(AreaPostprocessor);
  registerPostprocessor(PointValue);
  registerPostprocessor(NodalExtremeValue);
  registerPostprocessor(ElementExtremeValue);
  registerPostprocessor(DifferencePostprocessor);
  registerPostprocessor(FunctionValuePostprocessor);
  registerPostprocessor(NumPicardIterations);
  registerPostprocessor(FunctionSideIntegral);
  registerPostprocessor(ExecutionerAttributeReporter);
  registerPostprocessor(PercentChangePostprocessor);
  registerPostprocessor(RealParameterReporter);

  // vector PPS
  registerVectorPostprocessor(ConstantVectorPostprocessor);
  registerVectorPostprocessor(NodalValueSampler);
  registerVectorPostprocessor(SideValueSampler);
  registerVectorPostprocessor(PointValueSampler);
  registerVectorPostprocessor(LineValueSampler);
  registerVectorPostprocessor(VectorOfPostprocessors);
  registerVectorPostprocessor(LeastSquaresFit);
  registerVectorPostprocessor(ElementsAlongLine);
  registerVectorPostprocessor(LineMaterialRealSampler);

  // user objects
  registerUserObject(LayeredIntegral);
  registerUserObject(LayeredAverage);
  registerUserObject(LayeredSideIntegral);
  registerUserObject(LayeredSideAverage);
  registerUserObject(LayeredSideFluxAverage);
  registerUserObject(NearestPointLayeredAverage);
  registerUserObject(ElementIntegralVariableUserObject);
  registerUserObject(NodalNormalsPreprocessor);
  registerUserObject(NodalNormalsCorner);
  registerUserObject(NodalNormalsEvaluator);
  registerUserObject(SolutionUserObject);
#ifdef LIBMESH_HAVE_FPARSER
  registerUserObject(Terminator);
#endif

  // preconditioners
  registerNamedPreconditioner(PhysicsBasedPreconditioner, "PBP");
  registerNamedPreconditioner(FiniteDifferencePreconditioner, "FDP");
  registerNamedPreconditioner(SingleMatrixPreconditioner, "SMP");
#if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3,3,0)
  registerNamedPreconditioner(SplitBasedPreconditioner, "SBP");
#endif
  // dampers
  registerDamper(ConstantDamper);
  registerDamper(MaxIncrement);
  // DG
  registerDGKernel(DGDiffusion);
  registerBoundaryCondition(DGFunctionDiffusionDirichletBC);

  // Constraints
  registerConstraint(TiedValueConstraint);
  registerConstraint(CoupledTiedValueConstraint);
  registerConstraint(EqualValueConstraint);
  registerConstraint(EqualValueBoundaryConstraint);

  // Scalar kernels
  registerScalarKernel(ODETimeDerivative);
  registerScalarKernel(NodalEqualValueConstraint);
  registerScalarKernel(ParsedODEKernel);
  registerScalarKernel(QuotientScalarAux);

  // indicators
  registerIndicator(AnalyticalIndicator);
  registerIndicator(LaplacianJumpIndicator);
  registerIndicator(GradientJumpIndicator);

  // markers
  registerMarker(ErrorToleranceMarker);
  registerMarker(ErrorFractionMarker);
  registerMarker(UniformMarker);
  registerMarker(BoxMarker);
  registerMarker(OrientedBoxMarker);
  registerMarker(ComboMarker);
  registerMarker(ValueThresholdMarker);
  registerMarker(ValueRangeMarker);

  // splits
  registerSplit(Split);
  registerSplit(ContactSplit);

  // MultiApps
  registerMultiApp(TransientMultiApp);
  registerMultiApp(FullSolveMultiApp);
  registerMultiApp(AutoPositionsMultiApp);

  // time steppers
  registerTimeStepper(ConstantDT);
  registerTimeStepper(FunctionDT);
  registerTimeStepper(IterationAdaptiveDT);
  registerTimeStepper(SolutionTimeAdaptiveDT);
  registerTimeStepper(DT2);
  registerTimeStepper(PostprocessorDT);
  registerTimeStepper(AB2PredictorCorrector);
  // time integrators
  registerTimeIntegrator(SteadyState);
  registerTimeIntegrator(ImplicitEuler);
  registerTimeIntegrator(BDF2);
  registerTimeIntegrator(CrankNicolson);
  registerTimeIntegrator(ExplicitEuler);
  registerTimeIntegrator(RungeKutta2);
  registerDeprecatedObjectName(Dirk, "Dirk", "09/22/2015 12:00");
  registerTimeIntegrator(LStableDirk2);
  // predictors
  registerPredictor(SimplePredictor);
  registerPredictor(AdamsPredictor);

  // Transfers
#ifdef LIBMESH_HAVE_DTK
  registerTransfer(MultiAppDTKUserObjectTransfer);
  registerTransfer(MultiAppDTKInterpolationTransfer);
  registerTransfer(MoabTransfer);
#endif
  registerTransfer(MultiAppPostprocessorInterpolationTransfer);
  registerTransfer(MultiAppVariableValueSampleTransfer);
  registerTransfer(MultiAppVariableValueSamplePostprocessorTransfer);
  registerTransfer(MultiAppMeshFunctionTransfer);
  registerTransfer(MultiAppUserObjectTransfer);
  registerTransfer(MultiAppNearestNodeTransfer);
  registerTransfer(MultiAppCopyTransfer);
  registerTransfer(MultiAppInterpolationTransfer);
  registerTransfer(MultiAppPostprocessorTransfer);
  registerTransfer(MultiAppProjectionTransfer);
  registerTransfer(MultiAppPostprocessorToAuxScalarTransfer);

  // Outputs
#ifdef LIBMESH_HAVE_EXODUS_API
  registerOutput(Exodus);
#endif
#ifdef LIBMESH_HAVE_NEMESIS_API
  registerOutput(Nemesis);
#endif
  registerOutput(Console);
  registerOutput(CSV);
#ifdef LIBMESH_HAVE_VTK
  registerNamedOutput(VTKOutput, "VTK");
#endif
  registerOutput(Checkpoint);
  registerNamedOutput(XDA, "XDR");
  registerOutput(XDA);
  registerNamedOutput(GMVOutput, "GMV");
  registerOutput(Tecplot);
  registerOutput(Gnuplot);
  registerOutput(SolutionHistory);
  registerOutput(MaterialPropertyDebugOutput);
  registerOutput(VariableResidualNormsDebugOutput);
  registerOutput(TopResidualDebugOutput);
  registerNamedOutput(DOFMapOutput, "DOFMap");

  // Controls
  registerControl(RealFunctionControl);

  registered = true;
}
Beispiel #26
0
void
registerObjects(Factory & factory)
{
  // mesh
  registerMesh(FileMesh);
  registerMesh(GeneratedMesh);
  registerMesh(TiledMesh);
  registerMesh(ImageMesh);
  registerMesh(PatternedMesh);
  registerMesh(StitchedMesh);
  registerMesh(AnnularMesh);

  // mesh modifiers
  registerMeshModifier(MeshExtruder);
  registerMeshModifier(SideSetsFromPoints);
  registerMeshModifier(SideSetsFromNormals);
  registerMeshModifier(AddExtraNodeset);
  registerMeshModifier(BoundingBoxNodeSet);
  registerMeshModifier(Transform);
  registerMeshModifier(SideSetsAroundSubdomain);
  registerMeshModifier(SideSetsBetweenSubdomains);
  registerMeshModifier(AddAllSideSetsByNormals);
  registerMeshModifier(SubdomainBoundingBox);
  registerMeshModifier(OrientedSubdomainBoundingBox);
  registerMeshModifier(RenameBlock);
  registerMeshModifier(AssignElementSubdomainID);
  registerMeshModifier(ImageSubdomain);
  registerMeshModifier(BlockDeleter);
  registerMeshModifier(ParsedSubdomainMeshModifier);
  registerMeshModifier(BreakBoundaryOnSubdomain);
  registerMeshModifier(ParsedAddSideset);
  registerMeshModifier(AssignSubdomainID);
  registerMeshModifier(MeshSideSet);
  registerMeshModifier(AddSideSetsFromBoundingBox);

  // problems
  registerProblem(DisplacedProblem);
  registerProblem(FEProblem);
  registerProblem(EigenProblem);

  // kernels
  registerKernel(TimeDerivative);
  registerKernel(ConservativeAdvection);
  registerKernel(CoupledTimeDerivative);
  registerKernel(MassLumpedTimeDerivative);
  registerKernel(Diffusion);
  registerKernel(AnisotropicDiffusion);
  registerKernel(CoupledForce);
  registerRenamedObject("UserForcingFunction", BodyForce, "04/01/2018 00:00");
  registerKernel(Reaction);
  registerKernel(MassEigenKernel);
  registerKernel(NullKernel);
  registerKernel(MaterialDerivativeTestKernel);
  registerKernel(MaterialDerivativeRankTwoTestKernel);
  registerKernel(MaterialDerivativeRankFourTestKernel);

  // bcs
  registerBoundaryCondition(ConvectiveFluxBC);
  registerBoundaryCondition(DirichletBC);
  registerBoundaryCondition(PenaltyDirichletBC);
  registerBoundaryCondition(PresetBC);
  registerBoundaryCondition(NeumannBC);
  registerBoundaryCondition(PostprocessorNeumannBC);
  registerBoundaryCondition(FunctionDirichletBC);
  registerBoundaryCondition(FunctionPenaltyDirichletBC);
  registerBoundaryCondition(FunctionPresetBC);
  registerBoundaryCondition(FunctionNeumannBC);
  registerBoundaryCondition(MatchedValueBC);
  registerBoundaryCondition(VacuumBC);

  registerBoundaryCondition(SinDirichletBC);
  registerBoundaryCondition(SinNeumannBC);
  registerBoundaryCondition(VectorNeumannBC);
  registerBoundaryCondition(WeakGradientBC);
  registerBoundaryCondition(DiffusionFluxBC);
  registerBoundaryCondition(PostprocessorDirichletBC);
  registerBoundaryCondition(OneDEqualValueConstraintBC);

  // dirac kernels
  registerDiracKernel(ConstantPointSource);
  registerDiracKernel(FunctionDiracSource);

  // aux kernels
  registerAux(ConstantAux);
  registerAux(FunctionAux);
  registerAux(NearestNodeDistanceAux);
  registerAux(NearestNodeValueAux);
  registerAux(PenetrationAux);
  registerAux(ProcessorIDAux);
  registerAux(SelfAux);
  registerAux(GapValueAux);
  registerAux(MaterialRealAux);
  registerAux(MaterialRealVectorValueAux);
  registerAux(MaterialRealTensorValueAux);
  registerAux(MaterialStdVectorAux);
  registerAux(MaterialRealDenseMatrixAux);
  registerAux(MaterialStdVectorRealGradientAux);
  registerAux(DebugResidualAux);
  registerAux(BoundsAux);
  registerAux(SpatialUserObjectAux);
  registerAux(SolutionAux);
  registerAux(VectorMagnitudeAux);
  registerAux(ConstantScalarAux);
  registerAux(QuotientAux);
  registerAux(NormalizationAux);
  registerAux(FunctionScalarAux);
  registerAux(VariableGradientComponent);
  registerAux(ParsedAux);
  registerAux(VariableTimeIntegrationAux);
  registerAux(ElementLengthAux);
  registerAux(ElementLpNormAux);
  registerAux(ElementL2ErrorFunctionAux);
  registerAux(ElementH1ErrorFunctionAux);
  registerAux(DiffusionFluxAux);

  // Initial Conditions
  registerInitialCondition(ConstantIC);
  registerInitialCondition(BoundingBoxIC);
  registerInitialCondition(FunctionIC);
  registerInitialCondition(RandomIC);
  registerInitialCondition(ScalarConstantIC);
  registerInitialCondition(ScalarComponentIC);
  registerInitialCondition(FunctionScalarIC);

  // executioners
  registerExecutioner(Steady);
  registerExecutioner(Transient);
  registerExecutioner(InversePowerMethod);
  registerExecutioner(NonlinearEigen);
  registerExecutioner(Eigenvalue);

  // functions
  registerFunction(Axisymmetric2D3DSolutionFunction);
  registerFunction(ConstantFunction);
  registerFunction(CompositeFunction);
  registerNamedFunction(MooseParsedFunction, "ParsedFunction");
  registerNamedFunction(MooseParsedGradFunction, "ParsedGradFunction");
  registerNamedFunction(MooseParsedVectorFunction, "ParsedVectorFunction");
  registerFunction(PiecewiseConstant);
  registerFunction(PiecewiseLinear);
  registerFunction(SolutionFunction);
  registerFunction(PiecewiseBilinear);
  registerFunction(SplineFunction);
  registerFunction(BicubicSplineFunction);
  registerFunction(PiecewiseMultilinear);
  registerFunction(LinearCombinationFunction);
  registerFunction(ImageFunction);
  registerFunction(VectorPostprocessorFunction);

  // materials
  registerMaterial(DerivativeParsedMaterial);
  registerMaterial(DerivativeSumMaterial);
  registerMaterial(GenericConstantMaterial);
  registerMaterial(GenericConstantRankTwoTensor);
  registerMaterial(GenericFunctionMaterial);
  registerMaterial(ParsedMaterial);
  registerMaterial(PiecewiseLinearInterpolationMaterial);

  // PPS
  registerPostprocessor(AverageElementSize);
  registerPostprocessor(AverageNodalVariableValue);
  registerPostprocessor(CumulativeValuePostprocessor);
  registerPostprocessor(ChangeOverTimePostprocessor);
  registerPostprocessor(ChangeOverTimestepPostprocessor);
  registerPostprocessor(NodalSum);
  registerPostprocessor(ElementAverageValue);
  registerPostprocessor(ElementAverageTimeDerivative);
  registerPostprocessor(ElementW1pError);
  registerPostprocessor(ElementH1Error);
  registerPostprocessor(ElementH1SemiError);
  registerPostprocessor(ElementIntegralVariablePostprocessor);
  registerPostprocessor(ElementIntegralMaterialProperty);
  registerPostprocessor(ElementL2Error);
  registerPostprocessor(ElementVectorL2Error);
  registerPostprocessor(ScalarL2Error);
  registerPostprocessor(EmptyPostprocessor);
  registerPostprocessor(FindValueOnLine);
  registerPostprocessor(NodalVariableValue);
  registerPostprocessor(NumDOFs);
  registerPostprocessor(TimestepSize);
  registerPostprocessor(PerformanceData);
  registerPostprocessor(MemoryUsage);
  registerPostprocessor(NumElems);
  registerPostprocessor(NumNodes);
  registerPostprocessor(NumNonlinearIterations);
  registerPostprocessor(NumLinearIterations);
  registerPostprocessor(Residual);
  registerPostprocessor(ScalarVariable);
  registerPostprocessor(NumVars);
  registerPostprocessor(NumResidualEvaluations);
  registerPostprocessor(Receiver);
  registerPostprocessor(SideAverageValue);
  registerPostprocessor(SideFluxIntegral);
  registerPostprocessor(SideFluxAverage);
  registerPostprocessor(SideIntegralVariablePostprocessor);
  registerPostprocessor(NodalMaxValue);
  registerPostprocessor(NodalProxyMaxValue);
  registerPostprocessor(ElementalVariableValue);
  registerPostprocessor(ElementL2Norm);
  registerPostprocessor(NodalL2Norm);
  registerPostprocessor(NodalL2Error);
  registerPostprocessor(TotalVariableValue);
  registerPostprocessor(VolumePostprocessor);
  registerPostprocessor(AreaPostprocessor);
  registerPostprocessor(PointValue);
  registerPostprocessor(NodalExtremeValue);
  registerPostprocessor(ElementExtremeValue);
  registerPostprocessor(DifferencePostprocessor);
  registerPostprocessor(RelativeDifferencePostprocessor);
  registerPostprocessor(ScalePostprocessor);
  registerPostprocessor(LinearCombinationPostprocessor);
  registerPostprocessor(FunctionValuePostprocessor);
  registerPostprocessor(NumPicardIterations);
  registerPostprocessor(FunctionSideIntegral);
  registerPostprocessor(ExecutionerAttributeReporter);
  registerPostprocessor(PercentChangePostprocessor);
  registerPostprocessor(ElementL2Difference);
  registerPostprocessor(TimeExtremeValue);
  registerPostprocessor(RelativeSolutionDifferenceNorm);
  registerPostprocessor(AxisymmetricCenterlineAverageValue);
  registerPostprocessor(VariableInnerProduct);
  registerPostprocessor(VariableResidual);

  // vector PPS
  registerVectorPostprocessor(CSVReader);
  registerVectorPostprocessor(ConstantVectorPostprocessor);
  registerVectorPostprocessor(Eigenvalues);
  registerVectorPostprocessor(ElementVariablesDifferenceMax);
  registerVectorPostprocessor(ElementsAlongLine);
  registerVectorPostprocessor(ElementsAlongPlane);
  registerVectorPostprocessor(IntersectionPointsAlongLine);
  registerVectorPostprocessor(LeastSquaresFit);
  registerVectorPostprocessor(LineFunctionSampler);
  registerVectorPostprocessor(LineMaterialRealSampler);
  registerVectorPostprocessor(LineValueSampler);
  registerVectorPostprocessor(MaterialVectorPostprocessor);
  registerVectorPostprocessor(NodalValueSampler);
  registerVectorPostprocessor(PointValueSampler);
  registerVectorPostprocessor(SideValueSampler);
  registerVectorPostprocessor(SphericalAverage);
  registerVectorPostprocessor(VectorOfPostprocessors);
  registerVectorPostprocessor(VolumeHistogram);

  // user objects
  registerUserObject(GeometrySphere);
  registerUserObject(LayeredIntegral);
  registerUserObject(LayeredAverage);
  registerUserObject(LayeredSideIntegral);
  registerUserObject(LayeredSideAverage);
  registerUserObject(LayeredSideFluxAverage);
  registerUserObject(NearestPointLayeredAverage);
  registerUserObject(ElementIntegralVariableUserObject);
  registerUserObject(NodalNormalsPreprocessor);
  registerUserObject(NodalNormalsCorner);
  registerUserObject(NodalNormalsEvaluator);
  registerUserObject(SolutionUserObject);
  registerUserObject(PerflogDumper);
  registerUserObject(ElementQualityChecker);
#ifdef LIBMESH_HAVE_FPARSER
  registerUserObject(Terminator);
#endif

  // preconditioners
  registerNamedPreconditioner(PhysicsBasedPreconditioner, "PBP");
  registerNamedPreconditioner(FiniteDifferencePreconditioner, "FDP");
  registerNamedPreconditioner(SingleMatrixPreconditioner, "SMP");
#if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3, 3, 0)
  registerNamedPreconditioner(FieldSplitPreconditioner, "FSP");
#endif
  // dampers
  registerDamper(ConstantDamper);
  registerDamper(MaxIncrement);
  registerDamper(BoundingValueNodalDamper);
  registerDamper(BoundingValueElementDamper);
  // DG
  registerDGKernel(DGDiffusion);
  registerBoundaryCondition(DGFunctionDiffusionDirichletBC);
  registerDGKernel(DGConvection);

  // Constraints
  registerConstraint(TiedValueConstraint);
  registerConstraint(CoupledTiedValueConstraint);
  registerConstraint(EqualGradientConstraint);
  registerConstraint(EqualValueConstraint);
  registerConstraint(EqualValueBoundaryConstraint);
  registerConstraint(LinearNodalConstraint);

  // Scalar kernels
  registerScalarKernel(ODETimeDerivative);
  registerScalarKernel(CoupledODETimeDerivative);
  registerScalarKernel(NodalEqualValueConstraint);
  registerScalarKernel(ParsedODEKernel);
  registerScalarKernel(QuotientScalarAux);

  // indicators
  registerIndicator(AnalyticalIndicator);
  registerIndicator(LaplacianJumpIndicator);
  registerIndicator(GradientJumpIndicator);
  registerIndicator(ValueJumpIndicator);

  // markers
  registerMarker(ErrorToleranceMarker);
  registerMarker(ErrorFractionMarker);
  registerMarker(UniformMarker);
  registerMarker(BoxMarker);
  registerMarker(OrientedBoxMarker);
  registerMarker(ComboMarker);
  registerMarker(ValueThresholdMarker);
  registerMarker(ValueRangeMarker);

  // splits
  registerSplit(Split);

  // MultiApps
  registerMultiApp(TransientMultiApp);
  registerMultiApp(FullSolveMultiApp);
  registerMultiApp(AutoPositionsMultiApp);
  registerMultiApp(CentroidMultiApp);

  // time steppers
  registerTimeStepper(ConstantDT);
  registerTimeStepper(LogConstantDT);
  registerTimeStepper(FunctionDT);
  registerTimeStepper(TimeSequenceStepper);
  registerTimeStepper(ExodusTimeSequenceStepper);
  registerTimeStepper(CSVTimeSequenceStepper);
  registerTimeStepper(IterationAdaptiveDT);
  registerTimeStepper(SolutionTimeAdaptiveDT);
  registerTimeStepper(DT2);
  registerTimeStepper(PostprocessorDT);
  registerTimeStepper(AB2PredictorCorrector);
  // time integrators
  registerTimeIntegrator(ImplicitEuler);
  registerTimeIntegrator(BDF2);
  registerTimeIntegrator(CrankNicolson);
  registerTimeIntegrator(ExplicitEuler);
  registerTimeIntegrator(ExplicitMidpoint);
  registerTimeIntegrator(ExplicitTVDRK2);
  registerTimeIntegrator(LStableDirk2);
  registerTimeIntegrator(LStableDirk3);
  registerTimeIntegrator(AStableDirk4);
  registerTimeIntegrator(LStableDirk4);
  registerTimeIntegrator(ImplicitMidpoint);
  registerTimeIntegrator(Heun);
  registerTimeIntegrator(Ralston);
  // predictors
  registerPredictor(SimplePredictor);
  registerPredictor(AdamsPredictor);

// Transfers
#ifdef LIBMESH_TRILINOS_HAVE_DTK
  registerTransfer(MultiAppDTKUserObjectTransfer);
  registerTransfer(MultiAppDTKInterpolationTransfer);
#endif
  registerTransfer(MultiAppPostprocessorInterpolationTransfer);
  registerTransfer(MultiAppVariableValueSampleTransfer);
  registerTransfer(MultiAppVariableValueSamplePostprocessorTransfer);
  registerTransfer(MultiAppMeshFunctionTransfer);
  registerTransfer(MultiAppUserObjectTransfer);
  registerTransfer(MultiAppNearestNodeTransfer);
  registerTransfer(MultiAppCopyTransfer);
  registerTransfer(MultiAppInterpolationTransfer);
  registerTransfer(MultiAppPostprocessorTransfer);
  registerTransfer(MultiAppProjectionTransfer);
  registerTransfer(MultiAppPostprocessorToAuxScalarTransfer);
  registerTransfer(MultiAppScalarToAuxScalarTransfer);
  registerTransfer(MultiAppVectorPostprocessorTransfer);

// Outputs
#ifdef LIBMESH_HAVE_EXODUS_API
  registerOutput(Exodus);
#endif
#ifdef LIBMESH_HAVE_NEMESIS_API
  registerOutput(Nemesis);
#endif
  registerOutput(Console);
  registerOutput(CSV);
#ifdef LIBMESH_HAVE_VTK
  registerNamedOutput(VTKOutput, "VTK");
#endif
  registerOutput(Checkpoint);
  registerNamedOutput(XDA, "XDR");
  registerOutput(XDA);
  registerNamedOutput(GMVOutput, "GMV");
  registerOutput(Tecplot);
  registerOutput(Gnuplot);
  registerOutput(SolutionHistory);
  registerOutput(MaterialPropertyDebugOutput);
  registerOutput(VariableResidualNormsDebugOutput);
  registerOutput(TopResidualDebugOutput);
  registerNamedOutput(DOFMapOutput, "DOFMap");
  registerOutput(ControlOutput);

  // Controls
  registerControl(RealFunctionControl);
  registerControl(TimePeriod);

  // Partitioner
  registerPartitioner(LibmeshPartitioner);

  // NodalKernels
  registerNodalKernel(TimeDerivativeNodalKernel);
  registerNodalKernel(ConstantRate);
  registerNodalKernel(UserForcingFunctionNodalKernel);

  // RelationshipManagers
  registerRelationshipManager(ElementSideNeighborLayers);
  registerRelationshipManager(ElementPointNeighbors);
}
Beispiel #27
0
void
MooseTestApp::registerObjects(Factory & factory)
{
  // Kernels
  registerKernel(ConservativeAdvection);
  registerKernel(CoeffParamDiffusion);
  registerKernel(CoupledConvection);
  registerKernel(ForcingFn);
  registerKernel(MatDiffusion);
  registerKernel(DiffMKernel);
  registerKernel(GaussContForcing);
  registerKernel(CoefDiffusion);
  registerKernel(RestartDiffusion);
  registerKernel(MatCoefDiffusion);
  registerKernel(FuncCoefDiffusion);
  registerKernel(CoefReaction);
  registerKernel(Convection);
  registerKernel(PolyDiffusion);
  registerKernel(PolyConvection);
  registerKernel(PolyForcing);
  registerKernel(PolyReaction);
  registerKernel(MMSImplicitEuler);
  registerKernel(MMSDiffusion);
  registerKernel(MMSConvection);
  registerKernel(MMSForcing);
  registerKernel(MMSReaction);
  registerKernel(Diffusion0);
  registerKernel(GenericDiffusion);
  registerKernel(Advection0);
  registerKernel(AdvDiffReaction1);
  registerKernel(ForcingFunctionXYZ0);
  registerKernel(TEJumpFFN);
  registerKernel(NanKernel);
  registerKernel(NanAtCountKernel);
  registerKernel(ExceptionKernel);
  registerKernel(MatConvection);
  registerKernel(PPSDiffusion);
  registerKernel(DefaultPostprocessorDiffusion);
  registerKernel(DotCouplingKernel);
  registerKernel(UserObjectKernel);
  registerKernel(DiffusionPrecompute);
  registerKernel(ConvectionPrecompute);
  registerKernel(CoupledKernelGradTest);
  registerKernel(CoupledKernelValueTest);
  registerKernel(SplineFFn);
  registerKernel(BlkResTestDiffusion);
  registerKernel(DiffTensorKernel);
  registerKernel(ScalarLagrangeMultiplier);
  registerKernel(OptionallyCoupledForce);
  registerKernel(FDDiffusion);
  registerKernel(FDAdvection);
  registerKernel(MaterialEigenKernel);
  registerKernel(PHarmonic);
  registerKernel(PMassEigenKernel);
  registerKernel(CoupledEigenKernel);
  registerKernel(ConsoleMessageKernel);
  registerKernel(WrongJacobianDiffusion);
  registerKernel(DefaultMatPropConsumerKernel);
  registerKernel(DoNotCopyParametersKernel);

  // Aux kernels
  registerAux(CoupledAux);
  registerAux(CoupledScalarAux);
  registerAux(CoupledGradAux);
  registerAux(PolyConstantAux);
  registerAux(MMSConstantAux);
  registerAux(MultipleUpdateAux);
  registerAux(MultipleUpdateElemAux);
  registerAux(PeriodicDistanceAux);
  registerAux(MatPropUserObjectAux);
  registerAux(SumNodalValuesAux);
  registerAux(UniqueIDAux);
  registerAux(RandomAux);
  registerAux(PostprocessorAux);
  registerAux(FluxAverageAux);
  registerAux(OldMaterialAux);
  registerAux(DotCouplingAux);

  // DG kernels
  registerDGKernel(DGMatDiffusion);
  registerDGKernel(DGAdvection);

  // Interface kernels
  registerInterfaceKernel(InterfaceDiffusion);

  // Boundary Conditions
  registerBoundaryCondition(RobinBC);
  registerBoundaryCondition(InflowBC);
  registerBoundaryCondition(OutflowBC);
  registerBoundaryCondition(MTBC);
  registerBoundaryCondition(PolyCoupledDirichletBC);
  registerBoundaryCondition(MMSCoupledDirichletBC);
  registerBoundaryCondition(DirichletBCfuncXYZ0);
  registerBoundaryCondition(TEJumpBC);
  registerBoundaryCondition(OnOffDirichletBC);
  registerBoundaryCondition(OnOffNeumannBC);
  registerBoundaryCondition(ScalarVarBC);
  registerBoundaryCondition(BndTestDirichletBC);
  registerBoundaryCondition(MatTestNeumannBC);

  registerBoundaryCondition(DGMDDBC);
  registerBoundaryCondition(DGFunctionConvectionDirichletBC);

  registerBoundaryCondition(CoupledKernelGradBC);

  registerBoundaryCondition(DivergenceBC);
  registerBoundaryCondition(MatDivergenceBC);
  registerBoundaryCondition(CoupledDirichletBC);
  registerBoundaryCondition(TestLapBC);

  // Initial conditions
  registerInitialCondition(TEIC);
  registerInitialCondition(MTICSum);
  registerInitialCondition(MTICMult);
  registerInitialCondition(DataStructIC);

  // Materials
  registerMaterial(MTMaterial);
  registerMaterial(TypesMaterial);
  registerMaterial(StatefulMaterial);
  registerMaterial(SpatialStatefulMaterial);
  registerMaterial(ComputingInitialTest);
  registerMaterial(StatefulTest);
  registerMaterial(StatefulSpatialTest);
  registerMaterial(CoupledMaterial);
  registerMaterial(CoupledMaterial2);
  registerMaterial(LinearInterpolationMaterial);
  registerMaterial(VarCouplingMaterial);
  registerMaterial(VarCouplingMaterialEigen);
  registerMaterial(BadStatefulMaterial);
  registerMaterial(OutputTestMaterial);
  registerMaterial(SumMaterial);
  registerMaterial(VecRangeCheckMaterial);
  registerMaterial(DerivativeMaterialInterfaceTestProvider);
  registerMaterial(DerivativeMaterialInterfaceTestClient);
  registerMaterial(DefaultMatPropConsumerMaterial);
  registerMaterial(RandomMaterial);
  registerMaterial(RecomputeMaterial);
  registerMaterial(NewtonMaterial);


  registerScalarKernel(ExplicitODE);
  registerScalarKernel(ImplicitODEx);
  registerScalarKernel(ImplicitODEy);
  registerScalarKernel(AlphaCED);
  registerScalarKernel(PostprocessorCED);

  // Functions
  registerFunction(TimestepSetupFunction);
  registerFunction(PostprocessorFunction);
  registerFunction(MTPiecewiseConst1D);
  registerFunction(MTPiecewiseConst2D);
  registerFunction(MTPiecewiseConst3D);
  registerFunction(TestSetupPostprocessorDataActionFunction);

  // DiracKernels
  registerDiracKernel(ReportingConstantSource);
  registerDiracKernel(FrontSource);
  registerDiracKernel(MaterialPointSource);
  registerDiracKernel(MaterialMultiPointSource);
  registerDiracKernel(StatefulPointSource);
  registerDiracKernel(CachingPointSource);
  registerDiracKernel(BadCachingPointSource);
  registerDiracKernel(NonlinearSource);

  // meshes
  registerObject(StripeMesh);

  registerConstraint(EqualValueNodalConstraint);

  // UserObjects
  registerUserObject(MTUserObject);
  registerUserObject(RandomHitUserObject);
  registerUserObject(RandomHitSolutionModifier);
  registerUserObject(MaterialPropertyUserObject);
  registerUserObject(MaterialCopyUserObject);
  registerUserObject(InsideUserObject);
  registerUserObject(RestartableTypes);
  registerUserObject(RestartableTypesChecker);
  registerUserObject(PointerStoreError);
  registerUserObject(PointerLoadError);
  registerUserObject(VerifyElementUniqueID);
  registerUserObject(VerifyNodalUniqueID);
  registerUserObject(RandomElementalUserObject);
  registerUserObject(TrackDiracFront);
  registerUserObject(BoundaryUserObject);
  registerUserObject(TestBoundaryRestrictableAssert);
  registerUserObject(GetMaterialPropertyBoundaryBlockNamesTest);
  registerUserObject(GeneralSetupInterfaceCount);
  registerUserObject(ElementSetupInterfaceCount);
  registerUserObject(SideSetupInterfaceCount);
  registerUserObject(InternalSideSetupInterfaceCount);
  registerUserObject(NodalSetupInterfaceCount);
  registerUserObject(ReadDoubleIndex);

  registerPostprocessor(InsideValuePPS);
  registerPostprocessor(TestCopyInitialSolution);
  registerPostprocessor(TestSerializedSolution);
  registerPostprocessor(BoundaryValuePPS);
  registerPostprocessor(NumInternalSides);
  registerPostprocessor(NumElemQPs);
  registerPostprocessor(NumSideQPs);
  registerPostprocessor(ElementL2Diff);
  registerPostprocessor(TestPostprocessor);
  registerPostprocessor(ElementSidePP);
  registerPostprocessor(RealControlParameterReporter);

  registerMarker(RandomHitMarker);
  registerMarker(QPointMarker);
  registerMarker(CircleMarker);

  registerExecutioner(TestSteady);
  registerExecutioner(AdaptAndModify);

  registerProblem(MooseTestProblem);
  registerProblem(FailingProblem);

  // Outputs
  registerOutput(OutputObjectTest);

  // Controls
  registerControl(TestControl);
}
Beispiel #28
0
Transaction::Transaction(Database* dbase, GarrysMod::Lua::ILuaBase* LUA) : IQuery(dbase, LUA) {
	registerFunction(LUA, "addQuery", Transaction::addQuery);
	registerFunction(LUA, "getQueries", Transaction::getQueries);
	registerFunction(LUA, "clearQueries", Transaction::clearQueries);
}
Beispiel #29
0
char* OnionClient::registerFunction(char* endpoint, remoteFunction function) {
    return registerFunction(endpoint,function,0,0);
}
int
register_update_commands(RecoveryCommandContext *ctx)
{
    int ret;

    ret = commandInit();
    if (ret < 0) return ret;

    /*
     * Commands
     */

    ret = registerCommand("assert", CMD_ARGS_BOOLEAN, cmd_assert, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("delete", CMD_ARGS_WORDS, cmd_delete, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("delete_recursive", CMD_ARGS_WORDS, cmd_delete,
            (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("copy_dir", CMD_ARGS_WORDS,
            cmd_copy_dir, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("run_program", CMD_ARGS_WORDS,
            cmd_run_program, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("set_perm", CMD_ARGS_WORDS,
            cmd_set_perm, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("set_perm_recursive", CMD_ARGS_WORDS,
            cmd_set_perm, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("show_progress", CMD_ARGS_WORDS,
            cmd_show_progress, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("symlink", CMD_ARGS_WORDS, cmd_symlink, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("format", CMD_ARGS_WORDS, cmd_format, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_radio_image", CMD_ARGS_WORDS,
            cmd_write_firmware_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_hboot_image", CMD_ARGS_WORDS,
            cmd_write_firmware_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("write_raw_image", CMD_ARGS_WORDS,
            cmd_write_raw_image, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("mark", CMD_ARGS_WORDS, cmd_mark, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerCommand("done", CMD_ARGS_WORDS, cmd_done, (void *)ctx);
    if (ret < 0) return ret;

    /*
     * Functions
     */

    ret = registerFunction("compatible_with", fn_compatible_with, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("update_forced", fn_update_forced, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("get_mark", fn_get_mark, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("hash_dir", fn_hash_dir, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("matches", fn_matches, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("concat", fn_concat, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("getprop", fn_getprop, (void *)ctx);
    if (ret < 0) return ret;

    ret = registerFunction("file_contains", fn_file_contains, (void *)ctx);
    if (ret < 0) return ret;

    return 0;
}