40 #include "meshes/fish_mesh.h" 44 using namespace oomph;
70 template<
class ELEMENT>
93 return dynamic_cast<RefineableFishMesh<ELEMENT>*
>(Problem::mesh_pt());
98 void doc_solution(DocInfo& doc_info);
110 template<
class ELEMENT>
116 Problem::mesh_pt()=
new RefineableFishMesh<ELEMENT>;
119 mesh_pt()->spatial_error_estimator_pt()=
new Z2ErrorEstimator;
125 unsigned num_bound = mesh_pt()->nboundary();
127 for(
unsigned ibound=0;ibound<num_bound;ibound++)
129 unsigned num_nod= mesh_pt()->nboundary_node(ibound);
130 for (
unsigned inod=0;inod<num_nod;inod++)
133 mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
137 mesh_pt()->boundary_node_pt(ibound,inod)->set_value(0,0.0);
142 unsigned n_element = mesh_pt()->nelement();
143 for(
unsigned i=0;i<n_element;i++)
146 ELEMENT *el_pt =
dynamic_cast<ELEMENT*
>(mesh_pt()->element_pt(i));
153 cout <<
"Number of equations: " << assign_eqn_numbers() << std::endl;
163 template<
class ELEMENT>
175 sprintf(filename,
"%s/soln%i.dat",doc_info.directory().c_str(),
177 some_file.open(filename);
178 mesh_pt()->output(some_file,npts);
205 doc_info.set_directory(
"RESLT");
213 problem.
mesh_pt()->doc_adaptivity_targets(cout);
219 problem.newton_solve();
230 unsigned n_uniform=3;
231 for (
unsigned isolve=0;isolve<n_uniform;isolve++)
235 problem.refine_uniformly();
238 problem.newton_solve();
252 unsigned max_solve=4;
253 for (
unsigned isolve=0;isolve<max_solve;isolve++)
259 if ((problem.
mesh_pt()->nrefined() !=0)||
260 (problem.
mesh_pt()->nunrefined()!=0))
262 problem.newton_solve();
266 cout <<
"Mesh wasn't adapted --> we'll stop here" << std::endl;
void actions_after_newton_solve()
Update the problem specs after solve (empty)
double Strength
Strength of source function: default value -1.0.
RefineableFishPoissonProblem()
Constructor.
virtual ~RefineableFishPoissonProblem()
Destructor: Empty.
void get_source(const Vector< double > &x, double &source)
Const source function.
void actions_before_newton_solve()
Update the problem specs before solve (empty)
void solve_with_incremental_adaptation()
void doc_solution(DocInfo &doc_info)
Doc the solution. Output directory and labels are specified by DocInfo object.
Namespace for const source term in Poisson equation.
RefineableFishMesh< ELEMENT > * mesh_pt()
Overloaded version of the problem's access function to the mesh. Recasts the pointer to the base Mesh...