www.mooseframework.org
Namespaces | Classes | Enumerations | Functions | Variables
Moose Namespace Reference

Namespaces

 PetscSupport
 
 SlepcSupport
 

Classes

struct  indirect_comparator
 
class  ScopedCommSwapper
 

Enumerations

enum  MaterialDataType { BLOCK_MATERIAL_DATA, BOUNDARY_MATERIAL_DATA, FACE_MATERIAL_DATA, NEIGHBOR_MATERIAL_DATA }
 MaterialData types. More...
 
enum  AuxGroup { PRE_IC = 0, PRE_AUX = 1, POST_AUX = 2, ALL = 3 }
 Flag for AuxKernel related exeuction type. More...
 
enum  VarKindType { VAR_NONLINEAR, VAR_AUXILIARY }
 Framework-wide stuff. More...
 
enum  KernelType {
  KT_TIME = 0, KT_NONTIME = 1, KT_NONEIGEN = 2, KT_EIGEN = 3,
  KT_ALL
}
 
enum  CouplingType { COUPLING_DIAG, COUPLING_FULL, COUPLING_CUSTOM }
 
enum  ConstraintSideType { SIDE_MASTER, SIDE_SLAVE }
 
enum  DGResidualType { Element, Neighbor }
 
enum  DGJacobianType { ElementElement, ElementNeighbor, NeighborElement, NeighborNeighbor }
 
enum  ConstraintType { Slave = Element, Master = Neighbor }
 
enum  ConstraintJacobianType { SlaveSlave = ElementElement, SlaveMaster = ElementNeighbor, MasterSlave = NeighborElement, MasterMaster = NeighborNeighbor }
 
enum  CoordinateSystemType { COORD_XYZ, COORD_RZ, COORD_RSPHERICAL }
 
enum  PCSideType { PCS_LEFT, PCS_RIGHT, PCS_SYMMETRIC, PCS_DEFAULT }
 Preconditioning side. More...
 
enum  MooseKSPNormType {
  KSPN_NONE, KSPN_PRECONDITIONED, KSPN_UNPRECONDITIONED, KSPN_NATURAL,
  KSPN_DEFAULT
}
 Norm type for converge test. More...
 
enum  SolveType {
  ST_PJFNK, ST_JFNK, ST_NEWTON, ST_FD,
  ST_LINEAR
}
 Type of the solve. More...
 
enum  EigenSolveType {
  EST_POWER, EST_ARNOLDI, EST_KRYLOVSCHUR, EST_JACOBI_DAVIDSON,
  EST_NONLINEAR_POWER, EST_MF_NONLINEAR_POWER, EST_MONOLITH_NEWTON, EST_MF_MONOLITH_NEWTON
}
 Type of the eigen solve. More...
 
enum  EigenProblemType {
  EPT_HERMITIAN, EPT_NON_HERMITIAN, EPT_GEN_HERMITIAN, EPT_GEN_INDEFINITE,
  EPT_GEN_NON_HERMITIAN, EPT_POS_GEN_NON_HERMITIAN, EPT_SLEPC_DEFAULT
}
 Type of the eigen problem. More...
 
enum  WhichEigenPairs {
  WEP_LARGEST_MAGNITUDE, WEP_SMALLEST_MAGNITUDE, WEP_LARGEST_REAL, WEP_SMALLEST_REAL,
  WEP_LARGEST_IMAGINARY, WEP_SMALLEST_IMAGINARY, WEP_TARGET_MAGNITUDE, WEP_TARGET_REAL,
  WEP_TARGET_IMAGINARY, WEP_ALL_EIGENVALUES, WEP_SLEPC_DEFAULT
}
 Which eigen pairs. More...
 
enum  TimeIntegratorType {
  TI_IMPLICIT_EULER, TI_EXPLICIT_EULER, TI_CRANK_NICOLSON, TI_BDF2,
  TI_EXPLICIT_MIDPOINT, TI_LSTABLE_DIRK2, TI_EXPLICIT_TVD_RK_2
}
 Time integrators. More...
 
enum  ConstraintFormulationType { Penalty, Kinematic }
 Type of constraint formulation. More...
 
enum  LineSearchType {
  LS_INVALID, LS_DEFAULT, LS_NONE, LS_BASIC,
  LS_CUBIC, LS_QUADRATIC, LS_BASICNONORMS, LS_SHELL,
  LS_L2, LS_BT, LS_CP
}
 Type of the line search. More...
 
enum  MffdType { MFFD_INVALID, MFFD_WP, MFFD_DS }
 Type of the matrix-free finite-differencing parameter. More...
 

Functions

bool colorConsole ()
 Returns whether Console coloring is turned on (default: true). More...
 
bool setColorConsole (bool use_color, bool force=false)
 Turns color escape sequences on/off for info written to stdout. More...
 
void registerObjects (Factory &factory)
 Register objects that are in MOOSE. More...
 
void addActionTypes (Syntax &syntax)
 
void registerActions (Syntax &syntax, ActionFactory &action_factory)
 Multiple Action class can be associated with a single input file section, in which case all associated Actions will be created and "acted" on when the associated input file section is seen.b * Example: "setup_mesh" <-----——> SetupMeshAction <---—— \ [Mesh] / "setup_mesh_complete" <—> SetupMeshCompleteAction <-. More...
 
void setSolverDefaults (FEProblemBase &problem)
 
MPI_Comm swapLibMeshComm (MPI_Comm new_comm)
 Swap the libMesh MPI communicator out for ours. More...
 
void enableFPE (bool on=true)
 
void initial_condition (EquationSystems &es, const std::string &system_name)
 
void findContactPoint (PenetrationInfo &p_info, FEBase *fe_elem, FEBase *fe_side, FEType &fe_side_type, const Point &slave_point, bool start_with_centroid, const Real tangential_tolerance, bool &contact_point_on_side)
 Finds the closest point (called the contact point) on the master_elem on side "side" to the slave_point. More...
 
void restrictPointToFace (Point &p, const Elem *side, std::vector< const Node * > &off_edge_nodes)
 
void associateSyntax (Syntax &syntax, ActionFactory &action_factory)
 
template<typename T >
stringToEnum (const std::string &s)
 
template<>
ExecFlagType stringToEnum< ExecFlagType > (const std::string &s)
 
template<>
QuadratureType stringToEnum< QuadratureType > (const std::string &s)
 
template<>
Order stringToEnum< Order > (const std::string &s)
 
template<>
CoordinateSystemType stringToEnum< CoordinateSystemType > (const std::string &s)
 
template<>
SolveType stringToEnum< SolveType > (const std::string &s)
 
template<>
LineSearchType stringToEnum< LineSearchType > (const std::string &s)
 
template<>
TimeIntegratorType stringToEnum< TimeIntegratorType > (const std::string &s)
 
template<typename T >
std::vector< T > vectorStringsToEnum (const MultiMooseEnum &v)
 
template<>
std::vector< ExecFlagTypevectorStringsToEnum< ExecFlagType > (const MultiMooseEnum &v)
 
template<typename T >
std::string stringify (const T &t)
 conversion to string More...
 
std::string stringify (const SolveType &t)
 Convert solve type into human readable string. More...
 
std::string stringify (const ExecFlagType &t)
 Convert execute flags type into human readable string. More...
 
std::string stringify (const std::string &s)
 Add no-op stringify if the argument already is a string (must use overloading) More...
 
template<typename T , typename U >
std::string stringify (const std::pair< T, U > &p)
 Add pair stringify to support maps. More...
 
template<template< typename... > class T, typename... U>
std::string stringify (const T< U... > &c, const std::string &delim=",")
 Convert a container to a flat comma (or otherwise) separated string. More...
 
std::string stringifyExact (Real)
 Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips. More...
 
void elementsIntersectedByPlane (const Point &p0, const Point &normal, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
 Find all of the elements intersected by a plane. More...
 
void elementsIntersectedByPlane (const Point &p0, const Point &p1, const Point &p2, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
 Find all of the elements intersected by a plane. More...
 
std::string getExecutablePath ()
 This function returns the PATH of the running executable. More...
 
template<class RandomAccessIterator >
void initialize_indirect_sort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
 
template<class RandomAccessIterator >
void indirectSort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
 
template<class RandomAccessIterator , class UserComparisonFunctor >
void indirectSort (RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b, UserComparisonFunctor user_comp)
 
template<typename T >
void applyIndices (T &container, const std::vector< size_t > &indices)
 Uses indices created by the indirectSort function to sort the given container (which must support random access, resizing, and std::swap. More...
 
void elementsIntersectedByLine (const Point &p0, const Point &p1, const MeshBase &mesh, const PointLocatorBase &point_locator, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
 Find all of the elements intersected by a line. More...
 
void assemble_matrix (EquationSystems &es, const std::string &system_name)
 
void compute_jacobian (const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, NonlinearImplicitSystem &sys)
 
void compute_residual (const NumericVector< Number > &soln, NumericVector< Number > &residual, NonlinearImplicitSystem &sys)
 
void compute_bounds (NumericVector< Number > &lower, NumericVector< Number > &upper, NonlinearImplicitSystem &sys)
 
void compute_nullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_transpose_nullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_nearnullspace (std::vector< NumericVector< Number > * > &sp, NonlinearImplicitSystem &sys)
 
void compute_postcheck (const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln, NonlinearImplicitSystem &sys)
 
void initExecStoreType ()
 
void initQuadratureType ()
 
void initCoordinateSystemType ()
 
void initSolveType ()
 
void initEigenSolveType ()
 
void initEigenProlemType ()
 
void initWhichEigenPairs ()
 
void initLineSearchType ()
 
void initTimeIntegratorsType ()
 
void initMffdType ()
 
template<>
ExecFlagType stringToEnum (const std::string &s)
 
template<>
EigenSolveType stringToEnum< EigenSolveType > (const std::string &s)
 
template<>
EigenProblemType stringToEnum< EigenProblemType > (const std::string &s)
 
template<>
WhichEigenPairs stringToEnum< WhichEigenPairs > (const std::string &s)
 
template<>
MffdType stringToEnum< MffdType > (const std::string &s)
 
Point toPoint (const std::vector< Real > &pos)
 Convert point represented as std::vector into Point. More...
 
void findElementsIntersectedByPlane (const Plane &plane, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
 
const std::vector< ExecFlagTypepopulateExecTypes ()
 
int sideIntersectedByLine (const Elem *elem, std::vector< int > &not_side, const LineSegment &line_segment, Point &intersection_point)
 Figure out which (if any) side of an Elem is intersected by a line. More...
 
int sideNeighborIsOn (const Elem *elem, const Elem *neighbor)
 Returns the side number for elem that neighbor is on. More...
 
void recursivelyFindElementsIntersectedByLine (const LineSegment &line_segment, const Elem *current_elem, int incoming_side, const Point &incoming_point, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
 Recursively find all elements intersected by a line segment. More...
 

Variables

PerfLog perf_log
 Perflog to be used by applications. More...
 
bool _trap_fpe = true
 Variable indicating whether we will enable FPE trapping for this run. More...
 
bool _warnings_are_errors = false
 Variable to toggle any warning into an error (includes deprecated code warnings) More...
 
bool _deprecated_is_error = false
 Variable to toggle only deprecated warnings as errors. More...
 
bool _throw_on_error = false
 Variable to turn on exceptions during mooseError() and mooseWarning(), should only be used with MOOSE unit. More...
 
const SubdomainID ANY_BLOCK_ID = libMesh::Elem::invalid_subdomain_id - 1
 
const SubdomainID INVALID_BLOCK_ID = libMesh::Elem::invalid_subdomain_id
 
const BoundaryID ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1)
 
const BoundaryID INVALID_BOUNDARY_ID = libMesh::BoundaryInfo::invalid_id
 
const std::set< SubdomainIDEMPTY_BLOCK_IDS = {}
 
const std::set< BoundaryIDEMPTY_BOUNDARY_IDS = {}
 
const std::vector< ExecFlagTypeexec_types = populateExecTypes()
 A static list of all the exec types. More...
 
static bool registered = false
 
static bool _color_console = isatty(fileno(stdout))
 
std::map< std::string, ExecFlagTypeexecstore_type_to_enum
 
std::map< std::string, QuadratureType > quadrature_type_to_enum
 
std::map< std::string, CoordinateSystemTypecoordinate_system_type_to_enum
 
std::map< std::string, SolveTypesolve_type_to_enum
 
std::map< std::string, EigenSolveTypeeigen_solve_type_to_enum
 
std::map< std::string, EigenProblemTypeeigen_problem_type_to_enum
 
std::map< std::string, WhichEigenPairswhich_eigen_pairs_to_enum
 
std::map< std::string, LineSearchTypeline_search_type_to_enum
 
std::map< std::string, TimeIntegratorTypetime_integrator_to_enum
 
std::map< std::string, MffdTypemffd_type_to_enum
 

Enumeration Type Documentation

Flag for AuxKernel related exeuction type.

Enumerator
PRE_IC 
PRE_AUX 
POST_AUX 
ALL 

Definition at line 140 of file MooseTypes.h.

141 {
142  PRE_IC = 0,
143  PRE_AUX = 1,
144  POST_AUX = 2,
145  ALL = 3
146 };

Type of constraint formulation.

Enumerator
Penalty 
Kinematic 

Definition at line 318 of file MooseTypes.h.

319 {
320  Penalty,
321  Kinematic
322 };
Enumerator
SIDE_MASTER 
SIDE_SLAVE 

Definition at line 178 of file MooseTypes.h.

Enumerator
Slave 
Master 

Definition at line 198 of file MooseTypes.h.

Enumerator
COORD_XYZ 
COORD_RZ 
COORD_RSPHERICAL 

Definition at line 212 of file MooseTypes.h.

Enumerator
COUPLING_DIAG 
COUPLING_FULL 
COUPLING_CUSTOM 

Definition at line 171 of file MooseTypes.h.

Enumerator
ElementElement 
ElementNeighbor 
NeighborElement 
NeighborNeighbor 

Definition at line 190 of file MooseTypes.h.

Enumerator
Element 
Neighbor 

Definition at line 184 of file MooseTypes.h.

185 {
186  Element,
187  Neighbor
188 };

Type of the eigen problem.

Enumerator
EPT_HERMITIAN 

Hermitian.

EPT_NON_HERMITIAN 

Non-Hermitian.

EPT_GEN_HERMITIAN 

Generalized Hermitian.

EPT_GEN_INDEFINITE 

Generalized Hermitian indefinite.

EPT_GEN_NON_HERMITIAN 

Generalized Non-Hermitian.

EPT_POS_GEN_NON_HERMITIAN 

Generalized Non-Hermitian with positive (semi-)definite B.

EPT_SLEPC_DEFAULT 

use whatever SLPEC has by default

Definition at line 272 of file MooseTypes.h.

273 {
274  EPT_HERMITIAN,
281 };
Generalized Non-Hermitian.
Definition: MooseTypes.h:278
Generalized Hermitian indefinite.
Definition: MooseTypes.h:277
use whatever SLPEC has by default
Definition: MooseTypes.h:280
Generalized Non-Hermitian with positive (semi-)definite B.
Definition: MooseTypes.h:279
Non-Hermitian.
Definition: MooseTypes.h:275
Generalized Hermitian.
Definition: MooseTypes.h:276

Type of the eigen solve.

Enumerator
EST_POWER 

Power / Inverse / RQI.

EST_ARNOLDI 

Arnoldi.

EST_KRYLOVSCHUR 

Krylov-Schur.

EST_JACOBI_DAVIDSON 

Jacobi-Davidson.

EST_NONLINEAR_POWER 

Nonlinear inverse power.

EST_MF_NONLINEAR_POWER 

Matrix-free nonlinear inverse power.

EST_MONOLITH_NEWTON 

Newton-based eigen solver.

EST_MF_MONOLITH_NEWTON 

Matrix-free Newton-based eigen solver.

Definition at line 257 of file MooseTypes.h.

258 {
259  EST_POWER,
260  EST_ARNOLDI,
267 };
Newton-based eigen solver.
Definition: MooseTypes.h:265
Matrix-free Newton-based eigen solver.
Definition: MooseTypes.h:266
Matrix-free nonlinear inverse power.
Definition: MooseTypes.h:264
Power / Inverse / RQI.
Definition: MooseTypes.h:259
Krylov-Schur.
Definition: MooseTypes.h:261
Nonlinear inverse power.
Definition: MooseTypes.h:263
Jacobi-Davidson.
Definition: MooseTypes.h:262
Enumerator
KT_TIME 
KT_NONTIME 
KT_NONEIGEN 
KT_EIGEN 
KT_ALL 

Definition at line 162 of file MooseTypes.h.

163 {
164  KT_TIME = 0,
165  KT_NONTIME = 1,
166  KT_NONEIGEN = 2,
167  KT_EIGEN = 3,
168  KT_ALL
169 };

Type of the line search.

Enumerator
LS_INVALID 

means not set

LS_DEFAULT 
LS_NONE 
LS_BASIC 
LS_CUBIC 
LS_QUADRATIC 
LS_BASICNONORMS 
LS_SHELL 
LS_L2 
LS_BT 
LS_CP 

Definition at line 326 of file MooseTypes.h.

327 {
328  LS_INVALID,
329  LS_DEFAULT,
330  LS_NONE,
331  LS_BASIC,
332 #ifdef LIBMESH_HAVE_PETSC
333 #if PETSC_VERSION_LESS_THAN(3, 3, 0)
334  LS_CUBIC,
335  LS_QUADRATIC,
337 #else
338  LS_SHELL,
339  LS_L2,
340  LS_BT,
341  LS_CP
342 #endif
343 #endif
344 };
means not set
Definition: MooseTypes.h:328

MaterialData types.

See also
FEProblemBase, MaterialPropertyInterface
Enumerator
BLOCK_MATERIAL_DATA 
BOUNDARY_MATERIAL_DATA 
FACE_MATERIAL_DATA 
NEIGHBOR_MATERIAL_DATA 

Definition at line 129 of file MooseTypes.h.

Type of the matrix-free finite-differencing parameter.

Enumerator
MFFD_INVALID 

means not set

MFFD_WP 
MFFD_DS 

Definition at line 349 of file MooseTypes.h.

350 {
351  MFFD_INVALID,
352  MFFD_WP,
353  MFFD_DS
354 };
means not set
Definition: MooseTypes.h:351

Norm type for converge test.

Enumerator
KSPN_NONE 
KSPN_PRECONDITIONED 
KSPN_UNPRECONDITIONED 
KSPN_NATURAL 
KSPN_DEFAULT 

Use whatever we have in PETSc.

Definition at line 233 of file MooseTypes.h.

Preconditioning side.

Enumerator
PCS_LEFT 
PCS_RIGHT 
PCS_SYMMETRIC 
PCS_DEFAULT 

Use whatever we have in PETSc.

Definition at line 222 of file MooseTypes.h.

223 {
224  PCS_LEFT,
225  PCS_RIGHT,
227  PCS_DEFAULT
228 };
Use whatever we have in PETSc.
Definition: MooseTypes.h:227

Type of the solve.

Enumerator
ST_PJFNK 

Preconditioned Jacobian-Free Newton Krylov.

ST_JFNK 

Jacobian-Free Newton Krylov.

ST_NEWTON 

Full Newton Solve.

ST_FD 

Use finite differences to compute Jacobian.

ST_LINEAR 

Solving a linear problem.

Definition at line 245 of file MooseTypes.h.

246 {
247  ST_PJFNK,
248  ST_JFNK,
249  ST_NEWTON,
250  ST_FD,
251  ST_LINEAR
252 };
Full Newton Solve.
Definition: MooseTypes.h:249
Solving a linear problem.
Definition: MooseTypes.h:251
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:248
Use finite differences to compute Jacobian.
Definition: MooseTypes.h:250
Preconditioned Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:247

Time integrators.

Enumerator
TI_IMPLICIT_EULER 
TI_EXPLICIT_EULER 
TI_CRANK_NICOLSON 
TI_BDF2 
TI_EXPLICIT_MIDPOINT 
TI_LSTABLE_DIRK2 
TI_EXPLICIT_TVD_RK_2 

Definition at line 304 of file MooseTypes.h.

Framework-wide stuff.

Enumerator
VAR_NONLINEAR 
VAR_AUXILIARY 

Definition at line 156 of file MooseTypes.h.

Which eigen pairs.

Enumerator
WEP_LARGEST_MAGNITUDE 

largest magnitude

WEP_SMALLEST_MAGNITUDE 

smallest magnitude

WEP_LARGEST_REAL 

largest real

WEP_SMALLEST_REAL 

smallest real

WEP_LARGEST_IMAGINARY 

largest imaginary

WEP_SMALLEST_IMAGINARY 

smallest imaginary

WEP_TARGET_MAGNITUDE 

target magnitude

WEP_TARGET_REAL 

target real

WEP_TARGET_IMAGINARY 

target imaginary

WEP_ALL_EIGENVALUES 

all eigenvalues

WEP_SLEPC_DEFAULT 

use whatever we have in SLEPC

Definition at line 286 of file MooseTypes.h.

Function Documentation

void Moose::addActionTypes ( Syntax syntax)

The second param here indicates whether the task must be satisfied or not for a successful run. If set to true, then the ActionWarehouse will attempt to create "Action"s automatically if they have not been explicitly created by the parser or some other mechanism.

Note: Many of the actions in the "Minimal Problem" section are marked as false. However, we can generally force creation of these "Action"s as needed by registering them to syntax that we expect to see even if those "Action"s don't normally pick up parameters from the input file.

Additional Actions

The following is the default set of action dependencies for a basic MOOSE problem. The formatting of this string is important. Each line represents a set of dependencies that depend on the previous line. Items on the same line have equal weight and can be executed in any order.

Additional dependencies can be inserted later inside of user applications with calls to ActionWarehouse::addDependency("task", "pre_req")

The second param here indicates whether the task must be satisfied or not for a successful run. If set to true, then the ActionWarehouse will attempt to create "Action"s automatically if they have not been explicitly created by the parser or some other mechanism.

Note: Many of the actions in the "Minimal Problem" section are marked as false. However, we can generally force creation of these "Action"s as needed by registering them to syntax that we expect to see even if those "Action"s don't normally pick up parameters from the input file.

Additional Actions

The following is the default set of action dependencies for a basic MOOSE problem. The formatting of this string is important. Each line represents a set of dependencies that depend on the previous line. Items on the same line have equal weight and can be executed in any order.

Additional dependencies can be inserted later inside of user applications with calls to ActionWarehouse::addDependency("task", "pre_req")

Definition at line 890 of file Moose.C.

Referenced by associateSyntax().

891 {
905  // clang-format off
906  /**************************/
907  /**** Register Actions ****/
908  /**************************/
909  registerMooseObjectTask("create_problem", Problem, false);
910  registerMooseObjectTask("setup_executioner", Executioner, true);
911 
912  // This task does not construct an object, but it needs all of the parameters that
913  // would normally be used to construct an object.
914  registerMooseObjectTask("determine_system_type", Executioner, true);
915 
916  registerMooseObjectTask("setup_mesh", MooseMesh, false);
917  registerMooseObjectTask("init_mesh", MooseMesh, false);
918  registerMooseObjectTask("add_mesh_modifier", MeshModifier, false);
919 
920  registerMooseObjectTask("add_kernel", Kernel, false);
921  appendMooseObjectTask ("add_kernel", EigenKernel);
922 
923  registerMooseObjectTask("add_nodal_kernel", NodalKernel, false);
924 
925  registerMooseObjectTask("add_material", Material, false);
926  registerMooseObjectTask("add_bc", BoundaryCondition, false);
927  registerMooseObjectTask("add_function", Function, false);
928  registerMooseObjectTask("add_distribution", Distribution, false);
929  registerMooseObjectTask("add_sampler", Sampler, false);
930 
931  registerMooseObjectTask("add_aux_kernel", AuxKernel, false);
932  registerMooseObjectTask("add_elemental_field_variable", AuxKernel, false);
933 
934  registerMooseObjectTask("add_scalar_kernel", ScalarKernel, false);
935  registerMooseObjectTask("add_aux_scalar_kernel", AuxScalarKernel, false);
936  registerMooseObjectTask("add_dirac_kernel", DiracKernel, false);
937  registerMooseObjectTask("add_dg_kernel", DGKernel, false);
938  registerMooseObjectTask("add_interface_kernel", InterfaceKernel, false);
939  registerMooseObjectTask("add_constraint", Constraint, false);
940 
941  registerMooseObjectTask("add_ic", InitialCondition, false);
942  appendMooseObjectTask ("add_ic", ScalarInitialCondition);
943 
944  registerMooseObjectTask("add_damper", Damper, false);
945  registerMooseObjectTask("setup_predictor", Predictor, false);
946  registerMooseObjectTask("setup_time_stepper", TimeStepper, false);
947  registerMooseObjectTask("setup_time_integrator", TimeIntegrator, false);
948 
949  registerMooseObjectTask("add_preconditioning", MoosePreconditioner, false);
950  registerMooseObjectTask("add_field_split", Split, false);
951 
952  registerMooseObjectTask("add_user_object", UserObject, false);
953  appendMooseObjectTask ("add_user_object", Postprocessor);
954 
955  registerMooseObjectTask("add_postprocessor", Postprocessor, false);
956  registerMooseObjectTask("add_vector_postprocessor", VectorPostprocessor, false);
957 
958  registerMooseObjectTask("add_indicator", Indicator, false);
959  registerMooseObjectTask("add_marker", Marker, false);
960 
961  registerMooseObjectTask("add_multi_app", MultiApp, false);
962  registerMooseObjectTask("add_transfer", Transfer, false);
963 
964  registerMooseObjectTask("add_output", Output, false);
965 
966  registerMooseObjectTask("add_control", Control, false);
967  registerMooseObjectTask("add_partitioner", MoosePartitioner, false);
968 
969  // clang-format on
970 
971  registerTask("dynamic_object_registration", false);
972  registerTask("common_output", true);
973  registerTask("setup_recover_file_base", true);
974 
975  registerTask("add_bounds_vectors", false);
976  registerTask("add_periodic_bc", false);
977  registerTask("add_aux_variable", false);
978  registerTask("add_variable", false);
979 
980  registerTask("execute_mesh_modifiers", false);
981  registerTask("uniform_refine_mesh", false);
982  registerTask("prepare_mesh", false);
983  registerTask("setup_mesh_complete", false); // calls prepare
984 
985  registerTask("init_displaced_problem", false);
986 
987  registerTask("init_problem", true);
988  registerTask("check_copy_nodal_vars", true);
989  registerTask("copy_nodal_vars", true);
990  registerTask("copy_nodal_aux_vars", true);
991  registerTask("setup_postprocessor_data", false);
992 
993  registerTask("setup_dampers", true);
994  registerTask("check_integrity", true);
995  registerTask("setup_quadrature", true);
996 
998  registerTask("no_action", false); // Used for Empty Action placeholders
999  registerTask("set_global_params", false);
1000  registerTask("setup_adaptivity", false);
1001  registerTask("meta_action", false);
1002  registerTask("setup_debug", false);
1003  registerTask("setup_residual_debug", false);
1004  registerTask("setup_oversampling", false);
1005  registerTask("deprecated_block", false);
1006  registerTask("set_adaptivity_options", false);
1007  registerTask("add_mortar_interface", false);
1008 
1009  // Dummy Actions (useful for sync points in the dependencies)
1010  registerTask("setup_function_complete", false);
1011  registerTask("setup_variable_complete", false);
1012  registerTask("ready_to_init", true);
1013 
1014  // Output related actions
1015  registerTask("setup_material_output", true);
1016  registerTask("check_output", true);
1017 
1018  /**************************/
1019  /****** Dependencies ******/
1020  /**************************/
1031  syntax.addDependencySets("(meta_action)"
1032  "(dynamic_object_registration)"
1033  "(common_output)"
1034  "(set_global_params)"
1035  "(setup_recover_file_base)"
1036  "(check_copy_nodal_vars)"
1037  "(setup_mesh)"
1038  "(add_partitioner)"
1039  "(init_mesh)"
1040  "(prepare_mesh)"
1041  "(add_mesh_modifier)"
1042  "(execute_mesh_modifiers)"
1043  "(add_mortar_interface)"
1044  "(uniform_refine_mesh)"
1045  "(setup_mesh_complete)"
1046  "(determine_system_type)"
1047  "(create_problem)"
1048  "(setup_time_integrator)"
1049  "(setup_executioner)"
1050  "(setup_time_stepper)"
1051  "(setup_predictor)"
1052  "(setup_postprocessor_data)"
1053  "(init_displaced_problem)"
1054  "(add_aux_variable, add_variable, add_elemental_field_variable)"
1055  "(setup_variable_complete)"
1056  "(setup_quadrature)"
1057  "(add_function)"
1058  "(add_distribution)"
1059  "(add_sampler)"
1060  "(add_periodic_bc)"
1061  "(add_user_object)"
1062  "(setup_function_complete)"
1063  "(setup_adaptivity)"
1064  "(set_adaptivity_options)"
1065  "(add_ic)"
1066  "(add_constraint, add_field_split)"
1067  "(add_preconditioning)"
1068  "(ready_to_init)"
1069  "(setup_dampers)"
1070  "(setup_residual_debug)"
1071  "(add_bounds_vectors)"
1072  "(add_multi_app)"
1073  "(add_transfer)"
1074  "(copy_nodal_vars, copy_nodal_aux_vars)"
1075  "(add_material)"
1076  "(setup_material_output)"
1077  "(init_problem)"
1078  "(setup_debug)"
1079  "(add_output)"
1080  "(add_postprocessor)"
1081  "(add_vector_postprocessor)" // MaterialVectorPostprocessor requires this
1082  // to be after material objects are created.
1083  "(add_aux_kernel, add_bc, add_damper, add_dirac_kernel, add_kernel, "
1084  "add_nodal_kernel, add_dg_kernel, add_interface_kernel, "
1085  "add_scalar_kernel, add_aux_scalar_kernel, add_indicator, add_marker)"
1086  "(add_control)"
1087  "(check_output)"
1088  "(check_integrity)");
1089 }
Base class for function objects.
Definition: Function.h:46
Base class for split-based preconditioners.
Definition: Split.h:30
This is the base class for Samplers.
Definition: Sampler.h:46
Base class for predictors.
Definition: Predictor.h:39
Base class for all Constraint types.
Definition: Constraint.h:42
Class that hold the whole problem being solved.
Definition: Problem.h:29
Definition: Marker.h:42
MeshModifiers are objects that can modify or add to an existing mesh.
Definition: MeshModifier.h:31
Base class for time stepping.
Definition: TimeStepper.h:31
All Distributions should inherit from this class.
Definition: Distribution.h:28
InitialConditions are objects that set the initial value of variables.
Base class for MOOSE preconditioners.
Based class for output objects.
Definition: Output.h:45
The DGKernel class is responsible for calculating the residuals for various physics on internal sides...
Definition: DGKernel.h:47
Base class for making kernels that work on auxiliary scalar variables.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
Executioners are objects that do the actual work of solving your problem.
Definition: Executioner.h:41
Base class for all Postprocessors.
Definition: Postprocessor.h:35
The behavior of this kernel is controlled by one problem-wise global parameter eigen_on_current - boo...
Definition: EigenKernel.h:34
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:51
InterfaceKernel is responsible for interfacing physics across subdomains.
InitialConditions are objects that set the initial value of variables.
void addDependencySets(const std::string &action_sets)
Definition: Syntax.C:60
Materials compute MaterialProperties.
Definition: Material.h:53
Base class for creating new types of boundary conditions.
Base class for time integrators.
Base class for Control objects.
Definition: Control.h:43
Base class for MOOSE partitioner.
Base class for deriving dampers.
Definition: Damper.h:35
Definition: Kernel.h:25
Base class for creating new types of boundary conditions.
Definition: NodalKernel.h:50
A MultiApp represents one or more MOOSE applications that are running simultaneously.
Definition: MultiApp.h:59
Base class for Postprocessors that produce a vector of values.
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
Definition: DiracKernel.h:50
Base class for user-specific data.
Definition: UserObject.h:42
Base class for all Transfer objects.
Definition: Transfer.h:46
template<typename T >
void Moose::applyIndices ( T &  container,
const std::vector< size_t > &  indices 
)

Uses indices created by the indirectSort function to sort the given container (which must support random access, resizing, and std::swap.

Definition at line 114 of file IndirectSort.h.

Referenced by MaterialVectorPostprocessor::sortVecs().

115 {
116  T tmp;
117  tmp.resize(container.size());
118  for (size_t i = 0; i < indices.size(); i++)
119  tmp[i] = container[indices[i]];
120  std::swap(tmp, container);
121 }
X_global swap(X_sys)
void Moose::assemble_matrix ( EquationSystems &  es,
const std::string &  system_name 
)

Definition at line 37 of file NonlinearEigenSystem.C.

Referenced by NonlinearEigenSystem::NonlinearEigenSystem().

38 {
39  EigenProblem * p = es.parameters.get<EigenProblem *>("_eigen_problem");
40  EigenSystem & eigen_system = es.get_system<EigenSystem>(system_name);
41 
43  {
44  p->computeJacobian(
45  *eigen_system.current_local_solution.get(), *eigen_system.matrix_A, Moose::KT_NONEIGEN);
46  }
47  else
48  {
49  Mat petsc_mat_A = static_cast<PetscMatrix<Number> &>(*eigen_system.matrix_A).mat();
50 
51  PetscObjectComposeFunction((PetscObject)petsc_mat_A,
52  "formJacobian",
54  PetscObjectComposeFunction((PetscObject)petsc_mat_A,
55  "formFunction",
57 
58  PetscContainer container;
59  PetscContainerCreate(eigen_system.comm().get(), &container);
60  PetscContainerSetPointer(container, p);
61  PetscObjectCompose((PetscObject)petsc_mat_A, "formJacobianCtx", nullptr);
62  PetscObjectCompose((PetscObject)petsc_mat_A, "formJacobianCtx", (PetscObject)container);
63  PetscObjectCompose((PetscObject)petsc_mat_A, "formFunctionCtx", nullptr);
64  PetscObjectCompose((PetscObject)petsc_mat_A, "formFunctionCtx", (PetscObject)container);
65  PetscContainerDestroy(&container);
66 
67  // Let libmesh do not close matrices before solve
68  eigen_system.eigen_solver->set_close_matrix_before_solve(false);
69  }
70  if (eigen_system.generalized())
71  {
72  if (eigen_system.matrix_B)
73  {
75  {
76  p->computeJacobian(
77  *eigen_system.current_local_solution.get(), *eigen_system.matrix_B, Moose::KT_EIGEN);
78  }
79  else
80  {
81  Mat petsc_mat_B = static_cast<PetscMatrix<Number> &>(*eigen_system.matrix_B).mat();
82 
83  PetscObjectComposeFunction((PetscObject)petsc_mat_B,
84  "formJacobian",
86  PetscObjectComposeFunction((PetscObject)petsc_mat_B,
87  "formFunction",
89 
90  PetscContainer container;
91  PetscContainerCreate(eigen_system.comm().get(), &container);
92  PetscContainerSetPointer(container, p);
93  PetscObjectCompose((PetscObject)petsc_mat_B, "formFunctionCtx", nullptr);
94  PetscObjectCompose((PetscObject)petsc_mat_B, "formFunctionCtx", (PetscObject)container);
95  PetscObjectCompose((PetscObject)petsc_mat_B, "formJacobianCtx", nullptr);
96  PetscObjectCompose((PetscObject)petsc_mat_B, "formJacobianCtx", (PetscObject)container);
97  PetscContainerDestroy(&container);
98  }
99  }
100  else
101  mooseError("It is a generalized eigenvalue problem but matrix B is empty\n");
102  }
103 }
virtual bool isNonlinearEigenvalueSolver()
Definition: EigenProblem.C:155
PetscErrorCode mooseSlepcEigenFormJacobianB(SNES snes, Vec x, Mat jac, Mat pc, void *ctx)
Definition: SlepcSupport.C:488
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
PetscErrorCode mooseSlepcEigenFormFunctionA(SNES snes, Vec x, Vec r, void *ctx)
Definition: SlepcSupport.C:516
PetscErrorCode mooseSlepcEigenFormJacobianA(SNES snes, Vec x, Mat jac, Mat pc, void *ctx)
Definition: SlepcSupport.C:479
PetscErrorCode mooseSlepcEigenFormFunctionB(SNES snes, Vec x, Vec r, void *ctx)
Definition: SlepcSupport.C:525
virtual void computeJacobian(const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian, Moose::KernelType kernel_type) override
Definition: EigenProblem.C:115
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: EigenProblem.h:32
void Moose::associateSyntax ( Syntax syntax,
ActionFactory action_factory 
)

Note: the optional third parameter is used to differentiate which task is satisfied based on the syntax encountered for classes which are registered to satisfy more than one task

Variable/AuxVariable Actions

Note: the optional third parameter is used to differentiate which task is satisfied based on the syntax encountered for classes which are registered to satisfy more than one task

Variable/AuxVariable Actions

Definition at line 24 of file MooseSyntax.C.

25 {
31  registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "check_copy_nodal_vars");
32  registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "copy_nodal_vars");
33  registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "check_copy_nodal_vars");
34  registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "copy_nodal_aux_vars");
35 
36  registerSyntaxTask("AddKernelAction", "Kernels/*", "add_kernel");
37  registerSyntaxTask("AddNodalKernelAction", "NodalKernels/*", "add_nodal_kernel");
38  registerSyntaxTask("AddKernelAction", "AuxKernels/*", "add_aux_kernel");
39  registerSyntaxTask("AddKernelAction", "Bounds/*", "add_aux_kernel");
40 
41  registerSyntaxTask("AddScalarKernelAction", "ScalarKernels/*", "add_scalar_kernel");
42  registerSyntaxTask("AddScalarKernelAction", "AuxScalarKernels/*", "add_aux_scalar_kernel");
43 
44  registerSyntaxTask("AddBCAction", "BCs/*", "add_bc");
45 
46  registerSyntax("CreateProblemAction", "Problem");
47  registerSyntax("DynamicObjectRegistrationAction", "Problem");
48  registerSyntax("SetupMeshAction", "Mesh");
49  registerSyntax("SetupMeshCompleteAction", "Mesh");
50  // registerSyntaxTask("SetupMeshCompleteAction", "Mesh", "prepare_mesh");
51  // registerSyntaxTask("SetupMeshCompleteAction", "Mesh", "setup_mesh_complete");
52  registerSyntax("CreateDisplacedProblemAction", "Mesh");
53  registerSyntax("AddMeshModifierAction", "MeshModifiers/*");
54  registerSyntax("AddMortarInterfaceAction", "Mesh/MortarInterfaces/*");
55 
56  registerSyntax("AddFunctionAction", "Functions/*");
57  syntax.registerSyntaxType("Functions/*", "FunctionName");
58 
59  registerSyntax("GlobalParamsAction", "GlobalParams");
60 
61  registerSyntax("AddDistributionAction", "Distributions/*");
62  registerSyntax("AddSamplerAction", "Samplers/*");
63 
64  registerSyntax("SetupDebugAction", "Debug");
65  registerSyntax("SetupResidualDebugAction", "Debug");
66 
68  registerSyntax("AddVariableAction", "Variables/*");
69  syntax.registerSyntaxType("Variables/*", "VariableName");
70  syntax.registerSyntaxType("Variables/*", "NonlinearVariableName");
71  // syntax.registerActionSyntax("AddVariableAction", "Variables/*", "add_variable");
72  // syntax.registerActionSyntax("AddVariableAction", "Variables/*", "add_ic");
73 
74  registerSyntax("AddICAction", "Variables/*/InitialCondition");
75 
76  registerSyntax("AddAuxVariableAction", "AuxVariables/*");
77  syntax.registerSyntaxType("AuxVariables/*", "VariableName");
78  syntax.registerSyntaxType("AuxVariables/*", "AuxVariableName");
79  // syntax.registerActionSyntax("AddAuxVariableAction", "AuxVariables/*", "add_aux_variable");
80  // syntax.registerActionSyntax("AddAuxVariableAction", "AuxVariables/*", "add_ic");
81 
82  registerSyntax("AddICAction", "AuxVariables/*/InitialCondition");
83 
84  registerSyntaxTask("EmptyAction", "BCs/Periodic", "no_action"); // placeholder
85  registerSyntax("AddPeriodicBCAction", "BCs/Periodic/*");
86 
87  registerSyntaxTask("AddInitialConditionAction", "ICs/*", "add_ic");
88 
89  registerSyntax("AddMaterialAction", "Materials/*");
90 
91  registerSyntax("SetupPostprocessorDataAction", "Postprocessors/*");
92  registerSyntax("AddPostprocessorAction", "Postprocessors/*");
93  syntax.registerSyntaxType("Postprocessors/*", "PostprocessorName");
94  syntax.registerSyntaxType("Postprocessors/*", "UserObjectName");
95 
96  registerSyntax("AddVectorPostprocessorAction", "VectorPostprocessors/*");
97  syntax.registerSyntaxType("VectorPostprocessors/*", "VectorPostprocessorName");
98 
99  registerSyntax("AddDamperAction", "Dampers/*");
100 
101  registerSyntax("AddOutputAction", "Outputs/*");
102  registerSyntax("CommonOutputAction", "Outputs");
103  syntax.registerSyntaxType("Outputs/*", "OutputName");
104 
105  // Note: Preconditioner Actions will be built by this setup action
106  registerSyntax("SetupPreconditionerAction", "Preconditioning/*");
107  registerSyntax("AddFieldSplitAction", "Preconditioning/*/*");
108 
109  registerSyntax("DetermineSystemType", "Executioner");
110  registerSyntax("CreateExecutionerAction", "Executioner");
111  registerSyntax("SetupTimeStepperAction", "Executioner/TimeStepper");
112  registerSyntax("SetupTimeIntegratorAction", "Executioner/TimeIntegrator");
113 
114  registerSyntax("SetupQuadratureAction", "Executioner/Quadrature");
115  registerSyntax("SetupPredictorAction", "Executioner/Predictor");
116 #ifdef LIBMESH_ENABLE_AMR
117  registerSyntax("AdaptivityAction", "Executioner/Adaptivity");
118 #endif
119 
120  registerSyntax("PartitionerAction", "Mesh/Partitioner");
121 
122  registerSyntax("AddDiracKernelAction", "DiracKernels/*");
123 
124  registerSyntax("AddDGKernelAction", "DGKernels/*");
125 
126  registerSyntax("AddInterfaceKernelAction", "InterfaceKernels/*");
127 
128  registerSyntax("AddConstraintAction", "Constraints/*");
129 
130  registerSyntax("AddUserObjectAction", "UserObjects/*");
131  syntax.registerSyntaxType("UserObjects/*", "UserObjectName");
132  registerSyntax("AddControlAction", "Controls/*");
133  registerSyntax("AddBoundsVectorsAction", "Bounds");
134 
135  registerSyntax("AddNodalNormalsAction", "NodalNormals");
136  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_aux_variable");
137  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_postprocessor");
138  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_user_object");
139 
140  // Indicator
141  registerSyntax("AddElementalFieldAction", "Adaptivity/Indicators/*");
142  registerSyntax("AddIndicatorAction", "Adaptivity/Indicators/*");
143  syntax.registerSyntaxType("Adaptivity/Indicators/*", "IndicatorName");
144 
145  // Marker
146  registerSyntax("AddElementalFieldAction", "Adaptivity/Markers/*");
147  registerSyntax("AddMarkerAction", "Adaptivity/Markers/*");
148  syntax.registerSyntaxType("Adaptivity/Markers/*", "MarkerName");
149 
150  // New Adaptivity System
151  registerSyntax("SetAdaptivityOptionsAction", "Adaptivity");
152 
153  // Deprecated Block
154  registerSyntax("DeprecatedBlockAction", "DeprecatedBlock");
155 
156  // Multi Apps
157  registerSyntax("AddMultiAppAction", "MultiApps/*");
158  syntax.registerSyntaxType("MultiApps/*", "MultiAppName");
159 
160  // Transfers
161  registerSyntax("AddTransferAction", "Transfers/*");
162 
163  // Material derivative test
164  registerSyntaxTask("EmptyAction", "Debug/MaterialDerivativeTest", "no_action"); // placeholder
165  registerSyntax("MaterialDerivativeTestAction", "Debug/MaterialDerivativeTest/*");
166 
167  addActionTypes(syntax);
168  registerActions(syntax, action_factory);
169 }
void registerActions(Syntax &syntax, ActionFactory &action_factory)
Multiple Action class can be associated with a single input file section, in which case all associate...
Definition: Moose.C:1122
void registerSyntaxType(const std::string &syntax, const std::string &type)
Registration a type with a block.
Definition: Syntax.C:246
void addActionTypes(Syntax &syntax)
Definition: Moose.C:890
bool Moose::colorConsole ( )

Returns whether Console coloring is turned on (default: true).

Definition at line 1270 of file Moose.C.

Referenced by Console::Console().

1271 {
1272  return _color_console;
1273 }
static bool _color_console
Definition: Moose.C:1267
void Moose::compute_bounds ( NumericVector< Number > &  lower,
NumericVector< Number > &  upper,
NonlinearImplicitSystem &  sys 
)

Definition at line 49 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem().

52 {
53  FEProblemBase * p =
54  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
55  p->computeBounds(sys, lower, upper);
56 }
virtual void computeBounds(NonlinearImplicitSystem &sys, NumericVector< Number > &lower, NumericVector< Number > &upper)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void Moose::compute_jacobian ( const NumericVector< Number > &  soln,
SparseMatrix< Number > &  jacobian,
NonlinearImplicitSystem &  sys 
)

Definition at line 29 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem(), and NonlinearSystem::setupColoringFiniteDifferencedPreconditioner().

32 {
33  FEProblemBase * p =
34  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
35  p->computeJacobian(sys, soln, jacobian);
36 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void computeJacobian(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, SparseMatrix< Number > &jacobian)
void Moose::compute_nearnullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem &  sys 
)

Definition at line 76 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem().

77 {
78  FEProblemBase * p =
79  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
80  p->computeNearNullSpace(sys, sp);
81 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void computeNearNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > * > &sp)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void Moose::compute_nullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem &  sys 
)

Definition at line 59 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem().

60 {
61  FEProblemBase * p =
62  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
63  p->computeNullSpace(sys, sp);
64 }
virtual void computeNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > * > &sp)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void Moose::compute_postcheck ( const NumericVector< Number > &  old_soln,
NumericVector< Number > &  search_direction,
NumericVector< Number > &  new_soln,
bool &  changed_search_direction,
bool &  changed_new_soln,
NonlinearImplicitSystem &  sys 
)

Definition at line 84 of file NonlinearSystem.C.

Referenced by NonlinearSystem::solve().

90 {
91  FEProblemBase * p =
92  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
94  sys, old_soln, search_direction, new_soln, changed_search_direction, changed_new_soln);
95 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void computePostCheck(NonlinearImplicitSystem &sys, const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void Moose::compute_residual ( const NumericVector< Number > &  soln,
NumericVector< Number > &  residual,
NonlinearImplicitSystem &  sys 
)

Definition at line 39 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem().

42 {
43  FEProblemBase * p =
44  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
45  p->computeResidual(sys, soln, residual);
46 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void computeResidual(NonlinearImplicitSystem &sys, const NumericVector< Number > &soln, NumericVector< Number > &residual)
void Moose::compute_transpose_nullspace ( std::vector< NumericVector< Number > * > &  sp,
NonlinearImplicitSystem &  sys 
)

Definition at line 67 of file NonlinearSystem.C.

Referenced by NonlinearSystem::NonlinearSystem().

69 {
70  FEProblemBase * p =
71  sys.get_equation_systems().parameters.get<FEProblemBase *>("_fe_problem_base");
72  p->computeTransposeNullSpace(sys, sp);
73 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void computeTransposeNullSpace(NonlinearImplicitSystem &sys, std::vector< NumericVector< Number > * > &sp)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void Moose::elementsIntersectedByLine ( const Point &  p0,
const Point &  p1,
const MeshBase &  mesh,
const PointLocatorBase &  point_locator,
std::vector< Elem * > &  intersected_elems,
std::vector< LineSegment > &  segments 
)

Find all of the elements intersected by a line.

The line is given as the beginning and ending points

Parameters
p0The beginning of the line
p1The end of the line
intersected_elemsThe elements intersected by the line. Will be empty if there are no intersections.
segmentsThe line segments across each element

Definition at line 197 of file RayTracing.C.

Referenced by ElementsAlongLine::execute(), IntersectionPointsAlongLine::execute(), and LineMaterialSamplerBase< T >::execute().

203 {
204  // Make sure our list is clear
205  intersected_elems.clear();
206 
207  // Find the starting element
208  const Elem * first_elem = point_locator(p0);
209 
210  // Quick return if can't even locate the first element.
211  if (!first_elem)
212  return;
213 
214  intersected_elems.push_back(const_cast<Elem *>(first_elem));
215 
216  // Make a LineSegment object out of our two points for ease:
217  LineSegment line_segment = LineSegment(p0, p1);
218 
219  // Find 'em!
221  line_segment, first_elem, -1, p0, intersected_elems, segments);
222 }
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff...
Definition: LineSegment.h:33
void recursivelyFindElementsIntersectedByLine(const LineSegment &line_segment, const Elem *current_elem, int incoming_side, const Point &incoming_point, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
Recursively find all elements intersected by a line segment.
Definition: RayTracing.C:149
void Moose::elementsIntersectedByPlane ( const Point &  p0,
const Point &  normal,
const MeshBase &  mesh,
std::vector< const Elem * > &  intersected_elems 
)

Find all of the elements intersected by a plane.

The plane is given as a point and a normal vector.

Parameters
p0Point in plane.
normalNormal vector to plane.
intersected_elemsThe elements intersected by the plane. Will be empty if there are no intersections.

Definition at line 58 of file ElementsIntersectedByPlane.C.

Referenced by ElementsAlongPlane::execute().

62 {
63  // Make sure our list is clear
64  intersected_elems.clear();
65 
66  // Create plane from point and normal:
67  Plane plane(p0, normal);
68 
69  // Find 'em!
70  findElementsIntersectedByPlane(plane, mesh, intersected_elems);
71 }
void findElementsIntersectedByPlane(const Plane &plane, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
void Moose::elementsIntersectedByPlane ( const Point &  p0,
const Point &  p1,
const Point &  p2,
const MeshBase &  mesh,
std::vector< const Elem * > &  intersected_elems 
)

Find all of the elements intersected by a plane.

The plane is given as three points in the plane.

Parameters
p0Point in plane.
p1Point in plane.
p2Point in plane.
intersected_elemsThe elements intersected by the plane. Will be empty if there are no intersections.

Definition at line 74 of file ElementsIntersectedByPlane.C.

79 {
80  // Make sure our list is clear
81  intersected_elems.clear();
82 
83  // Create plane from three points:
84  Plane plane(p0, p1, p2);
85 
86  // Find 'em!
87  findElementsIntersectedByPlane(plane, mesh, intersected_elems);
88 }
void findElementsIntersectedByPlane(const Plane &plane, const MeshBase &mesh, std::vector< const Elem * > &intersected_elems)
void Moose::enableFPE ( bool  on = true)

Definition at line 1252 of file Moose.C.

Referenced by NonlinearSystemBase::computeJacobian(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeResidual(), and FEProblemBase::projectSolution().

1253 {
1254  if (_trap_fpe)
1255  libMesh::enableFPE(on);
1256 }
bool _trap_fpe
Variable indicating whether we will enable FPE trapping for this run.
Definition: Moose.C:1262
void enableFPE(bool on=true)
Definition: Moose.C:1252
void Moose::findContactPoint ( PenetrationInfo p_info,
FEBase *  fe_elem,
FEBase *  fe_side,
FEType &  fe_side_type,
const Point &  slave_point,
bool  start_with_centroid,
const Real  tangential_tolerance,
bool &  contact_point_on_side 
)

Finds the closest point (called the contact point) on the master_elem on side "side" to the slave_point.

Parameters
p_infoThe penetration info object, contains master_elem, side, various other information
fe_elemFE object for the element
fe_sideFE object for the side
fe_side_typeThe type of fe_side, needed for inverse_map routines
start_with_centroidif true, start inverse mapping procedure from element centroid
tangential_tolerance'tangential' tolerance for determining whether a contact point on a side
slave_pointThe physical space coordinates of the slave node
contact_point_on_sidewhether or not the contact_point actually lies on that side of the element.

Definition at line 49 of file FindContactPoint.C.

Referenced by PenetrationThread::createInfoForElem(), and PenetrationThread::operator()().

57 {
58  const Elem * master_elem = p_info._elem;
59 
60  unsigned int dim = master_elem->dim();
61 
62  const Elem * side = p_info._side;
63 
64  const std::vector<Point> & phys_point = fe_side->get_xyz();
65 
66  const std::vector<RealGradient> & dxyz_dxi = fe_side->get_dxyzdxi();
67  const std::vector<RealGradient> & d2xyz_dxi2 = fe_side->get_d2xyzdxi2();
68  const std::vector<RealGradient> & d2xyz_dxieta = fe_side->get_d2xyzdxideta();
69 
70  const std::vector<RealGradient> & dxyz_deta = fe_side->get_dxyzdeta();
71  const std::vector<RealGradient> & d2xyz_deta2 = fe_side->get_d2xyzdeta2();
72  const std::vector<RealGradient> & d2xyz_detaxi = fe_side->get_d2xyzdxideta();
73 
74  if (dim == 1)
75  {
76  const Node * nearest_node = side->node_ptr(0);
77  p_info._closest_point = *nearest_node;
78  p_info._closest_point_ref =
79  master_elem->master_point(master_elem->get_node_index(nearest_node));
80  std::vector<Point> elem_points = {p_info._closest_point_ref};
81  fe_elem->reinit(master_elem, &elem_points);
82 
83  const std::vector<RealGradient> & elem_dxyz_dxi = fe_elem->get_dxyzdxi();
84  p_info._normal = elem_dxyz_dxi[0];
85  if (nearest_node->id() == master_elem->node_id(0))
86  p_info._normal *= -1.0;
87  p_info._normal /= p_info._normal.norm();
88 
89  Point from_slave_to_closest = p_info._closest_point - slave_point;
90  p_info._distance = from_slave_to_closest * p_info._normal;
91  Point tangential = from_slave_to_closest - p_info._distance * p_info._normal;
92  p_info._tangential_distance = tangential.norm();
93  p_info._dxyzdxi = dxyz_dxi;
94  p_info._dxyzdeta = dxyz_deta;
95  p_info._d2xyzdxideta = d2xyz_dxieta;
96  p_info._side_phi = fe_side->get_phi();
97  p_info._side_grad_phi = fe_side->get_dphi();
98  contact_point_on_side = true;
99  return;
100  }
101 
102  Point ref_point;
103 
104  if (start_with_centroid)
105  ref_point =
106  FEInterface::inverse_map(dim - 1, fe_side_type, side, side->centroid(), TOLERANCE, false);
107  else
108  ref_point = p_info._closest_point_ref;
109 
110  std::vector<Point> points = {ref_point};
111  fe_side->reinit(side, &points);
112  RealGradient d = slave_point - phys_point[0];
113 
114  Real update_size = std::numeric_limits<Real>::max();
115 
116  // Least squares
117  for (unsigned int it = 0; it < 3 && update_size > TOLERANCE * 1e3; ++it)
118  {
119  DenseMatrix<Real> jac(dim - 1, dim - 1);
120 
121  jac(0, 0) = -(dxyz_dxi[0] * dxyz_dxi[0]);
122 
123  if (dim - 1 == 2)
124  {
125  jac(1, 0) = -(dxyz_dxi[0] * dxyz_deta[0]);
126  jac(0, 1) = -(dxyz_deta[0] * dxyz_dxi[0]);
127  jac(1, 1) = -(dxyz_deta[0] * dxyz_deta[0]);
128  }
129 
130  DenseVector<Real> rhs(dim - 1);
131 
132  rhs(0) = dxyz_dxi[0] * d;
133 
134  if (dim - 1 == 2)
135  rhs(1) = dxyz_deta[0] * d;
136 
137  DenseVector<Real> update(dim - 1);
138 
139  jac.lu_solve(rhs, update);
140 
141  ref_point(0) -= update(0);
142 
143  if (dim - 1 == 2)
144  ref_point(1) -= update(1);
145 
146  points[0] = ref_point;
147  fe_side->reinit(side, &points);
148  d = slave_point - phys_point[0];
149 
150  update_size = update.l2_norm();
151  }
152 
153  update_size = std::numeric_limits<Real>::max();
154 
155  unsigned nit = 0;
156 
157  // Newton Loop
158  for (; nit < 12 && update_size > TOLERANCE * TOLERANCE; nit++)
159  {
160  d = slave_point - phys_point[0];
161 
162  DenseMatrix<Real> jac(dim - 1, dim - 1);
163 
164  jac(0, 0) = (d2xyz_dxi2[0] * d) - (dxyz_dxi[0] * dxyz_dxi[0]);
165 
166  if (dim - 1 == 2)
167  {
168  jac(1, 0) = (d2xyz_dxieta[0] * d) - (dxyz_dxi[0] * dxyz_deta[0]);
169 
170  jac(0, 1) = (d2xyz_detaxi[0] * d) - (dxyz_deta[0] * dxyz_dxi[0]);
171  jac(1, 1) = (d2xyz_deta2[0] * d) - (dxyz_deta[0] * dxyz_deta[0]);
172  }
173 
174  DenseVector<Real> rhs(dim - 1);
175 
176  rhs(0) = -dxyz_dxi[0] * d;
177 
178  if (dim - 1 == 2)
179  rhs(1) = -dxyz_deta[0] * d;
180 
181  DenseVector<Real> update(dim - 1);
182 
183  jac.lu_solve(rhs, update);
184 
185  ref_point(0) += update(0);
186 
187  if (dim - 1 == 2)
188  ref_point(1) += update(1);
189 
190  points[0] = ref_point;
191  fe_side->reinit(side, &points);
192  d = slave_point - phys_point[0];
193 
194  update_size = update.l2_norm();
195  }
196 
197  /*
198  if (nit == 12 && update_size > TOLERANCE*TOLERANCE)
199  Moose::err<<"Warning! Newton solve for contact point failed to converge!"<<std::endl;
200  */
201 
202  p_info._closest_point_ref = ref_point;
203  p_info._closest_point = phys_point[0];
204  p_info._distance = d.norm();
205 
206  if (dim - 1 == 2)
207  {
208  p_info._normal = dxyz_dxi[0].cross(dxyz_deta[0]);
209  p_info._normal /= p_info._normal.norm();
210  }
211  else
212  {
213  p_info._normal = RealGradient(dxyz_dxi[0](1), -dxyz_dxi[0](0));
214  if (std::fabs(p_info._normal.norm()) > 1e-15)
215  p_info._normal /= p_info._normal.norm();
216  }
217 
218  // If the point has not penetrated the face, make the distance negative
219  const Real dot(d * p_info._normal);
220  if (dot > 0.0)
221  p_info._distance = -p_info._distance;
222 
223  contact_point_on_side = FEInterface::on_reference_element(ref_point, side->type());
224 
225  p_info._tangential_distance = 0.0;
226 
227  if (!contact_point_on_side)
228  {
229  p_info._closest_point_on_face_ref = ref_point;
231 
232  points[0] = p_info._closest_point_on_face_ref;
233  fe_side->reinit(side, &points);
234  Point closest_point_on_face(phys_point[0]);
235 
236  RealGradient off_face = closest_point_on_face - p_info._closest_point;
237  Real tangential_distance = off_face.norm();
238  p_info._tangential_distance = tangential_distance;
239  if (tangential_distance <= tangential_tolerance)
240  {
241  contact_point_on_side = true;
242  }
243  }
244 
245  const std::vector<std::vector<Real>> & phi = fe_side->get_phi();
246  const std::vector<std::vector<RealGradient>> & grad_phi = fe_side->get_dphi();
247 
248  points[0] = p_info._closest_point_ref;
249  fe_side->reinit(side, &points);
250 
251  p_info._side_phi = phi;
252  p_info._side_grad_phi = grad_phi;
253  p_info._dxyzdxi = dxyz_dxi;
254  p_info._dxyzdeta = dxyz_deta;
255  p_info._d2xyzdxideta = d2xyz_dxieta;
256 }
std::vector< RealGradient > _d2xyzdxideta
RealVectorValue RealGradient
Definition: Assembly.h:43
static PetscErrorCode Vec Mat jac
RealVectorValue _normal
void restrictPointToFace(Point &p, const Elem *side, std::vector< const Node * > &off_edge_nodes)
Point _closest_point_on_face_ref
std::vector< std::vector< RealGradient > > _side_grad_phi
std::vector< std::vector< Real > > _side_phi
const Elem * _elem
std::vector< RealGradient > _dxyzdxi
const Elem * _side
std::vector< const Node * > _off_edge_nodes
std::vector< RealGradient > _dxyzdeta
void Moose::findElementsIntersectedByPlane ( const Plane &  plane,
const MeshBase &  mesh,
std::vector< const Elem * > &  intersected_elems 
)

Definition at line 29 of file ElementsIntersectedByPlane.C.

Referenced by elementsIntersectedByPlane().

32 {
33  // Loop over all elements to find elements intersected by the plane
34  for (const auto & elem : mesh.element_ptr_range())
35  {
36  bool intersected = false;
37 
38  // Check whether the first node of this element is below or above the plane
39  const Node & node0 = elem->node_ref(0);
40  bool node0_above_plane = plane.above_surface(node0);
41 
42  // Loop over the rest of the nodes and check if any node is on the other side of the plane
43  for (unsigned int i = 1; i < elem->n_nodes(); ++i)
44  {
45  const Node & node = elem->node_ref(i);
46 
47  bool node_above_plane = plane.above_surface(node);
48  if (node0_above_plane != node_above_plane)
49  intersected = true;
50  }
51 
52  if (intersected)
53  intersected_elems.push_back(elem);
54  }
55 }
std::string Moose::getExecutablePath ( )

This function returns the PATH of the running executable.

There is not a portable way to do this function implements this function for Mac OS X and Linux boxes containing a normal /proc tree

Definition at line 29 of file ExecutablePath.C.

Referenced by SystemInfo::getInfo().

30 {
31  std::string exec_path;
32  char path[1024];
33 
34 #ifdef __APPLE__
35  uint32_t size = sizeof(path);
36  if (_NSGetExecutablePath(path, &size) == 0)
37  exec_path = path;
38  else
39  mooseError("Unable to retrieve executable path");
40 #else // Linux with Proc
41  std::ostringstream oss;
42  oss << "/proc/" << getpid() << "/exe";
43  int ch = readlink(oss.str().c_str(), path, 1024);
44  if (ch != -1)
45  {
46  path[ch] = 0;
47  exec_path = path;
48  }
49 #endif
50 
51  // Now strip off the exeuctable to get the PATH
52  std::string::size_type t = exec_path.find_last_of("/");
53  exec_path = exec_path.substr(0, t) + "/";
54 
55  return exec_path;
56 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
template<class RandomAccessIterator >
void Moose::indirectSort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b 
)

Definition at line 74 of file IndirectSort.h.

Referenced by SamplerBase::finalize().

75 {
76  // Space in b
77  initialize_indirect_sort(beg, end, b);
78 
79  // Typedef for less typing. Note: use of std::iterator_traits means this should work with
80  // naked pointers too...
81  typedef std::less<typename std::iterator_traits<RandomAccessIterator>::value_type>
82  LessThanComparator;
83 
84  // Construct comparator object
85  indirect_comparator<RandomAccessIterator, LessThanComparator> ic(beg, LessThanComparator());
86 
87  // Sort the indices, based on the data
88  std::sort(b.begin(), b.end(), ic);
89 }
void initialize_indirect_sort(RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
Definition: IndirectSort.h:58
template<class RandomAccessIterator , class UserComparisonFunctor >
void Moose::indirectSort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b,
UserComparisonFunctor  user_comp 
)

Definition at line 95 of file IndirectSort.h.

99 {
100  // Space in b
101  initialize_indirect_sort(beg, end, b);
102 
103  // Construct comparator object
104  indirect_comparator<RandomAccessIterator, UserComparisonFunctor> ic(beg, user_comp);
105 
106  // Sort the indices, based on the data
107  std::sort(b.begin(), b.end(), ic);
108 }
void initialize_indirect_sort(RandomAccessIterator beg, RandomAccessIterator end, std::vector< size_t > &b)
Definition: IndirectSort.h:58
void Moose::initCoordinateSystemType ( )

Definition at line 70 of file Conversion.C.

Referenced by stringToEnum< CoordinateSystemType >().

71 {
73  {
77  }
78 }
std::map< std::string, CoordinateSystemType > coordinate_system_type_to_enum
Definition: Conversion.C:29
void Moose::initEigenProlemType ( )

Definition at line 110 of file Conversion.C.

Referenced by stringToEnum< EigenProblemType >().

111 {
112  if (eigen_problem_type_to_enum.empty())
113  {
117  eigen_problem_type_to_enum["GEN_NON_HERMITIAN"] = EPT_GEN_NON_HERMITIAN;
119  eigen_problem_type_to_enum["POS_GEN_NON_HERMITIAN"] = EPT_POS_GEN_NON_HERMITIAN;
121  }
122 }
Generalized Non-Hermitian.
Definition: MooseTypes.h:278
Generalized Hermitian indefinite.
Definition: MooseTypes.h:277
std::map< std::string, EigenProblemType > eigen_problem_type_to_enum
Definition: Conversion.C:32
use whatever SLPEC has by default
Definition: MooseTypes.h:280
Generalized Non-Hermitian with positive (semi-)definite B.
Definition: MooseTypes.h:279
Non-Hermitian.
Definition: MooseTypes.h:275
Generalized Hermitian.
Definition: MooseTypes.h:276
void Moose::initEigenSolveType ( )

Definition at line 94 of file Conversion.C.

Referenced by stringToEnum< EigenSolveType >().

95 {
96  if (eigen_solve_type_to_enum.empty())
97  {
100  eigen_solve_type_to_enum["KRYLOVSCHUR"] = EST_KRYLOVSCHUR;
101  eigen_solve_type_to_enum["JACOBI_DAVIDSON"] = EST_JACOBI_DAVIDSON;
102  eigen_solve_type_to_enum["NONLINEAR_POWER"] = EST_NONLINEAR_POWER;
103  eigen_solve_type_to_enum["MF_NONLINEAR_POWER"] = EST_MF_NONLINEAR_POWER;
104  eigen_solve_type_to_enum["MONOLITH_NEWTON"] = EST_MONOLITH_NEWTON;
105  eigen_solve_type_to_enum["MF_MONOLITH_NEWTON"] = EST_MF_MONOLITH_NEWTON;
106  }
107 }
Newton-based eigen solver.
Definition: MooseTypes.h:265
std::map< std::string, EigenSolveType > eigen_solve_type_to_enum
Definition: Conversion.C:31
Matrix-free Newton-based eigen solver.
Definition: MooseTypes.h:266
Matrix-free nonlinear inverse power.
Definition: MooseTypes.h:264
Power / Inverse / RQI.
Definition: MooseTypes.h:259
Krylov-Schur.
Definition: MooseTypes.h:261
Nonlinear inverse power.
Definition: MooseTypes.h:263
Jacobi-Davidson.
Definition: MooseTypes.h:262
void Moose::initExecStoreType ( )

Definition at line 39 of file Conversion.C.

Referenced by stringToEnum().

40 {
41  if (execstore_type_to_enum.empty())
42  {
46  execstore_type_to_enum["TIMESTEP_END"] = EXEC_TIMESTEP_END;
47  execstore_type_to_enum["TIMESTEP_BEGIN"] = EXEC_TIMESTEP_BEGIN;
50  }
51 }
Object is evaluated in every residual computation.
Definition: MooseTypes.h:96
std::map< std::string, ExecFlagType > execstore_type_to_enum
Definition: Conversion.C:27
For use with custom executioners that want to fire objects at a specific time.
Definition: MooseTypes.h:110
Object is evaluated only once at the beginning of the simulation.
Definition: MooseTypes.h:94
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Object is evaluated at the end of the simulations (output only)
Definition: MooseTypes.h:104
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
Object is evaluated in every jacobian computation.
Definition: MooseTypes.h:98
void Moose::initial_condition ( EquationSystems &  es,
const std::string &  system_name 
)
template<class RandomAccessIterator >
void Moose::initialize_indirect_sort ( RandomAccessIterator  beg,
RandomAccessIterator  end,
std::vector< size_t > &  b 
)

Definition at line 58 of file IndirectSort.h.

Referenced by indirectSort().

61 {
62  // enough storage for all the indices
63  b.resize(std::distance(beg, end));
64 
65  // iota
66  for (size_t i = 0; i < b.size(); ++i)
67  b[i] = i;
68 }
void Moose::initLineSearchType ( )

Definition at line 144 of file Conversion.C.

Referenced by stringToEnum< LineSearchType >().

145 {
146  if (line_search_type_to_enum.empty())
147  {
151 #ifdef LIBMESH_HAVE_PETSC
152 #if PETSC_VERSION_LESS_THAN(3, 3, 0)
154  line_search_type_to_enum["QUADRATIC"] = LS_QUADRATIC;
155  line_search_type_to_enum["BASICNONORMS"] = LS_BASICNONORMS;
156 #else
161 #endif
162 #endif
163  }
164 }
std::map< std::string, LineSearchType > line_search_type_to_enum
Definition: Conversion.C:34
void Moose::initMffdType ( )

Definition at line 182 of file Conversion.C.

Referenced by stringToEnum< MffdType >().

183 {
184  if (mffd_type_to_enum.empty())
185  {
186  mffd_type_to_enum["DS"] = MFFD_DS;
187  mffd_type_to_enum["WP"] = MFFD_WP;
188  }
189 }
std::map< std::string, MffdType > mffd_type_to_enum
Definition: Conversion.C:36
void Moose::initQuadratureType ( )

Definition at line 54 of file Conversion.C.

Referenced by stringToEnum< QuadratureType >().

55 {
56  if (quadrature_type_to_enum.empty())
57  {
58  quadrature_type_to_enum["CLOUGH"] = QCLOUGH;
59  quadrature_type_to_enum["CONICAL"] = QCONICAL;
60  quadrature_type_to_enum["GAUSS"] = QGAUSS;
61  quadrature_type_to_enum["GRID"] = QGRID;
62  quadrature_type_to_enum["MONOMIAL"] = QMONOMIAL;
63  quadrature_type_to_enum["SIMPSON"] = QSIMPSON;
64  quadrature_type_to_enum["TRAP"] = QTRAP;
65  quadrature_type_to_enum["GAUSS_LOBATTO"] = QGAUSS_LOBATTO;
66  }
67 }
std::map< std::string, QuadratureType > quadrature_type_to_enum
Definition: Conversion.C:28
void Moose::initSolveType ( )

Definition at line 81 of file Conversion.C.

Referenced by stringToEnum< SolveType >().

82 {
83  if (solve_type_to_enum.empty())
84  {
85  solve_type_to_enum["PJFNK"] = ST_PJFNK;
86  solve_type_to_enum["JFNK"] = ST_JFNK;
87  solve_type_to_enum["NEWTON"] = ST_NEWTON;
88  solve_type_to_enum["FD"] = ST_FD;
89  solve_type_to_enum["LINEAR"] = ST_LINEAR;
90  }
91 }
Full Newton Solve.
Definition: MooseTypes.h:249
Solving a linear problem.
Definition: MooseTypes.h:251
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:248
Use finite differences to compute Jacobian.
Definition: MooseTypes.h:250
Preconditioned Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:247
std::map< std::string, SolveType > solve_type_to_enum
Definition: Conversion.C:30
void Moose::initTimeIntegratorsType ( )

Definition at line 167 of file Conversion.C.

Referenced by stringToEnum< TimeIntegratorType >().

168 {
169  if (time_integrator_to_enum.empty())
170  {
171  time_integrator_to_enum["IMPLICIT_EULER"] = TI_IMPLICIT_EULER;
172  time_integrator_to_enum["EXPLICIT_EULER"] = TI_EXPLICIT_EULER;
173  time_integrator_to_enum["CRANK_NICOLSON"] = TI_CRANK_NICOLSON;
175  time_integrator_to_enum["EXPLICIT_MIDPOINT"] = TI_EXPLICIT_MIDPOINT;
176  time_integrator_to_enum["LSTABLE_DIRK2"] = TI_LSTABLE_DIRK2;
177  time_integrator_to_enum["EXPLICIT_TVDRK2"] = TI_EXPLICIT_TVD_RK_2;
178  }
179 }
std::map< std::string, TimeIntegratorType > time_integrator_to_enum
Definition: Conversion.C:35
void Moose::initWhichEigenPairs ( )

Definition at line 125 of file Conversion.C.

Referenced by stringToEnum< WhichEigenPairs >().

126 {
127  if (which_eigen_pairs_to_enum.empty())
128  {
129  which_eigen_pairs_to_enum["LARGEST_MAGNITUDE"] = WEP_LARGEST_MAGNITUDE;
130  which_eigen_pairs_to_enum["SMALLEST_MAGNITUDE"] = WEP_SMALLEST_MAGNITUDE;
132  which_eigen_pairs_to_enum["SMALLEST_REAL"] = WEP_SMALLEST_REAL;
133  which_eigen_pairs_to_enum["LARGEST_IMAGINARY"] = WEP_LARGEST_IMAGINARY;
134  which_eigen_pairs_to_enum["SMALLEST_IMAGINARY"] = WEP_SMALLEST_IMAGINARY;
135  which_eigen_pairs_to_enum["TARGET_MAGNITUDE"] = WEP_TARGET_MAGNITUDE;
137  which_eigen_pairs_to_enum["TARGET_IMAGINARY"] = WEP_TARGET_IMAGINARY;
138  which_eigen_pairs_to_enum["ALL_EIGENVALUES"] = WEP_ALL_EIGENVALUES;
139  which_eigen_pairs_to_enum["SLEPC_DEFAULT"] = WEP_SLEPC_DEFAULT;
140  }
141 }
smallest magnitude
Definition: MooseTypes.h:289
std::map< std::string, WhichEigenPairs > which_eigen_pairs_to_enum
Definition: Conversion.C:33
target magnitude
Definition: MooseTypes.h:294
target imaginary
Definition: MooseTypes.h:296
smallest imaginary
Definition: MooseTypes.h:293
largest imaginary
Definition: MooseTypes.h:292
all eigenvalues
Definition: MooseTypes.h:297
use whatever we have in SLEPC
Definition: MooseTypes.h:298
largest magnitude
Definition: MooseTypes.h:288
const std::vector<ExecFlagType> Moose::populateExecTypes ( )

Definition at line 26 of file MooseTypes.C.

27 {
28  std::vector<ExecFlagType> exec_types(8);
37  return exec_types;
38 }
Object is evaluated in every residual computation.
Definition: MooseTypes.h:96
For use with custom executioners that want to fire objects at a specific time.
Definition: MooseTypes.h:110
Object is evaluated only once at the beginning of the simulation.
Definition: MooseTypes.h:94
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Objects is evaluated on subdomain.
Definition: MooseTypes.h:112
Object is evaluated at the end of the simulations (output only)
Definition: MooseTypes.h:104
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
const std::vector< ExecFlagType > exec_types
A static list of all the exec types.
Definition: MooseTypes.C:40
Object is evaluated in every jacobian computation.
Definition: MooseTypes.h:98
void Moose::recursivelyFindElementsIntersectedByLine ( const LineSegment line_segment,
const Elem *  current_elem,
int  incoming_side,
const Point &  incoming_point,
std::vector< Elem * > &  intersected_elems,
std::vector< LineSegment > &  segments 
)

Recursively find all elements intersected by a line segment.

Works by moving from one element to the next through the side of the current element. This means that (other than for the first element) there is always an incoming_side that is the reason we ended up in this element in the first place. Search all the other sides to see if there is a next element...

Parameters
line_segmentthe LineSegment to intersect
current_elemThe current element that needs to be searched
incoming_sideThe side of the current element that was intersected by the LineSegment that brought us here
intersected_elemsThe output
segmentsLine segments for the path across each element

Definition at line 149 of file RayTracing.C.

Referenced by elementsIntersectedByLine().

155 {
156  Point intersection_point;
157 
158  std::vector<int> not_side(1, incoming_side);
159 
160  // Find the side of this element that the LineSegment intersects... while ignoring the incoming
161  // side (we don't want to move backward!)
162  int intersected_side =
163  sideIntersectedByLine(current_elem, not_side, line_segment, intersection_point);
164 
165  if (intersected_side != -1) // -1 means that we didn't find any side
166  {
167  // Get the neighbor on that side
168  const Elem * neighbor = current_elem->neighbor_ptr(intersected_side);
169 
170  if (neighbor)
171  {
172  // Add it to the list
173  intersected_elems.push_back(const_cast<Elem *>(neighbor));
174 
175  // Add the line segment across the element to the segments list
176  segments.push_back(LineSegment(incoming_point, intersection_point));
177 
178  // Note: This is finding the side the current_elem is on for the neighbor. That's the
179  // "incoming_side" for the neighbor
180  int incoming_side = sideNeighborIsOn(neighbor, current_elem);
181 
182  // Recurse
184  line_segment, neighbor, incoming_side, intersection_point, intersected_elems, segments);
185  }
186  else // Add the final segment
187  segments.push_back(LineSegment(incoming_point, line_segment.end()));
188  }
189  else // Add the final segment
190  segments.push_back(LineSegment(incoming_point, line_segment.end()));
191 
192  // Finished... return out!
193  return;
194 }
int sideNeighborIsOn(const Elem *elem, const Elem *neighbor)
Returns the side number for elem that neighbor is on.
Definition: RayTracing.C:120
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff...
Definition: LineSegment.h:33
void recursivelyFindElementsIntersectedByLine(const LineSegment &line_segment, const Elem *current_elem, int incoming_side, const Point &incoming_point, std::vector< Elem * > &intersected_elems, std::vector< LineSegment > &segments)
Recursively find all elements intersected by a line segment.
Definition: RayTracing.C:149
const Point & end() const
Ending of the line segment.
Definition: LineSegment.h:71
int sideIntersectedByLine(const Elem *elem, std::vector< int > &not_side, const LineSegment &line_segment, Point &intersection_point)
Figure out which (if any) side of an Elem is intersected by a line.
Definition: RayTracing.C:39
void Moose::registerActions ( Syntax syntax,
ActionFactory action_factory 
)

Multiple Action class can be associated with a single input file section, in which case all associated Actions will be created and "acted" on when the associated input file section is seen.b * Example: "setup_mesh" <-----——> SetupMeshAction <---—— \ [Mesh] / "setup_mesh_complete" <—> SetupMeshCompleteAction <-.

Action classes can also be registered to act on more than one input file section for a different task if similar logic can work in multiple cases

Example: "add_variable" <–— -> [Variables/ *] \ / CopyNodalVarsAction / \ "add_aux_variable" <- -> [AuxVariables/ *]

Note: Placeholder "no_action" actions must be put in places where it is possible to match an object with a star or a more specific parent later on. (i.e. where one needs to negate the '*' matching prematurely)

Variable/AuxVariable Actions

Variable/AuxVariable Actions

Definition at line 1122 of file Moose.C.

Referenced by associateSyntax().

1123 {
1124 
1125 #undef registerAction
1126 #define registerAction(tplt, action) \
1127  action_factory.reg<tplt>(stringifyName(tplt), action, __FILE__, __LINE__)
1128 
1129  registerAction(SetupPostprocessorDataAction, "setup_postprocessor_data");
1130 
1131  registerAction(SetupMeshAction, "setup_mesh");
1132  registerAction(SetupMeshAction, "init_mesh");
1133  registerAction(SetupMeshCompleteAction, "prepare_mesh");
1134  registerAction(AddMeshModifierAction, "add_mesh_modifier");
1135  registerAction(AddMortarInterfaceAction, "add_mortar_interface");
1136  registerAction(SetupMeshCompleteAction, "execute_mesh_modifiers");
1137  registerAction(SetupMeshCompleteAction, "uniform_refine_mesh");
1138  registerAction(SetupMeshCompleteAction, "setup_mesh_complete");
1139 
1140  registerAction(AddFunctionAction, "add_function");
1141  registerAction(AddDistributionAction, "add_distribution");
1142  registerAction(AddSamplerAction, "add_sampler");
1143  registerAction(CreateExecutionerAction, "setup_executioner");
1144  registerAction(SetupTimeStepperAction, "setup_time_stepper");
1145  registerAction(SetupTimeIntegratorAction, "setup_time_integrator");
1146  registerAction(CreateDisplacedProblemAction, "init_displaced_problem");
1147  registerAction(DetermineSystemType, "determine_system_type");
1148  registerAction(CreateProblemAction, "create_problem");
1149  registerAction(DynamicObjectRegistrationAction, "dynamic_object_registration");
1150  registerAction(AddOutputAction, "add_output");
1151  registerAction(CommonOutputAction, "common_output");
1152  registerAction(SetupRecoverFileBaseAction, "setup_recover_file_base");
1153  registerAction(GlobalParamsAction, "set_global_params");
1154  registerAction(SetupPredictorAction, "setup_predictor");
1155  registerAction(MaterialOutputAction, "setup_material_output");
1156  registerAction(CheckOutputAction, "check_output");
1157 
1159  registerAction(AddVariableAction, "add_variable");
1160  registerAction(AddAuxVariableAction, "add_aux_variable");
1161 
1162  registerAction(CopyNodalVarsAction, "check_copy_nodal_vars");
1163  registerAction(CopyNodalVarsAction, "copy_nodal_vars");
1164  registerAction(CopyNodalVarsAction, "copy_nodal_aux_vars");
1165 
1166  // Initial Condition Actions
1167  registerAction(AddICAction, "add_ic");
1168  registerAction(AddInitialConditionAction, "add_ic");
1169 
1170  registerAction(AddKernelAction, "add_kernel");
1171  registerAction(AddNodalKernelAction, "add_nodal_kernel");
1172  registerAction(AddKernelAction, "add_aux_kernel");
1173  registerAction(AddScalarKernelAction, "add_scalar_kernel");
1174  registerAction(AddScalarKernelAction, "add_aux_scalar_kernel");
1175  registerAction(AddDGKernelAction, "add_dg_kernel");
1176  registerAction(AddInterfaceKernelAction, "add_interface_kernel");
1177  registerAction(AddBCAction, "add_bc");
1178  registerAction(EmptyAction, "no_action"); // placeholder
1179  registerAction(AddPeriodicBCAction, "add_periodic_bc");
1180  registerAction(AddMaterialAction, "add_material");
1181  registerAction(AddPostprocessorAction, "add_postprocessor");
1182  registerAction(AddVectorPostprocessorAction, "add_vector_postprocessor");
1183  registerAction(AddDamperAction, "add_damper");
1184  registerAction(AddFieldSplitAction, "add_field_split");
1185  registerAction(SetupPreconditionerAction, "add_preconditioning");
1186  registerAction(SetupQuadratureAction, "setup_quadrature");
1187  registerAction(DeprecatedBlockAction, "deprecated_block");
1188  registerAction(AddConstraintAction, "add_constraint");
1189  registerAction(AddUserObjectAction, "add_user_object");
1190  registerAction(AddControlAction, "add_control");
1191  registerAction(AddElementalFieldAction, "add_elemental_field_variable");
1192  registerAction(AddIndicatorAction, "add_indicator");
1193  registerAction(AddMarkerAction, "add_marker");
1194  registerAction(SetAdaptivityOptionsAction, "set_adaptivity_options");
1195 
1196  registerAction(AddNodalNormalsAction, "add_aux_variable");
1197  registerAction(AddNodalNormalsAction, "add_postprocessor");
1198  registerAction(AddNodalNormalsAction, "add_user_object");
1199 
1200 #ifdef LIBMESH_ENABLE_AMR
1201  registerAction(AdaptivityAction, "setup_adaptivity");
1202 #endif
1203 
1204  registerAction(PartitionerAction, "add_partitioner");
1205  registerAction(AddDiracKernelAction, "add_dirac_kernel");
1206  registerAction(SetupDebugAction, "setup_debug");
1207  registerAction(SetupResidualDebugAction, "setup_residual_debug");
1208 
1209  registerAction(AddBoundsVectorsAction, "add_bounds_vectors");
1210 
1211  // NonParsedActions
1212  registerAction(SetupDampersAction, "setup_dampers");
1213  registerAction(EmptyAction, "ready_to_init");
1214  registerAction(InitProblemAction, "init_problem");
1215  registerAction(CheckIntegrityAction, "check_integrity");
1216 
1217  registerAction(AddMultiAppAction, "add_multi_app");
1218  registerAction(AddTransferAction, "add_transfer");
1219 
1220  // TODO: Why is this here?
1221  registerTask("finish_input_file_output", false);
1222  registerAction(EmptyAction, "finish_input_file_output");
1223 
1224  registerAction(MaterialDerivativeTestAction, "add_variable");
1225  registerAction(MaterialDerivativeTestAction, "add_kernel");
1226  registerAction(MaterialDerivativeTestAction, "add_preconditioning");
1227 
1228 #undef registerAction
1229 #define registerAction(tplt, action) action_factory.regLegacy<tplt>(stringifyName(tplt), action)
1230 }
Sets the quadrature.
This Action adds a periodic boundary to the problem.
Adds nonlinear variable.
Sets up variables and Kernels to test the derivatives of material properties via the Jacobian checker...
Sets the predictor.
Action for creating Control objects.
Action to setup computation of nodal normals.
This class adds a distribution object.
Creates AuxVariables and AuxKernels for automatic output of material properties.
Do nothing action.
Definition: EmptyAction.h:28
Set the preconditioner up.
Action for checking that "outputs" is properly populated for Materials.
Action for creating output objects.
This class parses functions in the [Functions] block and creates them.
Action for creating Auxiliary variables.
This class adds a Sampler object.
Used for marking that some block are deprecated and not be used.
The PostprocessorInterface::hasPostprocessor method utilizes the PostprocessorData to determine if a ...
Meta-action for creating common output object parameters This action serves two purpose, first it adds common output object parameters.
void Moose::registerObjects ( Factory factory)

Register objects that are in MOOSE.

Definition at line 488 of file Moose.C.

489 {
490  // mesh
491  registerMesh(FileMesh);
492  registerMesh(GeneratedMesh);
493  registerMesh(TiledMesh);
494  registerMesh(ImageMesh);
495  registerMesh(PatternedMesh);
496  registerMesh(StitchedMesh);
497  registerMesh(AnnularMesh);
498 
499  // mesh modifiers
500  registerMeshModifier(MeshExtruder);
501  registerMeshModifier(SideSetsFromPoints);
502  registerMeshModifier(SideSetsFromNormals);
503  registerMeshModifier(AddExtraNodeset);
504  registerMeshModifier(BoundingBoxNodeSet);
505  registerMeshModifier(Transform);
506  registerMeshModifier(SideSetsAroundSubdomain);
507  registerMeshModifier(SideSetsBetweenSubdomains);
508  registerMeshModifier(AddAllSideSetsByNormals);
509  registerMeshModifier(SubdomainBoundingBox);
510  registerMeshModifier(OrientedSubdomainBoundingBox);
511  registerMeshModifier(RenameBlock);
512  registerMeshModifier(AssignElementSubdomainID);
513  registerMeshModifier(ImageSubdomain);
514  registerMeshModifier(BlockDeleter);
515  registerMeshModifier(ParsedSubdomainMeshModifier);
516  registerMeshModifier(BreakBoundaryOnSubdomain);
517  registerMeshModifier(ParsedAddSideset);
518  registerMeshModifier(AssignSubdomainID);
519  registerMeshModifier(MeshSideSet);
520  registerMeshModifier(AddSideSetsFromBoundingBox);
521 
522  // problems
523  registerProblem(DisplacedProblem);
524  registerProblem(FEProblem);
525  registerProblem(EigenProblem);
526 
527  // kernels
528  registerKernel(TimeDerivative);
529  registerKernel(ConservativeAdvection);
530  registerKernel(CoupledTimeDerivative);
531  registerKernel(MassLumpedTimeDerivative);
532  registerKernel(Diffusion);
533  registerKernel(AnisotropicDiffusion);
534  registerKernel(CoupledForce);
535  registerNamedObject(BodyForce, "UserForcingFunction");
536  factory.deprecateObject("UserForcingFunction", "BodyForce");
537  registerKernel(BodyForce);
538  registerKernel(Reaction);
539  registerKernel(MassEigenKernel);
540  registerKernel(NullKernel);
541  registerKernel(MaterialDerivativeTestKernel);
542  registerKernel(MaterialDerivativeRankTwoTestKernel);
543  registerKernel(MaterialDerivativeRankFourTestKernel);
544 
545  // bcs
546  registerBoundaryCondition(ConvectiveFluxBC);
547  registerBoundaryCondition(DirichletBC);
548  registerBoundaryCondition(PenaltyDirichletBC);
549  registerBoundaryCondition(PresetBC);
550  registerBoundaryCondition(NeumannBC);
551  registerBoundaryCondition(PostprocessorNeumannBC);
552  registerBoundaryCondition(FunctionDirichletBC);
553  registerBoundaryCondition(FunctionPenaltyDirichletBC);
554  registerBoundaryCondition(FunctionPresetBC);
555  registerBoundaryCondition(FunctionNeumannBC);
556  registerBoundaryCondition(MatchedValueBC);
557  registerBoundaryCondition(VacuumBC);
558 
559  registerBoundaryCondition(SinDirichletBC);
560  registerBoundaryCondition(SinNeumannBC);
561  registerBoundaryCondition(VectorNeumannBC);
562  registerBoundaryCondition(WeakGradientBC);
563  registerBoundaryCondition(DiffusionFluxBC);
564  registerBoundaryCondition(PostprocessorDirichletBC);
565  registerBoundaryCondition(OneDEqualValueConstraintBC);
566 
567  // dirac kernels
568  registerDiracKernel(ConstantPointSource);
569  registerDiracKernel(FunctionDiracSource);
570 
571  // aux kernels
572  registerAux(ConstantAux);
573  registerAux(FunctionAux);
574  registerAux(NearestNodeDistanceAux);
575  registerAux(NearestNodeValueAux);
576  registerAux(PenetrationAux);
577  registerAux(ProcessorIDAux);
578  registerAux(SelfAux);
579  registerAux(GapValueAux);
580  registerAux(MaterialRealAux);
581  registerAux(MaterialRealVectorValueAux);
582  registerAux(MaterialRealTensorValueAux);
583  registerAux(MaterialStdVectorAux);
584  registerAux(MaterialRealDenseMatrixAux);
586  registerAux(DebugResidualAux);
587  registerAux(BoundsAux);
588  registerAux(SpatialUserObjectAux);
589  registerAux(SolutionAux);
590  registerAux(VectorMagnitudeAux);
591  registerAux(ConstantScalarAux);
592  registerAux(QuotientAux);
593  registerAux(NormalizationAux);
594  registerAux(FunctionScalarAux);
595  registerAux(VariableGradientComponent);
596  registerAux(ParsedAux);
597  registerAux(VariableTimeIntegrationAux);
598  registerAux(ElementLengthAux);
599  registerAux(ElementLpNormAux);
600  registerAux(ElementL2ErrorFunctionAux);
601  registerAux(ElementH1ErrorFunctionAux);
602  registerAux(DiffusionFluxAux);
603 
604  // Initial Conditions
605  registerInitialCondition(ConstantIC);
606  registerInitialCondition(BoundingBoxIC);
607  registerInitialCondition(FunctionIC);
608  registerInitialCondition(RandomIC);
609  registerInitialCondition(ScalarConstantIC);
610  registerInitialCondition(ScalarComponentIC);
611  registerInitialCondition(FunctionScalarIC);
612 
613  // executioners
614  registerExecutioner(Steady);
615  registerExecutioner(Transient);
616  registerExecutioner(InversePowerMethod);
617  registerExecutioner(NonlinearEigen);
618  registerExecutioner(Eigenvalue);
619 
620  // functions
621  registerFunction(Axisymmetric2D3DSolutionFunction);
622  registerFunction(ConstantFunction);
623  registerFunction(CompositeFunction);
624  registerNamedFunction(MooseParsedFunction, "ParsedFunction");
625  registerNamedFunction(MooseParsedGradFunction, "ParsedGradFunction");
626  registerNamedFunction(MooseParsedVectorFunction, "ParsedVectorFunction");
627  registerFunction(PiecewiseConstant);
628  registerFunction(PiecewiseLinear);
629  registerFunction(SolutionFunction);
630  registerFunction(PiecewiseBilinear);
631  registerFunction(SplineFunction);
632  registerFunction(BicubicSplineFunction);
633  registerFunction(PiecewiseMultilinear);
634  registerFunction(LinearCombinationFunction);
635  registerFunction(ImageFunction);
636  registerFunction(VectorPostprocessorFunction);
637 
638  // materials
639  registerMaterial(GenericConstantMaterial);
640  registerMaterial(GenericConstantRankTwoTensor);
641  registerMaterial(GenericFunctionMaterial);
642  registerMaterial(PiecewiseLinearInterpolationMaterial);
643 
644  // PPS
645  registerPostprocessor(AverageElementSize);
646  registerPostprocessor(AverageNodalVariableValue);
647  registerPostprocessor(CumulativeValuePostprocessor);
648  registerPostprocessor(ChangeOverTimestepPostprocessor);
649  registerPostprocessor(NodalSum);
650  registerPostprocessor(ElementAverageValue);
651  registerPostprocessor(ElementAverageTimeDerivative);
652  registerPostprocessor(ElementW1pError);
653  registerPostprocessor(ElementH1Error);
654  registerPostprocessor(ElementH1SemiError);
655  registerPostprocessor(ElementIntegralVariablePostprocessor);
656  registerPostprocessor(ElementIntegralMaterialProperty);
657  registerPostprocessor(ElementL2Error);
658  registerPostprocessor(ElementVectorL2Error);
659  registerPostprocessor(ScalarL2Error);
660  registerPostprocessor(EmptyPostprocessor);
661  registerPostprocessor(FindValueOnLine);
662  registerPostprocessor(NodalVariableValue);
663  registerPostprocessor(NumDOFs);
664  registerPostprocessor(TimestepSize);
665  registerPostprocessor(PerformanceData);
666  registerPostprocessor(MemoryUsage);
667  registerPostprocessor(NumElems);
668  registerPostprocessor(NumNodes);
669  registerPostprocessor(NumNonlinearIterations);
670  registerPostprocessor(NumLinearIterations);
671  registerPostprocessor(Residual);
672  registerPostprocessor(ScalarVariable);
673  registerPostprocessor(NumVars);
674  registerPostprocessor(NumResidualEvaluations);
675  registerPostprocessor(Receiver);
676  registerPostprocessor(SideAverageValue);
677  registerPostprocessor(SideFluxIntegral);
678  registerPostprocessor(SideFluxAverage);
679  registerPostprocessor(SideIntegralVariablePostprocessor);
680  registerPostprocessor(NodalMaxValue);
681  registerPostprocessor(NodalProxyMaxValue);
682  registerPostprocessor(ElementalVariableValue);
683  registerPostprocessor(ElementL2Norm);
684  registerPostprocessor(NodalL2Norm);
685  registerPostprocessor(NodalL2Error);
686  registerPostprocessor(TotalVariableValue);
687  registerPostprocessor(VolumePostprocessor);
688  registerPostprocessor(AreaPostprocessor);
689  registerPostprocessor(PointValue);
690  registerPostprocessor(NodalExtremeValue);
691  registerPostprocessor(ElementExtremeValue);
692  registerPostprocessor(DifferencePostprocessor);
693  registerPostprocessor(RelativeDifferencePostprocessor);
694  registerPostprocessor(ScalePostprocessor);
695  registerPostprocessor(LinearCombinationPostprocessor);
696  registerPostprocessor(FunctionValuePostprocessor);
697  registerPostprocessor(NumPicardIterations);
698  registerPostprocessor(FunctionSideIntegral);
699  registerPostprocessor(ExecutionerAttributeReporter);
700  registerPostprocessor(PercentChangePostprocessor);
701  registerPostprocessor(ElementL2Difference);
702  registerPostprocessor(TimeExtremeValue);
703  registerPostprocessor(RelativeSolutionDifferenceNorm);
704  registerPostprocessor(AxisymmetricCenterlineAverageValue);
705  registerPostprocessor(VariableInnerProduct);
706  registerPostprocessor(VariableResidual);
707 
708  // vector PPS
709  registerVectorPostprocessor(CSVReader);
710  registerVectorPostprocessor(ConstantVectorPostprocessor);
711  registerVectorPostprocessor(Eigenvalues);
712  registerVectorPostprocessor(ElementVariablesDifferenceMax);
713  registerVectorPostprocessor(ElementsAlongLine);
714  registerVectorPostprocessor(ElementsAlongPlane);
715  registerVectorPostprocessor(IntersectionPointsAlongLine);
716  registerVectorPostprocessor(LeastSquaresFit);
717  registerVectorPostprocessor(LineFunctionSampler);
718  registerVectorPostprocessor(LineMaterialRealSampler);
719  registerVectorPostprocessor(LineValueSampler);
720  registerVectorPostprocessor(MaterialVectorPostprocessor);
721  registerVectorPostprocessor(NodalValueSampler);
722  registerVectorPostprocessor(PointValueSampler);
723  registerVectorPostprocessor(SideValueSampler);
724  registerVectorPostprocessor(SphericalAverage);
725  registerVectorPostprocessor(VectorOfPostprocessors);
726  registerVectorPostprocessor(VolumeHistogram);
727 
728  // user objects
729  registerUserObject(GeometrySphere);
730  registerUserObject(LayeredIntegral);
731  registerUserObject(LayeredAverage);
732  registerUserObject(LayeredSideIntegral);
733  registerUserObject(LayeredSideAverage);
734  registerUserObject(LayeredSideFluxAverage);
735  registerUserObject(NearestPointLayeredAverage);
736  registerUserObject(ElementIntegralVariableUserObject);
737  registerUserObject(NodalNormalsPreprocessor);
738  registerUserObject(NodalNormalsCorner);
739  registerUserObject(NodalNormalsEvaluator);
740  registerUserObject(SolutionUserObject);
741  registerUserObject(PerflogDumper);
742 #ifdef LIBMESH_HAVE_FPARSER
743  registerUserObject(Terminator);
744 #endif
745 
746  // preconditioners
747  registerNamedPreconditioner(PhysicsBasedPreconditioner, "PBP");
748  registerNamedPreconditioner(FiniteDifferencePreconditioner, "FDP");
749  registerNamedPreconditioner(SingleMatrixPreconditioner, "SMP");
750 #if defined(LIBMESH_HAVE_PETSC) && !PETSC_VERSION_LESS_THAN(3, 3, 0)
751  registerNamedPreconditioner(FieldSplitPreconditioner, "FSP");
752 #endif
753  // dampers
754  registerDamper(ConstantDamper);
755  registerDamper(MaxIncrement);
756  registerDamper(BoundingValueNodalDamper);
757  registerDamper(BoundingValueElementDamper);
758  // DG
759  registerDGKernel(DGDiffusion);
760  registerBoundaryCondition(DGFunctionDiffusionDirichletBC);
761  registerDGKernel(DGConvection);
762 
763  // Constraints
764  registerConstraint(TiedValueConstraint);
765  registerConstraint(CoupledTiedValueConstraint);
766  registerConstraint(EqualGradientConstraint);
767  registerConstraint(EqualValueConstraint);
768  registerConstraint(EqualValueBoundaryConstraint);
769  registerConstraint(LinearNodalConstraint);
770 
771  // Scalar kernels
772  registerScalarKernel(ODETimeDerivative);
773  registerScalarKernel(CoupledODETimeDerivative);
774  registerScalarKernel(NodalEqualValueConstraint);
775  registerScalarKernel(ParsedODEKernel);
776  registerScalarKernel(QuotientScalarAux);
777 
778  // indicators
779  registerIndicator(AnalyticalIndicator);
780  registerIndicator(LaplacianJumpIndicator);
781  registerIndicator(GradientJumpIndicator);
782 
783  // markers
784  registerMarker(ErrorToleranceMarker);
785  registerMarker(ErrorFractionMarker);
786  registerMarker(UniformMarker);
787  registerMarker(BoxMarker);
788  registerMarker(OrientedBoxMarker);
789  registerMarker(ComboMarker);
790  registerMarker(ValueThresholdMarker);
791  registerMarker(ValueRangeMarker);
792 
793  // splits
794  registerSplit(Split);
795 
796  // MultiApps
797  registerMultiApp(TransientMultiApp);
798  registerMultiApp(FullSolveMultiApp);
799  registerMultiApp(AutoPositionsMultiApp);
800 
801  // time steppers
802  registerTimeStepper(ConstantDT);
803  registerTimeStepper(LogConstantDT);
804  registerTimeStepper(FunctionDT);
805  registerTimeStepper(TimeSequenceStepper);
806  registerTimeStepper(ExodusTimeSequenceStepper);
807  registerTimeStepper(CSVTimeSequenceStepper);
808  registerTimeStepper(IterationAdaptiveDT);
809  registerTimeStepper(SolutionTimeAdaptiveDT);
810  registerTimeStepper(DT2);
811  registerTimeStepper(PostprocessorDT);
812  registerTimeStepper(AB2PredictorCorrector);
813  // time integrators
814  registerTimeIntegrator(ImplicitEuler);
815  registerTimeIntegrator(BDF2);
816  registerTimeIntegrator(CrankNicolson);
817  registerTimeIntegrator(ExplicitEuler);
818  registerTimeIntegrator(ExplicitMidpoint);
819  registerTimeIntegrator(ExplicitTVDRK2);
820  registerTimeIntegrator(LStableDirk2);
821  registerTimeIntegrator(LStableDirk3);
822  registerTimeIntegrator(AStableDirk4);
823  registerTimeIntegrator(LStableDirk4);
824  registerTimeIntegrator(ImplicitMidpoint);
825  registerTimeIntegrator(Heun);
826  registerTimeIntegrator(Ralston);
827  // predictors
828  registerPredictor(SimplePredictor);
829  registerPredictor(AdamsPredictor);
830 
831 // Transfers
832 #ifdef LIBMESH_TRILINOS_HAVE_DTK
833  registerTransfer(MultiAppDTKUserObjectTransfer);
834  registerTransfer(MultiAppDTKInterpolationTransfer);
835 #endif
837  registerTransfer(MultiAppVariableValueSampleTransfer);
839  registerTransfer(MultiAppMeshFunctionTransfer);
840  registerTransfer(MultiAppUserObjectTransfer);
841  registerTransfer(MultiAppNearestNodeTransfer);
842  registerTransfer(MultiAppCopyTransfer);
843  registerTransfer(MultiAppInterpolationTransfer);
844  registerTransfer(MultiAppPostprocessorTransfer);
845  registerTransfer(MultiAppProjectionTransfer);
847  registerTransfer(MultiAppScalarToAuxScalarTransfer);
848 
849 // Outputs
850 #ifdef LIBMESH_HAVE_EXODUS_API
851  registerOutput(Exodus);
852 #endif
853 #ifdef LIBMESH_HAVE_NEMESIS_API
854  registerOutput(Nemesis);
855 #endif
856  registerOutput(Console);
857  registerOutput(CSV);
858 #ifdef LIBMESH_HAVE_VTK
859  registerNamedOutput(VTKOutput, "VTK");
860 #endif
861  registerOutput(Checkpoint);
862  registerNamedOutput(XDA, "XDR");
863  registerOutput(XDA);
864  registerNamedOutput(GMVOutput, "GMV");
865  registerOutput(Tecplot);
866  registerOutput(Gnuplot);
867  registerOutput(SolutionHistory);
868  registerOutput(MaterialPropertyDebugOutput);
869  registerOutput(VariableResidualNormsDebugOutput);
870  registerOutput(TopResidualDebugOutput);
871  registerNamedOutput(DOFMapOutput, "DOFMap");
872  registerOutput(ControlOutput);
873 
874  // Controls
875  registerControl(RealFunctionControl);
876  registerControl(TimePeriod);
877 
878  // Partitioner
879  registerPartitioner(LibmeshPartitioner);
880 
881  // NodalKernels
882  registerNodalKernel(TimeDerivativeNodalKernel);
883  registerNodalKernel(ConstantRate);
884  registerNodalKernel(UserForcingFunctionNodalKernel);
885 
886  registered = true;
887 }
DG kernel for diffusion.
Definition: DGDiffusion.h:36
Sum_over_i (w_i * functions_i)
Transfers from spatially varying Interpolations in a MultiApp to the "master" system.
Integrate a post-processor value over time using trapezoidal rule.
This kernel implements a generic functional body force term: $ - c f $.
Definition: BodyForce.h:35
Defines a boundary condition that forces the value to be a user specified function at the boundary...
Definition: FunctionIC.h:37
Fourth-order diagonally implicit Runge Kutta method (Dirk) with five stages.
Definition: LStableDirk4.h:62
Computes a linear combination between an arbitrary number of post-processors.
Function which provides a piecewise continuous linear interpolation of a data set provided as two col...
Simple time-stepper which imposes a time step constant in the logarithmic space.
Definition: LogConstantDT.h:27
Class that represents constant function.
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
Automatically generates Sub-App positions from positions in the master app&#39;s mesh.
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:36
Solves the PDEs at a sequence of time points given as a column in a text table file (such as a *...
Computes the magnitude of a vector whose components are given by up to three coupled variables...
The explicit midpoint time integration method.
This class samples Real material properties for the integration points in all elements that are inter...
Initial condition to set different values on each component of scalar variable.
Compute an elemental field variable (single value per element) equal to the Lp-norm of a coupled Vari...
Implements a preconditioner designed to map onto PETSc&#39;s PCFieldSplit.
Base class for split-based preconditioners.
Definition: Split.h:30
Second-order Runge-Kutta (implicit midpoint) time integration.
MeshModifier for re-numbering or re-naming blocks.
Definition: RenameBlock.h:30
A class for computing the element-wise H1 error (actually W^{1,p} error, if you set the value of p to...
Compute a histogram of volume fractions binned according to variable values.
This postprocessor computes a volume integral of the specified variable.
A basic control for changing an input parameter using a Function.
AuxKernel for outputting a std::vector material-property component to an AuxVariable.
A spatially-constant, time-varying NodalBC whose imposed value g(t) varies sinusoidally with time acc...
A function for extracting data from an image or stack of images.
Definition: ImageFunction.h:31
Computes the difference between two postprocessors.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:30
Computes the distance from a block or boundary to another boundary.
A CoupledTiedValueConstraint forces the value of a variable to be the same on both sides of an interf...
A class for computing the element-wise L^2 error (actually L^p error, if you set the value of p to so...
This kernel implements the Laplacian operator multiplied by a 2nd order tensor giving anisotropic (di...
This UserObject computes side averages of a flux storing partial sums for the specified number of int...
This postprocessor computes the volume of a specified block.
ScalarConstantIC just returns a constant value.
Computes the max value at a node and broadcasts it to all processors.
Implements a simple Vacuum BC for neutron diffusion on the boundary.
Definition: VacuumBC.h:32
An output object for writing to the console (screen)
Definition: Console.h:30
This postprocessor will print out the h1 seminorm between the computed solution and the passed functi...
Creates a box of specified width, length and height, with its center at specified position...
AuxKernel for outputting a DenseMatrix<Real> material property component to an AuxVariable.
Compute the value of a variable at a specified location.
Definition: PointValue.h:32
This class implements a damper that limits the value of a variable to be within user-specified bounds...
This postprocessor computes an average element size (h) for the whole domain.
MeshModifier for defining a Subdomain inside or outside of a bounding box with arbitrary orientation...
An ElementUserObject that prepares MOOSE for computing nodal normals.
A TiedValueConstraint forces the value of a variable to be the same on both sides of an interface...
Constant auxiliary value.
Definition: ConstantAux.h:29
This postprocessor computes a volume integral of the specified variable.
NumNonlinearIterations is a postprocessor that reports the number of nonlinear iterations.
This kernel is used for testing derivatives of a material property.
Auxiliary kernel for debugging convergence.
Function auxiliary value.
Fills in the "bounds vectors" to provide an upper and lower bound for the variable that is coupled in...
Definition: BoundsAux.h:34
Third order diagonally implicit Runge Kutta method (Dirk) with three stages.
Definition: LStableDirk3.h:51
Adjust the timestep based on the number of iterations.
Steady executioners usually only call "solve()" on the NonlinearSystem once.
Definition: Steady.h:37
Function which provides a piecewise continuous constant interpolation of a provided (x...
Constrain a specified component of the gradient of a variable to be the same on both sides of an inte...
Computes the change in a post-processor value, or the magnitude of its relative change, over a time step.
Copy the value to the target domain from the nearest node in the source domain.
Function which provides a piecewise continuous linear interpolation of a provided (x...
MultiApp Implementation for Transient Apps.
A class for producing various debug related outputs.
AuxKernel for outputting a RealTensorValue material property component to an AuxVariable.
A class to report class attributes value from Executioners.
This is the term from the mortar method.
static bool registered
Definition: Moose.C:485
This class is used to evaluate symbolic equations passed in to Moose through the input file...
Class for output data to the XDAII format.
Definition: XDA.h:30
This calculates the time derivative for a coupled variable.
Copies the value of a SCALAR variable from one App to another.
Transfers from spatially varying UserObjects in a MultiApp to the "master" system.
Based class for adding basic filename support to output base class.
Definition: Gnuplot.h:32
A FluxBC which is consistent with the boundary terms arising from the Diffusion Kernel.
Boundary condition of a Neumann style whose value is computed by a user-defined function.
MeshModifier for assigning a subdomain ID to all elements.
Simple class to demonstrate off diagonal Jacobian contributions.
Definition: CoupledForce.h:29
This kernel implements the Laplacian operator: $ u $.
Definition: Diffusion.h:29
Copy the value to the target domain from the nearest node in the source domain.
Implements an explicit Adams predictor based on two old solution vectors.
Transfers from spatially varying PostprocessorInterpolations in a MultiApp to the "master" system...
This kernel is used for testing derivatives of a material property.
This class will add sidesets to the entire mesh based on unique normals.
A SimplePredictor uses an algorithm that will predict the next solution based on previous solutions...
Reads an arbitrary set of meshes and attempts to "stitch" (join) them along boundaries.
Definition: StitchedMesh.h:35
Base class for function objects.
This UserObject computes side averages of a variable storing partial sums for the specified number of...
BDF2 time integrator.
Definition: BDF2.h:28
This postprocessor computes the area of a specified block.
This auxiliary kernel computes its value by dividing "numerator" by "denominator. ...
Constrain the value of a variable to be the same on both sides of an interface.
MeshModifier for defining a Sideset by a parsed expression and optionally by looking at the subdomain...
Samples a variable&#39;s value in the Master domain at the point where the MultiApp is.
Defines a boundary condition that forces the value to be a user specified function at the boundary...
AuxKernel that evaluates a parsed function expression.
Definition: ParsedAux.h:30
BoundingBoxIC allows setting the initial condition of a value inside and outside of a specified box...
Definition: BoundingBoxIC.h:51
Solves the PDEs at a sequence of time points given as a vector in the input file. ...
An adaptive timestepper that compares the solution obtained from a single step of size dt with two st...
Definition: DT2.h:38
Implements a flux boundary condition grad(u).n = V.n, where the vector V is specifed by the user...
This postprocessor displays a single value which is supplied by a MooseFunction.
Scale a postprocessor.
A class for producing various debug related outputs.
This UserObject computes averages of a variable storing partial sums for the specified number of inte...
Simple constant damper.
This UserObject computes averages of a variable storing partial sums for the specified number of inte...
Gets the relative solution norm from the transient executioner.
Computes the absolute value of the relative difference between 2 post-processor values.
This material automatically declares as material properties whatever is passed to it through the para...
This postprocessor computes a side integral of the mass flux.
A basic control for disabling objects for a portion of the simulation.
Definition: TimePeriod.h:31
Adds the faces on the boundary of given block to the sidesets specified by "boundary" Optionally...
VectorOfPostprocessors is a type of VectorPostprocessor that outputs the values of an arbitrary user-...
Mesh generated from parameters.
Definition: GeneratedMesh.h:28
Reads one or more 2D mesh files and stitches them together based on a provided two-dimensional patter...
Definition: PatternedMesh.h:41
Find a specific target value along a sampling line.
Heun&#39;s (aka improved Euler) time integration method.
Definition: Heun.h:36
Copy the value to the target domain from the nearest node in the source domain.
Sums a nodal value across all processors and multiplies the result by a scale factor.
This class implements a damper that limits the value of a variable to be within user-specified bounds...
Based class for adding basic filename support to output base class.
Definition: CSV.h:32
Project values from one domain to another.
Boundary condition of a Dirichlet type.
void deprecateObject(const std::string &name)
Allow objects to be deprecated via function call.
Definition: Factory.C:158
Class for output data to the ExodusII format.
Definition: Exodus.h:36
Boundary condition of a Dirichlet type.
Definition: DirichletBC.h:30
MeshModifier for defining a Subdomains based on Image data.
A postprocessor for collecting the nodal min or max value.
Implements a constant Neumann BC where grad(u) is a equal to a postprocessor on the boundary...
Implements a segregated solve preconditioner.
LeastSquaresFit is a VectorPostprocessor that performs a least squares fit on data calculated in anot...
Defines a boundary condition that forces the value to be a user specified function at the boundary...
Function auxiliary value.
Definition: FunctionAux.h:30
Copies the value of a Postprocessor from one app to a scalar AuxVariable in another.
This material automatically declares as material properties whatever is passed to it through the para...
TODO:
Definition: PresetBC.h:28
The slave node variable is programmed as a linear combination of the master node variables (i...
Function for reading a 2D axisymmetric solution from file and mapping it to a 3D Cartesian system...
RandomIC just returns a Random value.
Definition: RandomIC.h:40
An output object for writing the DOF map of the system in a machine parsable format.
Definition: DOFMapOutput.h:31
Samples a variable&#39;s value in the Master domain at the point where the MultiApp is.
MeshModifier for defining a Subdomain inside or outside of a bounding box.
Weakly enforce a Dirichlet BC using a penalty term.
Computes the value of dt based on a postprocessor value.
This kernel is used for testing derivatives of a material property.
Transfers a vector of variables.
This class computes a maximum (over all the nodal values) of the coupled variable.
Definition: NodalMaxValue.h:30
This Userobject requests termination of the current solve based on the values of Postprocessors (and ...
Definition: Terminator.h:45
This auxiliary kernel normalizes a variable based on a postprocessor.
Mesh generated from parameters.
Definition: AnnularMesh.h:28
Represents the rate in a simple ODE of du/dt = f.
Get all of the elements that are intersected by a plane.
Class for output data to the TecplotII format.
Definition: Tecplot.h:30
Function for reading a solution from file Creates a function that extracts values from a solution rea...
Get the intersection points for all of the elements that are intersected by a line.
This postprocessor computes the integral of a function over a specified boundary. ...
Fourth-order diagonally implicit Runge Kutta method (Dirk) with three stages plus an update...
Definition: AStableDirk4.h:62
Solves the PDEs at a sequence of time points given as a vector in the input file. ...
Finds the closest node on a paired boundary to the current node or element and stores a corresponding...
Output maximum, average, or total process memory usage.
Definition: MemoryUsage.h:28
Ralston&#39;s time integration method.
Definition: Ralston.h:36
Implements a simple constant Neumann BC where grad(u)=value on the boundary.
Definition: NeumannBC.h:29
This class is similar to ParsedFunction except it also supports returning the gradient of the functio...
A postprocessor for collecting the nodal min or max value.
Auxiliary kernel responsible for computing the components of the flux vector in diffusion problems...
Computes a sum of the nodal values of the coupled variable.
Definition: NodalSum.h:29
Finite difference preconditioner.
Samples a variable&#39;s value in the Master domain at the point where the MultiApp is.
Sets a constant value on a scalar variable.
This material uses a LinearInterpolation object to define the dependence of the material&#39;s value on a...
A different approach to applying Dirichlet BCs.
Explicit Euler time integrator.
Definition: ExplicitEuler.h:28
Function that uses spline interpolation.
Snaps the selected nodes to the surface of a sphere (or circular disk in 2D)
Constraint to enforce equal values (in 1D)
Extract a component from the gradient of a variable.
Just returns the total number of Residual Evaluations performed.
Creates a cumulative sum of a post-processor value over a transient.
Object for passing a scalar, REAL material property to an AuxVariable.
This postprocessor will print out the H^1-norm of the difference between the computed solution and th...
PiecewiseBilinear reads from a file the information necessary to build the vectors x and y and the Co...
This postprocessor computes a volume integral of the time derivative of a given variable.
Self auxiliary value.
Definition: SelfAux.h:29
AuxKernel for outputting a std::vector material-property component to an AuxVariable.
This postprocessor computes a volume integral of the specified variable.
Works on top of NodalNormalsPreprocessor.
MeshModifier for defining a Subdomain inside or outside of combinatorial geometry.
Selects a set of nodes and assigns a nodeset name to them based on the bounding box specified...
Records all post processor data in a CSV file.
Definition: PerflogDumper.h:26
A class for producing various debug related outputs.
Returns the number of Picard iterations taken by the underlying Transient Executioner as a Postproces...
AuxKernel for reading a solution from file.
Definition: SolutionAux.h:33
MeshModifier for defining a Subdomain inside or outside of a bounding box.
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
Implements a spatially-constant, time-varying flux boundary condition grad(u).n = g(t)...
Definition: SinNeumannBC.h:38
A class for storing data, it allows the user to change the value of the postprocessor by altering the...
Definition: Receiver.h:30
This postprocessor computes a line integral of the specified variable along the centerline of an axis...
Represents the rate in a simple ODE of du/dt = rate.
Definition: ConstantRate.h:29
Single matrix preconditioner.
Add lower dimensional elements along the faces contained in a side set.
Definition: MeshSideSet.h:28
ConstantIC just returns a constant value.
Definition: ConstantIC.h:41
This postprocessor computes a volume integral of the specified variable.
Finds the largest difference between two variable fields.
Declares a constant material property of type RankTwoTensor.
Second order diagonally implicit Runge Kutta method (Dirk) with two stages.
Definition: LStableDirk2.h:49
Sets a value of a scalar variable based on the function.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: EigenProblem.h:32
Computes the L2-Norm difference between two solution fields.
Get all of the elements that are intersected by a line.
Explicit TVD (total-variation-diminishing) second-order Runge-Kutta time integration methods: ...
Class for output information regarding Controls to the screen.
Definition: ControlOutput.h:30
Computes the min or max of element length.
User object that reads an existing solution from an input file and uses it in the current simulation...
AuxKernel for outputting a RealVectorValue material property component to an AuxVariable.
Class for output data to the GMVOutputII format.
Definition: GMVOutput.h:30
Copies the value of a Postprocessor from the Master to a MultiApp.
A TimeStepper based on the AB2 method.
This class is similar to ParsedFunction except it returns a vector function.
This postprocessor records all scalar material properties of the specified material object on specifi...
Compute a spherical average of a variableas a function of radius throughout the simulation domain...
Function that uses spline interpolation.
MeshModifier for assigning subdomain IDs of all elements.
Crank-Nicolson time integrator.
Definition: CrankNicolson.h:33
This postprocessor computes a volume integral of the specified variable.
A 2D GeneratedMesh where xmin, xmax, etc.
Definition: ImageMesh.h:29
This type of MultiApp will completely solve itself the first time it is asked to take a step...
An AuxKernel that can be used to integrate a field variable in time using a variety of different inte...
Implicit Euler&#39;s method.
Definition: ImplicitEuler.h:28
A postprocessor for reporting the max/min value of another postprocessor over time.
This auxiliary kernel computes its value by dividing "numerator" by "denominator. ...
Definition: QuotientAux.h:32
Based class for adding basic filename support to output base class.
Computes the "nodal" L2-norm of the coupled variable, which is defined by summing the square of its v...
Definition: NodalL2Norm.h:31
Postprocessor for computing the error in a scalar value relative to a known Function&#39;s value...
Definition: ScalarL2Error.h:33
This postprocessor displays the change in the postprocessor between adjacent timesteps.
Class for output data to the Nemesis format.
Definition: Nemesis.h:36
This postprocessor computes the Sobolev norm W^{1,p} of the difference between the computed solution ...
Implements a simple coupled boundary condition where u=v on the boundary.
A FluxBC which is consistent with the boundary terms arising from the Diffusion Kernel.
void Moose::restrictPointToFace ( Point &  p,
const Elem *  side,
std::vector< const Node * > &  off_edge_nodes 
)

Definition at line 259 of file FindContactPoint.C.

Referenced by findContactPoint().

260 {
261  const ElemType t(side->type());
262  off_edge_nodes.clear();
263  Real & xi = p(0);
264  Real & eta = p(1);
265 
266  switch (t)
267  {
268  case EDGE2:
269  case EDGE3:
270  case EDGE4:
271  {
272  // The reference 1D element is [-1,1].
273  if (xi < -1.0)
274  {
275  xi = -1.0;
276  off_edge_nodes.push_back(side->node_ptr(0));
277  }
278  else if (xi > 1.0)
279  {
280  xi = 1.0;
281  off_edge_nodes.push_back(side->node_ptr(1));
282  }
283  break;
284  }
285 
286  case TRI3:
287  case TRI6:
288  {
289  // The reference triangle is isosceles
290  // and is bound by xi=0, eta=0, and xi+eta=1.
291 
292  if (xi <= 0.0 && eta <= 0.0)
293  {
294  xi = 0.0;
295  eta = 0.0;
296  off_edge_nodes.push_back(side->node_ptr(0));
297  }
298  else if (xi > 0.0 && xi < 1.0 && eta < 0.0)
299  {
300  eta = 0.0;
301  off_edge_nodes.push_back(side->node_ptr(0));
302  off_edge_nodes.push_back(side->node_ptr(1));
303  }
304  else if (eta > 0.0 && eta < 1.0 && xi < 0.0)
305  {
306  xi = 0.0;
307  off_edge_nodes.push_back(side->node_ptr(2));
308  off_edge_nodes.push_back(side->node_ptr(0));
309  }
310  else if (xi >= 1.0 && (eta - xi) <= -1.0)
311  {
312  xi = 1.0;
313  eta = 0.0;
314  off_edge_nodes.push_back(side->node_ptr(1));
315  }
316  else if (eta >= 1.0 && (eta - xi) >= 1.0)
317  {
318  xi = 0.0;
319  eta = 1.0;
320  off_edge_nodes.push_back(side->node_ptr(2));
321  }
322  else if ((xi + eta) > 1.0)
323  {
324  Real delta = (xi + eta - 1.0) / 2.0;
325  xi -= delta;
326  eta -= delta;
327  off_edge_nodes.push_back(side->node_ptr(1));
328  off_edge_nodes.push_back(side->node_ptr(2));
329  }
330  break;
331  }
332 
333  case QUAD4:
334  case QUAD8:
335  case QUAD9:
336  {
337  // The reference quadrilateral element is [-1,1]^2.
338  if (xi < -1.0)
339  {
340  xi = -1.0;
341  if (eta < -1.0)
342  {
343  eta = -1.0;
344  off_edge_nodes.push_back(side->node_ptr(0));
345  }
346  else if (eta > 1.0)
347  {
348  eta = 1.0;
349  off_edge_nodes.push_back(side->node_ptr(3));
350  }
351  else
352  {
353  off_edge_nodes.push_back(side->node_ptr(3));
354  off_edge_nodes.push_back(side->node_ptr(0));
355  }
356  }
357  else if (xi > 1.0)
358  {
359  xi = 1.0;
360  if (eta < -1.0)
361  {
362  eta = -1.0;
363  off_edge_nodes.push_back(side->node_ptr(1));
364  }
365  else if (eta > 1.0)
366  {
367  eta = 1.0;
368  off_edge_nodes.push_back(side->node_ptr(2));
369  }
370  else
371  {
372  off_edge_nodes.push_back(side->node_ptr(1));
373  off_edge_nodes.push_back(side->node_ptr(2));
374  }
375  }
376  else
377  {
378  if (eta < -1.0)
379  {
380  eta = -1.0;
381  off_edge_nodes.push_back(side->node_ptr(0));
382  off_edge_nodes.push_back(side->node_ptr(1));
383  }
384  else if (eta > 1.0)
385  {
386  eta = 1.0;
387  off_edge_nodes.push_back(side->node_ptr(2));
388  off_edge_nodes.push_back(side->node_ptr(3));
389  }
390  }
391  break;
392  }
393 
394  default:
395  {
396  mooseError("Unsupported face type: ", t);
397  break;
398  }
399  }
400 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
bool Moose::setColorConsole ( bool  use_color,
bool  force = false 
)

Turns color escape sequences on/off for info written to stdout.

Returns the the set value which may be different than use_color.

Definition at line 1276 of file Moose.C.

Referenced by CommonOutputAction::act(), Console::Console(), and MooseApp::setupOptions().

1277 {
1278  _color_console = (isatty(fileno(stdout)) || force) && use_color;
1279  return _color_console;
1280 }
static bool _color_console
Definition: Moose.C:1267
void Moose::setSolverDefaults ( FEProblemBase problem)

Definition at line 1233 of file Moose.C.

Referenced by FEProblemBase::solve(), and DT2::step().

1234 {
1235 #ifdef LIBMESH_HAVE_PETSC
1236  // May be a touch expensive to create a new DM every time, but probably safer to do it this way
1238 #endif // LIBMESH_HAVE_PETSC
1239 }
void petscSetDefaults(FEProblemBase &problem)
Sets the default options for PETSc.
Definition: PetscSupport.C:560
int Moose::sideIntersectedByLine ( const Elem *  elem,
std::vector< int > &  not_side,
const LineSegment line_segment,
Point &  intersection_point 
)

Figure out which (if any) side of an Elem is intersected by a line.

Parameters
elemThe elem to search
not_sideSides to not search (Use -1 if you want to search all sides)
intersection_pointIf an intersection is found this will be filled with the x,y,z position of that intersection
Returns
The side that is intersected by the line. Will return -1 if it doesn't intersect any side

Definition at line 39 of file RayTracing.C.

Referenced by recursivelyFindElementsIntersectedByLine().

43 {
44  unsigned int n_sides = elem->n_sides();
45 
46  // Whether or not they intersect
47  bool intersect = false;
48 
49  unsigned int dim = elem->dim();
50 
51  for (unsigned int i = 0; i < n_sides; i++)
52  {
53  // Don't search the "not_side"
54  // Note: A linear search is fine here because this vector is going to be < n_sides
55  if (std::find(not_side.begin(), not_side.end(), static_cast<int>(i)) != not_side.end())
56  continue;
57 
58  // Get a simplified side element
59  std::unique_ptr<Elem> side_elem = elem->side(i);
60 
61  if (dim == 3)
62  {
63  // Make a plane out of the first three nodes on the side
64  Plane plane(side_elem->point(0), side_elem->point(1), side_elem->point(2));
65 
66  // See if they intersect
67  intersect = line_segment.intersect(plane, intersection_point);
68  }
69  else if (dim == 2)
70  {
71  // Make a Line Segment out of the first two nodes on the side
72  LineSegment side_segment(side_elem->point(0), side_elem->point(1));
73 
74  // See if they intersect
75  intersect = line_segment.intersect(side_segment, intersection_point);
76  }
77  else // 1D
78  {
79  // See if the line segment contains the point
80  intersect = line_segment.contains_point(side_elem->point(0));
81 
82  // If it does then save off that one point as the intersection point
83  if (intersect)
84  intersection_point = side_elem->point(0);
85  }
86 
87  if (intersect)
88  {
89  if (side_elem->contains_point(intersection_point))
90  {
91  const Elem * neighbor = elem->neighbor_ptr(i);
92 
93  // If this side is on a boundary, let's do another search and see if we can find a better
94  // candidate
95  if (!neighbor)
96  {
97  not_side.push_back(i); // Make sure we don't find this side again
98 
99  int better_side = sideIntersectedByLine(elem, not_side, line_segment, intersection_point);
100 
101  if (better_side != -1)
102  return better_side;
103  }
104 
105  return i;
106  }
107  }
108  }
109 
110  // Didn't find one
111  return -1;
112 }
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff...
Definition: LineSegment.h:33
bool contains_point(const Point &p) const
Determines whether a point is in a line segment or not.
Definition: LineSegment.C:62
bool intersect(const Plane &pl, Point &intersect_p) const
Definition: LineSegment.C:69
int sideIntersectedByLine(const Elem *elem, std::vector< int > &not_side, const LineSegment &line_segment, Point &intersection_point)
Figure out which (if any) side of an Elem is intersected by a line.
Definition: RayTracing.C:39
int Moose::sideNeighborIsOn ( const Elem *  elem,
const Elem *  neighbor 
)

Returns the side number for elem that neighbor is on.

Returns -1 if the neighbor can't be found to be a neighbor

Definition at line 120 of file RayTracing.C.

Referenced by recursivelyFindElementsIntersectedByLine().

121 {
122  unsigned int n_sides = elem->n_sides();
123 
124  for (unsigned int i = 0; i < n_sides; i++)
125  {
126  if (elem->neighbor_ptr(i) == neighbor)
127  return i;
128  }
129 
130  return -1;
131 }
template<typename T >
std::string Moose::stringify ( const T &  t)
std::string Moose::stringify ( const SolveType t)

Convert solve type into human readable string.

Definition at line 366 of file Conversion.C.

367 {
368  switch (t)
369  {
370  case ST_NEWTON:
371  return "NEWTON";
372  case ST_JFNK:
373  return "JFNK";
374  case ST_PJFNK:
375  return "Preconditioned JFNK";
376  case ST_FD:
377  return "FD";
378  case ST_LINEAR:
379  return "Linear";
380  }
381  return "";
382 }
Full Newton Solve.
Definition: MooseTypes.h:249
Solving a linear problem.
Definition: MooseTypes.h:251
Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:248
Use finite differences to compute Jacobian.
Definition: MooseTypes.h:250
Preconditioned Jacobian-Free Newton Krylov.
Definition: MooseTypes.h:247
std::string Moose::stringify ( const ExecFlagType t)

Convert execute flags type into human readable string.

Definition at line 385 of file Conversion.C.

386 {
387  switch (t)
388  {
389  case EXEC_INITIAL:
390  return "INITIAL";
391  case EXEC_LINEAR:
392  return "LINEAR";
393  case EXEC_NONLINEAR:
394  return "NONLINEAR";
395  case EXEC_TIMESTEP_END:
396  return "TIMESTEP_END";
397  case EXEC_TIMESTEP_BEGIN:
398  return "TIMESTEP_BEGIN";
399  case EXEC_CUSTOM:
400  return "CUSTOM";
401  case EXEC_FINAL:
402  return "FINAL";
403  case EXEC_FORCED:
404  return "FORCED";
405  case EXEC_FAILED:
406  return "FAILED";
407  case EXEC_SUBDOMAIN:
408  return "SUBDOMAIN";
409  case EXEC_NONE:
410  return "NONE";
411  }
412  return "";
413 }
Object is evaluated in every residual computation.
Definition: MooseTypes.h:96
For use with custom executioners that want to fire objects at a specific time.
Definition: MooseTypes.h:110
Object is evaluated only once at the beginning of the simulation.
Definition: MooseTypes.h:94
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Forces execution to occur (output only)
Definition: MooseTypes.h:106
Objects is evaluated on subdomain.
Definition: MooseTypes.h:112
Forces execution on failed solve (output only)
Definition: MooseTypes.h:108
Object is evaluated at the end of the simulations (output only)
Definition: MooseTypes.h:104
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
Object is evaluated in every jacobian computation.
Definition: MooseTypes.h:98
std::string Moose::stringify ( const std::string &  s)

Add no-op stringify if the argument already is a string (must use overloading)

Definition at line 416 of file Conversion.C.

417 {
418  return s;
419 }
template<typename T , typename U >
std::string Moose::stringify ( const std::pair< T, U > &  p)

Add pair stringify to support maps.

Definition at line 85 of file Conversion.h.

86 {
87  return stringify(p.first) + ':' + stringify(p.second);
88 }
std::string stringify(const T< U... > &c, const std::string &delim=",")
Convert a container to a flat comma (or otherwise) separated string.
Definition: Conversion.h:93
template<template< typename... > class T, typename... U>
std::string Moose::stringify ( const T< U... > &  c,
const std::string &  delim = "," 
)

Convert a container to a flat comma (or otherwise) separated string.

Definition at line 93 of file Conversion.h.

94 {
95  std::string str;
96  const auto begin = c.begin(), end = c.end();
97  for (auto i = begin; i != end; ++i)
98  str += (i != begin ? delim : "") + stringify(*i);
99  return str;
100 }
std::string stringify(const T< U... > &c, const std::string &delim=",")
Convert a container to a flat comma (or otherwise) separated string.
Definition: Conversion.h:93
std::string Moose::stringifyExact ( Real  t)

Stringify Reals with enough precision to guarantee lossless Real -> string -> Real roundtrips.

Definition at line 422 of file Conversion.C.

Referenced by stringify().

423 {
424  // this or std::numeric_limits<T>::max_digits10
425  const unsigned int max_digits10 =
426  std::floor(std::numeric_limits<Real>::digits * std::log10(2) + 2);
427 
428  std::ostringstream os;
429  os << std::setprecision(max_digits10) << t;
430  return os.str();
431 }
template<typename T >
T Moose::stringToEnum ( const std::string &  s)

Definition at line 193 of file Conversion.C.

194 {
196 
197  std::string upper(s);
198  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
199 
200  if (!execstore_type_to_enum.count(upper))
201  mooseError("Unknown execution flag: ", upper);
202 
203  return execstore_type_to_enum[upper];
204 }
std::map< std::string, ExecFlagType > execstore_type_to_enum
Definition: Conversion.C:27
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initExecStoreType()
Definition: Conversion.C:39
template<>
ExecFlagType Moose::stringToEnum ( const std::string &  s)

Definition at line 193 of file Conversion.C.

194 {
196 
197  std::string upper(s);
198  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
199 
200  if (!execstore_type_to_enum.count(upper))
201  mooseError("Unknown execution flag: ", upper);
202 
203  return execstore_type_to_enum[upper];
204 }
std::map< std::string, ExecFlagType > execstore_type_to_enum
Definition: Conversion.C:27
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initExecStoreType()
Definition: Conversion.C:39
template<>
CoordinateSystemType Moose::stringToEnum< CoordinateSystemType > ( const std::string &  s)

Definition at line 236 of file Conversion.C.

237 {
239 
240  std::string upper(s);
241  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
242 
243  if (!coordinate_system_type_to_enum.count(upper))
244  mooseError("Unknown coordinate system type: ", upper);
245 
246  return coordinate_system_type_to_enum[upper];
247 }
std::map< std::string, CoordinateSystemType > coordinate_system_type_to_enum
Definition: Conversion.C:29
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initCoordinateSystemType()
Definition: Conversion.C:70
template<>
EigenProblemType Moose::stringToEnum< EigenProblemType > ( const std::string &  s)

Definition at line 281 of file Conversion.C.

282 {
284 
285  std::string upper(s);
286  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
287 
288  if (!eigen_problem_type_to_enum.count(upper))
289  mooseError("Unknown eigen problem type: ", upper);
290 
291  return eigen_problem_type_to_enum[upper];
292 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::map< std::string, EigenProblemType > eigen_problem_type_to_enum
Definition: Conversion.C:32
void initEigenProlemType()
Definition: Conversion.C:110
template<>
EigenSolveType Moose::stringToEnum< EigenSolveType > ( const std::string &  s)

Definition at line 266 of file Conversion.C.

267 {
269 
270  std::string upper(s);
271  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
272 
273  if (!eigen_solve_type_to_enum.count(upper))
274  mooseError("Unknown eigen solve type: ", upper);
275 
276  return eigen_solve_type_to_enum[upper];
277 }
std::map< std::string, EigenSolveType > eigen_solve_type_to_enum
Definition: Conversion.C:31
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initEigenSolveType()
Definition: Conversion.C:94
template<>
ExecFlagType Moose::stringToEnum< ExecFlagType > ( const std::string &  s)
template<>
LineSearchType Moose::stringToEnum< LineSearchType > ( const std::string &  s)

Definition at line 311 of file Conversion.C.

312 {
314 
315  std::string upper(s);
316  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
317 
318  if (!line_search_type_to_enum.count(upper))
319  mooseError("Unknown line search type: ", upper);
320 
321  return line_search_type_to_enum[upper];
322 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initLineSearchType()
Definition: Conversion.C:144
std::map< std::string, LineSearchType > line_search_type_to_enum
Definition: Conversion.C:34
template<>
MffdType Moose::stringToEnum< MffdType > ( const std::string &  s)

Definition at line 341 of file Conversion.C.

342 {
343  initMffdType();
344 
345  std::string upper(s);
346  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
347 
348  if (!mffd_type_to_enum.count(upper))
349  mooseError("Unknown mffd type: ", upper);
350 
351  return mffd_type_to_enum[upper];
352 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initMffdType()
Definition: Conversion.C:182
std::map< std::string, MffdType > mffd_type_to_enum
Definition: Conversion.C:36
template<>
Order Moose::stringToEnum< Order > ( const std::string &  s)

Definition at line 223 of file Conversion.C.

224 {
225  std::string upper(s);
226  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
227 
228  if (upper.compare("AUTO") == 0)
229  return INVALID_ORDER;
230  else
231  return Utility::string_to_enum<Order>(upper);
232 }
template<>
QuadratureType Moose::stringToEnum< QuadratureType > ( const std::string &  s)

Definition at line 208 of file Conversion.C.

209 {
211 
212  std::string upper(s);
213  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
214 
215  if (!quadrature_type_to_enum.count(upper))
216  mooseError("Unknown quadrature type: ", upper);
217 
218  return quadrature_type_to_enum[upper];
219 }
void initQuadratureType()
Definition: Conversion.C:54
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::map< std::string, QuadratureType > quadrature_type_to_enum
Definition: Conversion.C:28
template<>
SolveType Moose::stringToEnum< SolveType > ( const std::string &  s)

Definition at line 251 of file Conversion.C.

252 {
253  initSolveType();
254 
255  std::string upper(s);
256  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
257 
258  if (!solve_type_to_enum.count(upper))
259  mooseError("Unknown solve type: ", upper);
260 
261  return solve_type_to_enum[upper];
262 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void initSolveType()
Definition: Conversion.C:81
std::map< std::string, SolveType > solve_type_to_enum
Definition: Conversion.C:30
template<>
TimeIntegratorType Moose::stringToEnum< TimeIntegratorType > ( const std::string &  s)

Definition at line 326 of file Conversion.C.

327 {
329 
330  std::string upper(s);
331  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
332 
333  if (!time_integrator_to_enum.count(upper))
334  mooseError("Unknown time integrator: ", upper);
335 
336  return time_integrator_to_enum[upper];
337 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::map< std::string, TimeIntegratorType > time_integrator_to_enum
Definition: Conversion.C:35
void initTimeIntegratorsType()
Definition: Conversion.C:167
template<>
WhichEigenPairs Moose::stringToEnum< WhichEigenPairs > ( const std::string &  s)

Definition at line 296 of file Conversion.C.

297 {
299 
300  std::string upper(s);
301  std::transform(upper.begin(), upper.end(), upper.begin(), ::toupper);
302 
303  if (!which_eigen_pairs_to_enum.count(upper))
304  mooseError("Unknown type of WhichEigenPairs: ", upper);
305 
306  return which_eigen_pairs_to_enum[upper];
307 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::map< std::string, WhichEigenPairs > which_eigen_pairs_to_enum
Definition: Conversion.C:33
void initWhichEigenPairs()
Definition: Conversion.C:125
MPI_Comm Moose::swapLibMeshComm ( MPI_Comm  new_comm)

Swap the libMesh MPI communicator out for ours.

Note that you should usually use the Moose::ScopedCommSwapper class instead of calling this function.

Definition at line 1242 of file Moose.C.

Referenced by Moose::ScopedCommSwapper::forceSwap(), and Moose::ScopedCommSwapper::~ScopedCommSwapper().

1243 {
1244 #ifdef LIBMESH_HAVE_PETSC
1245  MPI_Comm old_comm = PETSC_COMM_WORLD;
1246  PETSC_COMM_WORLD = new_comm;
1247  return old_comm;
1248 #endif // LIBMESH_HAVE_PETSC
1249 }
Point Moose::toPoint ( const std::vector< Real > &  pos)

Convert point represented as std::vector into Point.

Parameters
posPoint represented as a vector
Returns
Converted point

Definition at line 434 of file Conversion.C.

Referenced by stringify().

435 {
436  mooseAssert(pos.size() == LIBMESH_DIM, "Wrong array size while converting into a point");
437  return Point(pos[0], pos[1], pos[2]);
438 }
template<typename T >
std::vector<T> Moose::vectorStringsToEnum ( const MultiMooseEnum v)
template<>
std::vector< ExecFlagType > Moose::vectorStringsToEnum< ExecFlagType > ( const MultiMooseEnum v)

Definition at line 356 of file Conversion.C.

Referenced by SetupInterface::SetupInterface().

357 {
358  std::vector<ExecFlagType> exec_flags(v.size());
359  for (unsigned int i = 0; i < v.size(); ++i)
360  exec_flags[i] = stringToEnum<ExecFlagType>(v[i]);
361 
362  return exec_flags;
363 }
ExecFlagType stringToEnum< ExecFlagType >(const std::string &s)
unsigned int size() const
Return the number of items in the MultiMooseEnum.

Variable Documentation

bool Moose::_color_console = isatty(fileno(stdout))
static

Definition at line 1267 of file Moose.C.

Referenced by colorConsole(), and setColorConsole().

bool Moose::_deprecated_is_error = false

Variable to toggle only deprecated warnings as errors.

Definition at line 1284 of file Moose.C.

Referenced by moose::internal::mooseDeprecatedStream(), and MooseApp::setupOptions().

bool Moose::_throw_on_error = false

Variable to turn on exceptions during mooseError() and mooseWarning(), should only be used with MOOSE unit.

Definition at line 1286 of file Moose.C.

Referenced by moose::internal::mooseErrorRaw(), and moose::internal::mooseWarningStream().

bool Moose::_trap_fpe = true

Variable indicating whether we will enable FPE trapping for this run.

Initialize global variables.

Definition at line 1262 of file Moose.C.

Referenced by enableFPE(), and MooseApp::setupOptions().

bool Moose::_warnings_are_errors = false

Variable to toggle any warning into an error (includes deprecated code warnings)

Definition at line 1282 of file Moose.C.

Referenced by moose::internal::mooseWarningStream(), and MooseApp::setupOptions().

const SubdomainID Moose::ANY_BLOCK_ID = libMesh::Elem::invalid_subdomain_id - 1
const BoundaryID Moose::ANY_BOUNDARY_ID = static_cast<BoundaryID>(-1)
std::map<std::string, CoordinateSystemType> Moose::coordinate_system_type_to_enum

Definition at line 29 of file Conversion.C.

std::map<std::string, EigenProblemType> Moose::eigen_problem_type_to_enum

Definition at line 32 of file Conversion.C.

std::map<std::string, EigenSolveType> Moose::eigen_solve_type_to_enum

Definition at line 31 of file Conversion.C.

const std::set<SubdomainID> Moose::EMPTY_BLOCK_IDS = {}

Definition at line 121 of file MooseTypes.h.

const std::set<BoundaryID> Moose::EMPTY_BOUNDARY_IDS = {}

Definition at line 122 of file MooseTypes.h.

const std::vector< ExecFlagType > Moose::exec_types = populateExecTypes()

A static list of all the exec types.

Definition at line 40 of file MooseTypes.C.

Referenced by ExecuteMooseObjectWarehouse< T >::ExecuteMooseObjectWarehouse(), EigenExecutionerBase::normalizeSolution(), and populateExecTypes().

std::map<std::string, ExecFlagType> Moose::execstore_type_to_enum

Definition at line 27 of file Conversion.C.

const SubdomainID Moose::INVALID_BLOCK_ID = libMesh::Elem::invalid_subdomain_id
const BoundaryID Moose::INVALID_BOUNDARY_ID = libMesh::BoundaryInfo::invalid_id

Definition at line 120 of file MooseTypes.h.

Referenced by MooseMesh::getBoundaryID().

std::map<std::string, LineSearchType> Moose::line_search_type_to_enum

Definition at line 34 of file Conversion.C.

std::map<std::string, MffdType> Moose::mffd_type_to_enum

Definition at line 36 of file Conversion.C.

PerfLog Moose::perf_log

Perflog to be used by applications.

If the application prints this in the end they will get performance info.

Referenced by FEProblemBase::adaptMesh(), PhysicsBasedPreconditioner::apply(), FileMesh::buildMesh(), CheckOutputAction::checkPerfLogOutput(), NonlinearSystemBase::computeDamping(), FEProblemBase::computeDamping(), NonlinearSystemBase::computeDiracContributions(), AuxiliarySystem::computeElementalVars(), FEProblemBase::computeIndicators(), NonlinearSystemBase::computeJacobian(), NonlinearSystemBase::computeJacobianBlocks(), FEProblemBase::computeMarkers(), NonlinearSystemBase::computeNodalBCs(), AuxiliarySystem::computeNodalVars(), FEProblemBase::computePostCheck(), NonlinearSystemBase::computeResidual(), NonlinearSystemBase::computeResidualInternal(), AuxiliarySystem::computeScalarVars(), FEProblemBase::computeUserObjects(), PenetrationLocator::detectPenetration(), FEProblemBase::execMultiAppTransfers(), PerflogDumper::execute(), FEProblemBase::executeControls(), FEProblemBase::executeSamplers(), NearestNodeLocator::findNodes(), PerformanceData::getValue(), DisplacedProblem::init(), PhysicsBasedPreconditioner::init(), FEProblemBase::init(), Console::initialSetup(), FEProblemBase::initialSetup(), Exodus::output(), CSV::output(), Console::output(), Checkpoint::output(), FEProblemBase::projectSolution(), Resurrector::restartFromFile(), Resurrector::restartRestartableData(), MooseApp::run(), MooseApp::setupOptions(), EigenProblem::solve(), FEProblemBase::solve(), DisplacedProblem::updateMesh(), and Console::~Console().

std::map<std::string, QuadratureType> Moose::quadrature_type_to_enum

Definition at line 28 of file Conversion.C.

bool Moose::registered = false
static

Definition at line 485 of file Moose.C.

std::map<std::string, SolveType> Moose::solve_type_to_enum

Definition at line 30 of file Conversion.C.

std::map<std::string, TimeIntegratorType> Moose::time_integrator_to_enum

Definition at line 35 of file Conversion.C.

std::map<std::string, WhichEigenPairs> Moose::which_eigen_pairs_to_enum

Definition at line 33 of file Conversion.C.