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

Method initializeOperatorState

ibtk/src/solvers/impls/CCLaplaceOperator.cpp:168–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166} // apply
167
168void
169CCLaplaceOperator::initializeOperatorState(const SAMRAIVectorReal<NDIM, double>& in,
170 const SAMRAIVectorReal<NDIM, double>& out)
171{
172 IBTK_TIMER_START(t_initialize_operator_state);
173
174 // Deallocate the operator state if the operator is already initialized.
175 if (d_is_initialized) deallocateOperatorState();
176
177 // Setup operator state.
178 d_hierarchy = in.getPatchHierarchy();
179 d_coarsest_ln = in.getCoarsestLevelNumber();
180 d_finest_ln = in.getFinestLevelNumber();
181
182 d_ncomp = in.getNumberOfComponents();
183
184#if !defined(NDEBUG)
185 TBOX_ASSERT(d_hierarchy == out.getPatchHierarchy());
186 TBOX_ASSERT(d_coarsest_ln == out.getCoarsestLevelNumber());
187 TBOX_ASSERT(d_finest_ln == out.getFinestLevelNumber());
188 TBOX_ASSERT(d_ncomp == out.getNumberOfComponents());
189#endif
190
191 if (!d_hier_math_ops_external)
192 {
193 d_hier_math_ops =
194 new HierarchyMathOps(d_object_name + "::HierarchyMathOps", d_hierarchy, d_coarsest_ln, d_finest_ln);
195 }
196 else
197 {
198#if !defined(NDEBUG)
199 TBOX_ASSERT(d_hier_math_ops);
200#endif
201 }
202
203 // Setup the interpolation transaction information.
204 d_fill_pattern = nullptr;
205 if (d_poisson_spec.dIsConstant())
206 {
207 d_fill_pattern = new CellNoCornersFillPattern(CELLG, /*overwrite_interior*/ false);
208 }
209 using InterpolationTransactionComponent = HierarchyGhostCellInterpolation::InterpolationTransactionComponent;
210 d_transaction_comps.clear();
211 for (int comp = 0; comp < d_ncomp; ++comp)
212 {
213 InterpolationTransactionComponent component(in.getComponentDescriptorIndex(comp),
214 d_data_refine_type,
215 d_use_cf_interpolation,
216 d_data_coarsen_type,
217 d_bdry_extrap_type,
218 d_use_consistent_type_2_bdry,
219 d_bc_coefs,
220 d_fill_pattern);
221 d_transaction_comps.push_back(component);
222 }
223
224 // Initialize the interpolation operators.
225 d_hier_bdry_fill = new HierarchyGhostCellInterpolation();

Callers 15

computeResidualMethod · 0.45
computeResidualMethod · 0.45
initializeSolverStateMethod · 0.45
computeResidualMethod · 0.45
initializeSolverStateMethod · 0.45
initializeSolverStateMethod · 0.45
computeResidualMethod · 0.45
initializeSolverStateMethod · 0.45
computeResidualMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 5

getPatchHierarchyMethod · 0.45
getFinestLevelNumberMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected