Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
Loading...
Searching...
No Matches
Dynamics.hpp
Go to the documentation of this file.
1
13#pragma once
14
15#include <math.h>
16#include <cmath>
17#include <vector>
18#include <iostream>
19#include <fstream>
20#include <sstream>
21#include <omp.h>
22#include <random>
23#include <algorithm>
24// model setup
25#include "mesh/Mesh.hpp"
26#include "mesh/Face.hpp"
27#include "mesh/Vertex.hpp"
31#include "model/Model.hpp"
32
33// matrix math
35// parameters
36#include "Parameters.hpp"
37
109
110class DynamicModel : public Model
111{
112public:
117 unsigned int randomSeed;
118 std::mt19937 gen;
119 std::normal_distribution<> normal_dist;
120
127 DynamicModel(DynamicMesh &mesh_, Record &record_);
128
142 void next_step();
143};
144
145/*
146//boundary condition
147int get_relatve_pt_periodic(int i, int n, int m);
148void postprocess_ghost_periodic(Param& param, gsl_matrix *verticesOnMesh, std::vector<Vertex>& vertex);
149*/
This file defines the Energy class with scaffold extensions.
This file defines the face class, which is the triangular element defined by vertices.
The Force class defines corresponding force terms type. Note that all the forces are gsl matrices wit...
This file defines gauss quadrature and related functions.
This file defines mesh class containing a vector of vertices and a vector of faces that are required ...
Contains the Model class, which encapsulates a mesh and a record object.
This file defines essential parameters used in continuum membrane as well as membrane dynamics code....
This file defines the Vertex class which includes information of coordinate and forces exerted at a v...
A class representing a dynamic mesh.
Definition Dynamics.hpp:44
void update_vertices_mat_with_vector()
Updates the vertices matrix using the values from the vertices vector.
Matrix mesh2surface
Definition Dynamics.hpp:46
DynamicMesh(Param &srcParam)
Construct a new Dynamic Mesh object. Calls the parent constructor Mesh::Mesh(srcParam).
Matrix matSurface
Definition Dynamics.hpp:49
Matrix matMesh
Definition Dynamics.hpp:48
void assign_mesh2surface()
Assign the mesh2surface member.
void update_vertices_vector_with_mat()
Updates the vertices vector using the values from the vertices matrix.
void postprocess_ghost_periodic()
Post process ghost vertices in case of periodic boundary condition.
Matrix surface2mesh
Definition Dynamics.hpp:47
void setup_flat()
Overloads the setup_flat in superclass Mesh. Add functionality to assign mesh2surface and surface2mes...
int get_relative_pt_periodic(int i, int n, int m)
calculate real point relative to the given ghost point (index(real) - index(given)) in periodic bound...
Definition Dynamics.hpp:111
std::normal_distribution normal_dist
Definition Dynamics.hpp:119
DynamicModel(DynamicMesh &mesh_, Record &record_)
Constructs a new Model object.
DynamicMesh & mesh
Definition Dynamics.hpp:113
double randScaleConst
Definition Dynamics.hpp:115
std::mt19937 gen
Definition Dynamics.hpp:118
void next_step()
This code iterates over all vertices in a mesh and displaces them randomly based on a force term and ...
unsigned int randomSeed
Definition Dynamics.hpp:117
double forceScaleConst
Definition Dynamics.hpp:116
Matrix used in continuum membrane model.
Definition Linear_algebra.hpp:65
A class representing a triangular mesh that defines a limit surface.
Definition Mesh.hpp:54
The Model class encapsulates a Mesh and a Record object.
Definition Model.hpp:94
Bookkeeps simulation data throughout iterations.
Definition Record.hpp:13
Contains simulation parameters and physical constants.
Definition Parameters.hpp:117