#include <PenetrationLocator.h>
Public Types | |
enum | NORMAL_SMOOTHING_METHOD { NSM_EDGE_BASED, NSM_NODAL_NORMAL_BASED } |
Public Member Functions | |
PenetrationLocator (SubProblem &subproblem, GeometricSearchData &geom_search_data, MooseMesh &mesh, const unsigned int primary_id, const unsigned int secondary_id, Order order, NearestNodeLocator &nearest_node) | |
~PenetrationLocator () | |
void | detectPenetration () |
void | reinit () |
Completely redo the search from scratch. More... | |
Real | penetrationDistance (dof_id_type node_id) |
RealVectorValue | penetrationNormal (dof_id_type node_id) |
Real | normDistance (const Elem &elem, const Elem &side, const Node &p0, Point &closest_point, RealVectorValue &normal) |
int | intersect2D_Segments (Point S1P0, Point S1P1, Point S2P0, Point S2P1, Point *I0, Point *I1) |
int | inSegment (Point P, Point SP0, Point SP1) |
void | setCheckWhetherReasonable (bool state) |
void | setUpdate (bool update) |
void | setTangentialTolerance (Real tangential_tolerance) |
void | setNormalSmoothingDistance (Real normal_smoothing_distance) |
void | setNormalSmoothingMethod (std::string nsmString) |
Real | getTangentialTolerance () |
PerfGraph & | perfGraph () |
Get the PerfGraph. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
Public Attributes | |
SubProblem & | _subproblem |
MooseMesh & | _mesh |
BoundaryID | _primary_boundary |
BoundaryID | _secondary_boundary |
libMesh::FEType | _fe_type |
std::vector< std::vector< libMesh::FEBase * > > | _fe |
NearestNodeLocator & | _nearest_node |
std::map< dof_id_type, PenetrationInfo * > & | _penetration_info |
Data structure of nodes and their associated penetration information. More... | |
std::set< dof_id_type > & | _has_penetrated |
Protected Member Functions | |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level) const |
Call to register a named section for timing. More... | |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const |
Call to register a named section for timing. More... | |
std::string | timedSectionName (const std::string §ion_name) const |
Protected Attributes | |
bool | _check_whether_reasonable |
Check whether found candidates are reasonable. More... | |
bool & | _update_location |
Real | _tangential_tolerance |
bool | _do_normal_smoothing |
Real | _normal_smoothing_distance |
NORMAL_SMOOTHING_METHOD | _normal_smoothing_method |
const Moose::PatchUpdateType | _patch_update_strategy |
MooseApp & | _pg_moose_app |
The MooseApp that owns the PerfGraph. More... | |
const std::string | _prefix |
A prefix to use for all sections. More... | |
Private Member Functions | |
template<typename T , typename... Args> | |
T & | declareRestartableData (const std::string &data_name, Args &&... args) |
Declare a piece of data as "restartable" and initialize it. More... | |
template<typename T , typename... Args> | |
ManagedValue< T > | declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
Declares a piece of "managed" restartable data and initialize it. More... | |
template<typename T , typename... Args> | |
const T & | getRestartableData (const std::string &data_name) const |
Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object. More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args) |
Declare a piece of data as "restartable" and initialize it. More... | |
template<typename T , typename... Args> | |
T & | declareRecoverableData (const std::string &data_name, Args &&... args) |
Declare a piece of data as "recoverable" and initialize it. More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args) |
Declare a piece of data as "restartable". More... | |
template<typename T , typename... Args> | |
T & | declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args) |
Declare a piece of data as "restartable". More... | |
std::string | restartableName (const std::string &data_name) const |
Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix. More... | |
Private Attributes | |
MooseApp & | _restartable_app |
Reference to the application. More... | |
const std::string | _restartable_system_name |
The system name this object is in. More... | |
const THREAD_ID | _restartable_tid |
The thread ID for this object. More... | |
const bool | _restartable_read_only |
Flag for toggling read only status (see ReporterData) More... | |
Definition at line 28 of file PenetrationLocator.h.
PenetrationLocator::PenetrationLocator | ( | SubProblem & | subproblem, |
GeometricSearchData & | geom_search_data, | ||
MooseMesh & | mesh, | ||
const unsigned int | primary_id, | ||
const unsigned int | secondary_id, | ||
Order | order, | ||
NearestNodeLocator & | nearest_node | ||
) |
Definition at line 24 of file PenetrationLocator.C.
PenetrationLocator::~PenetrationLocator | ( | ) |
Definition at line 91 of file PenetrationLocator.C.
|
protectedinherited |
Declares a piece of "managed" restartable data and initialize it.
Here, "managed" restartable data means that the caller can destruct this data upon destruction of the return value of this method. Therefore, this ManagedValue<T> wrapper should survive after the final calls to dataStore() for it. That is... at the very end.
This is needed for objects whose destruction ordering is important, and enables natural c++ destruction in reverse construction order of the object that declares it.
See delcareRestartableData and declareRestartableDataWithContext for more information.
Definition at line 276 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "recoverable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
Note - this data will NOT be restored on Restart!
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
args | Arguments to forward to the constructor of the data |
Definition at line 351 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
args | Arguments to forward to the constructor of the data |
Definition at line 269 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it.
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
context | Context pointer that will be passed to the load and store functions |
args | Arguments to forward to the constructor of the data |
Definition at line 294 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable".
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
object_name | A supplied name for the object that is declaring this data. |
args | Arguments to forward to the constructor of the data |
Definition at line 323 of file Restartable.h.
|
protectedinherited |
Declare a piece of data as "restartable".
This means that in the event of a restart this piece of data will be restored back to its previous value.
NOTE: This returns a reference! Make sure you store it in a reference!
data_name | The name of the data (usually just use the same name as the member variable) |
object_name | A supplied name for the object that is declaring this data. |
context | Context pointer that will be passed to the load and store functions |
args | Arguments to forward to the constructor of the data |
Definition at line 333 of file Restartable.h.
void PenetrationLocator::detectPenetration | ( | ) |
Definition at line 102 of file PenetrationLocator.C.
Referenced by reinit(), and GeometricSearchData::update().
|
protectedinherited |
Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData
but returns a const reference to the object.
Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.
NOTE: This returns a const reference! Make sure you store it in a const reference!
data_name | The name of the data (usually just use the same name as the member variable) |
Definition at line 287 of file Restartable.h.
|
inline |
Definition at line 89 of file PenetrationLocator.h.
int PenetrationLocator::inSegment | ( | Point | P, |
Point | SP0, | ||
Point | SP1 | ||
) |
int PenetrationLocator::intersect2D_Segments | ( | Point | S1P0, |
Point | S1P1, | ||
Point | S2P0, | ||
Point | S2P1, | ||
Point * | I0, | ||
Point * | I1 | ||
) |
Real PenetrationLocator::normDistance | ( | const Elem & | elem, |
const Elem & | side, | ||
const Node & | p0, | ||
Point & | closest_point, | ||
RealVectorValue & | normal | ||
) |
Real PenetrationLocator::penetrationDistance | ( | dof_id_type | node_id | ) |
Definition at line 185 of file PenetrationLocator.C.
RealVectorValue PenetrationLocator::penetrationNormal | ( | dof_id_type | node_id | ) |
Definition at line 196 of file PenetrationLocator.C.
|
inherited |
Get the PerfGraph.
Definition at line 78 of file PerfGraphInterface.C.
Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), and PerfGraphOutput::output().
|
protectedinherited |
Call to register a named section for timing.
section_name | The name of the code section to be timed |
level | The importance of the timer - lower is more important (0 will always come out) |
Definition at line 53 of file PerfGraphInterface.C.
|
protectedinherited |
Call to register a named section for timing.
section_name | The name of the code section to be timed |
level | The importance of the timer - lower is more important (0 will always come out) |
live_message | The message to be printed to the screen during execution |
print_dots | Whether or not progress dots should be printed for this section |
Definition at line 64 of file PerfGraphInterface.C.
void PenetrationLocator::reinit | ( | ) |
Completely redo the search from scratch.
This is probably getting called because of mesh adaptivity.
Definition at line 168 of file PenetrationLocator.C.
Referenced by GeometricSearchData::reinit().
|
protectedinherited |
Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.
This should only be used in this interface and in testing.
Definition at line 66 of file Restartable.C.
Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().
void PenetrationLocator::setCheckWhetherReasonable | ( | bool | state | ) |
Definition at line 208 of file PenetrationLocator.C.
Definition at line 226 of file PenetrationLocator.C.
Referenced by GapValueAux::GapValueAux(), NodeFaceConstraint::NodeFaceConstraint(), and PenetrationAux::PenetrationAux().
void PenetrationLocator::setNormalSmoothingMethod | ( | std::string | nsmString | ) |
Definition at line 234 of file PenetrationLocator.C.
Referenced by GapValueAux::GapValueAux(), NodeFaceConstraint::NodeFaceConstraint(), and PenetrationAux::PenetrationAux().
Definition at line 220 of file PenetrationLocator.C.
Referenced by GapValueAux::GapValueAux(), NodeFaceConstraint::NodeFaceConstraint(), and PenetrationAux::PenetrationAux().
void PenetrationLocator::setUpdate | ( | bool | update | ) |
Definition at line 214 of file PenetrationLocator.C.
|
protectedinherited |
section_name
.Optionally adds a prefix if one is defined.
Definition at line 47 of file PerfGraphInterface.C.
Referenced by PerfGraphInterface::registerTimedSection().
|
staticinherited |
Definition at line 16 of file PerfGraphInterface.C.
Referenced by Convergence::validParams().
|
protected |
Check whether found candidates are reasonable.
Definition at line 93 of file PenetrationLocator.h.
Referenced by detectPenetration(), and setCheckWhetherReasonable().
|
protected |
Definition at line 97 of file PenetrationLocator.h.
Referenced by detectPenetration(), setNormalSmoothingDistance(), and setNormalSmoothingMethod().
std::vector<std::vector<libMesh::FEBase *> > PenetrationLocator::_fe |
Definition at line 74 of file PenetrationLocator.h.
Referenced by detectPenetration(), PenetrationLocator(), and ~PenetrationLocator().
libMesh::FEType PenetrationLocator::_fe_type |
Definition at line 71 of file PenetrationLocator.h.
Referenced by detectPenetration(), and PenetrationLocator().
std::set<dof_id_type>& PenetrationLocator::_has_penetrated |
Definition at line 82 of file PenetrationLocator.h.
Referenced by reinit().
MooseMesh& PenetrationLocator::_mesh |
Definition at line 67 of file PenetrationLocator.h.
Referenced by detectPenetration(), and PenetrationLocator().
NearestNodeLocator& PenetrationLocator::_nearest_node |
Definition at line 76 of file PenetrationLocator.h.
Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), detectPenetration(), NonlinearSystemBase::overwriteNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().
|
protected |
Definition at line 98 of file PenetrationLocator.h.
Referenced by detectPenetration(), and setNormalSmoothingDistance().
|
protected |
Definition at line 100 of file PenetrationLocator.h.
Referenced by detectPenetration(), PenetrationLocator(), and setNormalSmoothingMethod().
|
protected |
Definition at line 102 of file PenetrationLocator.h.
Referenced by detectPenetration().
std::map<dof_id_type, PenetrationInfo *>& PenetrationLocator::_penetration_info |
Data structure of nodes and their associated penetration information.
Definition at line 79 of file PenetrationLocator.h.
Referenced by GapValueAux::computeValue(), PenetrationAux::computeValue(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), detectPenetration(), NonlinearSystemBase::overwriteNodeFace(), penetrationDistance(), penetrationNormal(), reinit(), NonlinearSystemBase::setConstraintSecondaryValues(), and ~PenetrationLocator().
|
protectedinherited |
The MooseApp that owns the PerfGraph.
Definition at line 124 of file PerfGraphInterface.h.
Referenced by PerfGraphInterface::perfGraph().
|
protectedinherited |
A prefix to use for all sections.
Definition at line 127 of file PerfGraphInterface.h.
Referenced by PerfGraphInterface::timedSectionName().
BoundaryID PenetrationLocator::_primary_boundary |
Definition at line 68 of file PenetrationLocator.h.
Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), detectPenetration(), NonlinearSystemBase::overwriteNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().
|
protectedinherited |
Reference to the application.
Definition at line 227 of file Restartable.h.
Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().
|
protectedinherited |
Flag for toggling read only status (see ReporterData)
Definition at line 236 of file Restartable.h.
Referenced by Restartable::registerRestartableDataOnApp().
|
protectedinherited |
The system name this object is in.
Definition at line 230 of file Restartable.h.
Referenced by Restartable::restartableName().
|
protectedinherited |
The thread ID for this object.
Definition at line 233 of file Restartable.h.
Referenced by Restartable::declareRestartableDataHelper().
BoundaryID PenetrationLocator::_secondary_boundary |
Definition at line 69 of file PenetrationLocator.h.
Referenced by NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), detectPenetration(), NonlinearSystemBase::overwriteNodeFace(), and NonlinearSystemBase::setConstraintSecondaryValues().
SubProblem& PenetrationLocator::_subproblem |
Definition at line 56 of file PenetrationLocator.h.
Referenced by detectPenetration(), and PenetrationLocator().
|
protected |
Definition at line 95 of file PenetrationLocator.h.
Referenced by detectPenetration(), getTangentialTolerance(), and setTangentialTolerance().
|
protected |
Definition at line 94 of file PenetrationLocator.h.
Referenced by detectPenetration(), and setUpdate().