Skip to content
Snippets Groups Projects
Commit d2d59429 authored by Matouš Fencl's avatar Matouš Fencl Committed by Tomáš Oberhuber
Browse files

Change of int to IndexType and preparations for OpenMPI.

parent 3f05fea7
No related branches found
No related tags found
1 merge request!27Hamilton jacobi
......@@ -25,6 +25,8 @@
#include <solvers/pde/tnlLinearSystemAssembler.h>
#include <functions/tnlMeshFunction.h>
#include <TNL/Meshes/DistributedMeshes/DistributedGridIO.h>
template< typename Mesh,
typename DifferentialOperator,
typename BoundaryCondition,
......
......@@ -121,13 +121,25 @@ setInitialCondition( const Config::ParameterContainer& parameters,
DofVectorType& dofs,
MeshDependentDataType& meshDependentData )
{
this->bindDofs( mesh, dofs );
const String& initialConditionFile = parameters.getParameter< String >( "initial-condition" );
if( ! this->solution.boundLoad( initialConditionFile ) )
{
std::cerr << "I am not able to load the initial condition from the file " << initialConditionFile << "." <<std::endl;
this->bindDofs( mesh, dofs );
const String& initialConditionFile = parameters.getParameter< String >( "initial-condition" );
if(CommunicatorType::isDistributed())
{
std::cout<<"Nodes Distribution: " << uPointer->getMesh().getDistributedMesh()->printProcessDistr() << std::endl;
if(distributedIOType==Meshes::DistributedMeshes::MpiIO)
Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::MpiIO> ::load(initialConditionFile, *uPointer );
if(distributedIOType==Meshes::DistributedMeshes::LocalCopy)
Meshes::DistributedMeshes::DistributedGridIO<MeshFunctionType,Meshes::DistributedMeshes::LocalCopy> ::load(initialConditionFile, *uPointer );
uPointer->template synchronize<CommunicatorType>();
}
else
{
if( ! this->solution.boundLoad( initialConditionFile ) )
{
std::cerr << "I am not able to load the initial condition from the file " << initialConditionFile << "." <<std::endl;
return false;
}
}
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment