app - It4innovations/espreso GitHub Wiki


Applications

The app directory contains application built from the library. Currently the following application are available:

  • espreso - the main application with support of all features
  • mesio - the parallel mesh loader and converter
  • gui - espreso GUI
  • ecfchecker - checker of ecf files (run ecfchecker -d to print the default ecf with all parameters)
  • ecfexport - export of ecf parameters for web-gui

The library contains several internal structures. They have to initialization in the correct order as is described in the example.

#include "esinfo/eslog.h"
#include "esinfo/envinfo.h"
#include "esinfo/mpiinfo.h"
#include "esinfo/systeminfo.h"
#include "esinfo/ecfinfo.h"
#include "esinfo/meshinfo.h"

#include "basis/logging/logger.h"
#include "basis/logging/progresslogger.h"
#include "basis/logging/timelogger.h"
#include "basis/logging/profiler.h"

#include "mesh/mesh.h"
#include "output/output.h"
#include "physics/physicalsolver.h"

using namespace espreso;

int main(int argc, char **argv)
{
	info::system::setSignals();     // signal settings
	info::env::set();               // read environment variables
	info::mpi::init(&argc, &argv);  // initialization of the MPI library
	MPITools::init();               // initialization of structures used during communication

	// initialization of the logger (we need to have initialized MPI)
	eslog::init(new Logger<TimeLogger, ProgressTerminalLogger, ProgressFileLogger>);
	eslog::startln("ESPRESO: STARTED", "ESPRESO");

	// read the configuration file (we need to habe initialized MPI)
	ECF::init(&argc, &argv, "espreso");
	// we can divide process into more instances (now we have readed 'mesh_duplication')
	info::mpi::divide(info::ecf->input.decomposition.mesh_duplication);
	// we can finish initialization of the MPITools (now we have readed 'scalability_limit')
	MPITools::setSubset(info::ecf->input.third_party_scalability_limit);

	// when processes are divided into more instances we can initilize log files and print run info
	eslog::initFiles();
	eslog::printRunInfo(&argc, &argv);

	// mesh pre-processing
	Mesh::init();
	Mesh::load();
	info::mesh->preprocess();
	info::mesh->printMeshStatistics();
	info::mesh->printDecompositionStatistics();
	info::mesh->output->updateMesh();

	if (!Mesh::convertDatabase()) {
		PhysicalSolver::run();
	}

	// delete structures in reverse order
	eslog::endln("ESPRESO: RUN FINISHED");
	Mesh::finish();
	eslog::finish();

	ECF::finish();
	MPITools::finish();
	info::mpi::finish();
	return 0;
}
⚠️ **GitHub.com Fallback** ⚠️