Skip to content
Snippets Groups Projects
Commit e4ef3df6 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Changing the interface for the right hand side of the PDE solvers.

parent de4c99d8
No related branches found
No related tags found
No related merge requests found
TODO: napsat FunctionDiscretizer pro jednotne rozhrani RightHandSide
TODO: doladit vse s CUDA TODO: doladit vse s CUDA
TODO: doplnit mesh travelsals pro jine mesh entity nez cell TODO: doplnit mesh travelsals pro jine mesh entity nez cell
TODO: implementovat tnlProblem
TODO: implementace maticovych resicu TODO: implementace maticovych resicu
* Gaussova eliminace * Gaussova eliminace
* SOR metoda * SOR metoda
......
...@@ -27,11 +27,9 @@ dist: $(DIST) ...@@ -27,11 +27,9 @@ dist: $(DIST)
install: $(TARGET) install: $(TARGET)
cp $(TARGET) $(INSTALL_DIR)/bin cp $(TARGET) $(INSTALL_DIR)/bin
cp $(CONFIG_FILE) $(INSTALL_DIR)/share/tnl-0.1/examples/heat-equation
uninstall: $(TARGET) uninstall: $(TARGET)
rm -f $(INSTALL_DIR)/bin/$(TARGET) rm -f $(INSTALL_DIR)/bin/$(TARGET)
rm -f $(CONFIG_FILE) $(INSTALL_DIR)/share/tnl-0.1/examples/heat-equation
$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
$(CXX) -o $(TARGET) $(OBJECTS) $(LD_FLAGS) $(CXX) -o $(TARGET) $(OBJECTS) $(LD_FLAGS)
......
...@@ -116,7 +116,8 @@ class tnlExplicitUpdater ...@@ -116,7 +116,8 @@ class tnlExplicitUpdater
index, index,
userData.u, userData.u,
userData.time ); userData.time );
userData.fu[ index ] += userData.rightHandSide.getValue( mesh.getEntityCenter< EntityDimensions >( index ), userData.fu[ index ] += userData.rightHandSide.getValue( mesh,
index,
userData.time ); userData.time );
} }
...@@ -201,12 +202,14 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >, ...@@ -201,12 +202,14 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >,
const CoordinatesType& coordinates ) const CoordinatesType& coordinates )
{ {
userData.fu[ index ] = userData.differentialOperator.getValue( mesh, userData.fu[ index ] = userData.differentialOperator.getValue( mesh,
index, index,
coordinates, coordinates,
userData.u, userData.u,
userData.time ); userData.time );
userData.fu[ index ] += userData.rightHandSide.getValue( mesh.template getCellCenter< VertexType >( coordinates ), userData.fu[ index ] += userData.rightHandSide.getValue( mesh,
index,
coordinates,
userData.time ); userData.time );
} }
......
...@@ -151,7 +151,8 @@ class tnlLinearSystemAssembler ...@@ -151,7 +151,8 @@ class tnlLinearSystemAssembler
const IndexType index ) const IndexType index )
{ {
userData.b[ index ] = userData.u[ index ] + userData.b[ index ] = userData.u[ index ] +
userData.tau * userData.rightHandSide.getValue( mesh.getEntityCenter< EntityDimensions >( index ), userData.tau * userData.rightHandSide.getValue( mesh,
index,
userData.time ); userData.time );
typename MatrixType::IndexType rowLength; typename MatrixType::IndexType rowLength;
userData.differentialOperator.updateLinearSystem( userData.time, userData.differentialOperator.updateLinearSystem( userData.time,
...@@ -258,7 +259,9 @@ class tnlLinearSystemAssembler< tnlGrid< Dimensions, Real, Device, Index >, ...@@ -258,7 +259,9 @@ class tnlLinearSystemAssembler< tnlGrid< Dimensions, Real, Device, Index >,
{ {
typedef typename MeshType::VertexType VertexType; typedef typename MeshType::VertexType VertexType;
userData.b[ index ] = userData.u[ index ] + userData.b[ index ] = userData.u[ index ] +
userData.tau * userData.rightHandSide.template getValue< VertexType >( mesh.template getCellCenter< VertexType >( index ), userData.tau * userData.rightHandSide.template getValue< VertexType >( mesh,
index,
coordinates,
userData.time ); userData.time );
typename MatrixType::IndexType rowLength; typename MatrixType::IndexType rowLength;
userData.differentialOperator.updateLinearSystem( userData.time, userData.differentialOperator.updateLinearSystem( userData.time,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment