MCPcopy Create free account
hub / github.com/IBAMR/IBAMR / ConstraintIBMethod

Method ConstraintIBMethod

src/IB/ConstraintIBMethod.cpp:201–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199/////////////////////////////// PUBLIC ///////////////////////////////////////
200
201ConstraintIBMethod::ConstraintIBMethod(std::string object_name,
202 Pointer<Database> input_db,
203 const int no_structures,
204 bool register_for_restart)
205 : IBMethod(std::move(object_name), input_db, register_for_restart),
206 d_no_structures(no_structures),
207 d_ib_kinematics(d_no_structures, Pointer<ConstraintIBKinematics>(nullptr)),
208 d_vol_element(d_no_structures, 0.0),
209 d_vol_element_is_set(d_no_structures, false),
210 d_structure_vol(d_no_structures, 0.0),
211 d_structure_mom(d_no_structures, std::vector<double>(3, 0.0)),
212 d_structure_rotational_mom(d_no_structures, std::vector<double>(3, 0.0)),
213 d_rigid_trans_vel_current(d_no_structures, std::vector<double>(3, 0.0)),
214 d_rigid_trans_vel_new(d_no_structures, std::vector<double>(3, 0.0)),
215 d_rigid_rot_vel_current(d_no_structures, std::vector<double>(3, 0.0)),
216 d_rigid_rot_vel_new(d_no_structures, std::vector<double>(3, 0.0)),
217 d_incremented_angle_from_reference_axis(d_no_structures, std::vector<double>(3, 0.0)),
218 d_vel_com_def_current(d_no_structures, std::vector<double>(3, 0.0)),
219 d_vel_com_def_new(d_no_structures, std::vector<double>(3, 0.0)),
220 d_omega_com_def_current(d_no_structures, std::vector<double>(3, 0.0)),
221 d_omega_com_def_new(d_no_structures, std::vector<double>(3, 0.0)),
222 d_center_of_mass_current(d_no_structures, std::vector<double>(3, 0.0)),
223 d_center_of_mass_new(d_no_structures, std::vector<double>(3, 0.0)),
224 d_center_of_mass_unshifted_current(d_no_structures, std::vector<double>(3, 0.0)),
225 d_center_of_mass_unshifted_new(d_no_structures, std::vector<double>(3, 0.0)),
226 d_moment_of_inertia_current(d_no_structures, Eigen::Matrix3d::Zero()),
227 d_moment_of_inertia_new(d_no_structures, Eigen::Matrix3d::Zero()),
228 d_tagged_pt_lag_idx(d_no_structures, 0),
229 d_tagged_pt_position(d_no_structures, std::vector<double>(3, 0.0)),
230 d_rho_solid(d_no_structures, std::numeric_limits<double>::quiet_NaN())
231{
232 // NOTE: Parent class constructor registers class with the restart manager,
233 // sets object name.
234
235 // Initialize object with data read from the input and restart databases.
236 bool from_restart = RestartManager::getManager()->isFromRestart();
237 if (from_restart) getFromRestart();
238 if (!input_db.isNull()) getFromInput(input_db, from_restart);
239
240 // Setup the cell centered Poisson Solver needed for projection.
241 if (d_needs_div_free_projection)
242 {
243 const std::string velcorrection_projection_prefix = "cIB_";
244 // Setup the various solver components.
245 for (int d = 0; d < NDIM; ++d)
246 {
247 d_velcorrection_projection_bc_coef.setBoundarySlope(2 * d, 0.0);
248 d_velcorrection_projection_bc_coef.setBoundarySlope(2 * d + 1, 0.0);
249 }
250
251 d_velcorrection_projection_spec.reset(
252 new PoissonSpecifications(d_object_name + "::ConstraintIBMethodProjection::Spec"));
253 d_velcorrection_projection_op =
254 new CCLaplaceOperator(d_object_name + "ConstraintIBMethodProjection::PoissonOperator",
255 /*input_db*/ nullptr,
256 /*homogeneous_bc*/ true);
257 d_velcorrection_projection_op->setPoissonSpecifications(*d_velcorrection_projection_spec);
258 d_velcorrection_projection_op->setPhysicalBcCoef(&d_velcorrection_projection_bc_coef);

Callers

nothing calls this directly

Calls 14

isFromRestartMethod · 0.80
isNullMethod · 0.80
resetMethod · 0.45
setPhysicalBcCoefMethod · 0.45
setOperatorMethod · 0.45
setPreconditionerMethod · 0.45
setKSPTypeMethod · 0.45
setAbsoluteToleranceMethod · 0.45
setRelativeToleranceMethod · 0.45
setMaxIterationsMethod · 0.45

Tested by

no test coverage detected