LinearSolver::LinearSolver(const LinearSolverBackendFactory& backendFactory) : _solution(new Solution()), _objectiveDirty(true), _linearConstraintsDirty(true), _parametersDirty(true) { registerInput(_objective, "objective"); registerInput(_linearConstraints, "linear constraints"); registerInput(_parameters, "parameters"); registerOutput(_solution, "solution"); // create solver backend _solver = backendFactory.createLinearSolverBackend(); // register callbacks for input changes _objective.registerCallback(&LinearSolver::onObjectiveModified, this); _linearConstraints.registerCallback(&LinearSolver::onLinearConstraintsModified, this); _parameters.registerCallback(&LinearSolver::onParametersModified, this); }
BEGIN_NAMESPACE_MW // all of these units should be assumed to be arbitrary, even though they many are tagged // by the term "deg" TODO -- drop all the "deg" refs // === EyeStatusMonitor is a very specific type of var transform adaptor ====== // the input data is expected to be calibrated eye data EyeStatusMonitor::EyeStatusMonitor(shared_ptr<Variable> _eyeHCalibratedVar, shared_ptr<Variable> _eyeVCalibratedVar, shared_ptr<Variable> _eyeStatusVar, int _filterWidthSamples) { // _filterWidthSamples is used for both the eye signale filters and the // velocity filters in the eyeStatusComputer // pointers to the input vars -- will setup notifications eyeHindex = registerInput(_eyeHCalibratedVar); // input 0 eyeVindex = registerInput(_eyeVCalibratedVar); // input 1 // pointers to the output vars eyeStatusIndex = registerOutput(_eyeStatusVar); // TODO -- should we post an update to this variable immediately? eyeStatus = M_EYE_STATUS_UNKNOWN; shared_ptr <Clock> clock = Clock::instance(); eyeStatusTimeUS = clock->getCurrentTimeUS(); // get current time // setup boxcar filters -- could use another filter down the road int filterWidthSamples = _filterWidthSamples; if (_filterWidthSamples<1) { filterWidthSamples = 1; mwarning(M_SYSTEM_MESSAGE_DOMAIN, "Tried to create eye status monitor boxcar filters with width <1, setting to 1 (no filtering)"); } filterH = new BoxcarFilter1D(filterWidthSamples); filterV = new BoxcarFilter1D(filterWidthSamples); int buffer_size = M_ASSUMED_EYE_SAMPLES_PER_MS * M_MAX_EYE_BUFFER_SIZE_MS; pairedEyeData = new PairedEyeData(buffer_size); // object to pair eye data }
SegmentFeaturesExtractor::SegmentFeaturesExtractor() : _geometryFeatureExtractor(boost::make_shared<GeometryFeatureExtractor>()), _histogramFeatureExtractor(boost::make_shared<HistogramFeatureExtractor>(10)), _typeFeatureExtractor(boost::make_shared<TypeFeatureExtractor>()), _featuresAssembler(boost::make_shared<FeaturesAssembler>()) { registerInput(_segments, "segments"); registerInput(_rawSections, "raw sections"); registerInput(_cropOffset, "crop offset"); registerOutput(_featuresAssembler->getOutput("all features"), "all features"); _segments.registerBackwardCallback(&SegmentFeaturesExtractor::onInputSet, this); _rawSections.registerBackwardCallback(&SegmentFeaturesExtractor::onInputSet, this); _cropOffset.registerBackwardCallback(&SegmentFeaturesExtractor::onOffsetSet, this); _featuresAssembler->addInput(_geometryFeatureExtractor->getOutput()); _featuresAssembler->addInput(_histogramFeatureExtractor->getOutput()); _featuresAssembler->addInput(_typeFeatureExtractor->getOutput()); }
ProblemsReader::ProblemsReader(const std::string& stream) : _problems(new Problems()), _streamName(stream), _stream(0), _fb(0) { if (readStdIn()) { _stream = new std::istream(std::cin.rdbuf()); } else { _fb = new std::filebuf; _fb->open(stream.c_str(), std::ios::in); _stream = new std::istream(_fb); } registerOutput(_problems, "problems"); }
FormantManager::FormantManager(int num_formants) : ProcessorRouter(0, 0) { Bypass* audio_input = new Bypass(); Bypass* reset_input = new Bypass(); registerInput(audio_input->input(), kAudio); registerInput(reset_input->input(), kReset); addProcessor(audio_input); addProcessor(reset_input); Processor* audio_flow = audio_input; for (int i = 0; i < num_formants; ++i) { Filter* formant = new Filter(); formant->plug(audio_flow, Filter::kAudio); formant->plug(reset_input, Filter::kReset); formants_.push_back(formant); addProcessor(formant); audio_flow = formant; } registerOutput(audio_flow->output()); }
Processor::Processor(int num_inputs, int num_outputs) : sample_rate_(DEFAULT_SAMPLE_RATE), buffer_size_(DEFAULT_BUFFER_SIZE), control_rate_(false), inputs_(new std::vector<Input*>()), outputs_(new std::vector<Output*>()), router_(0) { for (int i = 0; i < num_inputs; ++i) { Input* input = new Input(); owned_inputs_.push_back(input); // All inputs start off with null input. input->source = &Processor::null_source_; registerInput(input); } for (int i = 0; i < num_outputs; ++i) { Output* output = new Output(); owned_outputs_.push_back(output); // All outputs are owned by this Processor. output->owner = this; registerOutput(output); } }
void ImageExtractor::onInputSet(const pipeline::InputSetBase&) { LOG_ALL(imageextractorlog) << "input image stack set" << std::endl; updateInputs(); _images.resize(_stack->size()); // for each image in the stack for (unsigned int i = 0; i < _stack->size(); i++) { LOG_ALL(imageextractorlog) << "(re)setting output " << i << std::endl; _images[i] = (*_stack)[i]; LOG_ALL(imageextractorlog) << "image is " << _images[i]->width() << "x" << _images[i]->height() << std::endl; LOG_ALL(imageextractorlog) << "registering output 'image " << i << "'" << std::endl; registerOutput(_images[i], "image " + boost::lexical_cast<std::string>(i)); } }
FormantManager::FormantManager(int num_formants) : ProcessorRouter(0, 0) { Bypass* audio_input = new Bypass(); cr::Bypass* reset_input = new cr::Bypass(); registerInput(audio_input->input(), kAudio); registerInput(reset_input->input(), kReset); addProcessor(audio_input); addProcessor(reset_input); VariableAdd* total = new VariableAdd(num_formants); for (int i = 0; i < num_formants; ++i) { BiquadFilter* formant = new BiquadFilter(); formant->plug(audio_input, BiquadFilter::kAudio); formant->plug(reset_input, BiquadFilter::kReset); formants_.push_back(formant); addProcessor(formant); total->plugNext(formant); } addProcessor(total); registerOutput(total->output()); }
Sopnet::Sopnet(const std::string& projectDirectory) : _projectDirectory(projectDirectory), _membraneExtractor(boost::make_shared<ImageExtractor>()), _problemAssembler(boost::make_shared<ProblemAssembler>()), _segmentFeaturesExtractor(boost::make_shared<SegmentFeaturesExtractor>()), _randomForestReader(boost::make_shared<RandomForestHdf5Reader>(optionRandomForestFile.as<std::string>())), _randomForestCostFunction(boost::make_shared<RandomForestCostFunction>()), _segmentationCostFunction(boost::make_shared<SegmentationCostFunction>()), _priorCostFunction(boost::make_shared<PriorCostFunction>()), _objectiveGenerator(boost::make_shared<ObjectiveGenerator>()), _linearSolver(boost::make_shared<LinearSolver>()), _reconstructor(boost::make_shared<Reconstructor>()), _groundTruthExtractor(boost::make_shared<GroundTruthExtractor>()), _segmentRfTrainer(boost::make_shared<RandomForestTrainer>()) { // tell the outside world what we need registerInput(_rawSections, "raw sections"); registerInput(_membranes, "membranes"); registerInput(_groundTruth, "ground truth"); registerInput(_segmentationCostFunctionParameters, "segmentation cost parameters"); registerInput(_priorCostFunctionParameters, "prior cost parameters"); registerInput(_forceExplanation, "force explanation"); _membranes.registerBackwardCallback(&Sopnet::onMembranesSet, this); _rawSections.registerBackwardCallback(&Sopnet::onRawSectionsSet, this); _groundTruth.registerBackwardCallback(&Sopnet::onGroundTruthSet, this); _segmentationCostFunctionParameters.registerBackwardCallback(&Sopnet::onParametersSet, this); _priorCostFunctionParameters.registerBackwardCallback(&Sopnet::onParametersSet, this); _forceExplanation.registerBackwardCallback(&Sopnet::onParametersSet, this); // tell the outside world what we've got registerOutput(_reconstructor->getOutput(), "solution"); registerOutput(_problemAssembler->getOutput("segments"), "segments"); registerOutput(_groundTruthExtractor->getOutput("ground truth segments"), "ground truth segments"); registerOutput(_segmentRfTrainer->getOutput("gold standard"), "gold standard"); registerOutput(_segmentRfTrainer->getOutput("negative samples"), "negative samples"); registerOutput(_segmentRfTrainer->getOutput("random forest"), "random forest"); }
void MooseTestApp::registerObjects(Factory & factory) { // Kernels 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(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); // Aux kernels registerAux(CoupledAux); registerAux(CoupledGradAux); registerAux(PolyConstantAux); registerAux(MMSConstantAux); registerAux(MultipleUpdateAux); registerAux(MultipleUpdateElemAux); registerAux(PeriodicDistanceAux); registerAux(MatPropUserObjectAux); registerAux(SumNodalValuesAux); registerAux(UniqueIDAux); registerAux(RandomAux); registerAux(PostprocessorAux); // DG kernels registerDGKernel(DGMatDiffusion); // Boundary Conditions registerBoundaryCondition(MTBC); registerBoundaryCondition(PolyCoupledDirichletBC); registerBoundaryCondition(MMSCoupledDirichletBC); registerBoundaryCondition(DirichletBCfuncXYZ0); registerBoundaryCondition(DirichletBCfuncXYZ1); registerBoundaryCondition(TEJumpBC); registerBoundaryCondition(OnOffDirichletBC); registerBoundaryCondition(OnOffNeumannBC); registerBoundaryCondition(ScalarVarBC); registerBoundaryCondition(BndTestDirichletBC); registerBoundaryCondition(MatTestNeumannBC); registerBoundaryCondition(DGMDDBC); registerBoundaryCondition(DGFunctionConvectionDirichletBC); registerBoundaryCondition(PenaltyDirichletBC); registerBoundaryCondition(FunctionPenaltyDirichletBC); registerBoundaryCondition(CoupledKernelGradBC); registerBoundaryCondition(DivergenceBC); // Initial conditions registerInitialCondition(TEIC); registerInitialCondition(MTICSum); registerInitialCondition(MTICMult); // Materials registerMaterial(MTMaterial); registerMaterial(Diff1Material); registerMaterial(Diff2Material); registerMaterial(StatefulMaterial); registerMaterial(SpatialStatefulMaterial); registerMaterial(ComputingInitialTest); registerMaterial(StatefulTest); registerMaterial(StatefulSpatialTest); registerMaterial(CoupledMaterial); registerMaterial(CoupledMaterial2); registerMaterial(LinearInterpolationMaterial); registerMaterial(VarCouplingMaterial); registerMaterial(VarCouplingMaterialEigen); registerMaterial(BadStatefulMaterial); registerMaterial(OutputTestMaterial); 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(StatefulPointSource); // meshes registerObject(StripeMesh); registerConstraint(EqualValueNodalConstraint); // UserObjects registerUserObject(MTUserObject); registerUserObject(RandomHitUserObject); registerUserObject(RandomHitSolutionModifier); registerUserObject(MaterialPropertyUserObject); registerUserObject(InsideUserObject); registerUserObject(RestartableTypes); registerUserObject(RestartableTypesChecker); registerUserObject(PointerStoreError); registerUserObject(PointerLoadError); registerUserObject(VerifyElementUniqueID); registerUserObject(VerifyNodalUniqueID); registerUserObject(RandomElementalUserObject); registerUserObject(TrackDiracFront); registerUserObject(BoundaryUserObject); registerUserObject(TestBoundaryRestrictableAssert); registerPostprocessor(InsideValuePPS); registerPostprocessor(TestCopyInitialSolution); registerPostprocessor(BoundaryValuePPS); registerPostprocessor(NumInternalSides); registerPostprocessor(ElementL2Diff); registerMarker(RandomHitMarker); registerExecutioner(ExceptionSteady); registerExecutioner(SteadyTransientExecutioner); registerExecutioner(AdaptAndModify); registerProblem(MooseTestProblem); registerProblem(FailingProblem); // Outputs registerOutput(OutputObjectTest); }
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); }
void ConsoleDock::onObjectAdded(QObject *object) { if (LoggingInterface *output = qobject_cast<LoggingInterface*>(object)) registerOutput(output); }
GroundTruthExtractor::SegmentsAssembler::SegmentsAssembler() { registerInputs(_segments, "segments"); registerOutput(_allSegments, "ground truth segments"); }
void HelmEngine::init() { static const Value* minutes_per_second = new Value(1.0 / 60.0); #ifdef FE_DFL_DISABLE_SSE_DENORMS_ENV fesetenv(FE_DFL_DISABLE_SSE_DENORMS_ENV); #endif Processor* beats_per_minute = createMonoModControl("beats_per_minute", false); Multiply* beats_per_second = new Multiply(); beats_per_second->plug(beats_per_minute, 0); beats_per_second->plug(minutes_per_second, 1); addProcessor(beats_per_second); // Voice Handler. Processor* polyphony = createMonoModControl("polyphony", true); voice_handler_ = new HelmVoiceHandler(beats_per_second); addSubmodule(voice_handler_); voice_handler_->setPolyphony(32); voice_handler_->plug(polyphony, VoiceHandler::kPolyphony); // Monophonic LFO 1. Processor* lfo_1_waveform = createMonoModControl("mono_lfo_1_waveform", true); Processor* lfo_1_free_frequency = createMonoModControl("mono_lfo_1_frequency", true, false); Processor* lfo_1_free_amplitude = createMonoModControl("mono_lfo_1_amplitude", true); Processor* lfo_1_frequency = createTempoSyncSwitch("mono_lfo_1", lfo_1_free_frequency, beats_per_second, false); lfo_1_ = new HelmLfo(); lfo_1_->plug(lfo_1_waveform, HelmLfo::kWaveform); lfo_1_->plug(lfo_1_frequency, HelmLfo::kFrequency); Multiply* scaled_lfo_1 = new Multiply(); scaled_lfo_1->setControlRate(); scaled_lfo_1->plug(lfo_1_, 0); scaled_lfo_1->plug(lfo_1_free_amplitude, 1); addProcessor(lfo_1_); addProcessor(scaled_lfo_1); mod_sources_["mono_lfo_1"] = scaled_lfo_1->output(); mod_sources_["mono_lfo_1_phase"] = lfo_1_->output(Oscillator::kPhase); // Monophonic LFO 2. Processor* lfo_2_waveform = createMonoModControl("mono_lfo_2_waveform", true); Processor* lfo_2_free_frequency = createMonoModControl("mono_lfo_2_frequency", true, false); Processor* lfo_2_free_amplitude = createMonoModControl("mono_lfo_2_amplitude", true); Processor* lfo_2_frequency = createTempoSyncSwitch("mono_lfo_2", lfo_2_free_frequency, beats_per_second, false); lfo_2_ = new HelmLfo(); lfo_2_->plug(lfo_2_waveform, HelmLfo::kWaveform); lfo_2_->plug(lfo_2_frequency, HelmLfo::kFrequency); Multiply* scaled_lfo_2 = new Multiply(); scaled_lfo_2->setControlRate(); scaled_lfo_2->plug(lfo_2_, 0); scaled_lfo_2->plug(lfo_2_free_amplitude, 1); addProcessor(lfo_2_); addProcessor(scaled_lfo_2); mod_sources_["mono_lfo_2"] = scaled_lfo_2->output(); mod_sources_["mono_lfo_2_phase"] = lfo_2_->output(Oscillator::kPhase); // Step Sequencer. Processor* num_steps = createMonoModControl("num_steps", true); Processor* step_smoothing = createMonoModControl("step_smoothing", true); Processor* step_free_frequency = createMonoModControl("step_frequency", false, false); Processor* step_frequency = createTempoSyncSwitch("step_sequencer", step_free_frequency, beats_per_second, false); step_sequencer_ = new StepGenerator(MAX_STEPS); step_sequencer_->plug(num_steps, StepGenerator::kNumSteps); step_sequencer_->plug(step_frequency, StepGenerator::kFrequency); for (int i = 0; i < MAX_STEPS; ++i) { std::stringstream stream; stream << i; std::string num = stream.str(); if (num.length() == 1) num = "0" + num; Processor* step = createBaseControl(std::string("step_seq_") + num); step_sequencer_->plug(step, StepGenerator::kSteps + i); } SmoothFilter* smoothed_step_sequencer = new SmoothFilter(); smoothed_step_sequencer->plug(step_sequencer_, SmoothFilter::kTarget); smoothed_step_sequencer->plug(step_smoothing, SmoothFilter::kHalfLife); addProcessor(step_sequencer_); addProcessor(smoothed_step_sequencer); mod_sources_["step_sequencer"] = smoothed_step_sequencer->output(); mod_sources_["step_sequencer_step"] = step_sequencer_->output(StepGenerator::kStep); // Arpeggiator. Processor* arp_free_frequency = createMonoModControl("arp_frequency", true, false); Processor* arp_frequency = createTempoSyncSwitch("arp", arp_free_frequency, beats_per_second, false); Processor* arp_octaves = createMonoModControl("arp_octaves", true); Processor* arp_pattern = createMonoModControl("arp_pattern", true); Processor* arp_gate = createMonoModControl("arp_gate", true); arp_on_ = createBaseControl("arp_on"); arpeggiator_ = new Arpeggiator(voice_handler_); arpeggiator_->plug(arp_frequency, Arpeggiator::kFrequency); arpeggiator_->plug(arp_octaves, Arpeggiator::kOctaves); arpeggiator_->plug(arp_pattern, Arpeggiator::kPattern); arpeggiator_->plug(arp_gate, Arpeggiator::kGate); addProcessor(arpeggiator_); addProcessor(voice_handler_); // Delay effect. Processor* delay_free_frequency = createMonoModControl("delay_frequency", false, false); Processor* delay_frequency = createTempoSyncSwitch("delay", delay_free_frequency, beats_per_second, false); Processor* delay_feedback = createMonoModControl("delay_feedback", false, true); Processor* delay_wet = createMonoModControl("delay_dry_wet", false, true); Value* delay_on = createBaseControl("delay_on"); Clamp* delay_feedback_clamped = new Clamp(-1, 1); delay_feedback_clamped->plug(delay_feedback); SmoothFilter* delay_frequency_smoothed = new SmoothFilter(); delay_frequency_smoothed->plug(delay_frequency, SmoothFilter::kTarget); delay_frequency_smoothed->plug(&utils::value_half, SmoothFilter::kHalfLife); FrequencyToSamples* delay_samples = new FrequencyToSamples(); delay_samples->plug(delay_frequency_smoothed); Delay* delay = new Delay(MAX_DELAY_SAMPLES); delay->plug(voice_handler_, Delay::kAudio); delay->plug(delay_samples, Delay::kSampleDelay); delay->plug(delay_feedback_clamped, Delay::kFeedback); delay->plug(delay_wet, Delay::kWet); BypassRouter* delay_container = new BypassRouter(); delay_container->plug(delay_on, BypassRouter::kOn); delay_container->plug(voice_handler_, BypassRouter::kAudio); delay_container->addProcessor(delay_feedback_clamped); delay_container->addProcessor(delay_frequency_smoothed); delay_container->addProcessor(delay_samples); delay_container->addProcessor(delay); delay_container->registerOutput(delay->output()); addProcessor(delay_container); // Reverb Effect. Processor* reverb_feedback = createMonoModControl("reverb_feedback", false, true); Processor* reverb_damping = createMonoModControl("reverb_damping", false, true); Processor* reverb_wet = createMonoModControl("reverb_dry_wet", false, true); Value* reverb_on = createBaseControl("reverb_on"); Clamp* reverb_feedback_clamped = new Clamp(-1, 1); reverb_feedback_clamped->plug(reverb_feedback); Reverb* reverb = new Reverb(); reverb->plug(delay, Reverb::kAudio); reverb->plug(reverb_feedback_clamped, Reverb::kFeedback); reverb->plug(reverb_damping, Reverb::kDamping); reverb->plug(reverb_wet, Reverb::kWet); BypassRouter* reverb_container = new BypassRouter(); reverb_container->plug(reverb_on, BypassRouter::kOn); reverb_container->plug(delay, BypassRouter::kAudio); reverb_container->addProcessor(reverb); reverb_container->addProcessor(reverb_feedback_clamped); reverb_container->registerOutput(reverb->output(0)); reverb_container->registerOutput(reverb->output(1)); addProcessor(reverb_container); // Soft Clipping. Distortion* distorted_clamp_left = new Distortion(); Value* distortion_type = new Value(Distortion::kTanh); Value* distortion_threshold = new Value(0.9); distorted_clamp_left->plug(reverb_container->output(0), Distortion::kAudio); distorted_clamp_left->plug(distortion_type, Distortion::kType); distorted_clamp_left->plug(distortion_threshold, Distortion::kThreshold); Distortion* distorted_clamp_right = new Distortion(); distorted_clamp_right->plug(reverb_container->output(1), Distortion::kAudio); distorted_clamp_right->plug(distortion_type, Distortion::kType); distorted_clamp_right->plug(distortion_threshold, Distortion::kThreshold); // Volume. Processor* volume = createMonoModControl("volume", false, true); Multiply* scaled_audio_left = new Multiply(); scaled_audio_left->plug(distorted_clamp_left, 0); scaled_audio_left->plug(volume, 1); Multiply* scaled_audio_right = new Multiply(); scaled_audio_right->plug(distorted_clamp_right, 0); scaled_audio_right->plug(volume, 1); addProcessor(distorted_clamp_left); addProcessor(distorted_clamp_right); addProcessor(scaled_audio_left); addProcessor(scaled_audio_right); registerOutput(scaled_audio_left->output()); registerOutput(scaled_audio_right->output()); HelmModule::init(); }
FeaturesReader::FeaturesReader(std::string filename) : _filename(filename) { registerOutput(_features, "features"); }
HelmVoiceHandler::HelmVoiceHandler(Processor* beats_per_second) : ProcessorRouter(VoiceHandler::kNumInputs, 0), VoiceHandler(MAX_POLYPHONY), beats_per_second_(beats_per_second) { output_ = new Multiply(); registerOutput(output_->output()); }
HammingCostFunction::HammingCostFunction() : _costFunction(new costs_function_type(boost::bind(&HammingCostFunction::costs, this, _1, _2, _3, _4))) { registerInput(_goldStandard, "gold standard"); registerOutput(_costFunction, "cost function"); }
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); }
MeshView::MeshView() { registerInput(_meshes, "meshes"); registerOutput(_painter, "painter"); }
SegmentFeaturesExtractor::FeaturesAssembler::FeaturesAssembler() { registerInputs(_features, "features"); registerOutput(_allFeatures, "all features"); }
BundleCollector::BundleCollector() { registerOutput(_constraints, "linear constraints"); _constraints.registerForwardSlot(_constraintAdded); }
TypeFeatureExtractor::TypeFeatureExtractor() : _features(new Features()) { registerInput(_segments, "segments"); registerOutput(_features, "features"); }
ProblemsSolver::ProblemsSolver() : _solutions(new Solutions()) { registerInput(_problems, "problems"); registerOutput(_solutions, "solutions"); }
ProblemsSolver::SolutionsAssembler::SolutionsAssembler() { registerInputs(_singleSolutions, "solutions"); registerOutput(_solutions, "solutions"); }
MulNode::MulNode(){ inVar1 = registerInput(in1); inVar2 = registerInput(in2); outVar = registerOutput(outBuffer); output = makeConstSignal(outBuffer); }
ImageReader::ImageReader(std::string filename) : _filename(filename) { // let others know about our output registerOutput(_image, "image"); }
Sine() : Node(ExecutionMode::Consumer) { registerInput ("Enabled", "Boolean", type::Boolean(true)); registerInput ("Input", "Double", type::Double(0.0)); registerOutput ("Output", "Double", type::Double(0.0)); }
FeaturesReader::FeaturesReader(std::string filename, bool normalize) : _filename(filename), _normalize(normalize) { registerOutput(_features, "features"); }
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; }
FileContentProvider::FileContentProvider(std::string filename) : _filepath(filename) { registerOutput(_content, "content"); startInotifyThread(); }