https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PointInUnionCheckUO.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
14
15#include <vector>
16
33{
34public:
37
38 virtual void initialize() override {}
39 virtual void execute() override {}
40 virtual void finalize() override {}
41
42 // Answers queries on demand and stores no results, so there is nothing to
43 // combine across threads.
44 virtual void threadJoin(const UserObject &) override {}
45
46 virtual SurfaceGeometry::SurfaceSide sideness(const Point & p) const override;
47
49 virtual Real spatialValue(const Point & p) const override { return contains(p) ? 1.0 : 0.0; }
50
51protected:
53 std::vector<const PointInSurfaceCheckInterface *> _providers;
54};
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Mixin interface implemented by user objects that can classify a query point against a closed surface ...
bool contains(const libMesh::Point &p) const
Whether the point is inside or on the surface(s). ON maps to true.
Classifies a point against the union of several geometries, each supplied by a user object implementi...
std::vector< const PointInSurfaceCheckInterface * > _providers
The geometries whose union is tested (non-owning; owned by the warehouse).
virtual void threadJoin(const UserObject &) override
This method is not used and should not be used in a custom GeneralUserObject.
virtual SurfaceGeometry::SurfaceSide sideness(const Point &p) const override
virtual void finalize() override
Finalize.
virtual Real spatialValue(const Point &p) const override
1 for INSIDE/ON, 0 for OUTSIDE – usable directly by SpatialUserObjectAux.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void execute() override
Execute method.
static InputParameters validParams()
An instance of this object type has one copy per thread that runs on each thread.
Base class for user-specific data.
Definition UserObject.h:20
SurfaceSide
The side of a closed surface where a query point is located.
Definition SurfaceSide.h:21