-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Platypus to MOOSE migration #29633
base: next
Are you sure you want to change the base?
Platypus to MOOSE migration #29633
Conversation
… valid input parameters
…lair/MFEMSolversAndPreconditioners Enable user specification of solvers and preconditioners
Note that raw coefficients haven't yet been totally expunged from the code, as that will require some changes to the boundary conditions.
Also improved error handling for undeclared materials.
Tests all run, but they don't all pass
These provide the functionality of the MFEMCoefficient classes.
…terials Implement new interface for materials and coefficients
refs #0
refs #0
038f74b
to
9a370b9
Compare
@alexanderianblair one thing we'd probably want to do is shorten the tests for your kernels if possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder for myself to expand non no-optional recipes to include MFEM when ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Through 1/3 of the files. appropriately keeping things tracked as viewed so work can continue
* [FESpaces] | ||
* [] | ||
*/ | ||
class AddFESpaceAction : public MooseObjectAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename AddMFEMFESpaceAction
* This class implements the action controlling the construction of the | ||
* required MFEM ProblemOperator. | ||
*/ | ||
class AddProblemOperatorAction : public Action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename AddMFEMProblemOperatorAction
* This class implements the action ensuring the mesh uses the same FE space as | ||
* the displacement for mesh updates. | ||
*/ | ||
class SetMeshFESpaceAction : public Action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename for MFEM
// Name of (the test variable associated with) the weak form that the kernel is applied to. | ||
std::string _test_var_name; | ||
std::vector<BoundaryName> _boundary_names; | ||
mfem::Array<int> _bdr_attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Name of (the test variable associated with) the weak form that the kernel is applied to. | |
std::string _test_var_name; | |
std::vector<BoundaryName> _boundary_names; | |
mfem::Array<int> _bdr_attributes; | |
// Name of (the test variable associated with) the weak form that the kernel is applied to. | |
const std::string _test_var_name; | |
const std::vector<BoundaryName> _boundary_names; | |
mfem::Array<int> _bdr_attributes; |
mfem::Array<int> GetMarkers(mfem::Mesh & mesh); | ||
mfem::Array<int> _bdr_markers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Does
_bdr_markers
need to be public? GetMarkers
->getMarkers
- const on
GetMarkers
?
mfem::Array<int> GetEssentialBdrMarkers(const std::string & name_, mfem::Mesh * mesh_); | ||
|
||
void ApplyEssentialBCs(const std::string & name_, | ||
mfem::Array<int> & ess_tdof_list, | ||
mfem::GridFunction & gridfunc, | ||
mfem::Mesh * mesh_); | ||
|
||
void ApplyIntegratedBCs(const std::string & name_, mfem::BilinearForm & blf, mfem::Mesh * mesh_); | ||
|
||
void ApplyIntegratedBCs(const std::string & name_, mfem::LinearForm & lf, mfem::Mesh * mesh_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- camel case
- no abbreviation in
GetEssentialBdrMarkers
- mesh pointers here should probably all be able to be references?
#include <mfem.hpp> | ||
#include "libmesh/restore_warnings.h" | ||
|
||
namespace platypus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve namespace
{ | ||
|
||
/// Lightweight adaptor over an std::map from strings to pointer to T | ||
template <typename T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of camel case methods here.
Is it it not possible to have moose context here to make errors more rich?
#include "MFEMKernel.h" | ||
#include "ScaleIntegrator.h" | ||
|
||
namespace platypus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- resolve namespace
- camel case methods
- move public data that doesn't need to be public
/** | ||
* Set the device to use to solve the FE problem. | ||
*/ | ||
void setDevice(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a discussion at some point on devices and how to generalize specifying something like a GPU in moose
-DLAPACK_INCLUDE_DIRS="$PETSC_DIR/include" \ | ||
-DCMAKE_INSTALL_PREFIX="$MFEM_DIR" \ | ||
-DMFEM_USE_PETSC=YES \ | ||
-DPETSC_DIR="$PETSC_DIR" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to resolve #29635 (comment)
In-tree install of petsc with a PETSC_ARCH requires PETSC_ARCH, and requires all of the PETSC_DIRs for the other deps to be PETSC_DIR/PETSC_ARCH
@alexanderianblair is it unsurprising that the MFEM tests diff in parallel? |
refs #29632