PolyFEM
Loading...
Searching...
No Matches
polyfem::varform::VarForm Class Referenceabstract

#include <VarForm.hpp>

Inheritance diagram for polyfem::varform::VarForm:
[legend]
Collaboration diagram for polyfem::varform::VarForm:
[legend]

Public Member Functions

 VarForm (const io::ResourceIO &resources)
 
virtual ~VarForm ()=default
 
virtual std::string name () const =0
 Get the name of the variational formulation.
 
void set_args (const json &args)
 Reset the internal state of the variational formulation, e.g.
 
virtual void init (const std::string &formulation, const Units &units, const json &args, const std::string &out_path)
 Initialize the variational formulation with the given parameters.
 
void set_checkpoint_reader (const io::CheckpointReader &reader)
 
void set_mesh (std::unique_ptr< mesh::Mesh > mesh, const double loading_mesh_time=0)
 Set the mesh for the variational formulation.
 
void set_geometry (mesh::LoadedGeometry geometry, double loading_mesh_time=0)
 
void solve (Eigen::MatrixXd &sol, const InitialConditionOverride *initial_condition_override=nullptr, const ForwardStepCallback &post_step={})
 Solve the variational formulation and store the solution in the given matrix.
 
void set_time_callback (const std::function< void(int, int, double, double)> &callback)
 
int problem_dimension () const
 Get the problem dimension of the variational formulation, for output purposes.
 
virtual bool is_contact_enabled () const
 Check if contact is enabled for the variational formulation, for output purposes.
 
virtual io::OutputSpace output_space () const =0
 Get the output space of the variational formulation, for output purposes.
 
virtual std::vector< io::OutputField > output_fields (const io::OutputSample &sample, const Eigen::MatrixXd &solution, const io::OutputFieldOptions &options) const =0
 Get the output fields of the variational formulation, for output purposes.
 
const io::OutRuntimeData & output_timings () const
 Get the runtime timings of the variational formulation, for output purposes.
 
virtual io::OutStatsData compute_errors (const Eigen::MatrixXd &solution)=0
 Get the error statistics of the variational formulation, for output purposes.
 
virtual void save_json (const Eigen::MatrixXd &solution, std::ostream &out) const =0
 Save the solution to a JSON file, for output purposes.
 
void save_json (const Eigen::MatrixXd &solution) const
 Save the solution to a JSON file, for output purposes.
 
virtual void export_data (const Eigen::MatrixXd &solution) const =0
 
virtual void serialize_checkpoint (io::CheckpointWriter &writer, const Eigen::MatrixXd &solution, const io::CheckpointMetadata &metadata) const
 
virtual void deserialize_checkpoint (const io::CheckpointReader &reader, Eigen::MatrixXd &solution)
 

Protected Member Functions

void prepare ()
 Prepare all discretization and assembly data without running a solve.
 
std::string resolve_output_path (const std::string &path) const
 
void set_materials (assembler::Assembler &assembler, const int size) const
 
void restore_checkpoint_integrator (const std::shared_ptr< time_integrator::ImplicitTimeIntegrator > &integrator, const std::string &group, double dt, const std::string &ordering, const FESpace &space, int block_size) const
 
void write_checkpoint_ordering (io::CheckpointWriter &writer, const std::string &name, const FESpace &space) const
 
void reorder_checkpoint_block (const io::CheckpointReader &reader, const std::string &name, const FESpace &space, int block_size, int row_offset, Eigen::MatrixXd &value) const
 
Eigen::VectorXi checkpoint_ordering (const FESpace &space) const
 
void validate_checkpoint_solution (const Eigen::MatrixXd &solution, int expected_rows) const
 
bool checkpoint_reorder_enabled () const
 
virtual void reset ()=0
 
virtual void load_mesh (const mesh::Mesh &mesh, const json &args)=0
 
virtual void build_basis (mesh::Mesh &mesh, const bool iso_parametric, const json &args)=0
 
void assign_discr_orders (const json &space_args, const mesh::Mesh &mesh, Eigen::VectorXi &disc_orders, Eigen::VectorXi &disc_ordersq)
 
void assign_discr_orders (const json &space_args, const int fe_space_id, const mesh::Mesh &mesh, Eigen::VectorXi &disc_orders, Eigen::VectorXi &disc_ordersq)
 
virtual void assemble_rhs (const mesh::Mesh &mesh)=0
 
virtual void assemble_mass_mat (const mesh::Mesh &mesh, const json &args)=0
 
virtual void solve_problem (Eigen::MatrixXd &sol, const InitialConditionOverride *initial_condition_override, const ForwardStepCallback &post_step)=0
 
QuadratureOrders n_boundary_samples (const int discr_order, const int discr_orderq, const int gdiscr_order) const
 
void build_fe_space (mesh::Mesh &mesh, const bool iso_parametric, const Eigen::VectorXi &disc_orders, const Eigen::VectorXi &disc_ordersq, const std::string &basis_type, const std::string &poly_basis_type, const assembler::Assembler &space_assembler, const int value_dim, const int quadrature_order, const int mass_quadrature_order, const bool use_corner_quadrature, const int n_harmonic_samples, const int integral_constraints, FESpace &space, VarFormBoundaryState &boundary, std::shared_ptr< GeometryMapping > geometry=nullptr)
 
virtual void build_rhs_assembler ()=0
 
virtual void set_obstacle (mesh::Obstacle &&obstacle)
 
void save_step_state (const double t0, const double dt, const int t, const Eigen::MatrixXd &solution, const time_integrator::ImplicitTimeIntegrator *time_integrator) const
 
void ensure_output_sampler () const
 
void save_timestep (const double time, const int t, const double t0, const double dt, const Eigen::MatrixXd &solution) const
 
bool save_timestep_to_vtm (const double time, const int t, const double dt, const Eigen::MatrixXd &solution, paraviewo::VTMWriter &vtm, const std::string &block_prefix) const
 
void save_subsolve (const int i, const int t, const Eigen::MatrixXd &solution) const
 
int output_file_index (const int t) const
 
void notify_time_step (const int t, const int time_steps, const double t0, const double dt) const
 
void init_child_varform (VarForm &child, const std::string &formulation, const Units &units, const json &args, const std::string &out_path) const
 
io::OutGeometryData::ExportOptions export_options (const io::OutputSpace &space) const
 
io::OutputFieldFunction output_field_function (const Eigen::MatrixXd &solution, const io::OutGeometryData::ExportOptions &opts) const
 

Static Protected Member Functions

static void rebuild_node_positions (const std::vector< basis::ElementBases > &bases, const std::vector< int > &node_ids, std::vector< RowVectorNd > &positions)
 

Protected Attributes

std::shared_ptr< assembler::Problem > problem
 current problem, it contains rhs and bc
 
Units units
 
json args
 
io::OutStatsData stats
 
io::OutRuntimeData timings
 runtime statistics
 
std::string output_path
 
std::optional< std::reference_wrapper< const io::CheckpointReader > > checkpoint_reader_
 
std::unique_ptr< mesh::Mesh > mesh_
 
std::function< void(int, int, double, double)> time_callback
 
io::OutGeometryData output_geometry_
 
bool output_sampler_initialized_ = false
 
bool prepared_ = false
 
int output_index_offset_ = 0
 
const io::ResourceIO & resources_
 

Private Member Functions

void build_polygonal_basis (const mesh::Mesh &mesh, const std::string &poly_basis_type, const assembler::Assembler &space_assembler, bool iso_parametric, const int quadrature_order, const int mass_quadrature_order, const int n_harmonic_samples, const int integral_constraints, FESpace &space, VarFormBoundaryState &boundary)
 
void build_node_mapping (const mesh::Mesh &mesh, const std::string &basis_type, const FESpace &space, Eigen::VectorXi &space_in_node_to_node, Eigen::VectorXi &space_in_primitive_to_primitive) const
 

Friends

class polyfem::test::VarFormTestAccess
 

Detailed Description

Definition at line 55 of file VarForm.hpp.

Constructor & Destructor Documentation

◆ VarForm()

polyfem::varform::VarForm::VarForm ( const io::ResourceIO &  resources)
inlineexplicit

Definition at line 60 of file VarForm.hpp.

◆ ~VarForm()

virtual polyfem::varform::VarForm::~VarForm ( )
virtualdefault

Member Function Documentation

◆ assemble_mass_mat()

virtual void polyfem::varform::VarForm::assemble_mass_mat ( const mesh::Mesh &  mesh,
const json &  args 
)
protectedpure virtual

◆ assemble_rhs()

virtual void polyfem::varform::VarForm::assemble_rhs ( const mesh::Mesh &  mesh)
protectedpure virtual

◆ assign_discr_orders() [1/2]

void polyfem::varform::VarForm::assign_discr_orders ( const json &  space_args,
const int  fe_space_id,
const mesh::Mesh &  mesh,
Eigen::VectorXi &  disc_orders,
Eigen::VectorXi &  disc_ordersq 
)
protected

Definition at line 693 of file VarForm.cpp.

References polyfem::mesh::Mesh::get_body_id(), polyfem::mesh::Mesh::is_prism(), polyfem::mesh::Mesh::is_pyramid(), polyfem::mesh::Mesh::is_simplex(), polyfem::log_and_throw_error(), polyfem::logger(), polyfem::mesh::Mesh::n_elements(), polyfem::io::ResourceIO::read_int_matrix(), and resources_.

Here is the call graph for this function:

◆ assign_discr_orders() [2/2]

void polyfem::varform::VarForm::assign_discr_orders ( const json &  space_args,
const mesh::Mesh &  mesh,
Eigen::VectorXi &  disc_orders,
Eigen::VectorXi &  disc_ordersq 
)
protected

Definition at line 684 of file VarForm.cpp.

References assign_discr_orders().

Referenced by assign_discr_orders(), polyfem::varform::NavierStokesFSIVarForm::build_basis(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::ElasticVarForm::build_elastic_basis(), and polyfem::varform::ThermoElasticVarForm::build_temperature_basis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_basis()

virtual void polyfem::varform::VarForm::build_basis ( mesh::Mesh &  mesh,
const bool  iso_parametric,
const json &  args 
)
protectedpure virtual

◆ build_fe_space()

void polyfem::varform::VarForm::build_fe_space ( mesh::Mesh &  mesh,
const bool  iso_parametric,
const Eigen::VectorXi &  disc_orders,
const Eigen::VectorXi &  disc_ordersq,
const std::string &  basis_type,
const std::string &  poly_basis_type,
const assembler::Assembler &  space_assembler,
const int  value_dim,
const int  quadrature_order,
const int  mass_quadrature_order,
const bool  use_corner_quadrature,
const int  n_harmonic_samples,
const int  integral_constraints,
FESpace &  space,
VarFormBoundaryState &  boundary,
std::shared_ptr< GeometryMapping >  geometry = nullptr 
)
protected

Definition at line 274 of file VarForm.cpp.

References polyfem::varform::FESpace::bases, polyfem::basis::LagrangeBasis2d::build_bases(), polyfem::basis::SplineBasis2d::build_bases(), polyfem::basis::LagrangeBasis3d::build_bases(), polyfem::basis::SplineBasis3d::build_bases(), build_node_mapping(), build_polygonal_basis(), polyfem::io::OutRuntimeData::building_basis_time, polyfem::varform::FESpace::disc_orders, polyfem::varform::FESpace::disc_ordersq, polyfem::varform::FESpace::geometry, polyfem::mesh::Mesh::has_poly(), polyfem::varform::FESpace::is_iso_parametric(), polyfem::mesh::Mesh::is_volume(), polyfem::varform::VarFormBoundaryState::local_boundary, polyfem::logger(), polyfem::varform::FESpace::mesh_nodes, polyfem::varform::FESpace::n_bases, polyfem::assembler::Assembler::name(), polyfem::mesh::Mesh::orders(), polyfem::varform::FESpace::poly_edge_to_data, polyfem::varform::FESpace::reset(), polyfem::varform::VarFormBoundaryState::reset(), polyfem::varform::FESpace::space_in_node_to_node, polyfem::varform::FESpace::space_in_primitive_to_primitive, timings, polyfem::varform::VarFormBoundaryState::total_local_boundary, and polyfem::varform::FESpace::value_dim.

Referenced by polyfem::varform::NavierStokesFSIVarForm::build_basis(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::ElasticVarForm::build_elastic_basis(), and polyfem::varform::ThermoElasticVarForm::build_temperature_basis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_node_mapping()

void polyfem::varform::VarForm::build_node_mapping ( const mesh::Mesh &  mesh,
const std::string &  basis_type,
const FESpace &  space,
Eigen::VectorXi &  space_in_node_to_node,
Eigen::VectorXi &  space_in_primitive_to_primitive 
) const
private

Definition at line 605 of file VarForm.cpp.

References polyfem::varform::FESpace::disc_orders, polyfem::mesh::Mesh::has_poly(), polyfem::mesh::Mesh::in_ordered_edges(), polyfem::mesh::Mesh::in_ordered_faces(), polyfem::mesh::Mesh::in_ordered_vertices(), polyfem::mesh::Mesh::is_conforming(), polyfem::mesh::Mesh::is_volume(), polyfem::logger(), and polyfem::varform::FESpace::mesh_nodes.

Referenced by build_fe_space().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_polygonal_basis()

void polyfem::varform::VarForm::build_polygonal_basis ( const mesh::Mesh &  mesh,
const std::string &  poly_basis_type,
const assembler::Assembler &  space_assembler,
bool  iso_parametric,
const int  quadrature_order,
const int  mass_quadrature_order,
const int  n_harmonic_samples,
const int  integral_constraints,
varform::FESpace &  space,
varform::VarFormBoundaryState &  boundary 
)
private

◆ build_rhs_assembler()

◆ checkpoint_ordering()

Eigen::VectorXi polyfem::varform::VarForm::checkpoint_ordering ( const FESpace &  space) const
protected

Definition at line 951 of file VarForm.cpp.

References polyfem::varform::FESpace::mesh_nodes, and polyfem::varform::FESpace::n_bases.

Referenced by write_checkpoint_ordering().

Here is the caller graph for this function:

◆ checkpoint_reorder_enabled()

bool polyfem::varform::VarForm::checkpoint_reorder_enabled ( ) const
protected

Definition at line 974 of file VarForm.cpp.

Referenced by restore_checkpoint_integrator().

Here is the caller graph for this function:

◆ compute_errors()

virtual io::OutStatsData polyfem::varform::VarForm::compute_errors ( const Eigen::MatrixXd &  solution)
pure virtual

◆ deserialize_checkpoint()

void polyfem::varform::VarForm::deserialize_checkpoint ( const io::CheckpointReader &  reader,
Eigen::MatrixXd &  solution 
)
virtual

Reimplemented in polyfem::varform::BilaplacianVarForm, polyfem::varform::ElasticVarForm, polyfem::varform::FluidVarForm, polyfem::varform::IncompressibleElasticVarForm, polyfem::varform::NavierStokesFSIVarForm, polyfem::varform::OperatorSplittingVarForm, polyfem::varform::ScalarVarForm, and polyfem::varform::ThermoElasticVarForm.

Definition at line 905 of file VarForm.cpp.

References polyfem::io::CheckpointReader::exists(), polyfem::io::CheckpointMetadata::formulation, polyfem::log_and_throw_error(), polyfem::io::CheckpointReader::metadata(), name(), polyfem::io::CheckpointMetadata::output_index, output_index_offset_, and polyfem::io::CheckpointReader::read_matrix().

Referenced by polyfem::varform::BilaplacianVarForm::deserialize_checkpoint(), polyfem::varform::ElasticVarForm::deserialize_checkpoint(), polyfem::varform::FluidVarForm::deserialize_checkpoint(), polyfem::varform::IncompressibleElasticVarForm::deserialize_checkpoint(), polyfem::varform::NavierStokesFSIVarForm::deserialize_checkpoint(), polyfem::varform::OperatorSplittingVarForm::deserialize_checkpoint(), polyfem::varform::ScalarVarForm::deserialize_checkpoint(), polyfem::varform::ThermoElasticVarForm::deserialize_checkpoint(), and solve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensure_output_sampler()

void polyfem::varform::VarForm::ensure_output_sampler ( ) const
protected

◆ export_data()

virtual void polyfem::varform::VarForm::export_data ( const Eigen::MatrixXd &  solution) const
pure virtual

◆ export_options()

io::OutGeometryData::ExportOptions polyfem::varform::VarForm::export_options ( const io::OutputSpace &  space) const
protected

Definition at line 835 of file VarForm.cpp.

References args, polyfem::mesh::Mesh::has_prism(), polyfem::mesh::Mesh::is_linear(), polyfem::io::OutputSpace::mesh, and problem_dimension().

Referenced by polyfem::varform::BilaplacianVarForm::export_data(), polyfem::varform::FluidVarForm::export_data(), polyfem::varform::OperatorSplittingVarForm::export_data(), polyfem::varform::ScalarVarForm::export_data(), polyfem::varform::DifferentiableLinearElasticVarForm::save_vtu(), polyfem::varform::DifferentiableNonlinearElasticVarForm::save_vtu(), and polyfem::varform::DifferentiableScalarVarForm::save_vtu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void polyfem::varform::VarForm::init ( const std::string &  formulation,
const Units &  units,
const json &  args,
const std::string &  out_path 
)
virtual

Initialize the variational formulation with the given parameters.

Parameters
formulationname of the variational formulation
unitsunit system to use for the formulation
argsjson input arguments, used to initialize the formulation
out_pathoutput path for the formulation, used to save intermediate data

Reimplemented in polyfem::varform::BilaplacianVarForm, polyfem::varform::ElasticVarForm, polyfem::varform::FluidVarForm, polyfem::varform::IncompressibleElasticVarForm, polyfem::varform::NavierStokesFSIVarForm, polyfem::varform::NonlinearElasticVarForm, polyfem::varform::OperatorSplittingVarForm, polyfem::varform::ScalarVarForm, and polyfem::varform::ThermoElasticVarForm.

Definition at line 208 of file VarForm.cpp.

References args, output_path, output_sampler_initialized_, reset(), and units.

Referenced by polyfem::varform::BilaplacianVarForm::init(), polyfem::varform::ElasticVarForm::init(), polyfem::varform::FluidVarForm::init(), polyfem::varform::OperatorSplittingVarForm::init(), polyfem::varform::ScalarVarForm::init(), polyfem::varform::ThermoElasticVarForm::init(), and init_child_varform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_child_varform()

void polyfem::varform::VarForm::init_child_varform ( VarForm &  child,
const std::string &  formulation,
const Units &  units,
const json &  args,
const std::string &  out_path 
) const
protected

Definition at line 249 of file VarForm.cpp.

References args, init(), and units.

Referenced by polyfem::varform::NavierStokesFSIVarForm::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_contact_enabled()

virtual bool polyfem::varform::VarForm::is_contact_enabled ( ) const
inlinevirtual

Check if contact is enabled for the variational formulation, for output purposes.

Returns
True if contact is enabled, false otherwise

Reimplemented in polyfem::varform::DifferentiableLinearElasticVarForm, polyfem::varform::DifferentiableNonlinearElasticVarForm, polyfem::varform::DifferentiableScalarVarForm, and polyfem::varform::NonlinearElasticVarForm.

Definition at line 111 of file VarForm.hpp.

Referenced by polyfem::varform::DifferentiableLinearElasticVarForm::is_contact_enabled(), and polyfem::varform::DifferentiableScalarVarForm::is_contact_enabled().

Here is the caller graph for this function:

◆ load_mesh()

virtual void polyfem::varform::VarForm::load_mesh ( const mesh::Mesh &  mesh,
const json &  args 
)
protectedpure virtual

◆ n_boundary_samples()

QuadratureOrders polyfem::varform::VarForm::n_boundary_samples ( const int  discr_order,
const int  discr_orderq,
const int  gdiscr_order 
) const
protected

◆ name()

◆ notify_time_step()

void polyfem::varform::VarForm::notify_time_step ( const int  t,
const int  time_steps,
const double  t0,
const double  dt 
) const
protected

◆ output_field_function()

io::OutputFieldFunction polyfem::varform::VarForm::output_field_function ( const Eigen::MatrixXd &  solution,
const io::OutGeometryData::ExportOptions &  opts 
) const
protected

Definition at line 844 of file VarForm.cpp.

References polyfem::io::OutGeometryData::ExportOptions::fields, and output_fields().

Referenced by polyfem::varform::BilaplacianVarForm::export_data(), polyfem::varform::FluidVarForm::export_data(), polyfem::varform::OperatorSplittingVarForm::export_data(), polyfem::varform::ScalarVarForm::export_data(), polyfem::varform::DifferentiableLinearElasticVarForm::save_vtu(), polyfem::varform::DifferentiableNonlinearElasticVarForm::save_vtu(), and polyfem::varform::DifferentiableScalarVarForm::save_vtu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_fields()

virtual std::vector< io::OutputField > polyfem::varform::VarForm::output_fields ( const io::OutputSample &  sample,
const Eigen::MatrixXd &  solution,
const io::OutputFieldOptions &  options 
) const
pure virtual

Get the output fields of the variational formulation, for output purposes.

Parameters
sampleOutput sample
solutionSolution matrix
optionsOutput field options
Returns
Output fields

Implemented in polyfem::varform::BilaplacianVarForm, polyfem::varform::FluidVarForm, polyfem::varform::IncompressibleElasticVarForm, polyfem::varform::LinearElasticVarForm, polyfem::varform::NavierStokesFSIVarForm, polyfem::varform::NonlinearElasticVarForm, polyfem::varform::OperatorSplittingVarForm, polyfem::varform::ScalarVarForm, and polyfem::varform::ThermoElasticVarForm.

Referenced by output_field_function().

Here is the caller graph for this function:

◆ output_file_index()

int polyfem::varform::VarForm::output_file_index ( const int  t) const
protected

Definition at line 1111 of file VarForm.cpp.

Referenced by polyfem::varform::NavierStokesFSIVarForm::save_fsi_timestep(), and save_step_state().

Here is the caller graph for this function:

◆ output_space()

virtual io::OutputSpace polyfem::varform::VarForm::output_space ( ) const
pure virtual

Get the output space of the variational formulation, for output purposes.

Returns
Output space

Implemented in polyfem::varform::BilaplacianVarForm, polyfem::varform::ElasticVarForm, polyfem::varform::FluidVarForm, polyfem::varform::NonlinearElasticVarForm, polyfem::varform::OperatorSplittingVarForm, and polyfem::varform::ScalarVarForm.

Referenced by ensure_output_sampler().

Here is the caller graph for this function:

◆ output_timings()

const io::OutRuntimeData & polyfem::varform::VarForm::output_timings ( ) const
inline

Get the runtime timings of the variational formulation, for output purposes.

Returns
Runtime timings

Definition at line 128 of file VarForm.hpp.

References timings.

◆ prepare()

void polyfem::varform::VarForm::prepare ( )
protected

Prepare all discretization and assembly data without running a solve.

Definition at line 259 of file VarForm.cpp.

References args, assemble_mass_mat(), assemble_rhs(), build_basis(), polyfem::io::OutStatsData::compute_mesh_stats(), polyfem::log_and_throw_error(), mesh_, prepared_, and stats.

Referenced by polyfem::varform::DifferentiableLinearElasticVarForm::prepare(), polyfem::varform::DifferentiableNonlinearElasticVarForm::prepare(), polyfem::varform::DifferentiableScalarVarForm::prepare(), and solve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ problem_dimension()

int polyfem::varform::VarForm::problem_dimension ( ) const

Get the problem dimension of the variational formulation, for output purposes.

Returns
Problem dimension

Definition at line 854 of file VarForm.cpp.

References mesh_, and problem.

Referenced by export_options().

Here is the caller graph for this function:

◆ rebuild_node_positions()

void polyfem::varform::VarForm::rebuild_node_positions ( const std::vector< basis::ElementBases > &  bases,
const std::vector< int > &  node_ids,
std::vector< RowVectorNd > &  positions 
)
staticprotected

◆ reorder_checkpoint_block()

void polyfem::varform::VarForm::reorder_checkpoint_block ( const io::CheckpointReader &  reader,
const std::string &  name,
const FESpace &  space,
int  block_size,
int  row_offset,
Eigen::MatrixXd &  value 
) const
protected

◆ reset()

◆ resolve_output_path()

◆ restore_checkpoint_integrator()

void polyfem::varform::VarForm::restore_checkpoint_integrator ( const std::shared_ptr< time_integrator::ImplicitTimeIntegrator > &  integrator,
const std::string &  group,
double  dt,
const std::string &  ordering,
const FESpace &  space,
int  block_size 
) const
protected

Definition at line 917 of file VarForm.cpp.

References checkpoint_reader_, checkpoint_reorder_enabled(), polyfem::log_and_throw_error(), and reorder_checkpoint_block().

Referenced by polyfem::varform::NavierStokesFSIVarForm::build_forms(), polyfem::varform::ThermoElasticVarForm::build_forms(), polyfem::varform::LinearElasticVarForm::init_linear_solve(), polyfem::varform::BilaplacianVarForm::solve_transient_linear(), and polyfem::varform::IncompressibleElasticVarForm::solve_transient_linear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_json() [1/2]

void polyfem::varform::VarForm::save_json ( const Eigen::MatrixXd &  solution) const

Save the solution to a JSON file, for output purposes.

Parameters
solution

Definition at line 791 of file VarForm.cpp.

References args, polyfem::logger(), resolve_output_path(), and save_json().

Here is the call graph for this function:

◆ save_json() [2/2]

virtual void polyfem::varform::VarForm::save_json ( const Eigen::MatrixXd &  solution,
std::ostream &  out 
) const
pure virtual

Save the solution to a JSON file, for output purposes.

Parameters
solutionSolution matrix to save
outOutput stream to save the solution

Implemented in polyfem::varform::BilaplacianVarForm, polyfem::varform::ElasticVarForm, polyfem::varform::FluidVarForm, polyfem::varform::IncompressibleElasticVarForm, polyfem::varform::OperatorSplittingVarForm, and polyfem::varform::ScalarVarForm.

Referenced by save_json().

Here is the caller graph for this function:

◆ save_step_state()

void polyfem::varform::VarForm::save_step_state ( const double  t0,
const double  dt,
const int  t,
const Eigen::MatrixXd &  solution,
const time_integrator::ImplicitTimeIntegrator *  time_integrator 
) const
protected

◆ save_subsolve()

void polyfem::varform::VarForm::save_subsolve ( const int  i,
const int  t,
const Eigen::MatrixXd &  solution 
) const
protected

Definition at line 1086 of file VarForm.cpp.

References polyfem::io::OutputSpace::mesh.

Referenced by polyfem::varform::ThermoElasticVarForm::solve_nonlinear_step(), polyfem::varform::NavierStokesFSIVarForm::solve_nonlinear_step(), and polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_tensor_nonlinear().

Here is the caller graph for this function:

◆ save_timestep()

void polyfem::varform::VarForm::save_timestep ( const double  time,
const int  t,
const double  t0,
const double  dt,
const Eigen::MatrixXd &  solution 
) const
protected

◆ save_timestep_to_vtm()

bool polyfem::varform::VarForm::save_timestep_to_vtm ( const double  time,
const int  t,
const double  dt,
const Eigen::MatrixXd &  solution,
paraviewo::VTMWriter &  vtm,
const std::string &  block_prefix 
) const
protected

Definition at line 1063 of file VarForm.cpp.

References polyfem::logger(), and polyfem::io::OutputSpace::mesh.

Referenced by polyfem::varform::NavierStokesFSIVarForm::save_fsi_timestep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_checkpoint()

◆ set_args()

void polyfem::varform::VarForm::set_args ( const json &  args)
inline

Reset the internal state of the variational formulation, e.g.

when loading a new mesh

Parameters
argsjson input arguments, used to determine which data to reset

Definition at line 70 of file VarForm.hpp.

References args, output_sampler_initialized_, and prepared_.

◆ set_checkpoint_reader()

void polyfem::varform::VarForm::set_checkpoint_reader ( const io::CheckpointReader &  reader)
inline

Definition at line 88 of file VarForm.hpp.

References checkpoint_reader_.

◆ set_geometry()

void polyfem::varform::VarForm::set_geometry ( mesh::LoadedGeometry  geometry,
double  loading_mesh_time = 0 
)

Definition at line 236 of file VarForm.cpp.

References args, polyfem::mesh::LoadedGeometry::fem, load_mesh(), polyfem::io::OutRuntimeData::loading_mesh_time, mesh_, polyfem::mesh::LoadedGeometry::obstacle, output_sampler_initialized_, prepared_, set_obstacle(), and timings.

Here is the call graph for this function:

◆ set_materials()

void polyfem::varform::VarForm::set_materials ( assembler::Assembler &  assembler,
const int  size 
) const
protected

Definition at line 806 of file VarForm.cpp.

References args, polyfem::utils::is_param_valid(), mesh_, resources_, polyfem::assembler::Assembler::set_materials(), polyfem::assembler::Assembler::set_size(), and units.

Referenced by polyfem::varform::DifferentiableNonlinearElasticVarForm::init_forms(), polyfem::varform::BilaplacianVarForm::load_mesh(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::FluidVarForm::load_mesh(), polyfem::varform::IncompressibleElasticVarForm::load_mesh(), polyfem::varform::OperatorSplittingVarForm::load_mesh(), and polyfem::varform::ScalarVarForm::load_mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mesh()

void polyfem::varform::VarForm::set_mesh ( std::unique_ptr< mesh::Mesh >  mesh,
const double  loading_mesh_time = 0 
)

Set the mesh for the variational formulation.

Parameters
meshunique pointer to the mesh to use for the formulation

Definition at line 223 of file VarForm.cpp.

References args, load_mesh(), polyfem::io::OutRuntimeData::loading_mesh_time, mesh_, output_sampler_initialized_, prepared_, set_obstacle(), and timings.

Here is the call graph for this function:

◆ set_obstacle()

void polyfem::varform::VarForm::set_obstacle ( mesh::Obstacle &&  obstacle)
protectedvirtual

Reimplemented in polyfem::varform::NonlinearElasticVarForm.

Definition at line 247 of file VarForm.cpp.

Referenced by set_geometry(), and set_mesh().

Here is the caller graph for this function:

◆ set_time_callback()

void polyfem::varform::VarForm::set_time_callback ( const std::function< void(int, int, double, double)> &  callback)
inline

Definition at line 104 of file VarForm.hpp.

References time_callback.

◆ solve()

void polyfem::varform::VarForm::solve ( Eigen::MatrixXd &  sol,
const InitialConditionOverride *  initial_condition_override = nullptr,
const ForwardStepCallback &  post_step = {} 
)

Solve the variational formulation and store the solution in the given matrix.

Parameters
solmatrix to store the solution
initial_condition_overrideOptional initial condition.
post_stepPost simulation step callback.

Definition at line 594 of file VarForm.cpp.

References checkpoint_reader_, deserialize_checkpoint(), prepare(), and solve_problem().

Referenced by polyfem::varform::DifferentiableLinearElasticVarForm::solve(), polyfem::varform::DifferentiableNonlinearElasticVarForm::solve(), and polyfem::varform::DifferentiableScalarVarForm::solve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve_problem()

◆ validate_checkpoint_solution()

void polyfem::varform::VarForm::validate_checkpoint_solution ( const Eigen::MatrixXd &  solution,
int  expected_rows 
) const
protected

◆ write_checkpoint_ordering()

void polyfem::varform::VarForm::write_checkpoint_ordering ( io::CheckpointWriter &  writer,
const std::string &  name,
const FESpace &  space 
) const
protected

Friends And Related Symbol Documentation

◆ polyfem::test::VarFormTestAccess

friend class polyfem::test::VarFormTestAccess
friend

Definition at line 57 of file VarForm.hpp.

Member Data Documentation

◆ args

json polyfem::varform::VarForm::args
protected

Definition at line 263 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_mass_mat(), polyfem::varform::ElasticVarForm::assemble_mass_mat(), polyfem::varform::FluidVarForm::assemble_mass_mat(), polyfem::varform::IncompressibleElasticVarForm::assemble_mass_mat(), polyfem::varform::NavierStokesFSIVarForm::assemble_mass_mat(), polyfem::varform::OperatorSplittingVarForm::assemble_mass_mat(), polyfem::varform::ScalarVarForm::assemble_mass_mat(), polyfem::varform::ThermoElasticVarForm::assemble_mass_mat(), polyfem::varform::NavierStokesFSIVarForm::build_basis(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::ElasticVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::ElasticVarForm::build_elastic_basis(), polyfem::varform::NavierStokesFSIVarForm::build_forms(), polyfem::varform::ThermoElasticVarForm::build_forms(), polyfem::varform::ElasticVarForm::build_rhs_assembler(), polyfem::varform::FluidVarForm::build_rhs_assembler(), polyfem::varform::IncompressibleElasticVarForm::build_rhs_assembler(), polyfem::varform::NavierStokesFSIVarForm::build_rhs_assembler(), polyfem::varform::OperatorSplittingVarForm::build_rhs_assembler(), polyfem::varform::ScalarVarForm::build_rhs_assembler(), polyfem::varform::ThermoElasticVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_stiffness_mat(), polyfem::varform::FluidVarForm::build_stiffness_mat(), polyfem::varform::IncompressibleElasticVarForm::build_stiffness_mat(), polyfem::varform::LinearElasticVarForm::build_stiffness_mat(), polyfem::varform::ThermoElasticVarForm::build_temperature_basis(), polyfem::varform::BilaplacianVarForm::compute_errors(), polyfem::varform::FluidVarForm::compute_errors(), polyfem::varform::IncompressibleElasticVarForm::compute_errors(), polyfem::varform::OperatorSplittingVarForm::compute_errors(), polyfem::varform::ScalarVarForm::compute_errors(), polyfem::varform::ThermoElasticVarForm::compute_errors(), polyfem::varform::ThermoElasticVarForm::elastic_material_args(), polyfem::varform::ElasticVarForm::elastic_output_fields(), ensure_output_sampler(), polyfem::varform::BilaplacianVarForm::export_data(), polyfem::varform::FluidVarForm::export_data(), polyfem::varform::OperatorSplittingVarForm::export_data(), polyfem::varform::ScalarVarForm::export_data(), export_options(), polyfem::varform::DifferentiableLinearElasticVarForm::get_args(), polyfem::varform::DifferentiableNonlinearElasticVarForm::get_args(), polyfem::varform::DifferentiableScalarVarForm::get_args(), polyfem::varform::DifferentiableLinearElasticVarForm::get_args(), polyfem::varform::DifferentiableNonlinearElasticVarForm::get_args(), polyfem::varform::DifferentiableScalarVarForm::get_args(), init(), polyfem::varform::BilaplacianVarForm::init(), polyfem::varform::ElasticVarForm::init(), polyfem::varform::FluidVarForm::init(), polyfem::varform::IncompressibleElasticVarForm::init(), polyfem::varform::NavierStokesFSIVarForm::init(), polyfem::varform::NonlinearElasticVarForm::init(), polyfem::varform::OperatorSplittingVarForm::init(), polyfem::varform::ScalarVarForm::init(), polyfem::varform::ThermoElasticVarForm::init(), init_child_varform(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_forms(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_homogenization_solve(), polyfem::varform::LinearElasticVarForm::init_linear_solve(), polyfem::varform::NonlinearElasticVarForm::is_contact_enabled(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::IncompressibleElasticVarForm::load_mesh(), polyfem::varform::NavierStokesFSIVarForm::load_mesh(), polyfem::varform::NonlinearElasticVarForm::load_mesh(), polyfem::varform::OperatorSplittingVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::varform::NavierStokesFSIVarForm::mesh_material_args(), n_boundary_samples(), polyfem::varform::BilaplacianVarForm::output_fields(), polyfem::varform::NonlinearElasticVarForm::output_fields(), polyfem::varform::ScalarVarForm::output_fields(), polyfem::varform::ThermoElasticVarForm::output_fields(), prepare(), polyfem::varform::ThermoElasticVarForm::read_material_space_ids(), polyfem::varform::NavierStokesFSIVarForm::save_fsi_timestep(), save_json(), polyfem::varform::BilaplacianVarForm::save_json(), polyfem::varform::FluidVarForm::save_json(), polyfem::varform::IncompressibleElasticVarForm::save_json(), polyfem::varform::OperatorSplittingVarForm::save_json(), polyfem::varform::ScalarVarForm::save_json(), save_step_state(), set_args(), set_geometry(), set_materials(), set_mesh(), polyfem::varform::NavierStokesFSIVarForm::solid_varform_args(), polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_homogenization_step(), polyfem::varform::BilaplacianVarForm::solve_linear_system(), polyfem::varform::FluidVarForm::solve_linear_system(), polyfem::varform::IncompressibleElasticVarForm::solve_linear_system(), polyfem::varform::LinearElasticVarForm::solve_linear_system(), polyfem::varform::ThermoElasticVarForm::solve_nonlinear_step(), polyfem::varform::NavierStokesFSIVarForm::solve_nonlinear_step(), polyfem::varform::ThermoElasticVarForm::solve_problem(), polyfem::varform::DifferentiableNonlinearElasticTransientVarForm::solve_problem(), polyfem::varform::BilaplacianVarForm::solve_static_linear(), polyfem::varform::IncompressibleElasticVarForm::solve_static_linear(), polyfem::varform::LinearElasticVarForm::solve_static_linear(), polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_tensor_nonlinear(), polyfem::varform::BilaplacianVarForm::solve_transient_linear(), polyfem::varform::IncompressibleElasticVarForm::solve_transient_linear(), polyfem::varform::LinearElasticVarForm::solve_transient_linear(), polyfem::varform::ThermoElasticVarForm::time_integrator_args(), and polyfem::varform::NavierStokesFSIVarForm::time_integrator_args().

◆ checkpoint_reader_

std::optional<std::reference_wrapper<const io::CheckpointReader> > polyfem::varform::VarForm::checkpoint_reader_
protected

◆ mesh_

std::unique_ptr<mesh::Mesh> polyfem::varform::VarForm::mesh_
protected

Definition at line 273 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::NavierStokesFSIVarForm::build_forms(), polyfem::varform::ThermoElasticVarForm::build_forms(), polyfem::varform::NavierStokesFSIVarForm::build_interface_operators(), polyfem::varform::ElasticVarForm::build_rhs_assembler(), polyfem::varform::FluidVarForm::build_rhs_assembler(), polyfem::varform::IncompressibleElasticVarForm::build_rhs_assembler(), polyfem::varform::NavierStokesFSIVarForm::build_rhs_assembler(), polyfem::varform::OperatorSplittingVarForm::build_rhs_assembler(), polyfem::varform::ScalarVarForm::build_rhs_assembler(), polyfem::varform::ThermoElasticVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_stiffness_mat(), polyfem::varform::FluidVarForm::build_stiffness_mat(), polyfem::varform::IncompressibleElasticVarForm::build_stiffness_mat(), polyfem::varform::LinearElasticVarForm::build_stiffness_mat(), polyfem::varform::BilaplacianVarForm::compute_errors(), polyfem::varform::FluidVarForm::compute_errors(), polyfem::varform::IncompressibleElasticVarForm::compute_errors(), polyfem::varform::OperatorSplittingVarForm::compute_errors(), polyfem::varform::ScalarVarForm::compute_errors(), polyfem::varform::ThermoElasticVarForm::compute_errors(), polyfem::varform::ElasticVarForm::deserialize_checkpoint(), polyfem::varform::FluidVarForm::deserialize_checkpoint(), polyfem::varform::IncompressibleElasticVarForm::deserialize_checkpoint(), polyfem::varform::NavierStokesFSIVarForm::deserialize_checkpoint(), polyfem::varform::OperatorSplittingVarForm::deserialize_checkpoint(), polyfem::varform::ThermoElasticVarForm::deserialize_checkpoint(), polyfem::varform::ElasticVarForm::elastic_boundary_samples(), polyfem::varform::ElasticVarForm::elastic_output_fields(), polyfem::varform::ElasticVarForm::elastic_primitive_to_node(), polyfem::varform::BilaplacianVarForm::export_data(), polyfem::varform::FluidVarForm::export_data(), polyfem::varform::OperatorSplittingVarForm::export_data(), polyfem::varform::ScalarVarForm::export_data(), polyfem::varform::DifferentiableLinearElasticVarForm::get_mesh(), polyfem::varform::DifferentiableNonlinearElasticVarForm::get_mesh(), polyfem::varform::DifferentiableScalarVarForm::get_mesh(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_forms(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_homogenization_solve(), polyfem::varform::LinearElasticVarForm::init_linear_solve(), polyfem::varform::NavierStokesFSIVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::varform::NavierStokesFSIVarForm::mesh_displacement_ndof(), polyfem::varform::DifferentiableLinearElasticVarForm::mutable_mesh(), polyfem::varform::DifferentiableNonlinearElasticVarForm::mutable_mesh(), polyfem::varform::DifferentiableScalarVarForm::mutable_mesh(), n_boundary_samples(), polyfem::varform::BilaplacianVarForm::output_fields(), polyfem::varform::FluidVarForm::output_fields(), polyfem::varform::IncompressibleElasticVarForm::output_fields(), polyfem::varform::NavierStokesFSIVarForm::output_fields(), polyfem::varform::NonlinearElasticVarForm::output_fields(), polyfem::varform::OperatorSplittingVarForm::output_fields(), polyfem::varform::ScalarVarForm::output_fields(), polyfem::varform::ThermoElasticVarForm::output_fields(), polyfem::varform::BilaplacianVarForm::output_space(), polyfem::varform::FluidVarForm::output_space(), polyfem::varform::OperatorSplittingVarForm::output_space(), polyfem::varform::ScalarVarForm::output_space(), prepare(), polyfem::varform::FluidVarForm::primary_ndof(), polyfem::varform::IncompressibleElasticVarForm::primary_ndof(), polyfem::varform::OperatorSplittingVarForm::primary_ndof(), problem_dimension(), reset(), polyfem::varform::BilaplacianVarForm::save_json(), polyfem::varform::FluidVarForm::save_json(), polyfem::varform::IncompressibleElasticVarForm::save_json(), polyfem::varform::OperatorSplittingVarForm::save_json(), polyfem::varform::ScalarVarForm::save_json(), save_step_state(), set_geometry(), set_materials(), set_mesh(), polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_homogenization_step(), polyfem::varform::LinearElasticVarForm::solve_linear_system(), polyfem::varform::ThermoElasticVarForm::solve_problem(), polyfem::varform::BilaplacianVarForm::solve_static_linear(), polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_tensor_nonlinear(), polyfem::varform::BilaplacianVarForm::solve_transient_linear(), and polyfem::varform::IncompressibleElasticVarForm::solve_transient_linear().

◆ output_geometry_

◆ output_index_offset_

int polyfem::varform::VarForm::output_index_offset_ = 0
protected

Definition at line 280 of file VarForm.hpp.

Referenced by deserialize_checkpoint(), and reset().

◆ output_path

◆ output_sampler_initialized_

◆ prepared_

◆ problem

std::shared_ptr<assembler::Problem> polyfem::varform::VarForm::problem
protected

current problem, it contains rhs and bc

Definition at line 261 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_mass_mat(), polyfem::varform::ElasticVarForm::assemble_mass_mat(), polyfem::varform::FluidVarForm::assemble_mass_mat(), polyfem::varform::IncompressibleElasticVarForm::assemble_mass_mat(), polyfem::varform::ScalarVarForm::assemble_mass_mat(), polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::ElasticVarForm::assemble_rhs(), polyfem::varform::FluidVarForm::assemble_rhs(), polyfem::varform::OperatorSplittingVarForm::assemble_rhs(), polyfem::varform::ScalarVarForm::assemble_rhs(), polyfem::varform::ThermoElasticVarForm::assemble_rhs(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_displacement_boundary(), polyfem::varform::ElasticVarForm::build_elastic_basis(), polyfem::varform::ThermoElasticVarForm::build_forms(), polyfem::varform::ElasticVarForm::build_rhs_assembler(), polyfem::varform::FluidVarForm::build_rhs_assembler(), polyfem::varform::IncompressibleElasticVarForm::build_rhs_assembler(), polyfem::varform::OperatorSplittingVarForm::build_rhs_assembler(), polyfem::varform::ScalarVarForm::build_rhs_assembler(), polyfem::varform::ThermoElasticVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::compute_errors(), polyfem::varform::FluidVarForm::compute_errors(), polyfem::varform::IncompressibleElasticVarForm::compute_errors(), polyfem::varform::OperatorSplittingVarForm::compute_errors(), polyfem::varform::ScalarVarForm::compute_errors(), polyfem::varform::ThermoElasticVarForm::compute_errors(), polyfem::varform::ElasticVarForm::elastic_output_fields(), polyfem::varform::BilaplacianVarForm::export_data(), polyfem::varform::FluidVarForm::export_data(), polyfem::varform::OperatorSplittingVarForm::export_data(), polyfem::varform::ScalarVarForm::export_data(), polyfem::varform::DifferentiableLinearElasticVarForm::get_problem(), polyfem::varform::DifferentiableNonlinearElasticVarForm::get_problem(), polyfem::varform::DifferentiableScalarVarForm::get_problem(), polyfem::varform::DifferentiableLinearElasticVarForm::get_problem(), polyfem::varform::DifferentiableNonlinearElasticVarForm::get_problem(), polyfem::varform::DifferentiableScalarVarForm::get_problem(), polyfem::varform::BilaplacianVarForm::init(), polyfem::varform::ElasticVarForm::init(), polyfem::varform::FluidVarForm::init(), polyfem::varform::OperatorSplittingVarForm::init(), polyfem::varform::ScalarVarForm::init(), polyfem::varform::ThermoElasticVarForm::init(), polyfem::varform::LinearElasticVarForm::init_linear_solve(), polyfem::varform::ElasticVarForm::initial_solution(), polyfem::varform::BilaplacianVarForm::load_mesh(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::FluidVarForm::load_mesh(), polyfem::varform::OperatorSplittingVarForm::load_mesh(), polyfem::varform::ScalarVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::varform::BilaplacianVarForm::output_fields(), polyfem::varform::FluidVarForm::output_fields(), polyfem::varform::NonlinearElasticVarForm::output_fields(), polyfem::varform::OperatorSplittingVarForm::output_fields(), polyfem::varform::ScalarVarForm::output_fields(), polyfem::varform::BilaplacianVarForm::prepare_initial_solution(), polyfem::varform::FluidVarForm::prepare_initial_solution(), polyfem::varform::OperatorSplittingVarForm::prepare_initial_solution(), polyfem::varform::ScalarVarForm::prepare_initial_solution(), problem_dimension(), reset(), polyfem::varform::BilaplacianVarForm::save_json(), polyfem::varform::FluidVarForm::save_json(), polyfem::varform::IncompressibleElasticVarForm::save_json(), polyfem::varform::OperatorSplittingVarForm::save_json(), polyfem::varform::ScalarVarForm::save_json(), polyfem::varform::LinearElasticVarForm::solve_linear_system(), polyfem::varform::BilaplacianVarForm::solve_problem(), polyfem::varform::IncompressibleElasticVarForm::solve_problem(), polyfem::varform::LinearElasticVarForm::solve_problem(), polyfem::varform::ThermoElasticVarForm::solve_problem(), polyfem::varform::LinearElasticVarForm::solve_transient_linear(), and polyfem::varform::ThermoElasticVarForm::update_transient_form_weights().

◆ resources_

const io::ResourceIO& polyfem::varform::VarForm::resources_
protected

Definition at line 283 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::ElasticVarForm::assemble_rhs(), polyfem::varform::FluidVarForm::assemble_rhs(), polyfem::varform::OperatorSplittingVarForm::assemble_rhs(), polyfem::varform::ScalarVarForm::assemble_rhs(), polyfem::varform::ThermoElasticVarForm::assemble_rhs(), assign_discr_orders(), polyfem::varform::ElasticVarForm::build_rhs_assembler(), polyfem::varform::FluidVarForm::build_rhs_assembler(), polyfem::varform::IncompressibleElasticVarForm::build_rhs_assembler(), polyfem::varform::NavierStokesFSIVarForm::build_rhs_assembler(), polyfem::varform::OperatorSplittingVarForm::build_rhs_assembler(), polyfem::varform::ScalarVarForm::build_rhs_assembler(), polyfem::varform::ThermoElasticVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::build_rhs_assembler(), polyfem::varform::BilaplacianVarForm::init(), polyfem::varform::ElasticVarForm::init(), polyfem::varform::FluidVarForm::init(), polyfem::varform::NavierStokesFSIVarForm::init(), polyfem::varform::OperatorSplittingVarForm::init(), polyfem::varform::ScalarVarForm::init(), polyfem::varform::ThermoElasticVarForm::init(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_forms(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_homogenization_solve(), polyfem::varform::NavierStokesFSIVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), save_step_state(), and set_materials().

◆ stats

io::OutStatsData polyfem::varform::VarForm::stats
protected

Definition at line 265 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_mass_mat(), polyfem::varform::ElasticVarForm::assemble_mass_mat(), polyfem::varform::FluidVarForm::assemble_mass_mat(), polyfem::varform::IncompressibleElasticVarForm::assemble_mass_mat(), polyfem::varform::ScalarVarForm::assemble_mass_mat(), polyfem::varform::ThermoElasticVarForm::assemble_mass_mat(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::ElasticVarForm::build_elastic_basis(), polyfem::varform::NavierStokesFSIVarForm::build_forms(), polyfem::varform::BilaplacianVarForm::build_stiffness_mat(), polyfem::varform::FluidVarForm::build_stiffness_mat(), polyfem::varform::IncompressibleElasticVarForm::build_stiffness_mat(), polyfem::varform::LinearElasticVarForm::build_stiffness_mat(), polyfem::varform::BilaplacianVarForm::compute_errors(), polyfem::varform::FluidVarForm::compute_errors(), polyfem::varform::IncompressibleElasticVarForm::compute_errors(), polyfem::varform::OperatorSplittingVarForm::compute_errors(), polyfem::varform::ScalarVarForm::compute_errors(), polyfem::varform::ThermoElasticVarForm::compute_errors(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_homogenization_solve(), prepare(), reset(), polyfem::varform::BilaplacianVarForm::save_json(), polyfem::varform::FluidVarForm::save_json(), polyfem::varform::IncompressibleElasticVarForm::save_json(), polyfem::varform::OperatorSplittingVarForm::save_json(), polyfem::varform::ScalarVarForm::save_json(), polyfem::varform::BilaplacianVarForm::solve_linear_system(), polyfem::varform::FluidVarForm::solve_linear_system(), polyfem::varform::IncompressibleElasticVarForm::solve_linear_system(), polyfem::varform::LinearElasticVarForm::solve_linear_system(), polyfem::varform::ThermoElasticVarForm::solve_nonlinear_step(), polyfem::varform::NavierStokesFSIVarForm::solve_nonlinear_step(), polyfem::varform::BilaplacianVarForm::solve_problem(), polyfem::varform::IncompressibleElasticVarForm::solve_problem(), polyfem::varform::LinearElasticVarForm::solve_problem(), polyfem::varform::ThermoElasticVarForm::solve_problem(), polyfem::varform::DifferentiableNonlinearElasticStaticVarForm::solve_problem(), polyfem::varform::DifferentiableNonlinearElasticTransientVarForm::solve_problem(), and polyfem::varform::DifferentiableNonlinearElasticVarForm::solve_tensor_nonlinear().

◆ time_callback

std::function<void(int, int, double, double)> polyfem::varform::VarForm::time_callback
protected

Definition at line 275 of file VarForm.hpp.

Referenced by reset(), and set_time_callback().

◆ timings

io::OutRuntimeData polyfem::varform::VarForm::timings
protected

runtime statistics

Definition at line 268 of file VarForm.hpp.

Referenced by polyfem::varform::BilaplacianVarForm::assemble_mass_mat(), polyfem::varform::ElasticVarForm::assemble_mass_mat(), polyfem::varform::FluidVarForm::assemble_mass_mat(), polyfem::varform::IncompressibleElasticVarForm::assemble_mass_mat(), polyfem::varform::OperatorSplittingVarForm::assemble_mass_mat(), polyfem::varform::ScalarVarForm::assemble_mass_mat(), polyfem::varform::ThermoElasticVarForm::assemble_mass_mat(), polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::ElasticVarForm::assemble_rhs(), polyfem::varform::FluidVarForm::assemble_rhs(), polyfem::varform::OperatorSplittingVarForm::assemble_rhs(), polyfem::varform::ScalarVarForm::assemble_rhs(), polyfem::varform::ThermoElasticVarForm::assemble_rhs(), build_fe_space(), build_polygonal_basis(), polyfem::varform::BilaplacianVarForm::build_stiffness_mat(), polyfem::varform::FluidVarForm::build_stiffness_mat(), polyfem::varform::IncompressibleElasticVarForm::build_stiffness_mat(), polyfem::varform::LinearElasticVarForm::build_stiffness_mat(), output_timings(), reset(), polyfem::varform::BilaplacianVarForm::save_json(), polyfem::varform::FluidVarForm::save_json(), polyfem::varform::IncompressibleElasticVarForm::save_json(), polyfem::varform::OperatorSplittingVarForm::save_json(), polyfem::varform::ScalarVarForm::save_json(), set_geometry(), set_mesh(), polyfem::varform::BilaplacianVarForm::solve_problem(), polyfem::varform::IncompressibleElasticVarForm::solve_problem(), polyfem::varform::LinearElasticVarForm::solve_problem(), polyfem::varform::NavierStokesFSIVarForm::solve_problem(), polyfem::varform::ThermoElasticVarForm::solve_problem(), polyfem::varform::DifferentiableNonlinearElasticStaticVarForm::solve_problem(), and polyfem::varform::DifferentiableNonlinearElasticTransientVarForm::solve_problem().

◆ units


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