Skip to content

File finite_element_external_force.h

File List > constitution > finite_element_external_force.h

Go to the documentation of this file

#pragma once
#include <uipc/common/type_define.h>
#include <uipc/constitution/constitution.h>
#include <uipc/geometry/simplicial_complex.h>

namespace uipc::constitution
{
class UIPC_CONSTITUTION_API FiniteElementExternalForce final : public IConstitution
{
    using Base = IConstitution;

  public:
    FiniteElementExternalForce(const Json& config = default_config());
    ~FiniteElementExternalForce();

    void apply_to(geometry::SimplicialComplex& sc, const Vector3& force);

    static Json default_config();

  protected:
    virtual U64 get_uid() const noexcept override;

  private:
    Json m_config;
};
}  // namespace uipc::constitution