Parallel Finite Element - General geometry Ewald-like Method
Part of Continuum-particle Simulation Suite under MICCOM
copss_rigid_particle_system.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2016 Xujun Zhao, Jiyuan Li, Xikai Jiang
2 
3 // This code is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 
8 
9 // This code is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 
15 // You should have received a copy of the GNU General Public
16 // License along with this code; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #pragma once
19 
20 #include "../copss.h"
21 #include "../rigid_particle.h"
22 #include "../particle_mesh.h"
23 
24 using std::cout;
25 using std::endl;
26 using std::string;
27 
28 namespace libMesh{
29 
31 {
32 public:
33 
35 
37 
38  // integrator
39  void run(EquationSystems& equation_systems) override;
40 
41 protected:
42  // override read_particle_info() function in Copss class
43  void read_particle_info () override;
44 
45  // read ggem and ibm info
46  void read_ggem_info () override;
47 
48  // create objects, polymer chains
49  void create_object() override;
50 
51  // attach mesh spring network
53 
54  /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
55  Build MeshSpringNetwork according to the particle's mesh, which will be used to
56  apply the rigid-body constraint force.
57 
58  Note: if the particles use different meshes, or have different sizes,
59  we need to build them for each of particles!
60  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
61  void create_object_mesh() override;
62 
63  // attach object mesh to system
64  void attach_object_mesh(PMLinearImplicitSystem& system) override;
65 
66  // set parameters for equations systems
67  void set_parameters(EquationSystems& equation_systems) override;
68 
69  // // update object due to PBC after check_wall()
70  void update_object() override {};
71 
72  // write object to object file
73  void write_object(unsigned int step_id) override;
74 
75 
76 
77 
78 private:
79 
80  std::string particle_mesh_type;
81 
82  std::vector<std::string> particle_mesh_file;
83 
84  std::vector<Real> surface_constraint;
85 
86  std::vector<Real> hsize_solid;
87 
88  Real ibm_beta; // beta to calcualte GGEM-IBM ksi
89 
90  Real hmins; // surface mesh hmin
91 
92  Real hmaxs;
93 
94  ParticleMesh<3>* particle_mesh;
95 
96  std::vector<MeshSpringNetwork*> mesh_spring_network;
97 
98  std::size_t num_rigid_particles;
99 
100 
101 };
102 
103 
104 }
Definition: copss_init.h:32
void create_object_mesh() override
Definition: copss_rigid_particle_system.C:132
void create_object() override
Definition: copss_rigid_particle_system.C:68
void read_ggem_info() override
Definition: copss_rigid_particle_system.C:43
void update_object() override
Definition: copss_rigid_particle_system.h:70
void set_parameters(EquationSystems &equation_systems) override
Definition: copss_rigid_particle_system.C:175
Definition: brownian_system.h:58
void run(EquationSystems &equation_systems) override
Definition: copss_rigid_particle_system.C:219
void attach_mesh_spring_network()
Definition: copss_rigid_particle_system.C:117
Definition: copss.h:80
void write_object(unsigned int step_id) override
Definition: copss_rigid_particle_system.C:208
void attach_object_mesh(PMLinearImplicitSystem &system) override
Definition: copss_rigid_particle_system.C:168
Definition: copss_rigid_particle_system.h:30
Definition: pm_linear_implicit_system.h:52
void read_particle_info() override
Definition: copss_rigid_particle_system.C:56
~CopssRigidParticleSystem()
Definition: copss_rigid_particle_system.C:16
CopssRigidParticleSystem(CopssInit &init)
Definition: copss_rigid_particle_system.C:10