187 mesh.
read(
"meshes/shark_tooth_tri6.xda.gz");
190 for (
const Elem * elem :
mesh.active_element_ptr_range())
192 for (
unsigned int s=0; s != 3; ++s)
193 if (!elem->neighbor_ptr(s))
195 unsigned v2 = (s+1)%3;
198 if (elem->point(s)(0) - elem->point(v2)(0) < -.1)
202 else if (elem->point(s)(0) - elem->point(v2)(0) > .1)
213 vert.pairedboundary =
top_id;
220 const unsigned int u_var = sys.
add_variable(
"u", fe_type);
223 std::set<boundary_id_type> side_bdy {
side_id };
224 std::vector<unsigned int> all_vars (1, u_var);
237 for (
Real x = 0.1; x < 10; x += 0.2)
238 for (
Real ya = -2.9; ya < 1; ya += 0.2)
241 const Real offset = 1-std::abs(std::fmod(x,2)-1);
242 const Real y = ya + offset;
Wrap a libMesh-style function pointer into a FunctionBase object.
This is the EquationSystems class.
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.
void add_periodic_boundary(const PeriodicBoundaryBase &periodic_boundary)
Adds a copy of the specified periodic boundary to the system.
This class provides the ability to map between arbitrary, user-defined strings and several data types...
VectorValue< Real > RealVectorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
libMesh::Parallel::Communicator * TestCommWorld
static constexpr Real TOLERANCE
The ExodusII_IO class implements reading meshes in the ExodusII file format from Sandia National Labs...
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
const boundary_id_type side_id
This is the base class from which all geometric element types are derived.
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) const
This class allows one to associate Dirichlet boundary values with a given set of mesh boundary ids an...
The definition of a periodic boundary.
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
virtual void solve() override
Assembles & solves the linear system A*x=b.
void allow_remote_element_removal(bool allow)
If false is passed in then this mesh will no longer have remote elements deleted when being prepared ...
virtual void write_equation_systems(const std::string &fname, const EquationSystems &es, const std::set< std::string > *system_names=nullptr) override
Writes out the solution for no specific time or timestep.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
void attach_assemble_function(void fptr(EquationSystems &es, const std::string &name))
Register a user function to use in assembling the system matrix and RHS.
const boundary_id_type top_id
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void add_side(const dof_id_type elem, const unsigned short int side, const boundary_id_type id)
Add side side of element number elem with boundary id id to the boundary information data structure...
void periodic_bc_test_poisson(EquationSystems &es, const std::string &)
void add_dirichlet_boundary(const DirichletBoundary &dirichlet_boundary)
Adds a copy of the specified Dirichlet boundary to the system.
virtual void delete_remote_elements()
When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local ele...
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
const DofMap & get_dof_map() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
const boundary_id_type bottom_id
Number quadratic_solution(const Point &p, const Parameters &, const std::string &, const std::string &)