PolyFEM
Loading...
Searching...
No Matches
polyfem::problem::GenericScalarProblemExact Class Reference

#include <MiscProblem.hpp>

Inheritance diagram for polyfem::problem::GenericScalarProblemExact:
[legend]
Collaboration diagram for polyfem::problem::GenericScalarProblemExact:
[legend]

Public Member Functions

 GenericScalarProblemExact (const std::string &name)
 
bool is_scalar () const override
 
bool is_time_dependent () const override
 
bool is_constant_in_time () const override
 
void initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override
 
void set_parameters (const json &params) override
 
VectorNd eval_fun (const VectorNd &pt, double t) const override
 
AutodiffGradPt eval_fun (const AutodiffGradPt &pt, double t) const override
 
AutodiffHessianPt eval_fun (const AutodiffHessianPt &pt, double t) const override
 
void rhs (const assembler::Assembler &assembler, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
- Public Member Functions inherited from polyfem::problem::ProblemWithSolution
 ProblemWithSolution (const std::string &name)
 
virtual void dirichlet_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
virtual void exact (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
virtual void exact_grad (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
virtual bool has_exact_sol () const override
 
virtual bool is_rhs_zero () const override
 
virtual ~ProblemWithSolution ()
 
- Public Member Functions inherited from polyfem::assembler::Problem
 Problem (const std::string &name)
 
virtual void set_units (const assembler::Assembler &assembler, const Units &units)
 
virtual ~Problem ()
 
virtual void init (const mesh::Mesh &mesh)
 
const std::string & name () const
 
virtual void neumann_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const
 
virtual void pressure_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const
 
virtual double pressure_cavity_bc (const int boundary_id, const double t) const
 
virtual bool is_boundary_pressure (const int boundary_id) const
 
virtual void dirichlet_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const double t, Eigen::MatrixXd &val) const
 
virtual void neumann_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const Eigen::MatrixXd &normal, const double t, Eigen::MatrixXd &val) const
 
virtual bool is_nodal_dirichlet_boundary (const int n_id, const int tag)
 
virtual bool is_nodal_neumann_boundary (const int n_id, const int tag)
 
virtual bool has_nodal_dirichlet ()
 
virtual bool has_nodal_neumann ()
 
virtual void clear ()
 
virtual void initial_velocity (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_acceleration (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_density (const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual bool might_have_no_dirichlet ()
 
virtual bool is_dimension_dirichet (const int tag, const int dim) const
 
virtual bool is_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) const
 
virtual bool all_dimensions_dirichlet () const
 
void setup_bc (const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< basis::ElementBases > &pressure_bases, std::vector< mesh::LocalBoundary > &local_boundary, std::vector< int > &boundary_nodes, std::vector< mesh::LocalBoundary > &local_neumann_boundary, std::vector< mesh::LocalBoundary > &local_pressure_boundary, std::unordered_map< int, std::vector< mesh::LocalBoundary > > &local_pressure_cavity, std::vector< int > &pressure_boundary_nodes, std::vector< int > &dirichlet_nodes, std::vector< int > &neumann_nodes)
 
virtual void update_nodes (const Eigen::VectorXi &in_node_to_node)
 

Private Attributes

int func_
 

Additional Inherited Members

- Protected Member Functions inherited from polyfem::problem::ProblemWithSolution
virtual int size_for (const Eigen::MatrixXd &pts) const
 
- Protected Attributes inherited from polyfem::assembler::Problem
std::vector< int > boundary_ids_
 
std::vector< int > neumann_boundary_ids_
 
std::vector< int > normal_aligned_neumann_boundary_ids_
 
std::vector< int > pressure_boundary_ids_
 
std::vector< int > pressure_cavity_ids_
 
std::vector< int > splitting_pressure_boundary_ids_
 

Detailed Description

Definition at line 102 of file MiscProblem.hpp.

Constructor & Destructor Documentation

◆ GenericScalarProblemExact()

polyfem::problem::GenericScalarProblemExact::GenericScalarProblemExact ( const std::string &  name)

Definition at line 268 of file MiscProblem.cpp.

Member Function Documentation

◆ eval_fun() [1/3]

AutodiffGradPt polyfem::problem::GenericScalarProblemExact::eval_fun ( const AutodiffGradPt pt,
double  t 
) const
overridevirtual

Implements polyfem::problem::ProblemWithSolution.

Definition at line 294 of file MiscProblem.cpp.

References func_.

◆ eval_fun() [2/3]

AutodiffHessianPt polyfem::problem::GenericScalarProblemExact::eval_fun ( const AutodiffHessianPt pt,
double  t 
) const
overridevirtual

Implements polyfem::problem::ProblemWithSolution.

Definition at line 301 of file MiscProblem.cpp.

References func_.

◆ eval_fun() [3/3]

VectorNd polyfem::problem::GenericScalarProblemExact::eval_fun ( const VectorNd pt,
double  t 
) const
overridevirtual

Implements polyfem::problem::ProblemWithSolution.

Definition at line 287 of file MiscProblem.cpp.

References func_.

◆ initial_solution()

void polyfem::problem::GenericScalarProblemExact::initial_solution ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  pts,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 273 of file MiscProblem.cpp.

References polyfem::problem::ProblemWithSolution::exact(), and val.

Here is the call graph for this function:

◆ is_constant_in_time()

bool polyfem::problem::GenericScalarProblemExact::is_constant_in_time ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 109 of file MiscProblem.hpp.

◆ is_scalar()

bool polyfem::problem::GenericScalarProblemExact::is_scalar ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 107 of file MiscProblem.hpp.

◆ is_time_dependent()

bool polyfem::problem::GenericScalarProblemExact::is_time_dependent ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 108 of file MiscProblem.hpp.

References func_.

◆ rhs()

void polyfem::problem::GenericScalarProblemExact::rhs ( const assembler::Assembler assembler,
const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::problem::ProblemWithSolution.

Definition at line 309 of file MiscProblem.cpp.

References func_, polyfem::problem::ProblemWithSolution::rhs(), and val.

Here is the call graph for this function:

◆ set_parameters()

void polyfem::problem::GenericScalarProblemExact::set_parameters ( const json params)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 278 of file MiscProblem.cpp.

References func_.

Member Data Documentation

◆ func_

int polyfem::problem::GenericScalarProblemExact::func_
private

Definition at line 122 of file MiscProblem.hpp.

Referenced by eval_fun(), eval_fun(), eval_fun(), is_time_dependent(), rhs(), and set_parameters().


The documentation for this class was generated from the following files: