39 #include "meshes/fish_mesh.h" 43 using namespace oomph;
70 template<
class ELEMENT>
93 return dynamic_cast<FishMesh<ELEMENT>*
>(Problem::mesh_pt());
98 void doc_solution(DocInfo& doc_info);
110 template<
class ELEMENT>
116 Problem::mesh_pt()=
new FishMesh<ELEMENT>;
122 unsigned n_bound = mesh_pt()->nboundary();
123 for(
unsigned i=0;i<n_bound;i++)
125 unsigned n_node = mesh_pt()->nboundary_node(i);
126 for (
unsigned n=0;n<n_node;n++)
129 mesh_pt()->boundary_node_pt(i,n)->pin(0);
133 mesh_pt()->boundary_node_pt(i,n)->set_value(0,0.0);
138 unsigned n_element = mesh_pt()->nelement();
139 for(
unsigned e=0;e<n_element;e++)
142 ELEMENT *el_pt =
dynamic_cast<ELEMENT*
>(mesh_pt()->element_pt(e));
149 cout <<
"Number of equations: " << assign_eqn_numbers() << std::endl;
159 template<
class ELEMENT>
172 sprintf(filename,
"%s/soln%i.dat",doc_info.directory().c_str(),
174 some_file.open(filename);
175 mesh_pt()->output(some_file,npts);
179 sprintf(filename,
"%s/soln_nodes%i.dat",doc_info.directory().c_str(),
181 some_file.open(filename);
182 mesh_pt()->output(some_file,4);
186 sprintf(filename,
"%s/soln_fine%i.dat",doc_info.directory().c_str(),
188 some_file.open(filename);
189 mesh_pt()->output(some_file,20*npts);
194 sprintf(filename,
"%s/boundaries%i.dat",doc_info.directory().c_str(),
196 some_file.open(filename);
197 mesh_pt()->output_boundaries(some_file);
225 doc_info.set_directory(
"RESLT");
236 problem.newton_solve();
void source_function(const Vector< double > &x, double &source)
Const source function.
double Strength
Strength of source function: default value -1.0.
void actions_after_newton_solve()
Update the problem specs after solve (empty)
virtual ~FishPoissonProblem()
Destructor: Empty.
FishMesh< ELEMENT > * mesh_pt()
Overloaded version of the problem's access function to the mesh. Recasts the pointer to the base Mesh...
void doc_solution(DocInfo &doc_info)
Doc the solution. Output directory and labels are specified by DocInfo object.
FishPoissonProblem()
Constructor.
void actions_before_newton_solve()
Update the problem specs before solve (empty)
Namespace for const source term in Poisson equation.